/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    color: #1a1a1a;
    background: #fff;
    overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ===== CSS VARIABLES ===== */
:root {
    --orange: #F8991d;
    --teal: #48c2c5;
    --teal-mid: #38C6CD;
    --teal-dark: #128A95;
    --indigo: #383996;
    --green: #98ca3c;
    --gold: #f4c542;
    --dark: #1a1a1a;
    --whatsapp: #25D366;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 40px;
    --shadow-sm: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.12);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.18);
}

/* ===== UTILITY CLASSES ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Inline SVG icon utility */
.icon {
    display: inline-block;
    width: 1em; height: 1em;
    vertical-align: -0.13em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.icon--filled { fill: currentColor; stroke: none; }
.icon--lg { width: 2.2rem; height: 2.2rem; vertical-align: middle; }

/* Botones (Pills) */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.25s ease;
    cursor: pointer;
}
.pill--orange { background: var(--orange); color: #fff; }
.pill--orange:hover { background: #e0850f; transform: translateY(-1px); }
.pill--white { background: #fff; color: var(--dark); }
.pill--white:hover { background: var(--orange); color: #fff; }
.pill--outline-white { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.7); }
.pill--outline-white:hover { background: #fff; color: var(--dark); }
.pill--outline-dark { background: transparent; color: var(--dark); border: 2px solid var(--dark); }
.pill--outline-dark:hover { background: var(--dark); color: #fff; }
.pill--lg { padding: 0.85rem 2rem; font-size: 1rem; }

/* Reveal Animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== TOPBAR ===== */
.topbar {
    background: var(--orange);
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 200;
    position: relative;
    /* Fix SEO: Min-height para evitar CLS en la carga del JS del ticker */
    min-height: 40px; 
}
.topbar__left, .topbar__right {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    color: #fff;
    white-space: nowrap;
}
.topbar__center {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    color: #fff;
    text-align: center;
    flex: 1;
}
.topbar__ticker {
    display: inline-block;
    min-width: 130px;
    text-align: left;
    transition: opacity 0.4s ease;
}

@media (max-width: 768px) {
    .topbar__center, .topbar__right { display: none; }
    .topbar { justify-content: center; }
}

/* ===== NAVBAR ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    padding: 0.85rem 0;
}
.navbar.compact {
    padding: 0.4rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.navbar__logo {
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.navbar__logo img { transition: all 0.3s ease; height: 68px; width: auto; }
.compact .navbar__logo img { height: 48px; }

.navbar__nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}
.navbar__nav a {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: #444;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease;
}
.navbar__nav a:hover { color: var(--orange); }

.navbar__ctas {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

@media (max-width: 900px) { .navbar__nav { display: none; } }
@media (max-width: 600px) { .navbar__ctas .pill--outline-dark { display: none; } }

/* ===== BLOCK 1 — HERO ===== */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(160deg, #041e2e 0%, #073a4a 35%, #0a4a5a 65%, #061830 100%);
}

.hero__video-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    opacity: 0.52;
}

.hero__video-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 60%, rgba(72,194,197,0.4) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 30%, rgba(248,153,29,0.25) 0%, transparent 50%),
        linear-gradient(160deg, rgba(4,30,46,0.82) 0%, rgba(7,58,74,0.78) 35%, rgba(10,74,90,0.75) 65%, rgba(6,24,48,0.85) 100%);
    z-index: 1;
}

.hero__bg-anim {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        radial-gradient(ellipse at 20% 70%, rgba(72,194,197,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(248,153,29,0.1) 0%, transparent 45%);
    animation: bgShift 12s ease-in-out infinite alternate;
}

@keyframes bgShift {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.08) translate(-2%, 2%); }
}

/* Floating particles */
.hero__particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.particle { position: absolute; border-radius: 50%; filter: blur(1px); animation: float linear infinite; }
.particle:nth-child(1) { width:8px;height:8px;background:rgba(72,194,197,0.4);left:10%;top:20%;animation-duration:8s;animation-delay:0s; }
.particle:nth-child(2) { width:5px;height:5px;background:rgba(248,153,29,0.35);left:80%;top:60%;animation-duration:11s;animation-delay:-3s; }
.particle:nth-child(3) { width:10px;height:10px;background:rgba(72,194,197,0.25);left:60%;top:15%;animation-duration:9s;animation-delay:-1s; }
.particle:nth-child(4) { width:6px;height:6px;background:rgba(248,153,29,0.3);left:30%;top:75%;animation-duration:13s;animation-delay:-5s; }
.particle:nth-child(5) { width:4px;height:4px;background:rgba(255,255,255,0.2);left:90%;top:35%;animation-duration:7s;animation-delay:-2s; }
.particle:nth-child(6) { width:7px;height:7px;background:rgba(72,194,197,0.3);left:45%;top:85%;animation-duration:10s;animation-delay:-4s; }

@keyframes float {
    0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0.6; }
    33%  { transform: translateY(-30px) translateX(15px) scale(1.1); opacity: 1; }
    66%  { transform: translateY(-15px) translateX(-10px) scale(0.9); opacity: 0.7; }
    100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.6; }
}

.hero__content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 820px;
    padding: 2rem 1.5rem;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    padding: 0.5rem 1.2rem;
    margin-bottom: 1.8rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    color: #fff;
    letter-spacing: 0.04em;
}

.hero__badge-dot {
    width: 8px; height: 8px;
    background: var(--gold);
    border-radius: 50%;
    animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.4); }
}

.hero h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 1.2rem;
}

.hero h1 span { color: var(--teal); }

.hero__subtitle {
    font-family: 'Inter', sans-serif; /* Cambiado a Inter para consistencia, o puedes cargar Nunito en tu head */
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255,255,255,0.78);
    margin-bottom: 2.2rem;
    line-height: 1.6;
}

.hero__ctas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.hero__microbadges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero__microbadge {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255,255,255,0.55);
    display: flex;
    align-items: center;
    gap: 5px;
}

.hero__microbadge + .hero__microbadge::before {
    content: '·';
    color: rgba(255,255,255,0.25);
    margin-right: 0.5rem;
}

.hero__scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.4);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    font-family: 'Inter', sans-serif;
    z-index: 2;
}

.hero__scroll-arrow {
    width: 20px; height: 20px;
    border-right: 2px solid rgba(255,255,255,0.4);
    border-bottom: 2px solid rgba(255,255,255,0.4);
    transform: rotate(45deg);
    animation: bounce 1.8s ease infinite;
}

.hero__scroll-line {
    width: 1px; height: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.3), transparent);
}

@keyframes bounce {
    0%,100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(6px); }
}

/* Alineación precisa del Topbar Left */
.topbar__left {
    display: flex;
    align-items: center;
    gap: 6px; /* Espaciado uniforme entre iconos y texto */
}

/* Ajustes específicos para los iconos del topbar */
.icon--google {
    width: 14px;
    height: 14px;
    margin-right: 2px;
}

.icon--star {
    width: 12px;
    height: 12px;
    color: #fff; /* O el color que desees para la estrella */
}

.topbar__divider {
    margin: 0 4px;
    opacity: 0.7;
}

.topbar__rating {
    font-weight: 700;
}

/* ===== ÍCONOS SOCIALES NAVBAR ===== */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    color: var(--dark); /* Hereda el gris oscuro del texto */
    transition: all 0.25s ease;
    border-radius: 50%;
}

.social-icon:hover {
    color: var(--orange); /* Efecto hover elegante usando el naranja base */
    transform: translateY(-2px); /* Pequeña animación hacia arriba */
}

/* Ajustamos un poco el tamaño interno para que iguale visualmente al botón */
.social-icon .icon {
    width: 1.3rem;
    height: 1.3rem;
}


/* ===== MOBILE MENU OVERLAY ===== */

/* El botón hamburguesa */
.navbar__toggle {
    display: none; /* Escondido en desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    margin: 0 10px;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: var(--dark);
    transition: all 0.3s ease;
}

/* Responsive: Mostramos hamburguesa y preparamos el nav */
@media (max-width: 900px) {
    .navbar__toggle { display: flex; }

    .navbar__nav {
        position: fixed;
        top: 0;
        right: -100%; /* Escondido a la derecha */
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        flex-direction: column; /* Lista vertical */
        justify-content: center;
        gap: 2rem;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        display: flex; /* Sobrescribimos el display:none anterior */
    }

    /* Cuando el menú está abierto */
    .navbar__nav.is-open {
        right: 0;
    }

    .navbar__nav a {
        font-size: 1.2rem;
        font-weight: 700;
        width: 100%;
        text-align: center;
    }

    /* Animación de la hamburguesa a "X" */
    .navbar__toggle.is-active .hamburger-line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .navbar__toggle.is-active .hamburger-line:nth-child(2) { opacity: 0; }
    .navbar__toggle.is-active .hamburger-line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }


    /* 1. Ocultar redes sociales en móvil para replicar el diseño de la imagen */
    .navbar__ctas .social-icon {
        display: none !important;
    }

    /* 2. Ajustar el espaciado del contenedor de botones */
    .navbar__ctas {
        gap: 0.5rem; /* Reducir la separación para que encaje mejor en pantallas estrechas */
    }

    /* 3. Mover el botón de delivery a la izquierda de la hamburguesa */
    .navbar__ctas .pill--orange {
        order: 1;
        /* Reducir ligeramente el tamaño del botón para evitar desbordamientos en móviles muy pequeños */
        padding: 0.45rem 0.8rem; 
        font-size: 0.85rem;
    }

    /* 4. Mover la hamburguesa a la extrema derecha */
    .navbar__toggle {
        order: 2;
        margin: 0 0 0 0.5rem; /* Ajustar el margen para separarlo visualmente del botón */
    }

    /* 5. Asegurar que el logo no ocupe demasiado espacio horizontal */
    .navbar__logo img {
        height: 48px;
    }


    /* =========================================
   VERSIÓN MÓVIL (Scroll Horizontal Corregido)
========================================= */
@media (max-width: 900px) {
    /* 1. Quitamos el padding del contenedor base para que el scroll vaya de borde a borde */
    .sub-navbar .sub-nav-container {
        padding-left: 0;
        padding-right: 0;
    }

    .sub-nav-list {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden; /* Fuerza a no crear scroll vertical fantasma */
        -webkit-overflow-scrolling: touch;
        gap: 1.5rem;
        
        /* 2. Movemos el margen horizontal aquí (1.5rem) para que los items no peguen al teléfono */
        padding: 1rem 1.5rem; 
        
        scrollbar-width: none;       
        -ms-overflow-style: none;    
    }

    .sub-nav-list::-webkit-scrollbar {
        display: none; 
    }

    .sub-nav-list a {
        display: inline-block; /* 3. CRUCIAL: Esto evita que la caja de texto se recorte por debajo */
        white-space: nowrap; 
        font-size: 0.95rem;
        padding-bottom: 4px; /* Le da un respiro a la línea inferior naranja */
        line-height: 1.2;    /* Asegura que el alto de la fuente sea consistente */
    }
}
}

/* Aseguramos que el contenedor padre sea relativo */
.sub-navbar {
    position: relative;
}

@media (max-width: 900px) {
    /* --- SOMBRA IZQUIERDA --- */
    .sub-navbar::before {
        content: '';
        position: absolute;
        top: 0; left: 0;
        height: 100%; width: 60px;
        background: linear-gradient(to left, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 90%);
        pointer-events: none;
        z-index: 10;
        opacity: 0; /* Oculta por defecto al inicio */
        transition: opacity 0.3s ease;
    }

    /* --- SOMBRA DERECHA --- */
    .sub-navbar::after {
        content: '';
        position: absolute;
        top: 0; right: 0;
        height: 100%; width: 60px;
        background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 90%);
        pointer-events: none;
        z-index: 10;
        opacity: 1; /* Visible por defecto */
        transition: opacity 0.3s ease;
    }

    /* Clases dinámicas que inyectará JavaScript */
    .sub-navbar.is-scrolled-left::before {
        opacity: 1; /* Muestra sombra izquierda */
    }
    .sub-navbar.is-scrolled-right::after {
        opacity: 0; /* Oculta sombra derecha */
    }
}

.rutas__logo {
    display: block;
    margin: 1rem auto 0;
    height: 100px;
    width: auto;
}