﻿/* ============================================================
   index.css 
   ============================================================ */

/* ══ VENTA SECTION ══ */
.venta-section {
    position: relative;
    display: flex;
    flex-direction: column;
    padding-top: 82px;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    margin: 0;
    padding-bottom: 0;
}

.venta-section-bg {
    position: absolute;
    /* Arranca debajo del nav: así la foto completa queda visible
       y nada del motivo se esconde tras la barra */
    top: 82px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background: var(--b1);
}

.venta-section-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.venta-section-overlay {
    position: absolute;
    inset: 0;
    /* Velo ligero: da profundidad sin apagar el color de la foto */
    background: linear-gradient( to bottom, rgba(26,45,62,.38) 0%, rgba(26,45,62,.12) 45%, rgba(26,45,62,.42) 100% );
}

.venta-section-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 2.5rem 5vw;
}

/* Estilos del iframe de venta propia. Hoy no se ven porque el iframe lleva
   class="oculto", pero se conservan para que al reactivarlo quede igual que
   antes. Las alturas responsivas viven en las media queries del final. */
.venta-section-inner iframe {
    width: 100%;
    height: 760px;
    border: none;
    display: block;
    min-height: 400px;
}

/* ══ RÓTULOS DEL CARRUSEL ══ */
.venta-overlay {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

/* El rótulo flota por encima del botón en lugar de empujarlo:
   así el botón queda siempre en el centro exacto de la foto
   y tampoco salta al cambiar de imagen. */
.venta-caption {
    position: absolute;
    bottom: calc(100% + 1.9rem);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    font-family: var(--manrope);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    text-shadow: 0 2px 20px rgba(0,0,0,.6), 0 1px 3px rgba(0,0,0,.4);
    transition: opacity .55s ease;
}

    .venta-caption.is-hidden {
        opacity: 0;
    }

.venta-caption-sub {
    font-size: clamp(.78rem, 1.4vw, 1.1rem);
    font-weight: 500;
    letter-spacing: .24em;
    text-transform: uppercase;
}

.venta-caption-titulo {
    font-size: clamp(1.9rem, 5vw, 4.2rem);
    font-weight: 800;
    letter-spacing: .005em;
    line-height: 1.04;
    text-transform: uppercase;
}

/* ══ BOTÓN COMPRA TU BOLETO (carrusel) ══ */
/* Capa de entrada. Está separada del botón para que el hover pueda cortar
   el salto sin cancelar también la entrada (si no, al quitar el cursor la
   entrada volvía a empezar y el botón desaparecía medio segundo). */
.venta-cta-entra {
    display: inline-block;
    animation: ventaEntra .9s .5s cubic-bezier(.22,1,.36,1) backwards;
}

.venta-cta-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    background: var(--g2);
    color: var(--b1);
    font-family: var(--manrope);
    font-weight: 700;
    font-size: clamp(1rem, 1.25vw, 1.2rem);
    letter-spacing: .13em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 1.5rem 3.6rem;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 14px 38px rgba(0,0,0,.4);
    text-align: center;
    /* Saltito cada tanto. La entrada la hace .venta-cta-entra */
    animation: ventaSalto 3.6s 1.6s ease-in-out infinite;
    transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}

    /* Destello que cruza el botón */
    .venta-cta-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -60%;
        width: 45%;
        height: 100%;
        background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
        transform: skewX(-20deg);
        animation: ventaDestello 4.5s 2s ease-in-out infinite;
        pointer-events: none;
    }

    .venta-cta-btn > span {
        position: relative;
        z-index: 1;
    }

    .venta-cta-btn:hover,
    .venta-cta-btn:focus-visible {
        background: var(--g3);
        transform: translateY(-4px) scale(1.03);
        box-shadow: 0 20px 48px rgba(0,0,0,.5);
        /* Se corta el salto al pasar el cursor: el botón ya tiene la atención
           y si no, la animación pisaría el transform del hover. Solo afecta
           al salto, porque la entrada vive en .venta-cta-entra. */
        animation: none;
    }

    .venta-cta-btn:active {
        transform: translateY(-1px) scale(1);
    }

@keyframes ventaEntra {
    from {
        opacity: 0;
        transform: translateY(26px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Salto con rebote: brinca, aterriza aplastándose un poco y da un bote corto */
@keyframes ventaSalto {
    0%, 62%, 100% {
        transform: translateY(0) scale(1, 1);
    }

    68% {
        transform: translateY(-16px) scale(.98, 1.04);
    }

    76% {
        transform: translateY(0) scale(1.05, .92);
    }

    84% {
        transform: translateY(-7px) scale(1, 1.02);
    }

    92% {
        transform: translateY(0) scale(1.02, .97);
    }
}

@keyframes ventaDestello {
    0%, 62% {
        left: -60%;
    }

    88%, 100% {
        left: 125%;
    }
}

/* Respeta a quien pide menos movimiento en su sistema */
@media (prefers-reduced-motion: reduce) {
    .venta-cta-entra,
    .venta-cta-btn,
    .venta-cta-btn::before {
        animation: none;
    }
}

    /* Oculto en las imágenes que ya traen su propio mensaje */
    .venta-cta-btn.is-hidden {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .6s ease, visibility .6s ease;
    }

.venta-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 1.2s ease;
}

    .venta-slide.active {
        opacity: 1;
    }

/* ══ ENCUADRE POR IMAGEN ══
   object-fit: cover recorta; aquí se elige QUÉ parte se conserva
   en cada foto para no perder el motivo principal. */

/* Pasajero con maletas: está abajo a la derecha */
.venta-slide[src*="autobus_ejecutivo"] {
    object-position: center 82%;
}

/* Rótulo "LLEGA SEGURO A TU PRÓXIMO DESTINO": el texto va arriba */
.venta-slide[src*="imagen_tno"] {
    object-position: center top;
}

/* Rótulo de paquetería: el texto va a la izquierda */
.venta-slide[src*="paqueteria-sierra"] {
    object-position: center center;
}

/* Mujer rarámuri a la derecha del encuadre */
.venta-slide[src*="valle-hongos"] {
    object-position: 60% center;
}

/* ══ HERO ══ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
}

.hero-bg {
    position: absolute;
    /* Más alto que el hero para que el parallax (translateY) nunca
       descubra el fondo por arriba ni por abajo */
    top: -20%;
    left: 0;
    right: 0;
    height: 140%;
    z-index: 0;
    overflow: hidden;
    will-change: transform;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient( 105deg, rgba(26,45,62,.75) 0%, rgba(26,45,62,.45) 50%, rgba(26,45,62,.1) 100% );
}

.hero-inner {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 5rem 5vw 4rem;
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 960px;
}

.hero-h1 .line {
    display: block;
    overflow: visible; 
    padding-bottom: .2em;
}

/* Título */
.hero-h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(2.2rem, 4.5vw, 4.8rem);
    line-height: .95;
    letter-spacing: -.02em;
    color: #fff;
    margin-bottom: 2.5rem;
}
    
.hero-h1 .line:nth-child(4) span {
        animation-delay: .9s;
    }

    .hero-h1 .line {
        display: block;
        overflow: hidden;
        white-space: nowrap;
    }

        .hero-h1 .line span {
            display: block;
            opacity: 0;
            transform: translateY(100%);
            animation: fadeUp .8s ease forwards;
        }

        .hero-h1 .line:nth-child(1) span {
            animation-delay: .3s;
        }

        .hero-h1 .line:nth-child(2) span {
            animation-delay: .5s;
        }

        .hero-h1 .line:nth-child(3) span {
            animation-delay: .7s;
        }

        .hero-h1 .line:nth-child(4) span {
            animation-delay: .9s;
        }

    .hero-h1 em {
        font-style: italic;
        color: #d4b896;
    }

/* Subtítulo + botones en fila */
.hero-bottom {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    animation: fadeUp .7s 1.2s ease forwards;
}

    .hero-bottom .hero-sub {
        font-size: .92rem;
        font-weight: 300;
        line-height: 1.85;
        color: rgba(255,255,255,.6);
        max-width: 260px;
        flex-shrink: 0;
        margin: 0;
    }

.hero-btns {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.hero-flecha {
    width: 80px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.4));
}

.hero-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    transition: transform .3s;
    flex-shrink: 0;
}

    .hero-action-btn:hover {
        transform: translateY(-4px);
    }

.hero-boleto-stack {
    position: relative;
    width: 100px;
}

.hero-boleto {
    width: 100px;
    display: block;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,.5));
}

/* El logotipo va centrado en la parte lisa del boleto, no en el boleto
   entero: a la derecha están la perforación y el código de barras. Sobre la
   imagen de 499px, ese espacio va del píxel 16 al 356, así que su centro cae
   en el 37.3% del ancho y en el 47.9% del alto. En porcentaje y no en
   píxeles para que acompañe al boleto cuando encoge en móvil. */
.hero-aguila {
    position: absolute;
    /* Un punto intermedio: se nota un poco más grande sin llenar el boleto.
       El tope sería el 68%, donde ya tocaría la perforación. */
    width: 61%;
    top: 47.9%;
    left: 37.3%;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.5));
}

.hero-horarios {
    width: 80px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.5));
}

.hero-action-label {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
    white-space: nowrap;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ══ STATS ══ */
.stats {
    background: var(--b2);
    border-bottom: 1px solid rgba(193,162,116,.15);
}

.stats-in {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 5vw;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: .9rem;
}

.stat-n {
    font-family: var(--serif);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--g2);
    line-height: 1;
}

.stat-l {
    font-size: .6rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.4);
    line-height: 1.5;
}

/* ══ SERVICIOS ══ */
.servicios-banner {
    background: #fff;
    padding: 6rem 5vw;
}

.servicios-banner-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.servicios-titulo {
    text-align: center;
    margin-bottom: 4rem;
}

.servicios-subtitulo {
    font-size: .88rem;
    color: var(--muted);
    margin-top: .8rem;
    line-height: 1.7;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 2rem;
}

.servicio-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.servicio-circulo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--g5);
    border: 2px solid var(--g4);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(39,67,91,.1);
    transition: transform .35s, box-shadow .35s, border-color .3s;
}

.servicio-item:hover .servicio-circulo {
    transform: translateY(-6px) scale(1.06);
    border-color: var(--g2);
    box-shadow: 0 12px 36px rgba(39,67,91,.15);
}

.servicio-circulo svg {
    width: 40px;
    height: 40px;
}

.servicio-label {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--b2);
    text-align: center;
    line-height: 1.4;
}

/* ══ CTA CON IMAGEN ══ */
.cta {
    position: relative;
    overflow: hidden;
}

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

.cta-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26,45,62,.72);
    z-index: 1;
}

.cta-text,
.cta-acts,
.cta::before {
    position: relative;
    z-index: 2;
}

/* ══ MODAL PDF ══ */
.pdf-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(26,45,62,.85);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

    .pdf-overlay.open {
        display: flex;
    }

.pdf-modal {
    background: var(--b1);
    border-top: 3px solid var(--g2);
    width: 100%;
    max-width: 860px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,.5);
    border-radius: 0 0 4px 4px;
}

.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--b2);
    border-bottom: 1px solid rgba(193,162,116,.2);
    flex-shrink: 0;
}

.pdf-modal-title {
    font-family: var(--serif);
    font-size: 1rem;
    color: #fff;
    font-weight: 700;
}

.pdf-modal-cerrar {
    background: none;
    border: none;
    color: rgba(255,255,255,.5);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color .2s;
    padding: .2rem .5rem;
    line-height: 1;
}

    .pdf-modal-cerrar:hover {
        color: var(--g2);
    }

.pdf-iframe {
    flex: 1;
    border: none;
    width: 100%;
}

/* ft-legal */
.ft-legal {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

    .ft-legal a {
        font-size: .68rem;
        color: rgba(255,255,255,.25);
        transition: color .2s;
        text-decoration: none;
    }

        .ft-legal a:hover {
            color: var(--g3);
        }

/* ══════════════════════════════
   RESPONSIVE
   ══════════════════════════════ */

/* Tablet grande — 1100px */
@media (max-width: 1100px) {
    .venta-section-inner iframe {
        height: 700px;
    }

    .servicios-grid {
        grid-template-columns: repeat(3,1fr);
        gap: 1.8rem;
    }
}

/* Tablet — 960px */
@media (max-width: 960px) {
    .venta-section-inner iframe {
        height: 680px;
    }

    .hero-h1 {
        font-size: clamp(2.5rem, 6vw, 4.5rem);
    }

    .hero-inner {
        padding: 4rem 5vw 3rem;
    }
}

/* Tablet chica — 800px */
@media (max-width: 800px) {
    .venta-section-inner iframe {
        height: 620px;
    }

    .hero-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

        .hero-bottom .hero-sub {
            max-width: 100%;
        }

    .hero-btns {
        gap: .8rem;
    }

    .servicios-grid {
        grid-template-columns: repeat(3,1fr);
        gap: 1.5rem;
    }

    .stats-in {
        justify-content: flex-start;
        gap: 1.5rem 3rem;
    }
}

/* Móvil — 600px */
@media (max-width: 600px) {
    .venta-section-inner iframe {
        height: 580px;
    }

    .venta-section {
        padding-top: 72px;
    }

    .venta-section-bg {
        top: 72px;
    }

    .venta-section-inner {
        padding: 2.5rem 6vw;
    }

    .venta-overlay {
        gap: 1.3rem;
    }

    .venta-caption {
        min-height: 5.4rem;
        gap: .35rem;
    }

    .venta-caption-sub {
        letter-spacing: .18em;
    }

    .venta-caption-titulo {
        font-size: clamp(1.5rem, 7vw, 2.4rem);
    }

    /* El contenedor también se estira: si no, el width:100% del botón se
       mediría contra una caja que solo mide lo que su propio contenido. */
    .venta-cta-entra {
        width: 100%;
        max-width: 340px;
    }

    .venta-cta-btn {
        font-size: .9rem;
        padding: 1.25rem 1.8rem;
        letter-spacing: .1em;
        width: 100%;
        max-width: 340px;
    }

    .hero {
        min-height: 80vh;
    }

    .hero-inner {
        padding: 3rem 5vw 2.5rem;
    }

    .hero-h1 {
        font-size: clamp(2.2rem, 9vw, 3.5rem);
        margin-bottom: 1.8rem;
    }

    .hero-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.2rem;
    }

    .hero-btns {
        gap: .8rem;
        flex-wrap: wrap;
    }

    .hero-flecha {
        width: 55px;
    }

    .hero-boleto-stack,
    .hero-boleto {
        width: 80px;
    }

    /* El águila ya no necesita medida propia aquí: al ir en porcentaje
       encoge sola con el boleto y conserva su sitio. */

    .hero-horarios {
        width: 65px;
    }

    .servicios-banner {
        padding: 4rem 5vw;
    }

    .servicios-grid {
        grid-template-columns: repeat(2,1fr);
        gap: 1.2rem;
    }

    .servicio-circulo {
        width: 90px;
        height: 90px;
    }

        .servicio-circulo svg {
            width: 32px;
            height: 32px;
        }

    .stats-in {
        gap: 1rem 2rem;
    }

    .stat-n {
        font-size: 1.5rem;
    }

    .pdf-overlay {
        padding: .8rem;
    }

    .pdf-modal {
        height: 90vh;
    }

    .pdf-modal-header {
        padding: .8rem 1rem;
    }

    .ft-legal {
        gap: 1rem;
    }
}

/* Móvil pequeño — 400px */
@media (max-width: 400px) {
    .venta-section-inner iframe {
        height: 520px;
    }

    .venta-cta-btn {
        font-size: .82rem;
        padding: 1.1rem 1.4rem;
        gap: .5rem;
    }

    .hero-h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .hero-bottom .hero-sub {
        font-size: .82rem;
    }

    .servicios-grid {
        grid-template-columns: repeat(2,1fr);
        gap: 1rem;
    }

    .servicio-circulo {
        width: 75px;
        height: 75px;
    }

        .servicio-circulo svg {
            width: 28px;
            height: 28px;
        }

    .servicio-label {
        font-size: .6rem;
    }

    .pdf-modal {
        height: 95vh;
    }

    .ft-legal {
        flex-direction: column;
        gap: .5rem;
    }
}
