/* ============================================================
   Home Page — Brand Identity System
   Derived from the company emblem: a deep forest-green falcon
   crest with triple gold wing-stripes and a circular "wing ring".
   Every palette value, motif and shape on this page traces back
   to that mark: the green body, the gold trim, the 3-line wing
   feathers, and the ring the wing curls around.
   ============================================================ */

:root {
    --primary-color: #1f6b4a;       /* brand green — from the emblem body */
    --primary-dark: #123524;        /* deep shadow green */
    --primary-darker: #0c2118;      /* near-black green, hero backdrop */
    --secondary-color: #2f9e6e;     /* lighter leaf green — success/positive */
    --gold: #c9a227;                /* wing-stripe gold — premium accent */
    --gold-dark: #a6841e;
    --gold-soft: rgba(201, 162, 39, 0.12);
    --accent-color: #c9a227;        /* alias kept for VIP/amenity badges */
    --bg-light: #f6faf7;
    --bg-panel: #eef5f0;
    --text-main: #14251c;
    --text-muted: #5b6b63;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --ring-line: rgba(31, 107, 74, 0.14);
    --shadow-sm: 0 4px 6px -1px rgba(12, 33, 24, 0.08), 0 2px 4px -1px rgba(12, 33, 24, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(12, 33, 24, 0.1), 0 4px 6px -2px rgba(12, 33, 24, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(12, 33, 24, 0.12), 0 10px 10px -5px rgba(12, 33, 24, 0.04);
    --shadow-gold: 0 10px 25px -5px rgba(201, 162, 39, 0.35);
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
}

/* الاتجاه يتبع سمة dir الفعلية على <html> (يبدّلها مبدّل اللغة بين ar/en/fr) بدل فرض RTL دائماً -
   كانت هذه القاعدة تفرض RTL على الصفحة الرئيسية حتى عند اختيار الإنجليزية/الفرنسية. */
html[dir="rtl"], html[dir="rtl"] body {
    direction: rtl;
}

/* Re-tint every Bootstrap utility (.text-primary, .bg-success, .btn-outline-primary, etc.)
   used inside the homepage to the brand palette, without touching Bootstrap globally. */
.home-modern-container {
    --bs-primary: var(--primary-color);
    --bs-primary-rgb: 31, 107, 74;
    --bs-success: var(--secondary-color);
    --bs-success-rgb: 47, 158, 110;
    --bs-warning: var(--gold);
    --bs-warning-rgb: 201, 162, 39;
    --bs-info: var(--primary-color);
    --bs-info-rgb: 31, 107, 74;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    margin-bottom: 1rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--gold));
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-brand-gold { color: var(--gold) !important; }
.text-brand-green { color: var(--primary-color) !important; }

/* Container fix for row bleed */
.container, .container-fluid, .container-xl {
    overflow: hidden;
}

/* Section Spacing */
.section-py { padding: 90px 0; position: relative; }
@media (max-width: 768px) {
    .section-py { padding: 56px 0; }
}

/* ------------------------------------------------------------
   Wing-Stripe Divider — the emblem's 3 trailing feather lines,
   reused as a section-to-section seam across the whole page.
   ------------------------------------------------------------ */
.wing-divider {
    position: relative;
    height: 46px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 3;
    pointer-events: none;
}

.wing-divider span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
    opacity: 0.55;
}

.wing-divider span:nth-child(1) { width: 60px; }
.wing-divider span:nth-child(2) { width: 110px; }
.wing-divider span:nth-child(3) { width: 60px; }

/* Ring motif — echoes the circular wing-ring in the emblem */
.brand-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--ring-line);
    pointer-events: none;
}

/* Modern Buttons */
.btn-modern {
    padding: 13px 30px;
    border-radius: var(--radius-md);
    font-weight: 700;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary-modern {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 10px 20px -5px rgba(31, 107, 74, 0.45);
}

.btn-primary-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 30px -8px rgba(31, 107, 74, 0.5);
    color: var(--white);
}

.btn-gold-modern {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #1a1204;
    box-shadow: var(--shadow-gold);
}

.btn-gold-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 30px -8px rgba(201, 162, 39, 0.5);
    color: #1a1204;
}

.btn-glass-modern {
    /* لا يُستخدم backdrop-filter عمداً: يسبب أحياناً خللاً بصرياً (شرائط ألوان غريبة) في بعض
       متصفحات الهواتف/تطبيق PWA المثبَّت - خلفية شبه شفافة عادية تعطي نفس مظهر "الزجاج"
       تقريباً دون هذا الخطر. */
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
    border: 1px solid var(--glass-border);
}

.btn-glass-modern:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    transform: translateY(-3px);
}

/* Modern Cards */
.card-modern {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(31, 107, 74, 0.08);
    box-shadow: var(--shadow-sm);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 24px;
    height: 100%;
    position: relative;
}

.card-modern:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(31, 107, 74, 0.18);
}

/* Corner wing-stripe accent on feature cards */
.card-modern::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 26px;
    height: 14px;
    background-image: repeating-linear-gradient(100deg, var(--gold) 0px, var(--gold) 2px, transparent 2px, transparent 5px);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.card-modern:hover::before {
    opacity: 0.5;
}

/* ==========================================
   Scroll Reveal System (IntersectionObserver driven)
   Cinematic entrance: rises, un-blurs and settles into place —
   used to transition every section into view as the user scrolls.
   ========================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    filter: blur(6px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform, filter;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    /* Drop the forced compositing layer once the reveal finishes — leaving
       will-change on indefinitely is what let this layer paint over later
       siblings (the quick-actions icons) on iOS Safari. */
    will-change: auto;
}
.reveal.delay-100.active { transition-delay: 0.1s; }
.reveal.delay-200.active { transition-delay: 0.2s; }
.reveal.delay-300.active { transition-delay: 0.3s; }
.reveal.delay-400.active { transition-delay: 0.4s; }

.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Richer variant: slides in from the side while settling, for section
   headings that benefit from more choreographed motion than a plain rise. */
.reveal-slide {
    opacity: 0;
    transform: translateX(36px) translateY(10px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-slide.active {
    opacity: 1;
    transform: translateX(0) translateY(0);
    will-change: auto;
}

/* Richer variant: icon badges inside a .reveal card get their own delayed
   pop (scale + gentle rotate) layered on top of the card's own rise, so the
   entrance reads as choreographed instead of everything moving as one block. */
.reveal .icon-ring {
    opacity: 0;
    transform: scale(0.4) rotate(-18deg);
    transition: opacity 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.22s,
                transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.22s;
}
.reveal.active .icon-ring {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Wing-divider draws itself in, feather by feather, as it enters view */
.wing-divider span {
    transform: scaleX(0);
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.wing-divider span:nth-child(1) { transition-delay: 0s; }
.wing-divider span:nth-child(2) { transition-delay: 0.12s; }
.wing-divider span:nth-child(3) { transition-delay: 0.24s; }
.wing-divider.in-view span {
    transform: scaleX(1);
}

/* Scroll-linked depth parallax for section imagery (routes, fleet) */
.parallax-img {
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
    /* These only ever animate between two states — snapping straight to the
       end state is the correct reduced-motion behavior. */
    .reveal, .reveal-scale, .reveal-slide, .wing-divider span {
        transition: none !important;
        animation: none !important;
        filter: none !important;
        transform: none !important;
    }

    .reveal .icon-ring {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }

    /* These carry structural transforms (centering the watermark, cropping
       the route images) that must stay — only the JS-driven motion is
       skipped (already gated by prefers-reduced-motion in Index.cshtml). */
    .parallax-img, .hero-watermark {
        transition: none !important;
        animation: none !important;
    }
}

/* Scroll progress bar */
#scrollProgress {
    position: fixed;
    top: 0;
    right: 0;
    height: 3px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: right center;
    background: linear-gradient(90deg, var(--gold), var(--primary-color));
    z-index: 2000;
    will-change: transform;
}
html[dir="ltr"] #scrollProgress { right: auto; left: 0; transform-origin: left center; }

/* ==========================================
   HERO — logo-inspired backdrop
   ========================================== */
.hero-wrapper {
    position: relative;
    background: radial-gradient(ellipse 900px 600px at 82% 12%, rgba(201, 162, 39, 0.16), transparent 60%),
                radial-gradient(ellipse 1100px 700px at 10% 100%, rgba(47, 158, 110, 0.18), transparent 60%),
                linear-gradient(160deg, #0c2118 0%, #123524 55%, #0a1c14 100%);
    min-height: 94vh;
    display: flex;
    align-items: center;
    color: var(--white);
    border-radius: 0 0 60px 60px;
    overflow: hidden;
    /* Contain the hero's own compositing layers (watermark filter/blend-mode,
       Swiper transforms) so they can never paint over the quick-actions card
       that overlaps this section right below it — a WebKit stacking bug. */
    isolation: isolate;
}

@media (max-width: 768px) {
    .hero-wrapper {
        min-height: auto;
        padding-top: 110px;
        padding-bottom: 60px;
        border-radius: 0 0 40px 40px;
    }
}

/* Giant faint watermark of the emblem itself — the literal source of inspiration.
   A real element (not ::before) so JS can drive it: it drifts with the cursor,
   drifts with scroll, and tilts gently with the phone's orientation, all blended
   through one eased loop so the motions never fight each other. */
.hero-bg-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.hero-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1400px;
    height: 1400px;
    background-image: url('/img/sticker.webp');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transform: translate(calc(-38% + var(--wm-x, 0px)), calc(-50% + var(--wm-y, 0px))) rotate(calc(-6deg + var(--wm-rot, 0deg)));
    /* ملاحظة: كانت هذه العلامة المائية تستخدم mix-blend-mode:screen فوق صورة كبيرة جداً
       (1400px) مع filter - تركيبة معروفة بتسببها أحياناً في خلل تركيب طبقات (compositing)
       في بعض المتصفحات، يظهر كفراغ فاتح كامل مكان الخلفية الداكنة للهيرو. استُبدلت بشفافية
       بسيطة عادية (بدون blend-mode) تعطي نفس الأثر البصري تقريباً بلا أي مخاطرة تقنية.
    */
    opacity: 0.05;
    filter: brightness(0) invert(1);
    will-change: transform;
    pointer-events: none;
}

@media (max-width: 768px) {
    .hero-watermark {
        width: 900px;
        height: 900px;
        transform: translate(calc(-50% + var(--wm-x, 0px)), calc(-46% + var(--wm-y, 0px))) rotate(calc(-6deg + var(--wm-rot, 0deg)));
        opacity: 0.08;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-watermark { transition: none; }
}

/* Animated wing-stripe sweep lines across the hero (SVG feather motif) */
.hero-wing-lines {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.5;
}

.hero-wing-lines svg { width: 100%; height: 100%; }

.hero-wing-lines .stripe {
    stroke: var(--gold);
    stroke-width: 1.4;
    fill: none;
    stroke-dasharray: 6 10;
    opacity: 0.55;
    animation: stripeDrift 14s linear infinite;
}
.hero-wing-lines .stripe:nth-child(2) { animation-duration: 18s; opacity: 0.35; }
.hero-wing-lines .stripe:nth-child(3) { animation-duration: 22s; opacity: 0.22; }

@keyframes stripeDrift {
    to { stroke-dashoffset: -160; }
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-eyebrow-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-full);
    background: var(--gold-soft);
    border: 1px solid rgba(201, 162, 39, 0.35);
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* Trust strip under hero heading — small ring-badge stats */
.hero-trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin-top: 2.5rem;
}

.hero-trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-trust-ring {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1.5px solid rgba(201, 162, 39, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 1.05rem;
    flex-shrink: 0;
    position: relative;
}

.hero-trust-ring::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px dashed rgba(201, 162, 39, 0.25);
}

.hero-trust-value {
    font-weight: 900;
    font-size: 1.15rem;
    line-height: 1.1;
    color: var(--white);
}

.hero-trust-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    font-weight: 600;
}

/* Booking Form Widget */
.booking-widget {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    margin-top: 40px;
    color: var(--text-main);
}

@media (max-width: 768px) {
    .booking-widget {
        padding: 20px;
        margin-top: 30px;
    }
}

.booking-form-group {
    position: relative;
    margin-bottom: 15px;
}

.booking-form-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.booking-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
}

.booking-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
}


@media (max-width: 576px) {
    .table-responsive table {
        border: 0;
    }
    .table-responsive thead {
        display: none;
    }
    .table-responsive tbody tr {
        display: block;
        margin-bottom: 1rem;
        background: var(--white);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
        padding: 0.75rem;
    }
    .table-responsive td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
    }
    .table-responsive td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
    }
    .table-responsive td[data-label="الإجراء"] a {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* ==========================================
   Trips Carousel (Swiper) & Premium Cards
   ========================================== */
.trips-carousel-section {
    padding: 60px 0;
    background-color: var(--bg-light);
    position: relative;
}

.carousel-container {
    position: relative;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .carousel-container {
        padding: 0 10px;
    }
}

.swiper-button-next,
.swiper-button-prev {
    width: 48px;
    height: 48px;
    background: var(--white);
    border: 1px solid rgba(31, 107, 74, 0.08);
    border-radius: 50%;
    color: var(--primary-color) !important;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px !important;
    font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--primary-color);
    color: var(--white) !important;
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
}

.swiper-pagination-bullet-active {
    background: var(--gold) !important;
    width: 24px !important;
    border-radius: 4px !important;
}

/* Premium Carousel Trip Card */
.carousel-trip-card {
    --card-padding: 28px;
    background: var(--white);
    border: 1px solid rgba(31, 107, 74, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--card-padding);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

@media (max-width: 576px) {
    .carousel-trip-card {
        --card-padding: 20px;
    }
}

.carousel-trip-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

/* Trip Header Badge */
.trip-card-header-badge {
    position: absolute;
    top: 0;
    left: 24px;
    padding: 6px 14px;
    border-radius: 0 0 12px 12px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    background: rgba(31, 107, 74, 0.1);
    color: var(--primary-color);
    z-index: 10;
}

.trip-card-header-badge.vip {
    background: rgba(201, 162, 39, 0.14);
    color: var(--gold-dark);
}

/* Boarding Pass Ticket Path Styling */
.trip-boarding-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    margin-top: 10px;
}

.trip-city-node {
    flex: 1;
}

.trip-city-name {
    font-weight: 900;
    font-size: 1.35rem;
    color: var(--text-main);
    display: block;
    letter-spacing: -0.5px;
}

.trip-city-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.trip-visual-connector {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0 10px;
}

.trip-connector-line {
    height: 2px;
    background: repeating-linear-gradient(90deg, #cbd5e1 0px, #cbd5e1 4px, transparent 4px, transparent 8px);
    width: 100%;
    position: relative;
    margin: 8px 0;
}

.trip-connector-line::before,
.trip-connector-line::after {
    content: '';
    width: 6px;
    height: 6px;
    background: #cbd5e1;
    border-radius: 50%;
    position: absolute;
    top: -2px;
}

.trip-connector-line::before { right: 0; background: var(--primary-color); }
.trip-connector-line::after { left: 0; }

.trip-connector-bus {
    position: absolute;
    top: -9px;
    background: var(--white);
    padding: 0 8px;
    color: var(--primary-color);
    font-size: 1rem;
    transition: transform 0.5s ease;
}

.carousel-trip-card:hover .trip-connector-bus {
    transform: translateX(-15px);
}

/* Ticket Divider with Physical Cutouts */
.ticket-divider {
    position: relative;
    height: 1px;
    border-top: 1px dashed rgba(31, 107, 74, 0.18);
    margin: 10px calc(-1 * var(--card-padding)) 18px calc(-1 * var(--card-padding));
}

.ticket-divider::before,
.ticket-divider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--bg-light);
    border-radius: 50%;
    top: -8px;
    z-index: 5;
    transition: background-color 0.3s ease;
}

.ticket-divider::before {
    left: -8px;
}

.ticket-divider::after {
    right: -8px;
}

html[data-bs-theme="dark"] .ticket-divider {
    border-top-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .ticket-divider::before,
html[data-bs-theme="dark"] .ticket-divider::after {
    background: #081712;
}

/* Ticket Details */
.trip-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px dashed rgba(31, 107, 74, 0.12);
}

.trip-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.trip-meta-item i {
    color: var(--primary-color);
    font-size: 1.05rem;
}

/* Seats indicator */
.trip-seats-status {
    margin-bottom: 20px;
}

.trip-seats-count {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
}

/* Amenities and Facilities */
.trip-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 20px;
    padding-top: 16px;
    border-top: 1px dashed rgba(31, 107, 74, 0.12);
}

html[data-bs-theme="dark"] .trip-amenities {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.amenity-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(31, 107, 74, 0.07);
    color: var(--primary-color);
    border: 1px solid rgba(31, 107, 74, 0.12);
    transition: all 0.25s ease;
}

.amenity-badge.vip {
    background: rgba(201, 162, 39, 0.1);
    color: var(--gold-dark);
    border-color: rgba(201, 162, 39, 0.2);
}

.amenity-badge i {
    font-size: 0.85rem;
}

.amenity-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

html[data-bs-theme="dark"] .amenity-badge {
    background: rgba(47, 158, 110, 0.14);
    color: #7fd4ab;
    border-color: rgba(47, 158, 110, 0.25);
}

/* Mobile swipe hint - hidden by default */
.swipe-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: none; /* hidden on larger screens */
    align-items: center;
    gap: 4px;
    z-index: 20;
    animation: swipeHintPulse 2s infinite;
}

/* Show swipe hint on small screens */
@media (max-width: 991px) {
    .swipe-hint {
        display: flex !important;
    }
    .swipe-hint i.fa-arrow-right {
        animation: arrowMove 2s infinite;
    }
}

/* Pulse opacity animation */
@keyframes swipeHintPulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* Arrow slide animation */
@keyframes arrowMove {
    0% { transform: translateX(0); }
    50% { transform: translateX(4px); }
    100% { transform: translateX(0); }
}

html[data-bs-theme="dark"] .amenity-badge.vip {
    background: rgba(201, 162, 39, 0.16);
    color: #f0d783;
    border-color: rgba(201, 162, 39, 0.28);
}

/* Pricing and Booking */
.trip-footer-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(31, 107, 74, 0.08);
}

html[data-bs-theme="dark"] .trip-footer-row {
    border-top-color: rgba(255, 255, 255, 0.05);
}

@media (min-width: 576px) {
    .trip-footer-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
    }
}

.trip-price-wrapper {
    display: flex;
    flex-direction: column;
}

.trip-price-amount {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--gold-dark);
    line-height: 1;
}

.trip-price-currency {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 700;
}

/* ==========================================
   Dark Mode Overrides for Carousel & Sections
   ========================================== */
html[data-bs-theme="dark"] {
    /* إعادة تعريف متغيرات خلفية الأقسام الفاتحة (--bg-light / --bg-panel) في الوظع المظلم -
       كانت هذه المتغيرات مُعرَّفة مرة واحدة فقط على :root ولا تُعاد كتابتها هنا، فبقيت بعض
       الأقسام (مثل قسم "المسارات الشائعة" الذي يستخدم var(--bg-panel) مباشرة كنمط inline)
       فاتحة اللون دائماً بغض النظر عن الوضع الحالي. نفس نمط إصلاح --glass في شريط التنقل. */
    --bg-light: #081712;
    --bg-panel: #0c2118;
}

html[data-bs-theme="dark"] body {
    background-color: #081712 !important;
}

html[data-bs-theme="dark"] .trips-carousel-section,
html[data-bs-theme="dark"] .section-py.bg-white,
html[data-bs-theme="dark"] .section-py.bg-light {
    background-color: #081712 !important;
}

html[data-bs-theme="dark"] .card-modern {
    background: #0e2019;
    border-color: rgba(255, 255, 255, 0.06);
}

html[data-bs-theme="dark"] .carousel-trip-card {
    background: #0e2019;
    border-color: rgba(255, 255, 255, 0.06);
}

html[data-bs-theme="dark"] .carousel-trip-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

html[data-bs-theme="dark"] .trip-city-name,
html[data-bs-theme="dark"] h1, html[data-bs-theme="dark"] h2,
html[data-bs-theme="dark"] h3, html[data-bs-theme="dark"] h4,
html[data-bs-theme="dark"] h5, html[data-bs-theme="dark"] h6 {
    color: #f2f7f4;
}

html[data-bs-theme="dark"] .trip-connector-bus {
    background: #0e2019;
}

html[data-bs-theme="dark"] .trip-meta-grid {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .swiper-button-next,
html[data-bs-theme="dark"] .swiper-button-prev {
    background: #0e2019;
    border-color: rgba(255, 255, 255, 0.06);
    color: #7fd4ab !important;
}

html[data-bs-theme="dark"] .swiper-button-next:hover,
html[data-bs-theme="dark"] .swiper-button-prev:hover {
    background: var(--primary-color);
    color: var(--white) !important;
}

html[data-bs-theme="dark"] .text-muted {
    color: #8fa89b !important;
}

html[data-bs-theme="dark"] .booking-widget {
    background: #0e2019;
    color: #e6f0ea;
}

/* Custom Swiper Navigation Styles inside Carousel Container (Minimalist Arrow Style) */
.carousel-container .swiper-button-next,
.carousel-container .swiper-button-prev {
    width: 40px;
    height: 40px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--primary-color) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin-top: 0 !important;
    z-index: 20;
    opacity: 0.6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-container .swiper-button-next::after,
.carousel-container .swiper-button-prev::after {
    font-size: 28px !important;
    font-weight: 900;
}

.carousel-container .swiper-button-next:hover {
    opacity: 1;
    color: var(--primary-color) !important;
    transform: translateY(-50%) translateX(4px) scale(1.1) !important;
}

.carousel-container .swiper-button-prev:hover {
    opacity: 1;
    color: var(--primary-color) !important;
    transform: translateY(-50%) translateX(-4px) scale(1.1) !important;
}

.carousel-container .swiper-button-next {
    right: 2px !important;
}

.carousel-container .swiper-button-prev {
    left: 2px !important;
}

/* Dark Mode Minimalist Arrows */
html[data-bs-theme="dark"] .carousel-container .swiper-button-next,
html[data-bs-theme="dark"] .carousel-container .swiper-button-prev {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #7fd4ab !important;
}

html[data-bs-theme="dark"] .carousel-container .swiper-button-next:hover,
html[data-bs-theme="dark"] .carousel-container .swiper-button-prev:hover {
    background: transparent !important;
    color: #a9e6c4 !important;
}

/* Hide Swiper Navigation Buttons on Mobile & Tablet for Clean Touch Layout */
@media (max-width: 991px) {
    .carousel-container .swiper-button-next,
    .carousel-container .swiper-button-prev {
        display: none !important;
    }
    .carousel-container {
        padding: 0 !important;
    }
}

/* ==========================================
   Section Eyebrow / Heading kit (shared across partials)
   ========================================== */
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold-dark);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
}

html[data-bs-theme="dark"] .section-eyebrow { color: var(--gold); }

.section-underline {
    width: 64px;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--gold));
    margin: 14px auto 0;
}

.section-underline.align-start { margin-inline: 0; }

/* ==========================================
   Icon ring — circular badge echoing the emblem's wing-ring
   ========================================== */
.icon-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
    background: rgba(31, 107, 74, 0.08);
    color: var(--primary-color);
    transition: all 0.35s ease;
}

.icon-ring::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1.5px dashed rgba(201, 162, 39, 0.35);
    opacity: 0;
    transition: all 0.35s ease;
    transform: scale(0.85);
}

.card-modern:hover .icon-ring::after {
    opacity: 1;
    transform: scale(1);
}

.card-modern:hover .icon-ring {
    background: var(--primary-color);
    color: var(--white);
}

/* ==========================================
   Stats — count-up ring cards
   ========================================== */
.stat-ring-card {
    text-align: center;
    padding: 32px 16px;
    border-radius: var(--radius-lg);
    background: var(--white);
    border: 1px solid rgba(31, 107, 74, 0.08);
    box-shadow: var(--shadow-sm);
    transition: all 0.35s ease;
}

.stat-ring-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.stat-ring-value {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--gold));
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-ring-label {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.85rem;
    margin-top: 10px;
    display: block;
}

html[data-bs-theme="dark"] .stat-ring-card {
    background: #0e2019;
    border-color: rgba(255,255,255,0.06);
}

/* Fleet section dark backdrop, tuned to brand green-black */
.fleet-dark-section {
    background: radial-gradient(ellipse 800px 500px at 90% 0%, rgba(201,162,39,0.08), transparent 60%), #0a1c14;
    color: white;
    border-radius: 60px 60px 0 0;
}

/* Route card zoom on hover, combined with the scroll-linked depth
   parallax (--px-y, set by JS) so the two effects never fight over
   the transform property. */
.route-card-img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(var(--px-y, 0px)) scale(1.1);
}
.route-card-wrap:hover .route-card-img {
    transform: translateY(var(--px-y, 0px)) scale(1.18);
}

/* Footer CTA gradient — green to gold, brand signature */
.cta-brand-gradient {
    background: linear-gradient(135deg, #123524 0%, #1f6b4a 55%, #a6841e 130%);
}

/* ============================================================
   Install Promo Banner — nested INSIDE the hero section itself
   (same background/watermark as "رحلتك القادمة تبدأ بلمسة واحدة",
   not a separate card/section with its own background)
   ============================================================ */
.install-promo {
    position: relative;
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 56px;
    padding-top: 44px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

@media (min-width: 992px) {
    .install-promo { flex-wrap: nowrap; }
}

.install-promo-text { flex: 1 1 320px; min-width: 0; color: #fff; }

.install-promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(201, 162, 39, .18);
    border: 1px solid rgba(201, 162, 39, .4);
    color: var(--gold);
    font-size: .78rem;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 14px;
}

.install-promo-text h2 {
    font-size: clamp(1.4rem, 3.2vw, 2rem);
    font-weight: 900;
    margin-bottom: 12px;
    line-height: 1.35;
}

.install-promo-text p {
    color: rgba(255, 255, 255, .75);
    font-size: .98rem;
    line-height: 1.85;
    margin-bottom: 18px;
    max-width: 480px;
}

.install-promo-perks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.install-promo-perks span {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #e8efe9;
    font-size: .8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-full);
}

.install-promo-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #1a1204;
    font-weight: 800;
    font-size: 1rem;
    border: none;
    padding: 14px 34px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-gold);
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease;
}

.install-promo-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px -6px rgba(201, 162, 39, .5);
}

.install-promo-btn:active { transform: translateY(-1px); }

/* ── Realistic iPhone Frame (Dynamic-Island generation) ──
   ملاحظة مهمة: تعمّدنا تجنّب أي 3D transform (perspective/rotateY/rotateX) هنا -
   هذا القسم بالذات (Hero) يحمل توثيقاً سابقاً لخلل تركيب معروف في iOS Safari حيث
   تُرسم طبقة العنصر ثلاثي الأبعاد فوق العناصر الشقيقة التالية له في الصفحة (بطاقة
   الأزرار الدائرية أسفله مباشرة) بغض النظر عن ترتيب z-index. مَيلان ثنائي الأبعاد
   بسيط (rotate فقط) يعطي نفس الإحساس الواقعي دون التعرّض لهذا الخلل إطلاقاً. */
.install-promo-phone-wrap {
    position: relative;
    flex: 0 0 auto;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.iphone-frame {
    position: relative;
    width: 216px;
    height: 440px;
    background: linear-gradient(155deg, #3a3d40 0%, #1c1e20 45%, #101112 100%);
    border-radius: 46px;
    padding: 5px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, .15) inset,
        0 2px 4px rgba(255, 255, 255, .25) inset,
        0 40px 70px -20px rgba(0, 0, 0, .65),
        0 10px 25px -8px rgba(0, 0, 0, .5);
    transform: rotate(-3deg);
    transition: transform .5s cubic-bezier(.16, 1, .3, 1), box-shadow .5s ease;
}

.install-promo-phone-wrap:hover .iphone-frame,
.install-promo:hover .iphone-frame {
    transform: rotate(0deg);
}

/* تتبّع مَيلان ديناميكي بسيط لموضع الفأرة - لا يزال ثنائي الأبعاد (rotate فقط، بلا
   perspective/rotateX/rotateY) حتى لا يُعاد إنتاج خلل iOS Safari الموثّق أعلاه، لكنه
   يمنح إحساس "3D تفاعلي" لأن الميلان يتبع موضع المؤشر بدل قيمة hover ثابتة. مُفعَّل فقط
   على الأجهزة ذات الفأرة (راجع _InstallPromoBanner.cshtml) عبر متغيّر --dyn-tilt. */
.iphone-frame.dyn-tilt {
    transform: rotate(var(--dyn-tilt, -3deg)) scale(1.015);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, .15) inset,
        0 2px 4px rgba(255, 255, 255, .25) inset,
        0 50px 85px -18px rgba(0, 0, 0, .7),
        0 14px 32px -6px rgba(0, 0, 0, .55);
}

.iphone-btn {
    position: absolute;
    background: linear-gradient(90deg, #2a2c2e, #131415);
    z-index: -1;
}
.iphone-btn-mute { right: -3px; top: 92px; width: 3px; height: 22px; border-radius: 2px 0 0 2px; }
.iphone-btn-vol-up { right: -3px; top: 130px; width: 3px; height: 38px; border-radius: 2px 0 0 2px; }
.iphone-btn-vol-down { right: -3px; top: 176px; width: 3px; height: 38px; border-radius: 2px 0 0 2px; }
.iphone-btn-power { left: -3px; top: 145px; width: 3px; height: 56px; border-radius: 0 2px 2px 0; }

.iphone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 0 0 2px #000;
}

.iphone-dynamic-island {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 84px;
    height: 24px;
    background: #000;
    border-radius: 16px;
    z-index: 5;
}

/* ── "Video" simulation: cycling frames showing the booking flow ── */
.booking-demo {
    position: absolute;
    inset: 0;
    background: var(--bg-light);
}

.demo-frame {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity .5s ease, transform .5s ease;
    pointer-events: none;
}

.demo-frame.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.phone-app-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    padding: 46px 14px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.phone-app-icon { width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0; }
.demo-back { color: #fff; font-size: .8rem; opacity: .85; }

.phone-app-header-text { display: flex; flex-direction: column; gap: 2px; }
.phone-app-name { color: #fff; font-size: .7rem; font-weight: 800; }
.phone-app-status { color: rgba(255, 255, 255, .65); font-size: .56rem; font-weight: 600; }

.phone-search-card {
    background: #fff;
    margin: -8px 12px 8px;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 6px 14px rgba(12, 33, 24, .1);
    position: relative;
    z-index: 1;
}

.phone-search-row { display: flex; justify-content: space-between; align-items: center; font-size: .64rem; padding: 3px 0; }
.phone-search-row span { color: var(--text-muted); font-weight: 700; }
.phone-search-row b { color: var(--text-main); font-size: .68rem; }
.phone-search-sep { text-align: center; color: var(--gold); font-size: .55rem; padding: 2px 0; }

.demo-skeleton-btn {
    margin-top: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    font-size: .64rem;
    font-weight: 800;
    text-align: center;
    padding: 9px;
    border-radius: 10px;
}
.demo-skeleton-btn.gold { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #1a1204; }

.phone-trip-card {
    background: #fff;
    margin: 8px 12px 0;
    border-radius: 10px;
    padding: 9px 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(12, 33, 24, .06);
    border: 1.5px solid transparent;
}
.phone-trip-card.demo-pick { border-color: var(--gold); }

.phone-trip-time { font-size: .6rem; font-weight: 800; color: var(--primary-color); white-space: nowrap; }
.phone-trip-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.phone-trip-bar { height: 5px; border-radius: 3px; background: var(--bg-panel); }
.phone-trip-bar.short { width: 60%; }
.phone-trip-price { font-size: .6rem; font-weight: 800; color: var(--gold-dark); white-space: nowrap; }

.demo-seat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 14px 24px;
}
.demo-seat { aspect-ratio: 1; border-radius: 6px; background: var(--bg-panel); border: 1px solid rgba(0,0,0,.06); }
.demo-seat.taken { background: #e2b8b8; }
.demo-seat.picked { background: var(--gold); }

.demo-success-icon {
    width: 54px; height: 54px;
    margin: 50px auto 12px;
    background: var(--secondary-color);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 8px 20px rgba(47, 158, 110, .4);
}
.demo-success-title { text-align: center; font-weight: 800; font-size: .78rem; color: var(--text-main); margin-bottom: 14px; }
.demo-ticket { margin-left: 14px; margin-right: 14px; }

.booking-demo-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 4;
}
.booking-demo-dots span {
    width: 5px; height: 5px; border-radius: 50%;
    background: rgba(0, 0, 0, .15);
    transition: background .3s ease, width .3s ease;
}
.booking-demo-dots span.active { background: var(--primary-color); width: 14px; border-radius: 3px; }

@media (max-width: 480px) {
    .iphone-frame { width: 176px; height: 360px; border-radius: 38px; }
    .iphone-screen { border-radius: 32px; }
    .iphone-dynamic-island { width: 68px; height: 19px; top: 9px; }
    .install-promo { gap: 24px; margin-top: 40px; padding-top: 32px; }
}
