/*
 * -------------------------------------------------------------------------------
 * Author: Mohamed Salem (Expert AI Engineer & Automation Architect)
 * Focus: AI Engineering | Automation | Agentic Systems
 * Copyright (c) 2026. All Rights Reserved.
 * -------------------------------------------------------------------------------
 */

@keyframes spinSlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes floatSoft {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

@keyframes pulseHalo {
    0% {
        box-shadow: 0 0 0 0 rgba(217, 179, 108, 0.45);
    }
    70% {
        box-shadow: 0 0 0 14px rgba(217, 179, 108, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(217, 179, 108, 0);
    }
}

.animate-spin-slow {
    animation: spinSlow 30s linear infinite;
}

.animate-float-soft {
    animation: floatSoft 5s ease-in-out infinite;
}

.animate-pulse-halo {
    animation: pulseHalo 2.6s infinite;
}

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.bg-grid-pattern {
    background-image: radial-gradient(rgba(217, 179, 108, 0.12) 1px, transparent 1px);
    background-size: 28px 28px;
}

::-webkit-scrollbar {
    width: 7px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(217, 179, 108, 0.35);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(217, 179, 108, 0.7);
}

/* ===================================================================
 * CINEMATIC LAYER — Ultra-luxury Sinai & Red Sea
 * Everything below animates transform / opacity / translate only.
 * =================================================================== */

:root {
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --gold: 217, 179, 108;
    --gold-light: 237, 210, 155;
    --copper: 217, 107, 56;
    --sea: 44, 181, 160;
}

/* ---------- Film grain over the whole page (static, GPU-cheap) ---------- */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9990;
    pointer-events: none;
    opacity: 0.045;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
html:not(.dark) body::after {
    opacity: 0.07;
    mix-blend-mode: multiply;
}

/* ---------- Smoother global reveal ---------- */
.reveal {
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

/* ---------- Floating glass header ---------- */
.glass-nav {
    top: 0.75rem;
    width: min(calc(100% - 1.5rem), 80rem);
    margin: 0.75rem auto 0;
    border-radius: 1.25rem;
    backdrop-filter: blur(18px) saturate(1.5);
    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    box-shadow: 0 10px 40px -22px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: width 0.7s var(--ease-out), background-color 0.4s, box-shadow 0.4s, border-color 0.4s;
}
.glass-nav > div:first-child {
    transition: padding 0.5s var(--ease-out);
}
.glass-nav.is-scrolled {
    width: min(calc(100% - 1.5rem), 72rem);
    border-color: rgba(var(--gold), 0.28);
    box-shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(var(--gold), 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
html.dark .glass-nav.is-scrolled { background-color: rgba(8, 9, 12, 0.78); }
html:not(.dark) .glass-nav.is-scrolled { background-color: rgba(246, 243, 236, 0.85); }
.glass-nav.is-scrolled > div:first-child {
    padding-block: 0.375rem;
}
.glass-nav nav, .glass-nav nav a, #nav-book-btn { white-space: nowrap; }
.glass-nav nav a { position: relative; }
.glass-nav nav a::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: -6px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgb(var(--gold)), transparent);
    transform: scaleX(0);
    transition: transform 0.5s var(--ease-out);
}
.glass-nav nav a:hover::after { transform: scaleX(1); }

.magnetic {
    transition: translate 0.45s var(--ease-out), background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
    will-change: translate;
}
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.9s var(--ease-out);
    pointer-events: none;
}
.btn-shine:hover::after { transform: translateX(120%); }
html[dir="rtl"] .btn-shine::after { transform: translateX(120%); }
html[dir="rtl"] .btn-shine:hover::after { transform: translateX(-120%); }

/* ---------- Hero: layered light & depth ---------- */
#hero { isolation: isolate; }
.hero-aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-aurora span {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    will-change: translate;
}
.aurora-sun {
    width: 46rem; height: 46rem; top: -16rem; inset-inline-end: -12rem;
    background: radial-gradient(circle, rgba(var(--copper), 0.42), rgba(var(--gold), 0.18) 45%, transparent 70%);
}
.aurora-sea {
    width: 38rem; height: 38rem; bottom: -14rem; inset-inline-start: -10rem;
    background: radial-gradient(circle, rgba(var(--sea), 0.30), transparent 68%);
}
.aurora-copper {
    width: 26rem; height: 26rem; top: 30%; inset-inline-start: 38%;
    background: radial-gradient(circle, rgba(var(--gold), 0.14), transparent 70%);
}
html:not(.dark) .hero-aurora { opacity: 0.6; }
#hero > .relative.z-10 { z-index: 10; }

/* entrance choreography (CSS-only fallback) */
@keyframes riseIn {
    from { opacity: 0; transform: translate3d(0, 34px, 0) scale(0.985); }
    to { opacity: 1; transform: none; }
}
@keyframes maskUp {
    from { transform: translate3d(0, 112%, 0); }
    to { transform: none; }
}
.mask-line { display: block; overflow: hidden; padding-block: 0.1em 0.18em; margin-block: -0.1em -0.18em; }
.motion-ok .hero-enter {
    animation: riseIn 1.2s var(--ease-out) both;
    animation-delay: calc(var(--d, 0) * 0.13s + 0.15s);
}
.motion-ok .mask-inner {
    animation: maskUp 1.25s var(--ease-out) both;
    animation-delay: calc(var(--d, 1) * 0.14s + 0.2s);
}
@keyframes goldSweep {
    from { background-position: 0% 50%; }
    to { background-position: 200% 50%; }
}
.text-gold-shimmer { background-size: 200% 100%; animation: goldSweep 7s linear infinite; }
.motion-ok .text-gold-shimmer {
    animation: maskUp 1.25s var(--ease-out) both, goldSweep 7s linear 1.6s infinite;
    animation-delay: calc(var(--d, 1) * 0.14s + 0.2s), 1.6s;
}
html:not(.dark) .text-gold-shimmer {
    background-image: linear-gradient(90deg, #b88e44, #d96b38, #b88e44);
}

/* glass search console */
html.dark .glass-panel { background: rgba(22, 25, 34, 0.62); }
html:not(.dark) .glass-panel { background: rgba(255, 255, 255, 0.72); }
.glass-panel {
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-color: rgba(var(--gold), 0.22);
    box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.glass-panel:focus-within { border-color: rgba(var(--gold), 0.55); }

/* showcase */
.hero-stage::before {
    content: "";
    position: absolute; inset: 8% 4% -6%;
    background: radial-gradient(60% 60% at 50% 50%, rgba(var(--copper), 0.38), rgba(var(--gold), 0.14) 55%, transparent 75%);
    filter: blur(50px);
    z-index: -1;
}
.hero-ring {
    position: absolute; top: -2.5rem; inset-inline-end: -2.5rem;
    width: 11rem; height: 11rem; border-radius: 50%;
    border: 1px dashed rgba(var(--gold), 0.5);
    box-shadow: inset 0 0 0 14px rgba(var(--gold), 0.04);
    animation: spinSlow 40s linear infinite;
    z-index: -1; pointer-events: none;
}
.hero-frame {
    box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(var(--gold), 0.28), 0 0 70px -25px rgba(var(--copper), 0.5);
}
.hero-frame::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    box-shadow: inset 0 0 90px rgba(8, 9, 12, 0.45);
}
@keyframes kenburns {
    from { transform: scale(1.04) translate3d(0, 0, 0); }
    to { transform: scale(1.17) translate3d(-2.6%, -2%, 0); }
}
@keyframes imgIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes xfadeOut { to { opacity: 0; } }
.hero-kenburns { animation: kenburns 20s ease-in-out infinite alternate; will-change: transform; transform-origin: 60% 50%; }
.hero-kenburns.is-switching { animation: kenburns 20s ease-in-out infinite alternate, imgIn 0.9s ease both; }
.hero-xfade {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    pointer-events: none; transform-origin: 60% 50%;
    animation: xfadeOut 1.1s ease 0.05s forwards;
}
@keyframes captionIn { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }
.caption-in { animation: captionIn 0.7s var(--ease-out) both; }
.float-glass { animation: floatSoft 6s ease-in-out infinite; }
.hero-thumb { transition: transform 0.45s var(--ease-out), opacity 0.3s, border-color 0.3s, box-shadow 0.4s; }
.hero-thumb img { transition: transform 0.9s var(--ease-out); }
.hero-thumb:hover { transform: translateY(-4px); }
.hero-thumb:hover img { transform: scale(1.12); }
.hero-thumb.border-champagne { box-shadow: 0 12px 28px -10px rgba(var(--gold), 0.7); }

/* ---------- Programs: filter bar + cards ---------- */
#sort-select, #open-compare-btn { transition: transform 0.35s var(--ease-out), box-shadow 0.35s, border-color 0.3s, background-color 0.3s; }
#sort-select:hover, #open-compare-btn:hover { transform: translateY(-2px); }
#open-compare-btn:hover { box-shadow: 0 10px 24px -10px rgba(var(--sea), 0.8); }

#trips-grid > article {
    --rx: 0deg; --ry: 0deg; --ty: 0px;
    position: relative;
    transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translate3d(0, var(--ty), 0);
    transition: transform 0.35s var(--ease-out), box-shadow 0.4s, border-color 0.4s;
    will-change: transform;
}
#trips-grid > article::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5; border-radius: inherit;
    background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 0%), rgba(var(--gold-light), 0.16), transparent 55%);
    opacity: 0; transition: opacity 0.4s;
}
#trips-grid > article:hover::after { opacity: 1; }
#trips-grid > article:hover { box-shadow: 0 40px 70px -35px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(var(--gold), 0.35); }
#trips-grid > article img { transition: transform 1.2s var(--ease-out); }
#trips-grid > article:hover img { transform: scale(1.12); }

/* ---------- Why-us: ambient light + glow cards ---------- */
.why-us::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(55% 60% at 15% 0%, rgba(var(--sea), 0.14), transparent 70%),
        radial-gradient(50% 60% at 95% 100%, rgba(var(--copper), 0.16), transparent 70%);
}
.why-us > * { position: relative; z-index: 1; }
.glow-card {
    position: relative; overflow: hidden; isolation: isolate;
    transition: transform 0.6s var(--ease-out), border-color 0.4s, box-shadow 0.5s;
}
.glow-card::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(360px circle at var(--gx, 50%) var(--gy, 50%), rgba(var(--gold), 0.22), rgba(var(--copper), 0.06) 45%, transparent 70%);
    opacity: 0; transition: opacity 0.45s;
}
.glow-card:hover { transform: translateY(-5px); border-color: rgba(var(--gold), 0.4); box-shadow: 0 24px 50px -28px rgba(var(--gold), 0.5); }
.glow-card:hover::before { opacity: 1; }
.glow-card .counter { text-shadow: 0 0 30px rgba(var(--gold), 0.3); }
.cine-on .reveal-stagger:not(.visible) .stagger-item { opacity: 0; }
.cine-on .reveal-stagger.visible .stagger-item { animation: riseIn 0.9s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 90ms); }

/* ---------- Hub tabs + FAQ accordion ---------- */
.hub-tabs button { transition: background-color 0.4s, color 0.3s, box-shadow 0.4s, transform 0.3s var(--ease-out), border-color 0.3s; }
.hub-tabs button:hover { transform: translateY(-2px); }
.hub-tabs button.bg-champagne { box-shadow: 0 10px 26px -10px rgba(var(--gold), 0.75); }
@keyframes panelIn {
    from { opacity: 0; transform: translate3d(0, 22px, 0); }
    to { opacity: 1; transform: none; }
}
#hub-panel-prices:not(.hidden), #hub-panel-faq:not(.hidden) { animation: panelIn 0.6s var(--ease-out) both; }
#hub-panel-prices.reveal:not(.visible) { animation: none; }

.faq-item { transition: border-color 0.4s, box-shadow 0.4s; }
.faq-item:hover { border-color: rgba(var(--gold), 0.4); }
.faq-item .faq-toggle svg { transition: transform 0.5s var(--ease-out); }
.faq-item:has(.faq-body:not(.hidden)) { border-color: rgba(var(--gold), 0.5); box-shadow: 0 18px 40px -26px rgba(var(--gold), 0.6); }
.faq-item:has(.faq-body:not(.hidden)) .faq-toggle svg { transform: rotate(180deg); color: rgb(var(--gold)); }
.faq-body {
    display: block;
    max-height: 24rem; opacity: 1; overflow: hidden;
    transition: max-height 0.6s var(--ease-out), opacity 0.45s ease, padding 0.5s var(--ease-out), visibility 0s;
}
.faq-body.hidden {
    display: block !important;
    max-height: 0; opacity: 0; padding-top: 0 !important; padding-bottom: 0 !important;
    visibility: hidden; transition: max-height 0.5s var(--ease-out), opacity 0.3s ease, padding 0.4s, visibility 0s 0.5s;
}

/* ---------- Modals & assistant ---------- */
@keyframes backdropIn {
    from { opacity: 0; backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); }
    to { opacity: 1; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
}
@keyframes springIn {
    from { opacity: 0; transform: translate3d(0, 28px, 0) scale(0.86); }
    to { opacity: 1; transform: none; }
}
#booking-modal:not(.hidden), #compare-modal:not(.hidden) {
    animation: backdropIn 0.5s ease both;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
#booking-modal:not(.hidden) > div, #compare-modal:not(.hidden) > div {
    animation: springIn 0.75s var(--ease-spring) 0.05s both;
    box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(var(--gold), 0.2);
}
#ai-chat-panel {
    transform-origin: bottom right;
    backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(var(--gold), 0.2);
}
html[dir="rtl"] #ai-chat-panel { transform-origin: bottom left; }
#ai-chat-panel:not(.hidden) { animation: springIn 0.7s var(--ease-spring) both; }
#ai-fab { transition: transform 0.45s var(--ease-spring), box-shadow 0.4s; }
#ai-fab:hover { box-shadow: 0 18px 40px -10px rgba(var(--gold), 0.6); }
#booking-progress-bars > * { transition: background-color 0.5s, transform 0.5s var(--ease-out); }
#toast-container > div { animation: springIn 0.6s var(--ease-spring) both; }

/* ---------- Performance & accessibility ---------- */
@media (max-width: 768px) {
    .hero-aurora span { filter: blur(55px); }
    .hero-ring { display: none; }
    .glass-nav.is-scrolled { width: calc(100% - 1rem); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0s !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===================================================================
 * FLUID REM-BASED MOBILE RESPONSIVE LAYER (320px - 639px)
 * Uses fluid root font-size so every rem-based Tailwind utility scales
 * proportionally across small phones, packing content cleanly without
 * any single element hogging the entire viewport.
 * =================================================================== */
html { -webkit-text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: clip; }
img, svg, canvas, video { max-width: 100%; }
body.ai-sheet-open { overflow: hidden; }

#toast-container { width: max-content; max-width: 92vw; }
#toast-container > div { text-align: center; border-radius: 1rem; }
.ai-chips-strip { scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ai-chips-strip::-webkit-scrollbar { display: none; }
.m-glass-pill {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.m-hscroll { scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.m-hscroll::-webkit-scrollbar { display: none; }

/* Safe areas (iPhone notch / home bar) */
#ai-dock { bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); }
#booking-modal { padding-bottom: env(safe-area-inset-bottom, 0px); }

/* Comfortable touch targets on touch devices */
@media (pointer: coarse) {
    .cat-filter-btn, .hub-tabs button, #sort-select, #open-compare-btn,
    #theme-toggle, #mobile-menu-btn { min-height: 2.5rem; }
    .hero-thumb:hover, .glow-card:hover, #trips-grid > article:hover { transform: none; }
}

/* ---------- Phones (< 640px): Fluid rem + Native Mobile App Shell ---------- */
@media (max-width: 639px) {
    /* Fluid root rem scaling: crisp 15px on 360px -> 16px on 380px -> 16.5px on 393px+ */
    html { font-size: clamp(15px, 4.2vw, 16.5px); }

    /* #mobile-app-shell carries pb-28 for the floating bottom pill bar */
    body { padding-bottom: 0; }

    /* Compact Mobile App Footer override */
    #mobile-app-shell footer { padding-block: 1.35rem; text-align: center; }

    /* Booking & Compare Modals -> Native Bottom Sheet */
    #booking-modal, #compare-modal { padding: 0; align-items: flex-end; }
    #booking-modal > div, #compare-modal > div {
        max-width: 100%;
        max-height: 90dvh;
        border-radius: 1.35rem 1.35rem 0 0;
    }
    #booking-modal > div > div:first-child { padding: 0.85rem 1rem; }
    #booking-modal h3 { font-size: 1.1rem; }
    #booking-progress-bars { padding-inline: 0.95rem; gap: 0.3rem; }
    #booking-body { padding: 0.85rem 0.95rem; }
    #booking-modal > div > div:last-child {
        padding: 0.7rem 0.95rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
        flex-wrap: wrap;
        gap: 0.45rem;
    }
    #booking-modal > div > div:last-child > div:last-child { flex: 1 1 100%; }
    #booking-prev-btn, #booking-next-btn { flex: 1; padding: 0.65rem 0.9rem; min-height: 2.75rem; border-radius: 0.75rem; }
    #booking-prev-btn:not(.hidden) { flex: 0 0 36%; }
    #booking-body div.flex.justify-between.gap-3,
    #booking-body div.flex.justify-between.gap-2 { flex-wrap: wrap; }
    #booking-body div.flex.justify-between > span:last-child {
        max-width: 100%;
        text-align: end;
        overflow-wrap: anywhere;
    }
    #compare-body { padding: 0.7rem; }
    #compare-body table { min-width: 30rem; }

    /* Prevent iOS Safari auto-zoom on input focus */
    #booking-modal input, #booking-modal select, #ai-input,
    #hero-search-form select { font-size: 16px; }

    /* MOSA AI 2.0 Assistant -> Dedicated Mobile Bottom Sheet (Full Width, Native Slide-Up, Keyboard Resilient) */
    #ai-fab { display: none; }
    #ai-dock {
        inset-inline: 0;
        bottom: 0;
        align-items: stretch;
        gap: 0;
    }
    @keyframes aiSheetSlideUp {
        from { opacity: 0; transform: translate3d(0, 100%, 0); }
        to { opacity: 1; transform: translate3d(0, 0, 0); }
    }
    #ai-chat-panel {
        width: 100%;
        max-width: 100%;
        height: 88dvh;
        max-height: 88dvh;
        border-radius: 1.45rem 1.45rem 0 0;
        border-bottom: 0;
        border-inline: 0;
        transform-origin: bottom center !important;
    }
    #ai-chat-panel:not(.hidden) {
        animation: aiSheetSlideUp 0.36s var(--ease-out) both;
    }
    #ai-matcher-view select, #ai-quote-view select, #ai-input { font-size: 16px; }
    #ai-form {
        padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px));
    }
    #ai-quote-sticky-bar {
        padding-bottom: calc(0.7rem + env(safe-area-inset-bottom, 0px));
    }

    /* Compact layout automatically when virtual keyboard opens on phones */
    body.ai-keyboard-open #ai-chat-panel {
        height: 98dvh;
        max-height: 98dvh;
        border-radius: 0.9rem 0.9rem 0 0;
    }
    body.ai-keyboard-open #ai-chips-strip,
    body.ai-keyboard-open #ai-status-sub,
    body.ai-keyboard-open #ai-sheet-handle {
        display: none;
    }
    body.ai-keyboard-open .ai-concierge-header {
        padding-block: 0.45rem;
    }
    body.ai-keyboard-open .ai-orb-avatar {
        width: 2rem;
        height: 2rem;
    }
    body.ai-keyboard-open #ai-form {
        padding-bottom: 0.45rem;
    }
}

/* ---------- Ultra-Small Phones (320px - 359px) ---------- */
@media (max-width: 359px) {
    #m-hero h1 { font-size: 1.55rem; }
}

/* ===================================================================
 * MOSA AI 2.0 — LUXURY SINAI CONCIERGE VISUAL LAYER
 * =================================================================== */
.ai-concierge-header::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(65% 110% at 15% 0%, rgba(var(--gold), 0.22), transparent 65%),
        radial-gradient(55% 110% at 90% 100%, rgba(var(--sea), 0.18), transparent 65%);
}

.ai-orb-avatar::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 0.85rem;
    background: conic-gradient(from 0deg, rgba(var(--gold), 0.9), rgba(var(--sea), 0.65), rgba(var(--copper), 0.7), rgba(var(--gold), 0.9));
    opacity: 0.45;
    animation: spinSlow 9s linear infinite;
    z-index: 0;
}
.ai-orb-avatar::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 0.7rem;
    background: #0e1015;
    z-index: 1;
}

@keyframes aiPulseDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(44, 181, 160, 0.7); }
    65% { box-shadow: 0 0 0 6px rgba(44, 181, 160, 0); }
}
.ai-live-dot { animation: aiPulseDot 2.2s infinite; }

.ai-mode-btn {
    color: rgba(255, 255, 255, 0.68);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
}
.ai-mode-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
.ai-mode-btn.is-active {
    color: #08090C;
    background: linear-gradient(135deg, #EDD29B 0%, #D9B36C 100%);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 6px 18px -6px rgba(var(--gold), 0.75);
}

@keyframes aiMsgRise {
    from { opacity: 0; transform: translate3d(0, 10px, 0) scale(0.97); }
    to { opacity: 1; transform: none; }
}
.ai-msg-enter { animation: aiMsgRise 0.36s var(--ease-out) both; }

.ai-tour-card {
    transition: transform 0.25s var(--ease-out), border-color 0.25s, box-shadow 0.25s;
}
.ai-tour-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--gold), 0.65);
    box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.45);
}

@keyframes aiMicPulse {
    0% { box-shadow: 0 0 0 0 rgba(217, 107, 56, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(217, 107, 56, 0); }
    100% { box-shadow: 0 0 0 0 rgba(217, 107, 56, 0); }
}
.ai-mic-recording {
    background: #D96B38 !important;
    color: #fff !important;
    animation: aiMicPulse 1.2s infinite;
}

.ai-fab-luxury {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 18px 42px -12px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(var(--gold), 0.35);
}

@media (min-width: 640px) {
    #ai-chat-panel.ai-expanded {
        width: min(35rem, calc(100vw - 2.5rem)) !important;
        max-height: 86dvh !important;
    }
}

/* ---------- Luxury Editorial Expedition Steps & Tagline Reveal ---------- */
.tagline-word {
    display: inline-block;
    transition: opacity 0.4s ease, transform 0.4s var(--ease-out);
}
.expedition-step {
    position: relative;
    transition: transform 0.4s var(--ease-out), border-color 0.35s, box-shadow 0.4s;
}
.expedition-step:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--gold), 0.55);
    box-shadow: 0 22px 46px -24px rgba(0, 0, 0, 0.38);
}
