/* =========================================
   SISTEMA DE DISEÑO PREMIUM "WOW" (DARK MODE)
   ========================================= */
:root {
    --bg-dark: #050914;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.08);
    --primary: #007BFF;
    --accent: #FF6B00;
    --accent-glow: rgba(255, 107, 0, 0.5);
    --text-main: #FFFFFF;
    --text-muted: #94A3B8;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg-dark); color: var(--text-main); overflow-x: hidden; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; border-radius: 20px; display: block; object-fit: cover; }

/* Luces de Fondo (Glows) */
.glow-1 { position: absolute; top: -10%; left: -10%; width: 500px; height: 500px; background: radial-gradient(circle, rgba(0,123,255,0.15) 0%, transparent 70%); z-index: 0; pointer-events: none; }
.glow-2 { position: absolute; bottom: 20%; right: -10%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(255,107,0,0.1) 0%, transparent 70%); z-index: 0; pointer-events: none; }

/* Header Flotante */
header { position: fixed; width: 100%; top: 0; z-index: 1000; padding: 20px 0; transition: var(--transition); }
header.scrolled { background: rgba(5, 9, 20, 0.8); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border-glass); padding: 15px 0; }
.nav-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }
.logo { font-size: 1.8rem; font-weight: 900; color: white; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 40px; align-items: center; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 0.95rem; transition: var(--transition); }
.nav-links a:hover { color: white; }
.lang-switch { background: var(--bg-card); border: 1px solid var(--border-glass); color: white; padding: 8px 16px; border-radius: 30px; cursor: pointer; font-weight: 600; transition: var(--transition); }
.lang-switch:hover { background: var(--border-glass); }

/* Hero Section */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 120px 20px 80px; overflow: hidden; }
.hero-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; position: relative; z-index: 2; }
.hero-text h1 { font-size: 4.5rem; font-weight: 900; line-height: 1.1; letter-spacing: -2px; margin-bottom: 25px; }
.hero-text h1 span { background: linear-gradient(90deg, #FF6B00, #FF8C00); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-text p { color: var(--text-muted); font-size: 1.2rem; margin-bottom: 40px; max-width: 500px; }
.hero-image { position: relative; }
.hero-image img { border-radius: 30px; box-shadow: 0 0 80px rgba(0,123,255,0.2); border: 1px solid var(--border-glass); transform: perspective(1000px) rotateY(-5deg); transition: var(--transition); }
.hero-image img:hover { transform: perspective(1000px) rotateY(0deg) translateY(-10px); }

/* Botones Premium */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 16px 36px; border-radius: 50px; font-weight: 600; transition: var(--transition); cursor: pointer; border: none; font-size: 1rem; gap: 10px; }
.btn-primary { background: var(--accent); color: white; box-shadow: 0 0 20px var(--accent-glow); }
.btn-primary:hover { background: #FF8C00; transform: translateY(-3px); box-shadow: 0 0 30px var(--accent-glow); }
.btn-secondary { background: var(--bg-card); color: white; border: 1px solid var(--border-glass); backdrop-filter: blur(10px); }
.btn-secondary:hover { background: rgba(255,255,255,0.08); transform: translateY(-3px); }

/* Sección de Apps (Cristal) */
.apps-section { position: relative; padding: 120px 20px; z-index: 2; }
.section-header { text-align: center; margin-bottom: 80px; }
.section-title { font-size: 3rem; font-weight: 800; margin-bottom: 15px; letter-spacing: -1px; }
.section-subtitle { color: var(--text-muted); font-size: 1.2rem; }

.app-card {
    background: var(--bg-card); border: 1px solid var(--border-glass); border-radius: 30px;
    padding: 60px 80px; max-width: 1400px; margin: 0 auto 80px;
    display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 80px;
    align-items: center; backdrop-filter: blur(20px); transition: var(--transition);
}
.app-card:hover { border-color: rgba(255,255,255,0.2); box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
.app-card.reverse { direction: rtl; grid-template-columns: 1.2fr 0.8fr; }
.app-card.reverse > * { direction: ltr; }

.app-content h2 { font-size: 2.5rem; margin-bottom: 20px; font-weight: 800; color: white; }
.app-content p { color: var(--text-muted); font-size: 1.15rem; margin-bottom: 35px; line-height: 1.7; }

.app-features { margin-bottom: 40px; list-style: none; }
.app-features li { margin-bottom: 22px; font-size: 1.05rem; color: #E2E8F0; line-height: 1.7; position: relative; padding-left: 45px; }
.app-features i { position: absolute; left: 0; top: 4px; color: var(--accent); background: rgba(255,107,0,0.1); width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.8rem; }
.app-features strong { color: white; font-weight: 700; margin-right: 5px; }

/* =========================================
   GALERÍA CON MARCO DE IPHONE Y MINIATURAS EN GRID
   ========================================= */
.app-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-main {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 320 / 693;
    margin: 0 auto 25px;
    border-radius: 40px;
    border: 8px solid #1a1a1a;
    box-shadow:
            0 0 0 2px #333,
            0 20px 60px rgba(0, 0, 0, 0.8),
            0 0 50px rgba(255, 107, 0, 0.15);
    overflow: hidden;
    position: relative;
    background: #000;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    border-radius: 32px;
    transition: transform 0.4s ease;
}

.gallery-main:hover img {
    transform: scale(1.02);
}

/* Notch del iPhone */
.gallery-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 24px;
    background-color: #1a1a1a;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 10;
    pointer-events: none;
}

/* Home bar del iPhone */
.gallery-main::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    z-index: 10;
    pointer-events: none;
}

/* ✅ MINIATURAS EN GRID DE 3 COLUMNAS */
.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.gallery-thumb {
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    opacity: 0.6;
    background: #0a192f;
}

.gallery-thumb:hover {
    opacity: 1;
    transform: translateY(-3px);
    border-color: var(--accent);
}

.gallery-thumb.active {
    border-color: var(--accent);
    opacity: 1;
    box-shadow: 0 0 15px var(--accent-glow);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    border-radius: 10px;
}

/* Testimonios */
.testimonials-section { padding: 120px 20px; position: relative; z-index: 2; }
.testimonial-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.testimonial-card { background: var(--bg-card); border: 1px solid var(--border-glass); padding: 40px; border-radius: 24px; backdrop-filter: blur(10px); transition: var(--transition); }
.testimonial-card:hover { transform: translateY(-10px); border-color: rgba(255,255,255,0.15); }
.testimonial-card p { font-style: italic; color: #E2E8F0; margin-bottom: 25px; font-size: 1.05rem; }
.author-info h4 { color: white; font-size: 1rem; }
.author-info span { color: var(--text-muted); font-size: 0.85rem; }

/* Formulario Premium */
.contact-section { padding: 120px 20px; position: relative; z-index: 2; }
.contact-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.contact-info h2 { font-size: 3rem; font-weight: 800; margin-bottom: 20px; letter-spacing: -1px; }
.contact-info p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 40px; }
.contact-item { display: flex; align-items: center; gap: 20px; margin-bottom: 25px; font-size: 1.1rem; color: #E2E8F0; }
.contact-item i { color: var(--accent); font-size: 1.5rem; background: rgba(255,107,0,0.1); padding: 15px; border-radius: 15px; }

.form-box { background: var(--bg-card); padding: 50px; border-radius: 30px; border: 1px solid var(--border-glass); backdrop-filter: blur(20px); }
.form-group { margin-bottom: 25px; }
.form-group label { display: block; margin-bottom: 10px; font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.form-group input, .form-group textarea { width: 100%; padding: 16px; border-radius: 12px; border: 1px solid var(--border-glass); background: rgba(0,0,0,0.3); color: white; font-family: inherit; font-size: 1rem; transition: var(--transition); }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 15px rgba(255,107,0,0.1); }

/* Captcha Container */
.captcha-container { margin-bottom: 25px; display: flex; justify-content: center; }

/* Alertas */
.alert { padding: 15px; border-radius: 12px; margin-bottom: 25px; display: none; font-weight: 500; }
.alert-success { background: rgba(40,167,69,0.1); color: #2ecc71; border: 1px solid rgba(40,167,69,0.3); display: block; }
.alert-error { background: rgba(220,53,69,0.1); color: #ff6b6b; border: 1px solid rgba(220,53,69,0.3); display: block; }

/* Footer */
footer { background: rgba(5, 9, 20, 0.95); border-top: 1px solid var(--border-glass); padding: 60px 20px 30px; position: relative; z-index: 2; }
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: white; margin-bottom: 20px; font-size: 1.1rem; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: var(--text-muted); transition: 0.3s; }
.footer-col ul li a:hover { color: white; }
.footer-social { display: flex; gap: 15px; margin-top: 15px; }
.footer-social a { color: var(--text-muted); font-size: 1.2rem; transition: 0.3s; }
.footer-social a:hover { color: var(--accent); }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 20px; border-top: 1px solid var(--border-glass); text-align: center; color: var(--text-muted); font-size: 0.9rem; }

/* =========================================
   ESTILOS DE TOM SELECT (Buscador de Países)
   ========================================= */
.ts-wrapper.single .ts-control {
    background-color: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    color: white !important;
    font-size: 1rem !important;
    box-shadow: none !important;
}
.ts-wrapper.single.focus .ts-control {
    border-color: var(--accent) !important;
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.1) !important;
}
.ts-wrapper.single .ts-control .item {
    color: white !important;
}
.ts-wrapper.single .ts-control::after {
    border-color: white transparent transparent transparent !important;
}
.ts-control input {
    color: white !important;
    font-size: 1rem !important;
}
.ts-control input::placeholder {
    color: var(--text-muted) !important;
}
.ts-dropdown {
    background-color: #0A192F !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 12px !important;
    color: white !important;
    margin-top: 5px !important;
}
.ts-dropdown .option {
    color: #E2E8F0 !important;
    padding: 10px 16px !important;
}
.ts-dropdown .option:hover, .ts-dropdown .option.active {
    background-color: var(--accent) !important;
    color: white !important;
}
.ts-dropdown .option.selected {
    background-color: rgba(255, 107, 0, 0.2) !important;
    color: white !important;
}
.ts-dropdown-content {
    max-height: 300px !important;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-grid, .app-card, .contact-grid { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .app-card.reverse { direction: ltr; }
    .app-card { padding: 40px 30px; }
    .hero-text h1 { font-size: 3rem; }
    .hero-text p { margin: 0 auto 40px; }
    .nav-links { display: none; }
    .contact-item { justify-content: center; }
    .hero-image img { transform: none; }
    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .footer-social { justify-content: center; }
    .app-features li { text-align: left; padding-left: 40px; }
    .app-features i { left: 0; }

    /* Ajuste de la galería en móvil */
    .gallery-main {
        max-width: 280px;
    }
    .gallery-thumbs {
        max-width: 280px;
        gap: 10px;
    }
}