/* =========================================================
   X-PLORA Viajes y Turismo · Capa 2026
   Mejoras: animaciones, menú móvil, transporte, flota,
   páginas legales, banner de cookies y chatbot "Xplori".
   Se carga DESPUÉS de style.css. No reemplaza nada.
   ========================================================= */

/* ---------- Accesibilidad ---------- */
.skip-link{
    position:absolute;
    left:-999px;
    top:0;
    z-index:100000;
    background:var(--primary-dark);
    color:#fff;
    padding:12px 18px;
    border-radius:0 0 14px 0;
    font-weight:900;
}
.skip-link:focus{ left:0; }

:focus-visible{
    outline:3px solid var(--sky);
    outline-offset:2px;
    border-radius:6px;
}

/* ---------- Animaciones scroll-reveal ---------- */
.reveal{
    opacity:0;
    transform:translateY(34px);
    transition:opacity .7s cubic-bezier(.16,.8,.3,1),
               transform .7s cubic-bezier(.16,.8,.3,1);
    will-change:opacity,transform;
}
.reveal.is-visible{
    opacity:1;
    transform:none;
}
.reveal.delay-1{ transition-delay:.08s; }
.reveal.delay-2{ transition-delay:.16s; }
.reveal.delay-3{ transition-delay:.24s; }
.reveal.delay-4{ transition-delay:.32s; }

.reveal-left{ transform:translateX(-40px); }
.reveal-right{ transform:translateX(40px); }
.reveal-left.is-visible,
.reveal-right.is-visible{ transform:none; }

@keyframes floaty{
    0%,100%{ transform:translateY(0); }
    50%{ transform:translateY(-10px); }
}
@keyframes pulse-ring{
    0%{ box-shadow:0 0 0 0 rgba(37,211,102,.45); }
    70%{ box-shadow:0 0 0 18px rgba(37,211,102,0); }
    100%{ box-shadow:0 0 0 0 rgba(37,211,102,0); }
}

/* Respeta usuarios que reducen movimiento */
@media (prefers-reduced-motion: reduce){
    .reveal,.reveal-left,.reveal-right{
        opacity:1 !important;
        transform:none !important;
        transition:none !important;
    }
    *{ animation:none !important; scroll-behavior:auto !important; }
}

/* ---------- Menú móvil (hamburguesa) ---------- */
.nav-toggle{
    display:none;
    width:48px;
    height:48px;
    border:1px solid var(--line);
    background:#fff;
    border-radius:14px;
    cursor:pointer;
    position:relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after{
    content:"";
    position:absolute;
    left:50%;
    top:50%;
    width:22px;
    height:2.4px;
    background:var(--navy-dark);
    border-radius:4px;
    transform:translate(-50%,-50%);
    transition:.25s ease;
}
.nav-toggle span::before{ transform:translate(-50%,-8px); }
.nav-toggle span::after{ transform:translate(-50%,8px); }
body.nav-open .nav-toggle span{ background:transparent; }
body.nav-open .nav-toggle span::before{ transform:translate(-50%,0) rotate(45deg); }
body.nav-open .nav-toggle span::after{ transform:translate(-50%,0) rotate(-45deg); }

@media(max-width:960px){
    .navbar-content{
        flex-direction:row !important;
        height:72px !important;
        padding:0 !important;
    }
    .nav-toggle{ display:block; }
    .nav-menu{
        position:fixed;
        top:72px;
        left:0;
        right:0;
        bottom:0;
        flex-direction:column;
        justify-content:flex-start;
        align-items:stretch;
        gap:4px !important;
        background:#fff;
        padding:18px 22px 40px;
        overflow-y:auto;
        transform:translateX(100%);
        transition:transform .32s cubic-bezier(.16,.8,.3,1);
        box-shadow:-20px 0 60px rgba(15,23,42,.18);
    }
    body.nav-open .nav-menu{ transform:translateX(0); }
    .nav-menu a{
        padding:15px 10px;
        border-bottom:1px solid var(--line);
        font-size:16px;
    }
    .nav-menu .nav-cta,
    .nav-menu .portal-link{
        margin-top:12px;
        border-bottom:0;
        justify-content:center;
    }
    body.nav-open{ overflow:hidden; }
}

/* ---------- HERO: animaciones de entrada ---------- */
.hero-content > *{ animation:heroIn .9s both; }
.hero-content > *:nth-child(1){ animation-delay:.05s; }
.hero-content > *:nth-child(2){ animation-delay:.15s; }
.hero-content > *:nth-child(3){ animation-delay:.25s; }
.hero-content > *:nth-child(4){ animation-delay:.35s; }
.hero-content > *:nth-child(5){ animation-delay:.45s; }
.hero-quote-card{ animation:heroIn 1s .35s both; }
@keyframes heroIn{
    from{ opacity:0; transform:translateY(26px); }
    to{ opacity:1; transform:none; }
}
@media (prefers-reduced-motion: reduce){
    .hero-content > *,.hero-quote-card{ animation:none; }
}

/* ---------- Contadores animados ---------- */
.counter{ font-variant-numeric:tabular-nums; }

/* =========================================================
   SECCIÓN TRANSPORTE
   ========================================================= */
.transport-hero{
    padding:170px 0 90px;
    position:relative;
    color:#fff;
    text-align:center;
    background:
        linear-gradient(135deg,rgba(6,27,53,.82),rgba(7,59,95,.72),rgba(0,168,232,.45)),
        url('https://images.unsplash.com/photo-1544620347-c4fd4a3d5957?auto=format&fit=crop&w=1920&q=85') center/cover no-repeat;
}
.transport-hero h1{
    font-size:clamp(40px,7vw,76px);
    font-weight:950;
    letter-spacing:-1.8px;
    line-height:1.02;
    margin:16px 0;
}
.transport-hero h1 span{ color:var(--sky); display:block; }
.transport-hero p{
    max-width:760px;
    margin:0 auto 10px;
    font-size:18px;
    color:rgba(255,255,255,.92);
    line-height:1.8;
}
.transport-badges{
    display:flex;
    gap:12px;
    justify-content:center;
    flex-wrap:wrap;
    margin-top:28px;
}
.transport-badges span{
    background:rgba(255,255,255,.16);
    border:1px solid rgba(255,255,255,.28);
    backdrop-filter:blur(10px);
    padding:11px 20px;
    border-radius:999px;
    font-weight:850;
    font-size:14px;
}

.service-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:24px;
}
.service-card{
    background:#fff;
    border:1px solid var(--line);
    border-radius:28px;
    padding:32px 28px;
    box-shadow:var(--shadow-sm);
    transition:.25s ease;
    position:relative;
    overflow:hidden;
}
.service-card::after{
    content:"";
    position:absolute;
    inset:auto -40% -60% auto;
    width:180px;
    height:180px;
    background:radial-gradient(circle,rgba(0,168,232,.14),transparent 70%);
    border-radius:50%;
}
.service-card:hover{
    transform:translateY(-8px);
    box-shadow:var(--shadow-lg);
    border-color:rgba(0,168,232,.4);
}
.service-num{
    font-size:14px;
    font-weight:950;
    color:#fff;
    width:48px;height:48px;
    display:grid;place-items:center;
    border-radius:16px;
    background:linear-gradient(135deg,var(--sky),var(--navy));
    margin-bottom:18px;
}
.service-card h3{
    color:var(--navy-dark);
    font-size:21px;
    margin-bottom:10px;
    font-weight:950;
}
.service-card p{
    color:var(--muted);
    font-size:14.5px;
    line-height:1.7;
}

/* Flota */
.fleet-section{
    background:
        radial-gradient(circle at top right,rgba(0,168,232,.12),transparent 32%),
        linear-gradient(180deg,#F8FAFC,#fff);
}
.fleet-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:24px;
}
.fleet-card{
    background:
        radial-gradient(circle at top right,rgba(255,255,255,.2),transparent 40%),
        linear-gradient(135deg,var(--navy),var(--navy-dark));
    color:#fff;
    border-radius:28px;
    padding:34px 30px;
    box-shadow:0 30px 70px rgba(6,27,53,.28);
    transition:.25s ease;
}
.fleet-card:hover{ transform:translateY(-6px); }
.fleet-card .fleet-emoji{ font-size:40px; margin-bottom:14px; }
.fleet-card h3{ font-size:26px; font-weight:950; margin-bottom:6px; }
.fleet-card .fleet-cap{
    font-size:15px;
    color:var(--sky);
    font-weight:900;
    margin-bottom:14px;
}
.fleet-card p{ color:rgba(255,255,255,.82); font-size:14px; line-height:1.6; }

/* Timeline / pasos */
.transport-steps{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:22px;
    counter-reset:step;
}
.transport-step{
    background:#fff;
    border:1px solid var(--line);
    border-radius:24px;
    padding:28px 24px;
    position:relative;
    box-shadow:var(--shadow-sm);
}
.transport-step::before{
    counter-increment:step;
    content:counter(step);
    position:absolute;
    top:-18px;left:24px;
    width:40px;height:40px;
    display:grid;place-items:center;
    border-radius:12px;
    background:linear-gradient(135deg,var(--primary),var(--primary-dark));
    color:#fff;font-weight:950;
    box-shadow:0 12px 26px rgba(120,190,32,.3);
}
.transport-step h3{ margin:10px 0 8px; color:var(--navy-dark); font-size:18px; }
.transport-step p{ color:var(--muted); font-size:14px; line-height:1.65; }

/* =========================================================
   PÁGINAS LEGALES
   ========================================================= */
.legal-main{
    padding:150px 0 90px;
    background:#fff;
}
.legal-wrap{
    display:grid;
    grid-template-columns:260px 1fr;
    gap:46px;
    align-items:start;
}
.legal-toc{
    position:sticky;
    top:110px;
    background:#F8FAFC;
    border:1px solid var(--line);
    border-radius:22px;
    padding:22px;
}
.legal-toc h4{
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:1px;
    color:var(--primary-dark);
    margin-bottom:12px;
    font-weight:950;
}
.legal-toc a{
    display:block;
    color:var(--navy);
    font-size:14px;
    font-weight:700;
    padding:7px 0;
    border-bottom:1px solid var(--line);
}
.legal-toc a:hover{ color:var(--primary-dark); }
.legal-content h1{
    font-size:clamp(30px,5vw,46px);
    color:var(--navy-dark);
    font-weight:950;
    letter-spacing:-1px;
    margin-bottom:8px;
}
.legal-updated{
    color:var(--muted);
    font-size:14px;
    margin-bottom:28px;
}
.legal-content h2{
    color:var(--navy-dark);
    font-size:24px;
    margin:34px 0 12px;
    font-weight:900;
    scroll-margin-top:110px;
}
.legal-content h3{
    color:var(--navy-dark);
    font-size:18px;
    margin:22px 0 8px;
    font-weight:850;
}
.legal-content p,
.legal-content li{
    color:#334155;
    font-size:15.5px;
    line-height:1.85;
    margin-bottom:12px;
}
.legal-content ul,
.legal-content ol{ padding-left:22px; margin-bottom:16px; }
.legal-note{
    background:var(--primary-soft);
    border:1px solid rgba(120,190,32,.3);
    border-left:5px solid var(--primary);
    border-radius:14px;
    padding:16px 20px;
    margin:20px 0;
    font-size:14.5px;
    color:var(--navy-dark);
}
.legal-review{
    background:#FFF7E6;
    border:1px solid var(--gold);
    border-left:5px solid var(--gold);
    border-radius:14px;
    padding:16px 20px;
    margin:0 0 26px;
    font-size:14px;
    color:#7a5a00;
}
@media(max-width:860px){
    .legal-wrap{ grid-template-columns:1fr; }
    .legal-toc{ position:static; }
}

/* =========================================================
   BANNER DE COOKIES
   ========================================================= */
.cookie-banner{
    position:fixed;
    left:16px;right:16px;bottom:16px;
    z-index:100000;
    max-width:560px;
    margin:0 auto;
    background:#fff;
    border:1px solid var(--line);
    border-radius:24px;
    box-shadow:0 30px 80px rgba(6,27,53,.3);
    padding:24px;
    transform:translateY(160%);
    transition:transform .45s cubic-bezier(.16,.8,.3,1);
}
.cookie-banner.show{ transform:none; }
.cookie-banner h4{
    color:var(--navy-dark);
    font-size:18px;
    margin-bottom:8px;
    font-weight:950;
}
.cookie-banner p{
    color:var(--muted);
    font-size:13.5px;
    line-height:1.65;
    margin-bottom:16px;
}
.cookie-banner p a{ color:var(--primary-dark); font-weight:800; text-decoration:underline; }
.cookie-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}
.cookie-actions button{
    flex:1;
    min-width:130px;
    border:0;
    cursor:pointer;
    padding:13px 18px;
    border-radius:14px;
    font-weight:900;
    font-size:14px;
    transition:.2s ease;
}
.ck-accept{
    background:linear-gradient(135deg,var(--primary),var(--primary-dark));
    color:#fff;
    box-shadow:0 14px 30px rgba(120,190,32,.3);
}
.ck-accept:hover{ transform:translateY(-2px); }
.ck-reject{
    background:#fff;
    color:var(--navy-dark);
    border:1.5px solid var(--line);
}
.ck-config{
    background:#EEF4FA;
    color:var(--navy);
}
.cookie-prefs{
    margin-top:16px;
    display:none;
    border-top:1px solid var(--line);
    padding-top:14px;
}
.cookie-prefs.show{ display:block; }
.cookie-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    padding:10px 0;
    border-bottom:1px solid var(--line);
}
.cookie-row b{ color:var(--navy-dark); font-size:14px; display:block; }
.cookie-row small{ color:var(--muted); font-size:12px; }
.switch{ position:relative; width:46px; height:26px; flex:0 0 auto; }
.switch input{ opacity:0; width:0; height:0; }
.switch .slider{
    position:absolute; inset:0;
    background:#cbd5e1; border-radius:999px; cursor:pointer; transition:.2s;
}
.switch .slider::before{
    content:""; position:absolute; height:20px; width:20px; left:3px; top:3px;
    background:#fff; border-radius:50%; transition:.2s;
}
.switch input:checked + .slider{ background:var(--primary); }
.switch input:checked + .slider::before{ transform:translateX(20px); }
.switch input:disabled + .slider{ background:var(--primary-dark); opacity:.6; cursor:not-allowed; }

/* =========================================================
   CHATBOT "XPLORI"
   ========================================================= */
.xplori-launcher{
    position:fixed;
    right:22px;
    bottom:92px;
    z-index:99998;
    width:62px;height:62px;
    border-radius:50%;
    border:0;
    cursor:pointer;
    background:linear-gradient(135deg,var(--sky),var(--navy));
    color:#fff;
    font-size:26px;
    box-shadow:0 18px 45px rgba(0,168,232,.4);
    display:grid;place-items:center;
    animation:pulse-ring 2.6s infinite;
    transition:transform .2s ease;
}
.xplori-launcher:hover{ transform:scale(1.08); }
.xplori-launcher .dot{
    position:absolute;top:4px;right:4px;
    width:14px;height:14px;border-radius:50%;
    background:var(--gold);border:2px solid #fff;
}

.xplori-window{
    position:fixed;
    right:22px;
    bottom:92px;
    z-index:99999;
    width:min(380px,calc(100vw - 32px));
    height:min(560px,calc(100vh - 130px));
    background:#fff;
    border-radius:24px;
    box-shadow:0 40px 100px rgba(6,27,53,.35);
    display:flex;
    flex-direction:column;
    overflow:hidden;
    transform:translateY(24px) scale(.96);
    opacity:0;
    pointer-events:none;
    transition:.28s cubic-bezier(.16,.8,.3,1);
}
.xplori-window.open{
    transform:none;
    opacity:1;
    pointer-events:auto;
}
.xplori-head{
    background:
        radial-gradient(circle at top right,rgba(255,255,255,.2),transparent 40%),
        linear-gradient(135deg,var(--navy),var(--primary-dark));
    color:#fff;
    padding:18px 20px;
    display:flex;
    align-items:center;
    gap:12px;
}
.xplori-avatar{
    width:42px;height:42px;border-radius:50%;
    background:rgba(255,255,255,.2);
    display:grid;place-items:center;font-size:22px;
    flex:0 0 auto;
}
.xplori-head b{ font-size:16px; display:block; }
.xplori-head small{ font-size:12px; color:rgba(255,255,255,.82); display:flex; align-items:center; gap:6px; }
.xplori-head small::before{
    content:""; width:8px;height:8px;border-radius:50%;background:#4ade80;display:inline-block;
}
.xplori-close{
    margin-left:auto;background:transparent;border:0;color:#fff;
    font-size:22px;cursor:pointer;opacity:.85;
}
.xplori-body{
    flex:1;
    overflow-y:auto;
    padding:18px;
    background:#F6F9FC;
    display:flex;
    flex-direction:column;
    gap:12px;
}
.xplori-msg{
    max-width:84%;
    padding:12px 15px;
    border-radius:16px;
    font-size:14px;
    line-height:1.55;
    animation:msgIn .25s ease both;
}
@keyframes msgIn{ from{opacity:0;transform:translateY(8px);} to{opacity:1;transform:none;} }
.xplori-msg.bot{
    background:#fff;
    color:var(--text);
    border:1px solid var(--line);
    border-bottom-left-radius:5px;
    align-self:flex-start;
}
.xplori-msg.user{
    background:linear-gradient(135deg,var(--primary),var(--primary-dark));
    color:#fff;
    border-bottom-right-radius:5px;
    align-self:flex-end;
}
.xplori-msg a{ color:var(--primary-dark); font-weight:800; text-decoration:underline; }
.xplori-msg.user a{ color:#fff; }
.xplori-chips{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    padding:0 18px 12px;
    background:#F6F9FC;
}
.xplori-chip{
    background:#fff;
    border:1px solid var(--line);
    color:var(--navy-dark);
    border-radius:999px;
    padding:8px 14px;
    font-size:12.5px;
    font-weight:800;
    cursor:pointer;
    transition:.18s ease;
}
.xplori-chip:hover{
    background:var(--primary-soft);
    border-color:var(--primary);
    color:var(--primary-dark);
}
.xplori-foot{
    display:flex;
    gap:8px;
    padding:12px;
    border-top:1px solid var(--line);
    background:#fff;
}
.xplori-foot input{
    flex:1;
    border:1px solid var(--line);
    border-radius:14px;
    padding:12px 14px;
    font-size:14px;
    outline:none;
}
.xplori-foot input:focus{ border-color:var(--primary); box-shadow:0 0 0 3px rgba(120,190,32,.16); }
.xplori-send{
    border:0;cursor:pointer;
    width:46px;border-radius:14px;
    background:linear-gradient(135deg,var(--primary),var(--primary-dark));
    color:#fff;font-size:18px;
}
.xplori-typing{
    display:flex;gap:4px;padding:12px 15px;background:#fff;border:1px solid var(--line);
    border-radius:16px;border-bottom-left-radius:5px;align-self:flex-start;width:fit-content;
}
.xplori-typing span{
    width:7px;height:7px;border-radius:50%;background:var(--muted);
    animation:blink 1.2s infinite;
}
.xplori-typing span:nth-child(2){ animation-delay:.2s; }
.xplori-typing span:nth-child(3){ animation-delay:.4s; }
@keyframes blink{ 0%,60%,100%{opacity:.25;} 30%{opacity:1;} }
.xplori-disclaimer{
    font-size:10.5px;color:var(--muted);text-align:center;padding:0 12px 10px;background:#fff;
}
@media(max-width:600px){
    .xplori-window{ bottom:84px; right:12px; left:12px; width:auto; height:70vh; }
    .xplori-launcher{ right:14px; bottom:84px; }
}

/* Botón WhatsApp flotante: subir para no chocar con el chatbot */
.whatsapp-float{ bottom:22px; }

/* ---------- Teaser de transporte en home ---------- */
.transport-teaser{
    background:
        radial-gradient(circle at bottom left,rgba(0,168,232,.14),transparent 34%),
        linear-gradient(135deg,var(--navy-dark),var(--navy));
    border-radius:40px;
    padding:56px 46px;
    color:#fff;
    display:grid;
    grid-template-columns:1.2fr .8fr;
    gap:40px;
    align-items:center;
    box-shadow:0 34px 90px rgba(6,27,53,.3);
    overflow:hidden;
}
.transport-teaser h2{
    font-size:clamp(30px,4.5vw,48px);
    font-weight:950;
    line-height:1.08;
    letter-spacing:-1px;
    margin-bottom:16px;
}
.transport-teaser h2 span{ color:var(--sky); }
.transport-teaser p{ color:rgba(255,255,255,.88); line-height:1.8; margin-bottom:24px; }
.teaser-pills{ display:flex; flex-wrap:wrap; gap:10px; }
.teaser-pills span{
    background:rgba(255,255,255,.14);
    border:1px solid rgba(255,255,255,.24);
    padding:9px 16px;border-radius:999px;font-weight:800;font-size:13px;
}
.teaser-fleet{
    display:grid;gap:12px;
}
.teaser-fleet div{
    background:rgba(255,255,255,.12);
    border:1px solid rgba(255,255,255,.2);
    border-radius:18px;padding:16px 20px;
}
.teaser-fleet strong{ display:block;font-size:22px;font-weight:950; }
.teaser-fleet small{ color:rgba(255,255,255,.8); font-size:13px; }
@media(max-width:860px){
    .transport-teaser{ grid-template-columns:1fr; padding:38px 26px; border-radius:28px; }
}
