/* =====================================================================
   ItineraryCrafter — Sistema visual global (site.css)
   Tokens, base tipográfica, botones, header, footer y modales compartidos.
   Lo cargan TODAS las páginas antes de su hoja específica:
     · Home:            site.css + home.css
     · Herramientas:    site.css + styles.css
     · Auth:            site.css + auth.css
   Ver docs/design-system.md.
   ===================================================================== */

:root {
    /* ---- Marca ---- */
    --ink-950: #050E17;
    --ink-900: #08141F;
    --ink-850: #0B1A28;
    --ink-800: #0F2233;
    --ink-700: #16304A;
    --ink-600: #22415E;

    /* Azul eléctrico: tono 207°–218°, anclado en #003867 (--blue-900) */
    --blue-50: #EFF5FF;
    --blue-100: #DCE8FF;
    --blue-200: #B9D1FF;
    --blue-300: #8AB6FF;
    --blue-400: #5C97FF;
    --blue-500: #2F7BFF;
    --blue-600: #0A63E8;
    --blue-700: #0057C2;
    --blue-800: #004A94;
    --blue-900: #003867;

    --sand-200: #F0E2C6;
    --sand-300: #E6CFA3;
    --sand-400: #D4B27A;
    --sand-500: #B8925A;
    --sand-600: #9A7847;

    --paper: #F5F2EC;
    --paper-2: #EDE8DF;
    --canvas: #F4F6F9;

    /* ---- Documentos exportados ----
       Identidad real de los Word/PDF (document_rendering.py: INK, TEXT, MUTED, ACCENT, PAPER,
       MIST, LINE). Sólo para superficies que representan un documento exportado; la interfaz
       sigue siendo tinta, azul eléctrico y arena. tests/test_site_shell.py lo verifica. */
    --doc-ink: #173E43;
    --doc-text: #263D42;
    --doc-muted: #586D71;
    --doc-accent: #9A7847;
    --doc-paper: #F4F2ED;
    --doc-mist: #EAF1F0;
    --doc-line: #D7E1DF;

    /* ---- Neutros (pizarra con tinte tinta) ---- */
    --n-900: #0F1B2D;
    --n-800: #1F2D40;
    --n-700: #334256;
    --n-600: #4A596D;
    --n-500: #64748A;
    --n-400: #8B97A8;
    --n-300: #B7C1CE;
    --n-200: #DBE1E9;
    --n-150: #E6EBF1;
    --n-100: #F0F3F7;
    --n-50: #F7F9FB;

    /* ---- Semánticos ---- */
    --text: var(--n-900);
    --text-2: var(--n-600);
    --text-3: var(--n-500);
    --border: var(--n-200);
    --border-soft: var(--n-150);
    --surface: #FFFFFF;
    --accent: var(--blue-600);
    --accent-hover: var(--blue-700);
    --focus: var(--blue-500);
    --danger: #B4332A;
    --danger-bg: #FDF1F0;
    --success: #1E7A3C;
    --success-bg: #EEF7F0;

    /* ---- Tipografía ---- */
    --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
    --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    --doc-sans: "Source Sans 3", "Source Sans Pro", var(--font-sans);

    /* ---- Forma ---- */
    --r-xs: 6px;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 22px;
    --r-2xl: 28px;
    --r-pill: 999px;

    --shadow-xs: 0 1px 2px rgba(8, 20, 31, 0.06);
    --shadow-sm: 0 0 0 1px rgba(14, 27, 39, 0.06), 0 1px 2px rgba(14, 27, 39, 0.05), 0 4px 12px rgba(14, 27, 39, 0.04);
    --shadow-md: 0 0 0 1px rgba(14, 27, 39, 0.05), 0 2px 4px rgba(14, 27, 39, 0.04), 0 12px 32px rgba(14, 27, 39, 0.08);
    --shadow-lg: 0 0 0 1px rgba(14, 27, 39, 0.05), 0 8px 16px rgba(14, 27, 39, 0.05), 0 28px 64px rgba(14, 27, 39, 0.14);
    --shadow-xl: 0 0 0 1px rgba(14, 27, 39, 0.06), 0 12px 24px rgba(14, 27, 39, 0.08), 0 44px 96px rgba(14, 27, 39, 0.24);

    /* ---- Movimiento ---- */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
    --dur-1: 120ms;
    --dur-2: 200ms;
    --dur-3: 320ms;
    --dur-4: 560ms;

    /* ---- Layout ---- */
    --container: 1200px;
    --container-wide: 1320px;
    --gutter: clamp(16px, 4vw, 40px);
    --header-h: 64px;
}

/* ================= BASE ================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img,
svg {
    max-width: 100%;
}

::selection {
    background: rgba(92, 151, 255, 0.35);
    color: inherit;
}

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

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ic {
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 2000;
    padding: 10px 16px;
    border-radius: var(--r-sm);
    background: #fff;
    color: var(--ink-900);
    font: 600 14px/1.2 var(--font-sans);
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    transform: translateY(-160%);
    transition: transform var(--dur-2) var(--ease-out);
}

.skip-link:focus {
    transform: translateY(0);
}

.skip-target {
    display: block;
    height: 0;
    outline: none;
}

/* ================= BOTONES ================= */

.btn {
    --btn-h: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--btn-h);
    padding: 0 20px;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.005em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition:
        background-color var(--dur-2) ease,
        color var(--dur-2) ease,
        border-color var(--dur-2) ease,
        box-shadow var(--dur-3) ease,
        transform var(--dur-3) var(--ease-out);
}

.btn .ic {
    transition: transform var(--dur-3) var(--ease-out);
}

.btn:hover .ic--nudge {
    transform: translateX(3px);
}

.btn:active {
    transform: translateY(1px) scale(0.99);
}

.btn--sm {
    --btn-h: 36px;
    padding: 0 14px;
    font-size: 14px;
    border-radius: 9px;
}

.btn--lg {
    --btn-h: 52px;
    padding: 0 26px;
    font-size: 16px;
    border-radius: 12px;
}

.btn--block {
    width: 100%;
}

/* Primario sobre fondos claros */
.btn--primary {
    background: var(--blue-600);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 1px 2px rgba(6, 17, 28, 0.18),
        0 8px 20px -10px rgba(10, 99, 232, 0.7);
}

.btn--primary:hover {
    background: var(--blue-700);
    color: #fff;
}

/* Primario luminoso (azul eléctrico) sobre fondos oscuros */
.btn--glow {
    background: var(--blue-600);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 0 0 1px rgba(92, 151, 255, 0.5),
        0 10px 34px -10px rgba(47, 123, 255, 0.95);
}

.btn--glow:hover {
    color: #fff;
    filter: brightness(1.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.26),
        0 0 0 1px rgba(92, 151, 255, 0.7),
        0 14px 44px -8px rgba(47, 123, 255, 1);
}

/* Secundario sobre fondos claros */
.btn--secondary {
    background: #fff;
    color: var(--ink-900);
    border-color: var(--n-200);
    box-shadow: var(--shadow-xs);
}

.btn--secondary:hover {
    background: var(--n-50);
    border-color: var(--n-300);
    color: var(--ink-900);
}

/* Secundario sobre fondos oscuros */
.btn--ghost {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.16);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* Oscuro sobre fondos claros */
.btn--dark {
    background: var(--ink-900);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 20px -10px rgba(8, 20, 31, 0.6);
}

.btn--dark:hover {
    background: var(--ink-700);
    color: #fff;
}

.btn[disabled],
.btn[aria-disabled="true"] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Enlace con flecha */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--blue-600);
    text-decoration: none;
}

.link-arrow .ic {
    transition: transform var(--dur-3) var(--ease-out);
}

.link-arrow:hover .ic {
    transform: translateX(3px);
}

/* Etiqueta mínima */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: var(--r-pill);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--blue-50);
    color: var(--blue-700);
}

/* ================= HEADER ================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    color: #fff;
    background: var(--ink-900);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.site-header::after {
    /* filo de luz inferior, apenas perceptible */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(92, 151, 255, 0.28) 30%, rgba(212, 178, 122, 0.22) 70%, transparent);
    opacity: 0.7;
    pointer-events: none;
}

.site-header--overlay {
    position: fixed;
    left: 0;
    right: 0;
    background: transparent;
    transition: border-color var(--dur-3) ease;
}

/* Vidrio en un pseudo-elemento: un backdrop-filter en el header mismo convertiría
   al header en el bloque contenedor del panel fijo del menú móvil. */
.site-header--overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(6, 16, 26, 0.78);
    -webkit-backdrop-filter: saturate(150%) blur(18px);
    backdrop-filter: saturate(150%) blur(18px);
    transition: opacity var(--dur-3) ease;
    pointer-events: none;
}

/* Transparente sobre el hero sólo con JS (main.js le devuelve el fondo al hacer scroll);
   sin JS el header queda siempre legible. */
.js .site-header--overlay:not(.is-scrolled):not(.is-menu-open) {
    border-bottom-color: transparent;
}

.js .site-header--overlay:not(.is-scrolled):not(.is-menu-open)::before,
.js .site-header--overlay:not(.is-scrolled):not(.is-menu-open)::after {
    opacity: 0;
}

.site-header--overlay::after {
    transition: opacity var(--dur-3) ease;
}

.site-header__inner {
    position: relative;
    max-width: var(--container-wide);
    height: var(--header-h);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: #fff;
    text-decoration: none;
    border-radius: var(--r-sm);
}

.brand__mark {
    width: 30px;
    height: 30px;
    display: block;
    transition: transform var(--dur-4) var(--ease-spring);
}

.brand:hover .brand__mark {
    transform: rotate(-8deg) scale(1.06);
}

.brand__name {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: #fff;
}

.brand__name span {
    color: var(--blue-400);
}

/* ---- Navegación de marketing ---- */

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 12px;
}

.site-nav a,
.site-header__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--r-sm);
    color: rgba(255, 255, 255, 0.72);
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--dur-2) ease, background-color var(--dur-2) ease;
}

.site-nav a:hover,
.site-header__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

/* ---- Pestañas de herramientas (área autenticada) ---- */

.app-tabs {
    display: flex;
    align-items: stretch;
    align-self: stretch;
    gap: 2px;
    margin-left: 8px;
}

.app-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--dur-2) ease;
}

.app-tab .ic {
    opacity: 0.8;
}

.app-tab::before {
    /* superficie de hover dentro de la barra */
    content: "";
    position: absolute;
    inset: 12px 2px;
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, 0);
    transition: background-color var(--dur-2) ease;
    z-index: -1;
}

.app-tab::after {
    /* indicador activo */
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--blue-400);
    transform: scaleX(0);
    transition: transform var(--dur-3) var(--ease-out);
}

.app-tab:hover {
    color: #fff;
}

.app-tab:hover::before {
    background: rgba(255, 255, 255, 0.06);
}

.app-tab[aria-current="page"] {
    color: #fff;
}

.app-tab[aria-current="page"] .ic {
    color: var(--blue-300);
    opacity: 1;
}

.app-tab[aria-current="page"]::after {
    transform: scaleX(1);
}

.app-tab:focus-visible {
    outline-offset: -6px;
    border-radius: 10px;
}

/* ---- Acciones (derecha) ---- */

.site-header__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--r-sm);
    color: rgba(255, 255, 255, 0.66);
    transition: color var(--dur-2) ease, background-color var(--dur-2) ease;
}

.header-help:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

/* ---- Menú de usuario (details/summary: funciona sin JS) ---- */

.user-menu {
    position: relative;
}

.user-menu > summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 8px 0 4px;
    border-radius: 10px;
    cursor: pointer;
    color: #fff;
    transition: background-color var(--dur-2) ease;
    -webkit-tap-highlight-color: transparent;
}

.user-menu > summary::-webkit-details-marker {
    display: none;
}

.user-menu > summary:hover,
.user-menu[open] > summary {
    background: rgba(255, 255, 255, 0.07);
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(140deg, var(--blue-300), var(--blue-500));
    color: var(--ink-950);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.user-menu__name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.user-menu__chevron {
    color: rgba(255, 255, 255, 0.55);
    transition: transform var(--dur-3) var(--ease-out);
}

.user-menu[open] .user-menu__chevron {
    transform: rotate(180deg);
}

.menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 290px;
    max-width: calc(100vw - 24px);
    padding: 6px;
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    box-shadow: var(--shadow-xl);
    transform-origin: top right;
    animation: menu-in var(--dur-3) var(--ease-out);
}

@keyframes menu-in {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.menu-panel__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--n-150);
}

.menu-panel__head .avatar {
    width: 38px;
    height: 38px;
    font-size: 14px;
    box-shadow: none;
}

.menu-panel__who {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.menu-panel__title {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text);
    overflow-wrap: anywhere;
}

.menu-panel__email {
    font-size: 12.5px;
    color: var(--text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-panel form {
    margin: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    margin: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--n-800);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--dur-1) ease, color var(--dur-1) ease;
}

.menu-item .ic {
    color: var(--n-500);
    transition: color var(--dur-1) ease;
}

.menu-item:hover,
.menu-item:focus-visible {
    background: var(--n-100);
    color: var(--text);
    outline: none;
}

.menu-item:hover .ic,
.menu-item:focus-visible .ic {
    color: var(--blue-600);
}

.menu-item .tag {
    margin-left: auto;
}

.menu-item--danger {
    color: var(--danger);
}

.menu-item--danger .ic {
    color: currentColor;
}

.menu-item--danger:hover,
.menu-item--danger:focus-visible {
    background: var(--danger-bg);
    color: var(--danger);
}

.menu-item--danger:hover .ic,
.menu-item--danger:focus-visible .ic {
    color: var(--danger);
}

.menu-sep {
    height: 1px;
    margin: 4px 6px;
    background: var(--n-150);
}

/* ---- Menú móvil (details/summary) ---- */

.mobile-nav {
    display: none;
}

.mobile-nav > summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color var(--dur-2) ease;
}

.mobile-nav > summary::-webkit-details-marker {
    display: none;
}

.mobile-nav > summary:hover,
.mobile-nav[open] > summary {
    background: rgba(255, 255, 255, 0.08);
}

.mobile-nav .ic--close {
    display: none;
}

.mobile-nav[open] .ic--open {
    display: none;
}

.mobile-nav[open] .ic--close {
    display: inline-block;
}

.mobile-nav__panel {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-h);
    bottom: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px var(--gutter) 32px;
    background: var(--ink-900);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    animation: sheet-in var(--dur-3) var(--ease-out);
}

@keyframes sheet-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.mobile-nav__label {
    margin: 18px 4px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.mobile-nav__link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.88);
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
}

.mobile-nav__link .ic {
    color: var(--blue-300);
}

.mobile-nav__link[aria-current="page"] {
    color: #fff;
}

.mobile-nav__link[aria-current="page"]::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-left: auto;
    border-radius: 50%;
    background: var(--blue-400);
}

.mobile-nav__ctas {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.mobile-nav__logout {
    margin: 0;
}

.mobile-nav__logout .mobile-nav__link {
    width: 100%;
    margin: 0;
    border-width: 0 0 1px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.07);
    border-radius: 0;
    background: none;
    font-family: var(--font-sans);
    text-align: left;
    cursor: pointer;
    color: #F5B5AE;
}

.mobile-nav__logout .mobile-nav__link .ic {
    color: currentColor;
}

body.is-locked {
    overflow: hidden;
}

/* ---- Responsive del header ---- */

@media (max-width: 1080px) {
    .site-nav a {
        padding: 0 9px;
    }

    .user-menu__name {
        display: none;
    }
}

@media (max-width: 900px) {
    :root {
        --header-h: 60px;
    }

    .site-nav,
    .app-tabs,
    .site-header__link,
    .header-help {
        display: none;
    }

    .mobile-nav {
        display: block;
    }

    .site-header__inner {
        gap: 12px;
    }
}

@media (max-width: 420px) {
    .site-header__inner {
        gap: 8px;
    }

    .brand {
        gap: 8px;
    }

    .brand__mark {
        width: 28px;
        height: 28px;
    }

    .brand__name {
        font-size: 15px;
    }

    .site-header__actions {
        gap: 6px;
    }

    .site-header__actions .btn--sm {
        padding: 0 10px;
        font-size: 13px;
    }

    .mobile-nav > summary {
        width: 36px;
    }

    .user-menu > summary {
        gap: 6px;
        padding: 0 4px;
    }
}

/* ================= FOOTER ================= */

.site-footer {
    position: relative;
    margin-top: 72px;
    background: var(--ink-950);
    color: rgba(255, 255, 255, 0.68);
    overflow: hidden;
    isolation: isolate;
}

.site-footer::before {
    /* halo de marca */
    content: "";
    position: absolute;
    z-index: -1;
    width: 760px;
    height: 420px;
    left: -180px;
    top: -260px;
    background: radial-gradient(closest-side, rgba(47, 123, 255, 0.22), transparent);
    pointer-events: none;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.68);
    text-decoration: none;
    transition: color var(--dur-2) ease;
}

.site-footer a:hover {
    color: #fff;
}

.site-footer__inner {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 64px var(--gutter) 0;
}

.site-footer__top {
    display: grid;
    grid-template-columns: minmax(260px, 1.3fr) repeat(3, minmax(0, 1fr));
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

.footer-brand__logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #fff;
}

.footer-brand__logo img {
    width: 52px;
    height: 52px;
}

.footer-brand__name {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #fff;
}

.footer-brand__name span {
    color: var(--blue-400);
}

.footer-brand__tagline {
    max-width: 330px;
    margin: 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
}

.footer-brand__tagline em {
    font-family: var(--font-serif);
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
}

.feedback-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    margin: 4px 0 0;
    border: 1px solid rgba(92, 151, 255, 0.35);
    border-radius: 10px;
    background: rgba(92, 151, 255, 0.08);
    color: var(--blue-200);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--dur-2) ease, border-color var(--dur-2) ease, color var(--dur-2) ease, transform var(--dur-3) var(--ease-out);
}

.feedback-button:hover {
    background: rgba(92, 151, 255, 0.16);
    border-color: rgba(92, 151, 255, 0.6);
    color: #fff;
    transform: translateY(-1px);
}

.footer-col h2 {
    margin: 0 0 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 11px;
    font-size: 14.5px;
}

.footer-col li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col .ic {
    color: var(--blue-300);
    opacity: 0.9;
}

.footer-col .tag {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.footer-col button.footer-link-btn {
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    color: rgba(255, 255, 255, 0.68);
    font: inherit;
    cursor: pointer;
    transition: color var(--dur-2) ease;
}

.footer-col button.footer-link-btn:hover {
    color: #fff;
}

.site-footer__legal {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    padding: 28px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__disclaimer {
    margin: 0;
    max-width: 680px;
    font-size: 13px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.5);
}

.site-footer__legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px 20px;
    font-size: 13.5px;
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 0 28px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.42);
}

.site-footer__bottom p {
    margin: 0;
}

.site-footer__made {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.site-footer__made .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue-300);
    box-shadow: 0 0 0 4px rgba(92, 151, 255, 0.15);
}

@media (max-width: 1000px) {
    .site-footer__top {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .site-footer {
        margin-top: 48px;
    }

    .site-footer__inner {
        padding-top: 48px;
    }

    .site-footer__top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 36px 24px;
    }

    .site-footer__legal {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .site-footer__legal-links {
        justify-content: flex-start;
    }
}

@media (max-width: 420px) {
    .site-footer__top {
        grid-template-columns: 1fr;
    }
}

/* ================= MODAL DE FEEDBACK / CONTACTO =================
   Las clases .feedback-* también las reutilizan los modales de Itinerario
   (búsqueda avanzada de hoteles y voucher): conservar estructura y estados. */

.feedback-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5, 14, 23, 0.62);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.feedback-overlay.fb-open {
    opacity: 1;
    pointer-events: auto;
}

.feedback-modal {
    position: relative;
    width: 100%;
    max-width: 480px;
    padding: 30px;
    border-radius: 18px;
    background: #fff;
    color: var(--text);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    transform: translateY(14px) scale(0.97);
    transition: transform 0.35s var(--ease-out), opacity 0.25s ease;
}

.feedback-overlay.fb-open .feedback-modal {
    opacity: 1;
    transform: none;
}

.feedback-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.feedback-modal-title {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text);
}

.feedback-modal-subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-2);
}

.feedback-modal-close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-height: auto;
    padding: 0;
    margin: -4px -6px 0 0;
    border: 0;
    border-radius: 9px;
    background: none;
    color: var(--n-500);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.feedback-modal-close:hover {
    background: var(--n-100);
    color: var(--text);
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feedback-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--n-700);
}

.feedback-form select,
.feedback-form textarea,
.feedback-form input[type="email"],
.feedback-form input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--n-200);
    border-radius: 10px;
    background: var(--n-50);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.feedback-form select:focus,
.feedback-form textarea:focus,
.feedback-form input[type="email"]:focus,
.feedback-form input[type="text"]:focus {
    border-color: var(--blue-500);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(47, 123, 255, 0.16);
}

.feedback-form textarea {
    height: auto;
    min-height: 120px;
    margin: 0;
    resize: vertical;
}

.feedback-char-count {
    margin-top: 4px;
    font-size: 12px;
    color: var(--n-400);
    text-align: right;
}

.feedback-char-count.fb-warn {
    color: #B7791F;
}

.feedback-char-count.fb-error {
    color: var(--danger);
}

.feedback-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    padding: 12px 24px;
    border: 0;
    border-radius: 10px;
    background: var(--blue-600);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 8px 20px -10px rgba(10, 99, 232, 0.7);
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.feedback-submit-btn:hover:not(:disabled) {
    background: var(--blue-700);
}

.feedback-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.fb-spinner {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fb-spin 0.7s linear infinite;
}

@keyframes fb-spin {
    to {
        transform: rotate(360deg);
    }
}

.feedback-status {
    display: none;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.feedback-status.fb-success {
    display: block;
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid #C7E6CF;
}

.feedback-status.fb-error {
    display: block;
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid #F3C9C5;
}

.feedback-validation-msg {
    display: none;
    margin-top: 4px;
    font-size: 12px;
    color: var(--danger);
}

.feedback-validation-msg.fb-show {
    display: block;
}

.feedback-required {
    color: var(--danger);
}

.feedback-direct {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--text-3);
    text-align: center;
}

.feedback-direct a {
    color: var(--blue-600);
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 520px) {
    .feedback-modal {
        padding: 24px 18px;
    }
}

/* ================= MOVIMIENTO REDUCIDO ================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
