/* ════════════════════════════════════════════════════
   Sheikhah Travel — Master Stylesheet
   ════════════════════════════════════════════════════ */

/* ── Light Mode (Default) ─────────────────────────── */
:root {
    --gold:              #B8943A;
    --gold-light:        #D4AF37;
    --gold-dark:         #8B6914;
    --emerald:           #163a28;
    --emerald-light:     #2D6A4F;
    --cream:             #F8F5F0;
    --cream-dark:        #EDE8E0;

    /* ✦ New: Luxury Light Mode Palette ✦ */
    --bg-body:           #EEE8DC;
    --bg-body-gradient:  linear-gradient(160deg, #EDE4D0 0%, #E4DACE 30%, #D9D0BF 60%, #E8E2D4 100%);
    --bg-card:           rgba(255, 252, 245, 0.80);
    --bg-card-solid:     rgba(255, 252, 248, 0.95);
    --bg-bottom-bar:     rgba(238, 232, 220, 0.98);
    --bg-input:          rgba(255, 252, 248, 0.95);
    --bg-navbar-scroll:  rgba(22, 58, 40, 0.96);
    --bg-section-alt:    rgba(22, 58, 40, 0.04);
    --bg-section-warm:   linear-gradient(135deg, rgba(184, 148, 58, 0.06) 0%, rgba(22, 58, 40, 0.04) 100%);

    --text-primary:      #12301e;
    --text-secondary:    rgba(18, 48, 30, 0.65);
    --text-nav:          #F8F5F0;
    --border-card:       rgba(184, 148, 58, 0.25);
    --shadow-card:       rgba(18, 48, 30, 0.08);
    --shadow-card-hover: rgba(184, 148, 58, 0.18);
    --scrollbar-track:   #E4DACE;
    --wave-fill:         #EEE8DC;
    --feature-bg:        rgba(255, 252, 245, 0.90);
    --tab-inactive-text: #163a28;
    --tab-inactive-border: rgba(22, 58, 40, 0.25);
    --gold-glow:         rgba(184, 148, 58, 0.20);
    --emerald-glow:      rgba(22, 58, 40, 0.12);

    --theme-transition: 0.35s ease;
}

/* ── Dark Mode ────────────────────────────────────── */
html.dark {
    --cream:             #d6cfc2;
    --cream-dark:        #bfb8ab;

    --bg-body:           #0e1f16;
    --bg-card:           rgba(20, 44, 30, 0.90);
    --bg-card-solid:     #152e1e;
    --bg-bottom-bar:     rgba(8, 20, 13, 0.97);
    --bg-input:          #1a3326;
    --bg-navbar-scroll:  rgba(8, 20, 14, 0.97);
    --text-primary:      #ddd5c4;
    --text-secondary:    rgba(221, 213, 196, 0.65);
    --text-nav:          #ddd5c4;
    --border-card:       rgba(197, 160, 89, 0.22);
    --shadow-card:       rgba(0, 0, 0, 0.45);
    --scrollbar-track:   #0e1f16;
    --wave-fill:         #0e1f16;
    --feature-bg:        #152e1e;
    --tab-inactive-text: #d6cfc2;
    --tab-inactive-border: rgba(197, 160, 89, 0.40);
}

/* ── Reset & Base ─────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background var(--theme-transition), color var(--theme-transition);
}
/* Light mode: rich warm gradient */
html:not(.dark) body {
    background: var(--bg-body-gradient);
    min-height: 100vh;
}

/* ── Preloader ────────────────────────────────────── */
.preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--emerald); z-index: 10000; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity 0.8s ease, visibility 0.8s ease; }
.preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-logo { font-size: 4rem; font-weight: 700; color: var(--gold); letter-spacing: 0.2em; }
.preloader-logo span { display: inline-block; opacity: 0; transform: translateY(50px); }
.preloader-bar { width: 200px; height: 2px; background: rgba(197, 160, 89, 0.2); margin-top: 2rem; border-radius: 2px; overflow: hidden; }
.preloader-bar-fill { height: 100%; background: var(--gold); width: 0%; border-radius: 2px; transition: width 0.3s ease; }
.preloader-text { color: var(--cream); font-size: 0.9rem; margin-top: 1rem; opacity: 0.7; letter-spacing: 0.1em; }

/* ── Animations ───────────────────────────────────── */
@keyframes shimmer { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
.gold-shimmer {
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 25%, #fff 50%, var(--gold-light) 75%, var(--gold) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
    filter: drop-shadow(0 0 12px rgba(197, 160, 89, 0.4));
}

/* ── Cards ────────────────────────────────────────── */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-card);
    box-shadow: 0 8px 32px var(--shadow-card);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Light mode: extra luxury pearl glow */
html:not(.dark) .glass-card {
    background: linear-gradient(145deg, rgba(255,252,245,0.90) 0%, rgba(250,246,238,0.85) 100%);
    border: 1px solid rgba(184, 148, 58, 0.22);
    box-shadow: 0 8px 32px rgba(18, 48, 30, 0.07), 0 2px 8px rgba(184, 148, 58, 0.08), inset 0 1px 0 rgba(255,255,255,0.8);
}
.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(197, 160, 89, 0.15), 0 8px 32px var(--shadow-card);
    border-color: rgba(197, 160, 89, 0.4);
}
html:not(.dark) .glass-card:hover {
    box-shadow: 0 20px 50px var(--shadow-card-hover), 0 8px 20px rgba(18, 48, 30, 0.06), inset 0 1px 0 rgba(255,255,255,0.9);
    border-color: rgba(184, 148, 58, 0.45);
}

/* ── Buttons ──────────────────────────────────────── */
.magnetic-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: var(--emerald);
    font-weight: 700;
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3), inset 0 -2px 5px rgba(0,0,0,0.1);
}
.magnetic-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}
.magnetic-btn:hover::before { left: 100%; }
.magnetic-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(197, 160, 89, 0.5), inset 0 -2px 5px rgba(0,0,0,0.1);
}
.magnetic-btn:active {
    transform: translateY(1px);
    box-shadow: 0 4px 10px rgba(197, 160, 89, 0.3);
}

/* ── Scroll Indicator ─────────────────────────────── */
@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    margin-left: -1rem; /* center the 2rem width */
    z-index: 20;
    animation: bounce-subtle 2s infinite ease-in-out;
    filter: drop-shadow(0 0 8px rgba(197, 160, 89, 0.6));
    cursor: pointer;
}

/* ── Navbar ───────────────────────────────────────── */
.navbar { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; padding: 1rem 3rem; transition: all 0.5s ease; background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 100%); }
.navbar.scrolled { background: var(--bg-navbar-scroll); backdrop-filter: blur(20px); padding: 0.75rem 3rem; box-shadow: 0 4px 30px rgba(0,0,0,0.15); }
.nav-link { position: relative; color: #F8F5F0; font-weight: 500; transition: color 0.3s ease; }
.nav-link::after { content: ''; position: absolute; bottom: -4px; right: 0; width: 0; height: 2px; background: var(--gold); transition: width 0.3s ease; }
.nav-link:hover { color: var(--gold); }
.nav-link:hover::after { width: 100%; }

.navbar .text-cream { color: #F8F5F0 !important; }
.navbar #darkModeToggle { color: #F8F5F0 !important; border-color: rgba(197,160,89,0.5) !important; }
/* ── Back Button (Global) ─────────────────────────── */
.back-btn-global {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.3rem 0.9rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #F8F5F0 !important;
    border: 1px solid rgba(197, 160, 89, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 50;
    white-space: nowrap;
}
.back-btn-global svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}
.back-btn-global:hover, .back-btn-global:active {
    background: var(--gold) !important;
    color: #1B4332 !important;
    border-color: var(--gold);
}

@media (min-width: 769px) {
    .back-btn-global {
        position: relative;
        left: auto;
        transform: none;
        font-size: 0.9rem;
        padding: 0.4rem 1.1rem;
    }
}



/* ── Dark Mode Toggle Button ─────────────────────── */
#darkModeToggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(197,160,89,0.3);
    color: var(--cream);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}
#darkModeToggle:hover { background: rgba(197,160,89,0.2); border-color: var(--gold); color: var(--gold); }

/* ── Hero ─────────────────────────────────────────── */
.hero { position: relative; height: 100vh; overflow: hidden; }
.hero-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(180deg, rgba(27, 67, 50, 0.4) 0%, rgba(27, 67, 50, 0.8) 100%); }
.hero-wave { position: absolute; bottom: 0; left: 0; width: 100%; line-height: 0; }
.hero-wave svg { display: block; width: 100%; height: 150px; }
.hero-wave path { fill: var(--wave-fill) !important; transition: fill var(--theme-transition); }

.scroll-indicator { position: absolute; bottom: 3rem; left: 50%; transform: translateX(-50%); animation: bounce 2s infinite; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); } 40% { transform: translateX(-50%) translateY(-10px); } 60% { transform: translateX(-50%) translateY(-5px); } }

/* ── Section Title ────────────────────────────────── */
.section-title { position: relative; display: inline-block; }
.section-title::before { content: ''; position: absolute; bottom: -10px; right: 0; width: 60px; height: 3px; background: var(--gold); }

/* ── Destination Cards ────────────────────────────── */
.destination-card { position: relative; overflow: hidden; border-radius: 20px; transition: transform 0.5s ease; cursor: pointer; }
.destination-card:hover { transform: translateY(-10px); }
.destination-card img { transition: transform 0.8s ease; }
.destination-card:hover img { transform: scale(1.1); }
.destination-card-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 2rem; background: linear-gradient(transparent, rgba(27, 67, 50, 0.9)); transform: translateY(20px); transition: transform 0.5s ease; }
.destination-card:hover .destination-card-overlay { transform: translateY(0); }

/* ── Tab Buttons (Premium Segmented Control) ── */
.premium-tabs-wrapper {
    background: rgba(27, 67, 50, 0.05);
    border: 1px solid rgba(197, 160, 89, 0.2);
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.dark .premium-tabs-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(197, 160, 89, 0.15);
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.2);
}

.tab-btn { 
    padding: 0.85rem 2.5rem; 
    border-radius: 50px; 
    font-weight: 700; 
    font-size: 1.05rem;
    transition: all 0.4s cubic-bezier(0.83, 0, 0.17, 1); 
    cursor: pointer; 
    position: relative;
    overflow: hidden;
    color: var(--emerald);
    border: 2px solid transparent;
}
.dark .tab-btn {
    color: var(--cream);
    opacity: 0.7;
}

.tab-btn.active { 
    background: linear-gradient(135deg, var(--emerald), #112d21); 
    color: var(--gold) !important; 
    box-shadow: 0 8px 20px rgba(27, 67, 50, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
    opacity: 1 !important;
    border-color: rgba(197, 160, 89, 0.3);
}
.dark .tab-btn.active {
    background: linear-gradient(135deg, var(--gold), #9b7a3d); 
    color: var(--dark) !important;
    box-shadow: 0 8px 20px rgba(197, 160, 89, 0.2), inset 0 1px 0 rgba(255,255,255,0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.tab-btn:not(.active):hover { 
    background: rgba(197, 160, 89, 0.1); 
    color: var(--gold);
    opacity: 1;
}
.dark .tab-btn:not(.active):hover {
    background: rgba(197, 160, 89, 0.15); 
}

/* ── Animate on Scroll ────────────────────────────── */
.animate-hidden { opacity: 0; transform: translateY(50px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.animate-visible { opacity: 1; transform: translateY(0); }

/* ── Destination Pages ────────────────────────────── */
.destination-hero { position: relative; height: 70vh; overflow: hidden; }
.destination-hero img { width: 100%; height: 100%; object-fit: cover; }
.destination-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(27,67,50,0.9) 0%, rgba(27,67,50,0.3) 50%, transparent 100%); }
.destination-hero-overlay + div { color: #F8F5F0; }
.destination-hero-overlay + div h1, .destination-hero-overlay + div p, .destination-hero-overlay + div span { color: #F8F5F0 !important; }

/* ── Panorama ─────────────────────────────────────── */
.panorama-container { width: 100%; height: 500px; border-radius: 20px; overflow: hidden; }
.panorama-container iframe { width: 100%; height: 100%; border: none; }

/* ── Timeline ─────────────────────────────────────── */
.timeline-item { position: relative; padding-right: 2rem; border-right: 2px solid var(--gold); padding-bottom: 2rem; }
.timeline-item::before { content: ''; position: absolute; right: -6px; top: 0; width: 10px; height: 10px; background: var(--gold); border-radius: 50%; }
.timeline-item:last-child { border-right: none; }

/* ── Gallery ──────────────────────────────────────── */
.gallery-item { position: relative; overflow: hidden; border-radius: 15px; cursor: pointer; }
.gallery-item img { transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.1); }

/* ── Forms ────────────────────────────────────────── */
.form-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(197, 160, 89, 0.3);
    border-radius: 15px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}
.form-input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.1); }

/* ── Feature Cards ────────────────────────────────── */
.feature-card {
    background: var(--feature-bg);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border-card);
    transition: all 0.5s ease, background var(--theme-transition);
    position: relative;
    overflow: hidden;
}
html:not(.dark) .feature-card {
    background: linear-gradient(145deg, rgba(255,253,247,0.95) 0%, rgba(252,248,240,0.90) 100%);
    border: 1px solid rgba(184, 148, 58, 0.20);
    box-shadow: 0 4px 20px rgba(18, 48, 30, 0.06), inset 0 1px 0 rgba(255,255,255,0.9);
}
.feature-card::before { content: ''; position: absolute; top: 0; right: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); transform: scaleX(0); transform-origin: right; transition: transform 0.5s ease; }
.feature-card:hover::before { transform: scaleX(1); }
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px var(--shadow-card); }
html:not(.dark) .feature-card:hover {
    box-shadow: 0 20px 40px rgba(184, 148, 58, 0.15), 0 6px 16px rgba(18, 48, 30, 0.06);
    border-color: rgba(184, 148, 58, 0.38);
}

.destination-card-overlay h3,
.destination-card-overlay p,
.destination-card-overlay span {
    color: #F8F5F0 !important;
}

/* ── Lightbox ─────────────────────────────────────── */
.lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 5000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.5s ease; }
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox img, .lightbox video { max-width: 90%; max-height: 90%; border-radius: 10px; transform: scale(0.8); transition: transform 0.5s ease; outline: none; }
.lightbox.active img, .lightbox.active video { transform: scale(1); }

/* ── Arabic Geometric Pattern ─────────────────────── */
.arabic-pattern { background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C5A059' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }

/* ── Scrollbars ───────────────────────────────────── */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ── Reading Progress ─────────────────────────────── */
.reading-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--gold); z-index: 1001; transition: width 0.1s ease; }

/* ── Back to Top ──────────────────────────────────── */
.back-to-top { position: fixed; bottom: 2rem; right: 2rem; width: 50px; height: 50px; background: var(--emerald); color: var(--cream); border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--gold); color: var(--emerald); }

/* ══════════════════════════════════════════════════════
   DYNAMIC MOBILE-FIRST RESPONSIVE SYSTEM
   Supports: iPhone SE → iPhone 16 Pro Max, all Android sizes
   ══════════════════════════════════════════════════════ */

/* ── CSS Custom Properties for fluid sizing ─────────── */
:root {
    --space-safe-top:    env(safe-area-inset-top, 0px);
    --space-safe-bottom: env(safe-area-inset-bottom, 0px);
    --space-safe-left:   env(safe-area-inset-left, 0px);
    --space-safe-right:  env(safe-area-inset-right, 0px);
}

/* ── Hero: use dynamic viewport height (dvh) to handle
      iOS Safari URL bar shrinking/growing ──────────── */
.hero {
    height: 100svh; /* svh = small viewport height (iOS safe) */
    min-height: 100svh;
}

/* ── Fluid Typography with clamp() ─────────────────── */
h1#heroTitle {
    font-size: clamp(2.4rem, 8vw, 7rem) !important;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.section-title {
    font-size: clamp(1.6rem, 5vw, 3rem) !important;
}

/* ── Base mobile styles ──────────────────────────────── */
@media (max-width: 768px) {
    /* Navbar */
    .navbar { padding: 0.75rem 1.25rem; }
    .navbar.hide-up { transform: translateY(-100%); }

    /* Hero */
    .hero { height: 100svh; min-height: 100svh; }
    .destination-hero { height: 50svh; }

    /* Cards & layout */
    .destination-card-overlay {
        transform: translateY(0);
        background: linear-gradient(transparent, rgba(27, 67, 50, 0.95));
        padding: 1.25rem;
    }
    .glass-card { padding: 1.25rem !important; }
    .feature-card { padding: 1.25rem; }

    /* Back to top - above floating bar */
    .back-to-top { bottom: 7rem; right: 1rem; width: 44px; height: 44px; }

    /* Body padding for floating bottom bar */
    body { padding-bottom: calc(5rem + var(--space-safe-bottom)); }
}

/* ── iPhone SE / small phones (width ≤ 375px) ───────── */
@media (max-width: 375px) {
    h1#heroTitle { font-size: 2.3rem !important; }
    .section-title { font-size: 1.5rem !important; }
    .mobile-nav-text { font-size: 1.25rem; }
    .magnetic-btn { padding: 0.85rem 1.75rem; font-size: 0.95rem; }
    .navbar { padding: 0.6rem 1rem; }
    .bottom-app-btn { padding: 0.5rem 0.75rem; font-size: 0.65rem; }
}

/* ── iPhone 12 / 13 / 14 standard (390px) ───────────── */
@media (min-width: 376px) and (max-width: 430px) {
    h1#heroTitle { font-size: clamp(2.6rem, 9vw, 3.5rem) !important; }
    .mobile-nav-text { font-size: 1.4rem; }
}

/* ── iPhone Plus / Max / Pro Max (430px+) ───────────── */
@media (min-width: 431px) and (max-width: 768px) {
    h1#heroTitle { font-size: clamp(3rem, 9vw, 4rem) !important; }
    .mobile-nav-text { font-size: 1.5rem; }
    .section-title { font-size: 2.2rem !important; }
}

/* ── Touch targets: Apple HIG requires 44x44pt minimum ── */
.bottom-app-btn, .nav-link, .mobile-nav-item, .magnetic-btn, .tab-btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.bottom-app-btn { min-height: 44px; }
.mobile-nav-item { min-height: 52px; }

/* ── Prevent zoom on iOS when tapping inputs ─────────── */
input, textarea, select, .form-input {
    font-size: max(16px, 1rem) !important;
}

/* ── Smooth momentum scrolling on iOS ─────────────────── */
body, .hide-scrollbar {
    -webkit-overflow-scrolling: touch;
}

/* ── Fix position:fixed elements on iOS (overscroll) ── */
html {
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
}

/* ── Bottom App Bar ───────────────────────────────── */
.bottom-app-bar {
    position: fixed;
    bottom: calc(1.25rem + var(--space-safe-bottom));
    left: max(1.25rem, var(--space-safe-left));
    right: max(1.25rem, var(--space-safe-right));
    width: auto;
    background: var(--bg-bottom-bar);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-card);
    border-radius: 2rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.4rem 0.75rem;
    z-index: 4000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(197, 160, 89, 0.1);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background var(--theme-transition);
}
.bottom-app-bar.hidden { transform: translateY(150%); }

.bottom-app-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0.6rem 1rem;
    border-radius: 1.5rem;
    position: relative;
    overflow: hidden;
}

.bottom-app-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gold);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 1.5rem;
    z-index: -1;
}

.bottom-app-btn:active {
    transform: scale(0.95);
}

.bottom-app-btn.active::before {
    opacity: 0.12;
}

.bottom-app-btn.active {
    color: var(--gold);
    transform: translateY(-3px);
    background: rgba(197, 160, 89, 0.10);
}

/* Active dot indicator under icon */
.bottom-app-btn.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 6px rgba(197, 160, 89, 0.6);
}

.bottom-app-btn svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-app-btn.active svg {
    transform: scale(1.2);
    filter: drop-shadow(0 3px 6px rgba(197, 160, 89, 0.4));
}

@media (min-width: 769px) {
    .bottom-app-bar { display: none; }
}

/* ── Premium Mobile Menu ──────────────────────── */
.mobile-menu-backdrop {
    background-color: var(--bg-body);
    opacity: 0.96;
    backdrop-filter: blur(24px);
    transition: background-color 0.4s ease;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}
.mobile-nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(197,160,89,0.12), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
}
.mobile-nav-item:hover::before,
.mobile-nav-item:active::before { opacity: 1; }
.mobile-nav-item:hover { border-color: rgba(197,160,89,0.3); }

.mobile-nav-num {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gold);
    opacity: 0.6;
    font-family: 'Space Grotesk', monospace;
    letter-spacing: 0.05em;
    min-width: 24px;
}
.mobile-nav-text {
    flex: 1;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}
.mobile-nav-arrow {
    width: 20px;
    height: 20px;
    color: var(--gold);
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
}
.mobile-nav-item:hover .mobile-nav-arrow,
.mobile-nav-item:active .mobile-nav-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ── Page Transition ──────────────────────────────── */
.page-transition-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--emerald);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.83, 0, 0.17, 1);
}

/* ── Premium Scroll Animations ──────────────────── */
.animate-hidden {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    filter: blur(5px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                filter 0.8s ease-out;
    will-change: transform, opacity, filter;
}

.animate-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
}

/* ══════════════════════════════════════════════════════
   📱 COMPLETE MOBILE RESPONSIVE SYSTEM
   iPhone SE (375px) → iPhone 16 Pro Max (430px)
   Android Small (360px) → Large (480px+)
   ══════════════════════════════════════════════════════ */

/* ── Global fluid base (all screens) ─────────────────── */
img, video { max-width: 100%; }
.hero-video { width: 100%; height: 100%; object-fit: cover; }

/* ── All mobiles ≤ 768px ──────────────────────────────── */
@media screen and (max-width: 768px) {

    /* === LAYOUT === */
    body { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); }
    .navbar { padding: 0.7rem 1.1rem !important; }

    /* === HERO === */
    .hero {
        height: 100svh !important;
        min-height: 100svh !important;
    }
    .hero-video { object-position: center center; }

    /* === HERO TEXT === */
    h1#heroTitle {
        font-size: clamp(2rem, 9vw, 3.5rem) !important;
        line-height: 1.2 !important;
        padding: 0 1rem;
    }

    /* === CTA BUTTON === */
    .magnetic-btn {
        font-size: clamp(0.85rem, 3.5vw, 1rem) !important;
        padding: 0.75rem 1.75rem !important;
    }

    /* === DESTINATION HERO (inner pages) === */
    .destination-hero { height: 45svh !important; }

    /* === DESTINATION CARDS === */
    .destination-card-overlay {
        transform: translateY(0) !important;
        padding: 1rem !important;
    }
    .destination-card h3 { font-size: clamp(1.1rem, 4vw, 1.4rem); }

    /* === SECTION TITLE === */
    .section-title {
        font-size: clamp(1.4rem, 5.5vw, 2rem) !important;
        margin-bottom: 0.5rem;
    }

    /* === CARDS === */
    .glass-card { padding: 1.1rem !important; }
    .feature-card { padding: 1.1rem !important; }

    /* === TABS === */
    .tab-btn { font-size: clamp(0.75rem, 3vw, 0.9rem) !important; padding: 0.5rem 1rem !important; }

    /* === MOBILE MENU === */
    .mobile-nav-text { font-size: clamp(1.1rem, 5vw, 1.5rem) !important; }
    .mobile-nav-item { padding: 0.85rem 1.25rem !important; }

    /* === BACK TO TOP === */
    .back-to-top { bottom: 7rem; right: 0.75rem; width: 42px; height: 42px; }

    /* === SCROLL INDICATOR === */
    .scroll-indicator { bottom: 1.5rem; }

    /* === DESTINATION SECTION TEXT === */
    .arabic-pattern section p,
    section p { font-size: clamp(0.85rem, 3.5vw, 1rem); }
}

/* ── iPhone SE + tiny phones ≤ 375px ─────────────────── */
@media screen and (max-width: 375px) {
    h1#heroTitle { font-size: 2rem !important; }
    .section-title { font-size: 1.35rem !important; }
    .mobile-nav-text { font-size: 1.1rem !important; }
    .magnetic-btn { padding: 0.7rem 1.4rem !important; font-size: 0.82rem !important; }
    .navbar { padding: 0.55rem 0.85rem !important; }
    .bottom-app-btn { padding: 0.45rem 0.6rem !important; font-size: 0.6rem !important; }
    .bottom-app-btn svg { width: 20px !important; height: 20px !important; }
    .glass-card { padding: 0.9rem !important; }
    .back-btn-global { font-size: 0.72rem !important; padding: 0.25rem 0.65rem !important; }
    .mobile-nav-item { padding: 0.75rem 1rem !important; }
}

/* ── iPhone 12/13/14 — 390px ─────────────────────────── */
@media screen and (min-width: 376px) and (max-width: 393px) {
    h1#heroTitle { font-size: clamp(2.2rem, 8.5vw, 3rem) !important; }
    .section-title { font-size: 1.7rem !important; }
    .mobile-nav-text { font-size: 1.35rem !important; }
}

/* ── iPhone 14 Pro / 15 — 393px → 430px ─────────────── */
@media screen and (min-width: 394px) and (max-width: 430px) {
    h1#heroTitle { font-size: clamp(2.4rem, 8vw, 3.5rem) !important; }
    .section-title { font-size: 1.85rem !important; }
    .mobile-nav-text { font-size: 1.4rem !important; }
}

/* ── iPhone Pro Max / Plus ≥ 430px (mobile only) ─────── */
@media screen and (min-width: 431px) and (max-width: 768px) {
    h1#heroTitle { font-size: clamp(2.8rem, 7.5vw, 4rem) !important; }
    .section-title { font-size: 2rem !important; }
    .mobile-nav-text { font-size: 1.5rem !important; }
    .glass-card { padding: 1.5rem !important; }
    .bottom-app-btn { padding: 0.65rem 1.25rem !important; }
}

/* ── Landscape mode on phones ─────────────────────────── */
@media screen and (max-width: 900px) and (orientation: landscape) {
    .hero { height: 100svw !important; min-height: 60svh !important; }
    h1#heroTitle { font-size: clamp(1.6rem, 5vw, 2.5rem) !important; }
    .magnetic-btn { padding: 0.6rem 1.5rem !important; }
    .scroll-indicator { display: none; }
    .bottom-app-bar {
        bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
        left: max(1rem, env(safe-area-inset-left, 1rem));
        right: max(1rem, env(safe-area-inset-right, 1rem));
    }
}

/* ── iPhone notch / Dynamic Island padding ────────────── */
@supports (padding-top: env(safe-area-inset-top)) {
    .navbar {
        padding-top: max(0.7rem, env(safe-area-inset-top, 0.7rem));
    }
    @media (max-width: 768px) {
        .bottom-app-bar {
            bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
        }
        body {
            padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
        }
    }
}

/* ═══════════════════════════════════════════════════════
   ✦ LUXURY LIGHT MODE — Full Theme Override ✦
   ═══════════════════════════════════════════════════════ */
html:not(.dark) .arabic-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23B8943A' fill-opacity='0.12'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-color: transparent;
}

/* Bottom App Bar — warm ivory */
html:not(.dark) .bottom-app-bar {
    background: rgba(238, 232, 218, 0.97) !important;
    border-top-color: rgba(184, 148, 58, 0.20) !important;
    box-shadow: 0 -4px 30px rgba(18, 48, 30, 0.08), 0 -1px 0 rgba(184, 148, 58, 0.15) !important;
    backdrop-filter: blur(20px);
}
html:not(.dark) .bottom-app-btn {
    color: var(--emerald);
    opacity: 0.55;
}
html:not(.dark) .bottom-app-btn.active,
html:not(.dark) .bottom-app-btn:hover {
    color: var(--gold);
    opacity: 1;
}

/* Section headings — rich emerald with subtle depth */
html:not(.dark) .section-title {
    color: #12301e !important;
    text-shadow: 0 2px 16px rgba(18, 48, 30, 0.07);
}

/* Sections that have a green background — keep them elegant in light mode */
html:not(.dark) section[style*="background-color: var(--emerald)"],
html:not(.dark) footer[style*="background-color: var(--emerald)"] {
    background-color: var(--emerald) !important;
}

/* Destinations section background — warm linen instead of flat white */
html:not(.dark) #destinations {
    background: linear-gradient(160deg, #E8E2D3 0%, #EDE6D6 50%, #E4DCC8 100%);
}

/* Tab wrapper — luxury sand tones */
html:not(.dark) .premium-tabs-wrapper {
    background: rgba(255, 252, 240, 0.75);
    border: 1px solid rgba(184, 148, 58, 0.25);
    box-shadow: 0 4px 24px rgba(18, 48, 30, 0.07), inset 0 1px 0 rgba(255,255,255,0.8);
}
html:not(.dark) .tab-btn:not(.active) {
    color: #163a28;
    opacity: 0.7;
}
html:not(.dark) .tab-btn.active {
    background: linear-gradient(135deg, #163a28, #1f5237);
    color: var(--gold) !important;
    box-shadow: 0 8px 24px rgba(22, 58, 40, 0.25);
}

/* Form inputs — pearl white */
html:not(.dark) .form-input,
html:not(.dark) input,
html:not(.dark) textarea,
html:not(.dark) select {
    background: rgba(255, 253, 248, 0.95);
    border-color: rgba(184, 148, 58, 0.22);
    color: #12301e;
}
html:not(.dark) .form-input:focus,
html:not(.dark) input:focus,
html:not(.dark) textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(184, 148, 58, 0.12);
}

/* Mobile menu overlay — warm tones */
html:not(.dark) .mobile-menu-backdrop {
    background: linear-gradient(160deg, rgba(238, 232, 218, 0.97) 0%, rgba(228, 218, 198, 0.97) 100%);
}
html:not(.dark) .mobile-nav-item {
    color: #12301e;
    border-color: rgba(184, 148, 58, 0.15) !important;
}
html:not(.dark) .mobile-nav-item:hover {
    background: rgba(184, 148, 58, 0.08);
    color: var(--gold-dark);
}
html:not(.dark) .mobile-nav-num {
    color: var(--gold);
}
