/* ============================================
   7afalaty - Main Stylesheet
   Theme: WhatsApp Green (#25D366) & Dark Charcoal (#1e293b)
   ============================================ */

/* --- CSS Variables / Theme Colors --- */
:root {
    --whatsapp-green: #25D366;
    --whatsapp-green-dark: #1DA851;
    --whatsapp-green-light: #DCF8C6;
    --dark-charcoal: #1e293b;
    --dark-charcoal-light: #334155;
    --dark-charcoal-lighter: #475569;
    --dark-charcoal-bg: #f1f5f9;
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
}

/* --- Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    width: 100%;
    max-width: 100%;
}

/* --- RTL / Arabic Typography --- */
html[lang="ar"],
body[dir="rtl"],
[dir="rtl"] * {
    font-family: 'Cairo', sans-serif !important;
}

/* --- Global Cairo typography (Arabic-first design system) --- */
body, input, button, select, textarea, .btn, h1, h2, h3, label, p, span, a {
    font-family: 'Cairo', sans-serif !important;
}
html[lang="ar"] {
    direction: rtl;
    text-align: right;
}

/* --- Global Keyboard Focus Accessibility --- */
:focus-visible {
    outline: 2px solid var(--whatsapp-green-dark, #1DA851);
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
    outline: 2px solid var(--whatsapp-green-dark, #1DA851);
    outline-offset: 2px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    overflow-y: visible;
}

/* Anti-flash fade-in: dynamic homepage sections stay hidden (opacity 0) during
   script boot and are revealed only after applyLanguage() + the primary
   renderers have populated them with localized/API content — no flash of Arabic
   fallback text or empty containers on load/refresh. */
.is-loading {
    opacity: 0;
    transition: opacity 0.15s ease-in;
}
#hero-partial,
#categories-container,
#events-partial,
#about-company-container {
    transition: opacity 0.15s ease-in; /* keep the transition so the reveal fades in */
}

/* ============================================
   SKELETON LOADERS (pulsing card placeholders)
   Replace plain text "Loading…" messages with animated placeholders that mirror
   the real event card / detail layout; cleared the moment the API response
   renders the actual event data.
   ============================================ */
@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}
.skeleton {
    background: linear-gradient(90deg, var(--gray-200, #e5e7eb) 25%, var(--gray-100, #f3f4f6) 50%, var(--gray-200, #e5e7eb) 75%);
    background-size: 200% 100%;
    animation: pulse 1.4s ease-in-out infinite;
    border-radius: 8px;
}
.skeleton-card {
    display: flex;
    flex-direction: column;
    background: var(--white, #fff);
    border: 1px solid var(--gray-100, #f3f4f6);
    border-radius: 16px;
    overflow: hidden;
}
.skeleton-img {
    aspect-ratio: 16 / 9;
    width: 100%;
    border-radius: 0;
}
.skeleton-card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.skeleton-title {
    height: 1rem;
    width: 80%;
}
.skeleton-meta {
    height: 0.7rem;
    width: 60%;
}
.skeleton-meta.short {
    width: 45%;
}
.skeleton-btn {
    height: 2.2rem;
    width: 100%;
    border-radius: 50px;
    margin-top: 0.4rem;
}
/* Detail-page skeleton (event.html #eventDetail) */
.skeleton-detail {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}
.skeleton-detail-img {
    aspect-ratio: 16 / 9;
    width: 100%;
    border-radius: 16px;
}
.skeleton-detail-title {
    height: 1.6rem;
    width: 60%;
}
.skeleton-detail-meta {
    height: 0.9rem;
    width: 40%;
}
.skeleton-detail-meta.short {
    width: 30%;
}
.skeleton-detail-btn {
    height: 2.6rem;
    width: 50%;
    border-radius: 50px;
}

/* --- Header --- */
.header {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.95), rgba(29, 168, 81, 0.95));
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    /* CRITICAL: never clip floating dropdown/flyout menus below the header */
    overflow: visible;
}

.header .container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    /* CRITICAL: override .container overflow-x:hidden so dropdowns can
       extend past the header boundary without scrollbars/clipping. */
    overflow: visible !important;
    position: relative !important;
    z-index: 120;
    width: 100% !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    box-sizing: border-box !important;
}

/* Default / Mobile-first: Hide desktop nav columns */
.header-start {
    display: none;
}

.header-end {
    display: none;
}

.header-logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    gap: 1px;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    z-index: 10 !important;
    pointer-events: auto !important;
}

.header-logo-img {
    max-height: 40px;
    width: auto;
}

.header-logo-demo {
    font-size: 8px;          /* text-[8px] */
    font-weight: 700;        /* font-bold */
    letter-spacing: 0.2em;   /* tracking-widest */
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8); /* subtle accent (opacity-80) */
    line-height: 1;
    white-space: nowrap;
}

.header-nav a,
.header-start a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.header-nav a:hover,
.header-start a:hover {
    color: var(--white);
}

/* Desktop Header Layout (min-width: 1024px): Symmetrical 3-Zone Layout */
@media (min-width: 1024px) {
    .header .container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        position: relative !important;
        width: 100% !important;
        max-width: 1200px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        box-sizing: border-box !important;
    }

    /* Zone 1 (Start): Navigation links [Home / الرئيسية] and [Events / الفعاليات] */
    .header-start {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 1.75rem !important;
        z-index: 20 !important;
    }

    .header-start a {
        margin: 0 !important;
    }

    /* Zone 2 (Center): Platform Logo centered absolutely/identically across all pages */
    .header-logo {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
        display: inline-flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1 !important;
        gap: 1px !important;
        z-index: 10 !important;
        pointer-events: auto !important;
    }

    .header-logo-img {
        max-height: 40px;
    }

    /* Zone 3 (End): Language toggle + Action capsules + Profile/Hamburger menu */
    .header-end {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 0.65rem !important;
        z-index: 20 !important;
    }

    .mobile-header-actions {
        display: none !important;
    }
}

/* Tablet & Mobile Header Layout (< 1024px): Symmetrical 3-Zone Layout */
@media (max-width: 1023px) {
    .header .container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 1200px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        position: relative !important;
        box-sizing: border-box !important;
    }

    .header-start,
    .header-end {
        display: none !important;
    }

    .header-logo {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 auto !important;
        display: inline-flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1 !important;
        gap: 1px !important;
        z-index: 10 !important;
        pointer-events: auto !important;
    }

    [dir="rtl"] .header-logo,
    html:not([dir="ltr"]) .header-logo {
        align-items: center !important;
    }

    .header-logo-img {
        max-height: 28px;
    }

    .mobile-header-actions {
        display: flex !important;
        width: 100% !important;
        justify-content: space-between !important;
        align-items: center !important;
        position: relative !important;
        z-index: 15 !important;
        pointer-events: none !important;
    }

    .mobile-header-actions > * {
        pointer-events: auto !important;
    }

    .mobile-actions-end {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
    }
}

/* Login button in the header navigation & mobile drawer (Underline-free, clean soft shadow) */
.nav-login-btn,
.header-login-btn,
#navLogin,
#loginBtn,
#sdNavLogin,
a.nav-login-btn,
a.header-login-btn,
a#navLogin,
a#loginBtn {
    background: var(--white);
    color: var(--whatsapp-green-dark) !important;
    font-weight: 700 !important;
    padding: 0.4rem 1.4rem;
    border-radius: 50px;
    display: inline-block;
    transition: all 0.3s ease;
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-login-btn:hover,
.nav-login-btn:active,
.nav-login-btn:focus,
.header-login-btn:hover,
.header-login-btn:active,
.header-login-btn:focus,
#navLogin:hover,
#navLogin:active,
#navLogin:focus,
#loginBtn:hover,
#loginBtn:active,
#loginBtn:focus,
#sdNavLogin:hover,
#sdNavLogin:active,
#sdNavLogin:focus,
a.nav-login-btn:hover,
a.nav-login-btn:active,
a.nav-login-btn:focus,
a.header-login-btn:hover,
a.header-login-btn:active,
a.header-login-btn:focus,
a#navLogin:hover,
a#navLogin:active,
a#navLogin:focus,
a#loginBtn:hover,
a#loginBtn:active,
a#loginBtn:focus {
    background: var(--whatsapp-green-light);
    color: var(--whatsapp-green-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none !important;
    border-bottom: none !important;
}

.nav-login-btn:focus:not(:focus-visible),
.header-login-btn:focus:not(:focus-visible),
#navLogin:focus:not(:focus-visible),
#loginBtn:focus:not(:focus-visible),
#sdNavLogin:focus:not(:focus-visible) {
    outline: none;
}

.nav-login-btn:focus-visible,
.header-login-btn:focus-visible,
#navLogin:focus-visible,
#loginBtn:focus-visible,
#sdNavLogin:focus-visible {
    outline: 2px solid var(--whatsapp-green-dark, #1DA851) !important;
    outline-offset: 2px;
}

/* Prominent Green CTA for Mobile Drawer Login */
#sdNavLogin {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.75rem 1rem !important;
    background: linear-gradient(135deg, #25D366, #128C7E) !important;
    color: #fff !important;
    font-weight: 800 !important;
    font-size: 0.95rem !important;
    border-radius: 14px !important;
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3) !important;
    margin-bottom: 0.6rem !important;
    transition: all 0.2s ease !important;
}

#sdNavLogin:hover,
#sdNavLogin:active,
#sdNavLogin:focus {
    background: linear-gradient(135deg, #1DA851, #0f6b5f) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4) !important;
    color: #fff !important;
    text-decoration: none !important;
    border-bottom: none !important;
}

#sdNavLogin svg {
    stroke: #fff !important;
}

/* Create Event CTA button in the header navigation */
.nav-create-event-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--white);
    color: var(--whatsapp-green-dark) !important;
    font-weight: 800 !important;
    font-size: 0.85rem;
    padding: 0.45rem 1.1rem;
    border-radius: 50px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}
.nav-create-event-btn:hover {
    background: var(--whatsapp-green-light);
    color: var(--whatsapp-green-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.nav-create-event-btn svg { flex-shrink: 0; }

/* Compact "Create Event" circle button for the mobile header */
.mobile-create-event-btn:hover { background: #DCF8C6 !important; }
.mobile-create-event-btn svg { flex-shrink: 0; }

/* Prominent "Create Event" tile at the top of the mobile side drawer */
.side-drawer-create {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff !important;
    border-radius: 10px;
    font-weight: 800;
    text-decoration: none;
    margin-bottom: 0.25rem;
}
.side-drawer-create:hover {
    background: linear-gradient(135deg, #1DA851, #0f6b5f) !important;
    color: #fff !important;
}
.side-drawer-create svg { flex-shrink: 0; }

/* Narrower desktop widths: show only the + icon on the header CTA */
@media (max-width: 1000px) {
    .nav-create-event-btn span { display: none; }
    .nav-create-event-btn { padding: 0.45rem 0.6rem; }
}

/* --- Hero Section --- */
.hero {
    /* Solid dark base underneath the photo-banner layer (see .hero::before). */
    background-color: var(--dark-charcoal, #0f172a);
    color: var(--white);
    text-align: left; /* LTR: headline/subtitle hug the dark left side */
    /* Balanced hero: top padding 4rem, bottom padding 6.5rem so the
       bottom-pinned #heroScrollBtn never overlaps .hero-search-wrap even on
       short desktop viewports.
       The fixed-header offset is handled by adjustHeaderSpacing() on <body>. */
    padding: 4rem 1rem 6.5rem;
    position: relative;
    /* CRITICAL: allow the hero-search autocomplete dropdown (absolute) to
       overlay content below without being clipped or creating scrollbars. */
    overflow: visible;
}

/* Desktop: the hero fills the remaining viewport below the fixed header and
   vertically centers its content (heading → subtitle → search bar) so the
   banner spans a full screen before the categories section below. */
@media (min-width: 769px) {
    .hero {
        min-height: calc(100vh - 80px);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* CRITICAL: override .container overflow-x:hidden (which computes to
   overflow-y:auto → a vertical scroll container) so the hero-search dropdown
   can extend past the hero boundary without a container scrollbar. */
.hero .container {
    overflow: visible;
    text-align: left; /* LTR: content sits over the left dark gradient area */
}

/* RTL (Arabic): mirror the content alignment so headline, subtitle and search
   all sit over the right dark gradient area (the banner layer is flipped too). */
html[lang="ar"] .hero,
html[lang="ar"] .hero .container,
[dir="rtl"] .hero,
[dir="rtl"] .hero .container {
    text-align: right;
}

/* Photo banner layer: hero_banner.webp with a horizontal dark gradient whose
   dark end sits on the START side (left in LTR) so the white headline + search
   bar stay readable over the darkened negative space while the far end of the
   photo stays bright. In RTL the entire layer is mirrored (scaleX(-1)) so the
   dark side moves to the right, behind the right-aligned content. */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0.7) 100%),
        url('/images/hero_banner.webp') center / cover no-repeat;
    background-color: var(--dark-charcoal, #0f172a);
    transform: scaleX(1);
    transition: transform 0.35s ease;
    pointer-events: none;
}

/* RTL (Arabic): horizontally mirror the banner so the dark negative space
   lands on the right, directly behind the right-aligned content. */
html[lang="ar"] .hero::before,
[dir="rtl"] .hero::before {
    transform: scaleX(-1);
}

/* Directional SVG arrows flip horizontally in RTL */
html[lang="ar"] .dir-arrow,
[dir="rtl"] .dir-arrow,
html[lang="ar"] .dir-arrow-back,
[dir="rtl"] .dir-arrow-back {
    transform: scaleX(-1);
}

/* Animated background layer: hero_banner.mp4 (muted autoplay — plays exactly
   once, no native loop). The static hero_banner.webp remains the poster (shown
   while the video loads, if the source fails, and as the backup revealed after
   playback ends) and the .hero::before layer below stays as the no-JS/no-video
   CSS fallback. object-fit: cover fills the hero without distortion;
   pointer-events: none lets every click reach the headline / search bar. */
.hero-video {
    position: absolute;
    inset: 0;                    /* absolute inset-0 */
    width: 100%;                 /* w-full */
    height: 100%;                /* h-full */
    object-fit: cover;           /* object-cover */
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.6s ease; /* smooth fade to the static backup layer */
}

/* After the hero video's single play ends it is paused (last frame held) and
   faded out so the static poster / CSS backup layer (.hero::before) shows
   cleanly and the hero never restarts or goes blank. */
.hero-video.video-ended {
    opacity: 0;
}

/* RTL (Arabic): mirror the video horizontally, matching the ::before layer. */
html[lang="ar"] .hero-video,
[dir="rtl"] .hero-video {
    transform: scaleX(-1);
}

/* Responsive variants: exactly ONE hero video is visible at any width —
   mobile below md/769px, desktop at md and above — so the correct aspect ratio
   plays and the unused source is not rendered. (No Tailwind in this project;
   these mirror `md:hidden` / `hidden md:block`.) */
.hero-video-mobile {
    display: none;
}

.hero-video-desktop {
    display: block;
}

@media (max-width: 768px) {
    .hero-video-desktop {
        display: none;
    }

    .hero-video-mobile {
        display: block;
    }
}

/* Readability gradient overlay ON TOP of the playing video (the ::before layer
   already carries its own gradient for the static fallback). Keeps the white
   headline + search bar legible over the animated background. */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
    pointer-events: none;
}

html[lang="ar"] .hero::after,
[dir="rtl"] .hero::after {
    transform: scaleX(-1);
}

/* Content stacks above the video + overlay layers. */
.hero h1,
.hero p,
.hero-search-wrap {
    z-index: 2;
}

/* Mobile (<768px): dedicated portrait asset hero_banner_mobile_2.webp — the
   subject (face + raised arm) stays centered and clearly visible in the top
   half, and a dark lower gradient carries the bottom-aligned headline + search
   card. The language flip (scaleX) below still mirrors it for RTL, and the
   centered background position keeps the subject visible in both directions. */
@media (max-width: 768px) {
    .hero::before {
        background-image:
            linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0.7) 100%),
            url('/images/hero_banner_mobile_2.webp');
        background-size: cover; /* proportional scaling on any aspect ratio */
        background-position: center top;
    }

    html[lang="ar"] .hero::before,
    [dir="rtl"] .hero::before {
        background-position: center top;
    }

    /* Mobile: bottom-anchored dark gradient over the video (mirrors the mobile
       ::before gradient so the bottom-aligned headline + search card stay
       readable over the animated background). */
    .hero::after {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0.7) 100%);
    }
}

.hero h1 {
    font-size: 2.25rem; /* text-4xl — scaled so multi-line breaks fit the dark side */
    font-weight: 800; /* font-extrabold */
    line-height: 1.4;
    margin: 0 0 0.75rem;
    position: relative;
    max-width: 720px; /* keep the headline over the darkened negative space */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

@media (min-width: 769px) {
    .hero h1 {
        font-size: 3rem; /* md:text-5xl */
    }
}

@media (min-width: 1024px) {
    .hero h1 {
        font-size: 3.75rem; /* lg:text-6xl */
    }
}

.hero h1 .highlight {
    color: var(--whatsapp-green);
}

.hero p {
    font-size: 1.15rem;
    max-width: 650px;
    margin: 0 0 1.5rem; /* start-aligned instead of auto-centered */
    opacity: 0.95;
    position: relative;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* Search bar wrapper: capped width pinned to the start side (left in LTR /
   right in RTL, via the inherited direction) so the white filter bar sits
   directly beneath the heading & subtitle, over the darkened gradient area. */
.hero-search-wrap {
    position: relative;
    max-width: 820px;
}

/* Hero headline variants: desktop vs mobile — both show exactly two clean,
   balanced lines per language:
   - Desktop & mobile EN «Discover Best Events / Concerts & Festivals»
   - Desktop & mobile AR «اكتشف أفضل الفعاليات / والحفلات والمهرجانات»
   Exactly one variant is visible at any width. */
.hero-title-sm {
    display: none;
}

@media (max-width: 768px) {
    .hero-title-md {
        display: none;
    }

    .hero-title-sm {
        display: inline;
    }

    /* Mobile: lift the hero content — smaller top padding so the heading sits
       higher on small screens, and reserve explicit clearance below the search
       card (mb-10 / 2.5rem) so the scroll-down indicator never overlaps the
       green "بحث" button (≥ 35–40px breathing room on ≤768px viewports). */
    .hero {
        padding: 2rem 1rem 2.5rem; /* top 2rem (was 4rem) lifts the content up */
    }

    .hero-search-wrap {
        margin-bottom: 0.75rem; /* spacing above in-flow #heroScrollBtn on ≤768px */
    }
}

/* Featured events carousel — relocated from inside .hero into its own clean
   light section below the categories bar (no outer my-* margin in index.html),
   so the gap to the categories bar above and the events grid below stays a
   balanced 24px + 24px = 48px — inside the tight 32–48px vertical rhythm. */

/* --- OpenTable-Style Search Bar --- */
.search-bar {
    background: var(--white);
    border-radius: 60px;
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 10;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
}

.search-bar .search-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-right: 1px solid var(--gray-200);
    position: relative;
}

.search-bar .search-item:last-of-type {
    border-right: none;
}

.search-bar .search-item .search-icon {
    font-size: 1.1rem;
    color: var(--gray-400);
}

/* --- Search Query Wrapper (for autocomplete positioning) --- */
.search-query-wrapper {
    position: relative;
}

/* --- Autocomplete Dropdown (Booking.com Style) --- */
.autocomplete-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 320px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-200);
    z-index: 1000;
    padding: 0.5rem 0;
    max-height: 380px;
    overflow-y: auto;
}

.autocomplete-dropdown.active {
    display: block;
    animation: autocompleteFadeIn 0.15s ease-out;
}

@keyframes autocompleteFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section title (category badge) */
.autocomplete-section-title {
    padding: 0.5rem 1rem 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-500);
}

/* Divider between sections */
.autocomplete-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 0.25rem 0.75rem;
}

/* Individual suggestion item */
.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 1rem;
    cursor: pointer;
    transition: background-color 0.12s ease;
    border-left: 3px solid transparent;
}

.autocomplete-item:hover {
    background-color: var(--gray-50);
    border-left-color: var(--whatsapp-green);
}

.autocomplete-item:active {
    background-color: var(--whatsapp-green-light);
}

.autocomplete-item-emoji {
    font-size: 1.15rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.autocomplete-item-text {
    font-size: 0.9rem;
    color: var(--gray-700);
    font-weight: 500;
    line-height: 1.3;
}

/* Scrollbar styling for dropdown */
.autocomplete-dropdown::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Responsive: full-width dropdown on mobile */
@media (max-width: 768px) {
    .autocomplete-dropdown {
        position: fixed;
        top: auto;
        left: 1rem;
        right: 1rem;
        min-width: unset;
        max-height: 50vh;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        border-radius: 12px 12px 0 0;
        bottom: 0;
    }
}


.search-bar select,
.search-bar input[type="date"],
.search-bar input[type="text"] {
    border: none;
    font-size: 0.9rem;
    color: var(--gray-700);
    background: transparent;
    font-family: inherit;
    min-width: 100px;
    cursor: pointer;
    padding: 0.2rem 0;
}

.search-bar select:focus:not(:focus-visible),
.search-bar input[type="date"]:focus:not(:focus-visible),
.search-bar input[type="text"]:focus:not(:focus-visible) {
    outline: none;
}

.search-bar select {
    min-width: 110px;
}

.search-bar input[type="date"] {
    min-width: 120px;
}

.search-bar input[type="text"] {
    min-width: 140px;
}

.search-bar .search-item label {
    display: none;
}

.btn-letsgo {
    background: linear-gradient(135deg, var(--whatsapp-green), var(--whatsapp-green-dark));
    color: var(--white);
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-letsgo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

/* ============================================
   TOP CATEGORIES BAR (Eventbrite style)
   ============================================ */
.top-categories {
    /* Tight rhythm: the dark hero ends ~28px (padding-bottom 1.75rem) below the
       search bar, so just 8px of top padding here keeps the category heading +
       icon circles ~36px under the search bar — no excessive dead whitespace. */
    padding: 0.5rem 0 1rem; /* tightened bottom gap (20px -> 16px) */
    background: var(--gray-50, #f9fafb);
    border-bottom: 1px solid var(--gray-100, #f3f4f6);
    overflow: hidden;
}

/* Centered container for the 6 category items (max-w-6xl mx-auto px-4) */
.categories-container {
    width: 100% !important;
    max-width: 72rem !important; /* max-w-6xl */
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1rem;
    padding-right: 1rem;
    overflow: visible;
}

@media (min-width: 768px) {
    .categories-container {
        max-width: 72rem !important;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .categories-container {
        max-width: 72rem !important; /* max-w-6xl */
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.top-categories-title {
    text-align: center;
    /* Section heading — text-xl (1.375rem) / font-bold / text-gray-800, one step
       lighter than the 2.25rem "Events Near You" heading, with a short green
       accent bar below. */
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--gray-800, #1f2937);
    margin-bottom: 0.375rem; /* tightened: 0.5rem -> 0.375rem */
    letter-spacing: 0;
}

/* Compact green accent bar centered under the title (brand accent). */
.top-categories-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--whatsapp-green), var(--whatsapp-green-dark));
    margin: 0.375rem auto 0;
}

@media (min-width: 768px) {
    .top-categories-title {
        font-size: 1.5rem; /* md:text-2xl */
    }
}

/* "Events Near You" (homepage) uses the EXACT same section-heading typography
   and green accent bar as "Browse by Category" (.top-categories-title). The ID
   specificity wins over the shared `.restaurants h3` rule (2.25rem / 3rem
   spacing) so both headings render identically. */
#homeEventsHeading {
    text-align: center;
    font-size: 1.375rem;               /* text-xl — matches .top-categories-title */
    font-weight: 700;                  /* font-bold */
    color: var(--gray-800, #1f2937);
    margin-bottom: 0.375rem;
    letter-spacing: 0;
}
/* Compact green accent bar centered under the title — identical to
   .top-categories-title::after (brand accent). */
#homeEventsHeading::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--whatsapp-green), var(--whatsapp-green-dark));
    margin: 0.375rem auto 0;
}
@media (min-width: 768px) {
    #homeEventsHeading {
        font-size: 1.5rem;             /* md:text-2xl — matches .top-categories-title */
    }
}

.categories-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* grid-cols-3: 3x2 clean grid on mobile */
    gap: 1rem 0.75rem;
    justify-items: center;
    align-items: start;
    padding-top: 0.5rem;
}

@media (min-width: 768px) {
    .categories-row {
        grid-template-columns: repeat(6, minmax(0, 1fr)); /* md:grid-cols-6: single row on desktop */
        gap: 1.5rem;
    }
}

/* Floating borderless 3D icon + bold category label */
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--gray-800, #1f2937);
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0.25rem;
    box-shadow: none;
    transition: color 0.2s ease;
    width: 100%;
    max-width: 120px;
    text-align: center;
    flex: 0 0 auto;
}

@media (min-width: 1024px) {
    .category-card {
        max-width: 160px;
    }
}

.category-card:hover {
    background: transparent;
    border: none;
    box-shadow: none;
}

.category-card:hover .category-icon-circle {
    transform: translateY(-4px) scale(1.05);
    filter: drop-shadow(0 12px 18px rgba(15, 23, 42, 0.16));
}

.category-card:hover .category-label {
    color: var(--whatsapp-green-dark, #128c7e);
}

/* Transparent, borderless wrapper for floating 3D WebP icons */
.category-icon-circle {
    width: 72px;
    height: 72px;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 6px 12px rgba(15, 23, 42, 0.1));
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), filter 0.25s ease;
}

.category-icon-circle img,
.category-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

@media (min-width: 1024px) {
    .category-icon-circle {
        width: 88px;
        height: 88px;
    }
}

.category-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-800, #1f2937);
    line-height: 1.3;
    transition: color 0.2s ease;
}

@media (min-width: 1024px) {
    .category-label {
        /* Consistent 700 weight at every breakpoint */
        font-size: 1rem;
        font-weight: 700;
    }
}

/* ============================================
   CATEGORY PAGE (Eventbrite style)
   ============================================ */
.category-page {
    padding-bottom: 5rem;
    background: var(--gray-50, #f9fafb);
    min-height: 70vh;
}

.category-hero {
    position: relative;
    color: #fff;
    padding: 5rem 0 3.5rem;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background: linear-gradient(135deg, rgba(15,23,42,0.85), rgba(30,41,59,0.7)), url('/images/Zamalek/Pier 88.webp');
}

.category-hero h1 {
    font-size: 2.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.category-hero p {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.85);
    max-width: 640px;
    margin: 0 auto;
    text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

.category-filter-pills, #categoryFilterPills {
    display: flex;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.5rem auto 0 !important;
    max-width: 720px;
    width: 100%;
}

.category-filter-pill {
    display: inline-block;
    padding: 0.55rem 1.5rem;
    border-radius: 50px;
    background: #fff;
    border: 1.5px solid var(--gray-200, #e5e7eb);
    color: var(--gray-600, #4b5563);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.category-filter-pill:hover {
    border-color: #25D366;
    color: #128C7E;
}

.category-filter-pill.active {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.category-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2.5rem 0 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.category-results-header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--gray-800, #1f2937);
    margin: 0;
}

.category-results-count {
    color: var(--gray-500, #6b7280);
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

/* Results count badge — pill-style counter on events.html and category pages.
   Rendered by resultsCountBadgeHtml() in main.js. */
.events-count-badge {
    display: inline-flex;
    align-items: center;
    background: var(--gray-100, #f3f4f6);
    color: var(--gray-700, #374151);
    padding: 0.3rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--gray-800);
}

.feature-card p {
    color: var(--gray-500);
    line-height: 1.7;
}

/* --- Restaurants Section --- */
.restaurants {
    padding: 5rem 0;
    background-color: var(--gray-50);
}

/* Homepage events section: tightened top spacing so the "Events Near You"
   heading connects with the categories bar above it (no large blank gap). */
#eventsList.restaurants {
    padding-top: 1.5rem;
}

/* --- Animated "Scroll Down" hero indicator (bottom-center) ---
   Tailwind utility classes in the hero partial may not be present on every
   page (the homepage loads main.css only), so this block is the source of
   truth for the indicator's layout, hover states and the El Gouna-style
   smooth dual-chevron down-slide animation. */
#heroScrollBtn {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    border: none;
    padding: 0;
    font: inherit;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    color: #fff;
    opacity: 0.85;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    z-index: 20;
    transition: opacity 0.2s ease;
}
#heroScrollBtn:hover {
    opacity: 1;
}
#heroScrollBtn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
    border-radius: 0.75rem;
}
#heroScrollText {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s ease;
}
#heroScrollBtn:hover #heroScrollText {
    color: #fff;
}
/* Circular badge — clips the sliding chevrons to the circle (overflow:hidden
   mirrors the markup's overflow-hidden utility, which needs no Tailwind). */
#heroScrollBtn > .hero-scroll-badge,
#heroScrollBtn > div {
    position: relative;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.2);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
#heroScrollBtn:hover > .hero-scroll-badge,
#heroScrollBtn:hover > div {
    border-color: #fff;
    background: rgba(0, 0, 0, 0.4);
}
/* Stacked chevron column (mirrors the flex flex-col gap utility). */
.chevron-slide-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
/* El Gouna-style smooth down-slide: continuous vertical translation with a
   soft fade-in at the top edge and fade-out at the bottom edge of the badge. */
.chevron-slide-container svg {
    width: 1rem;
    height: 1rem;
    color: #fff;
    animation: elGounaChevronSlide 1.8s infinite ease-in-out;
}
.chevron-slide-container .chevron-2 {
    animation-delay: 0.3s;
}
@keyframes elGounaChevronSlide {
    0% {
        transform: translateY(-8px);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(8px);
        opacity: 0;
    }
}
/* Mobile & tablet (<=768px): place #heroScrollBtn in normal flex flow inside
   .hero so it never overlaps .hero-search-wrap on 375px, 641px-768px, or
   short mobile viewports. */
@media (max-width: 768px) {
    #heroScrollBtn {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 0.5rem;
        flex-shrink: 0;
    }
}

.restaurants h3 {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--gray-800);
    margin-bottom: 3rem;
}

/* --- Constrain Events Grid Container & Center on Desktop --- */
.restaurants .container,
#eventsList .container,
#events-partial .container,
.events-feed-container,
.events-grid-container {
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    width: 100%;
}

.restaurants-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

#eventsGrid, .restaurants-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 640px) {
    #eventsGrid, .restaurants-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    #eventsGrid, .restaurants-grid {
        grid-template-columns: repeat(3, 1fr) !important; /* Strictly 3 cards per row */
    }
}

/* =======================================================
   MOBILE RESPONSIVE OVERHAUL (max-width: 640px)
   Single wide comfortable event cards, compact hero banner,
   and smooth horizontal scroll for filter pills.
   ======================================================= */
@media (max-width: 640px) {
    /* Events Grid: Single Card Per Row (1fr) */
    .events-grid,
    #eventsGrid,
    .category-events-grid,
    .restaurants-grid,
    #categoryEventsGrid,
    #allEventsGrid {
        grid-template-columns: 1fr !important; /* كارت واحد عريض ومريح في كل صف */
        gap: 18px !important;
        padding: 0 14px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Event Card Full Width & Rounded Corners */
    .event-card,
    .restaurant-card,
    .event-card-item {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        border-radius: 16px !important;
        box-sizing: border-box !important;
    }

    /* Poster Proportions */
    .event-card-img-wrap,
    .event-card img:not(.event-organizer-avatar):not(.leaflet-marker-icon):not(.leaflet-marker-shadow):not(.leaflet-tile),
    .restaurant-card-img,
    .event-poster-fg {
        height: 200px !important; /* نسبة عرض لارتفاع مناسبة للبوستر */
        aspect-ratio: auto !important;
        object-fit: cover !important;
    }

    /* Event Detail: Organizer card mobile layout (375px+) */
    .event-organizer.registered-org {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.85rem !important;
        padding: 0.95rem 1rem !important;
    }
    .event-organizer.registered-org > div:first-child,
    .event-organizer.registered-org .event-organizer-info {
        width: 100% !important;
        flex: 1 1 100% !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }
    .event-organizer.registered-org > div:last-child:not(:first-child),
    .event-organizer.registered-org .event-organizer-actions {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0.75rem !important;
        flex-wrap: wrap !important;
        padding-top: 0.65rem;
        border-top: 1px solid rgba(16, 185, 129, 0.14);
    }
    .event-organizer.registered-org .event-organizer-avatar,
    .event-organizer .event-organizer-avatar {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        flex-shrink: 0 !important;
    }
    .event-organizer.registered-org .event-organizer-icon {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
    }
    .event-organizer.registered-org .event-organizer-name {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 4px 6px !important;
        min-width: 0 !important;
    }
    .event-organizer.registered-org .event-organizer-handle,
    .event-organizer .event-organizer-handle {
        white-space: nowrap !important;
        display: inline-block;
        unicode-bidi: isolate;
    }
    .event-organizer.registered-org #eventOrganizerFollowersCount {
        white-space: nowrap;
    }

    /* Event Detail: Keep Leaflet map markers at natural dimensions */
    .event-card .leaflet-marker-icon,
    .event-card .leaflet-marker-shadow,
    .event-location-map .leaflet-marker-icon,
    .event-location-map .leaflet-marker-shadow {
        width: auto;
        height: auto;
        max-width: none;
        object-fit: initial;
    }

    /* Card Body & Details */
    .event-card-body,
    .restaurant-card-body,
    .restaurant-card-content {
        padding: 14px !important;
        box-sizing: border-box !important;
    }
    .event-card-title,
    .restaurant-card-title {
        font-size: 16px !important;
        line-height: 1.4 !important;
        white-space: normal !important;
    }
    .event-card-meta,
    .event-card-meta-row,
    .restaurant-card-location,
    .event-card-time {
        font-size: 13px !important;
    }

    /* Hero Banner Mobile Adjustments */
    .category-hero-banner {
        padding: 2rem 1rem 1.5rem !important;
        text-align: center !important;
    }
    .category-hero-banner h1,
    #categoryHeroTitle {
        font-size: 22px !important;
        line-height: 1.35 !important;
        margin-bottom: 0.5rem !important;
    }
    .category-hero-banner p,
    #categoryHeroSubtitle {
        font-size: 14px !important;
        line-height: 1.5 !important;
        max-width: 92% !important;
        margin: 0 auto !important;
        opacity: 0.9 !important;
    }

    /* Perfectly Centered Filter Pills (Mobile) */
    .category-filter-pills,
    #categoryFilterPills {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        padding: 4px 6px !important;
        margin: 1rem auto 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .category-filter-pill {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        padding: 0.45rem 1.15rem !important;
        font-size: 13px !important;
        border-radius: 9999px !important;
        text-align: center !important;
    }

    /* Category Results Header */
    .category-results-header {
        margin: 1.5rem 0 1rem !important;
        padding: 0 14px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
    }
    .category-results-header h2 {
        font-size: 1.15rem !important;
        line-height: 1.35 !important;
    }
    .category-results-count {
        font-size: 0.85rem !important;
    }
}


/* --- Events Feed Clean Overflow (No Nested Scrollbars) ---
   Ensures the event cards feed expands naturally with page height and
   uses only the primary window scrollbar without secondary vertical tracks. */
.restaurants,
#eventsList,
#events-partial,
.restaurants .container,
.restaurants-grid,
#eventsContainer,
#allEventsGrid,
#categoryEventsGrid,
#recommendedEventsGrid,
#eventsGrid,
.events-container,
.all-events-page,
.all-events-page .container {
    max-height: none !important;
    height: auto !important;
    overflow-y: visible !important;
}

/* --- Clean UI Utility: Hide Internal Scrollbars Globally ---
   Hides scrollbar track/thumb across WebKit, Firefox, and IE/Edge while
   preserving smooth native scrolling and touch interactions. */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Apply clean hidden scrollbars to all horizontal filter/tab rows */
.for-you-tabs,
.category-filter-pills,
.categories-row,
.tabs-container,
.cd-pills {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.for-you-tabs::-webkit-scrollbar,
.category-filter-pills::-webkit-scrollbar,
.categories-row::-webkit-scrollbar,
.tabs-container::-webkit-scrollbar,
.cd-pills::-webkit-scrollbar {
    display: none;
}

/* --- Event Card (Modern Vertical 16:9 Layout) --- */
.restaurant-card {
    background: var(--white, #ffffff);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    border: 1px solid var(--gray-200, #e5e7eb);
    display: flex;
    flex-direction: column; /* Modern vertical layout */
    align-items: stretch;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
    width: 100%;
    height: 100%;
}

.restaurant-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--whatsapp-green, #25D366);
}

/* Poster Container (Fixed 16:9 Aspect Ratio) */
.restaurant-card-img,
.event-poster-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Edge-to-Edge Poster Display (Cover Mode) */
.restaurant-card-img .event-poster-bg {
    display: none !important;
}

.restaurant-card-img .event-poster-fg {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
}

/* Gradient scrim for bottom pills readability */
.event-poster-scrim {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.75) 0%, rgba(15, 23, 42, 0.35) 60%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

/* Floating Date Badge (Top Start Corner) */
.event-card-date-badge {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    z-index: 4;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 6px 10px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

.event-card-date-badge .date-badge-month {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    font-variant: small-caps;
    letter-spacing: 0.5px;
    color: var(--whatsapp-green-dark, #059669);
}

.event-card-date-badge .date-badge-day {
    font-size: 1.25rem;
    font-weight: 900;
    color: #111827;
    margin: 3px 0 2px;
}

.event-card-date-badge .date-badge-dow {
    font-size: 0.6rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
}

/* Floating Featured Star Badge (Opposite corner with 8px clearance from save button) */
.event-featured-flag {
    position: absolute;
    top: 16px;
    inset-inline-end: 56px;
    z-index: 4;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.92);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
}

/* Floating Wishlist / Save Button (Opposite Top Corner) */
.restaurant-card .event-save-btn,
.restaurant-card .bookmark-btn,
.event-save-btn,
.bookmark-btn:not(.event-title-action-btn) {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    z-index: 10;
    pointer-events: auto;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16);
    font-size: 1.15rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    color: #4b5563;
}

.restaurant-card .event-save-btn:hover,
.restaurant-card .bookmark-btn:hover,
.event-save-btn:hover,
.bookmark-btn:not(.event-title-action-btn):hover {
    transform: scale(1.1);
    background: #ffffff;
    color: #ef4444;
}

.restaurant-card .event-save-btn.saved,
.restaurant-card .bookmark-btn.saved,
.event-save-btn.saved,
.bookmark-btn:not(.event-title-action-btn).saved {
    color: #ef4444;
}

/* Bottom Overlay (Category & Price Pills) */
.event-poster-bottom-overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    z-index: 3;
    pointer-events: none;
}

.event-pill-category {
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    border-radius: 9999px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    max-width: 65%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.event-pill-category .cat-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #25D366;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(37, 211, 102, 0.8);
}

.event-pill-low-stock {
    background: rgba(154, 52, 18, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    border-radius: 9999px;
    padding: 4px 9px;
    font-size: 0.72rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(254, 215, 170, 0.45);
    white-space: nowrap;
    flex-shrink: 0;
}

.event-pill-low-stock svg {
    flex-shrink: 0;
}

.event-pill-price {
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #25D366;
    border-radius: 9999px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(37, 211, 102, 0.35);
    flex-shrink: 0;
}

/* Info Section (Below Poster) */
.restaurant-card-body,
.restaurant-card-content {
    width: 100%;
    padding: 10px 14px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
    box-sizing: border-box;
}

.restaurant-card-top {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.restaurant-card-body h4,
.restaurant-card-content h4,
.event-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900, #111827);
    margin: 0 0 6px 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Meta Row: Venue + Area start side, Start Time opposite side */
.event-card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--gray-500, #6b7280);
    padding-top: 4px;
    border-top: 1px solid var(--gray-100, #f3f4f6);
}

    flex-direction: column;
    min-width: 0;
}

.restaurant-card-body h4,
.restaurant-card-content h4,
.event-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900, #111827);
    margin: 0 0 6px 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Meta Row: Venue + Area start side, Start Time opposite side */
.event-card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--gray-500, #6b7280);
    padding-top: 4px;
    border-top: 1px solid var(--gray-100, #f3f4f6);
}

.restaurant-card-location {
    font-size: 0.82rem;
    color: var(--gray-500, #6b7280);
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.restaurant-card-location svg {
    flex-shrink: 0;
    color: var(--gray-400, #9ca3af);
}

.restaurant-card-location span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-card-time {
    font-weight: 700;
    color: var(--whatsapp-green-dark, #059669);
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.82rem;
}

/* ============================================
   Event Image Lightbox (full-size preview modal)
   ============================================ */
.event-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.event-lightbox.event-lightbox-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.25s ease;
}

.event-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: zoom-out;
}

.event-lightbox-img {
    position: relative;
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 0.75rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.96);
    transition: transform 0.25s ease;
    object-fit: contain;
}

.event-lightbox.event-lightbox-open .event-lightbox-img {
    transform: scale(1);
}

.event-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    font-family: inherit;
}

.event-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
}

/* Rating block (blue badge + label) */
.restaurant-card-rating-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    flex-shrink: 0;
}

.resto-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: var(--white);
    padding: 0.15rem 0.5rem;
    border-radius: 6px 6px 6px 0;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.3;
}

.resto-rating-label {
    font-size: 0.625rem; /* text-[10px] on mobile */
    color: var(--gray-500);
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
}

/* Action block: book button bottom-right */
.restaurant-card-cta {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 0.4rem;
}

.restaurant-card-body .btn-book {
    display: inline-block;
    background: linear-gradient(135deg, var(--whatsapp-green), var(--whatsapp-green-dark));
    color: var(--white);
    padding: 0.4rem 1.1rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.25);
    white-space: nowrap;
}

.restaurant-card-body .btn-book:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.35);
}

/* --- Dashboard Section --- */
.dashboard {
    padding: 5rem 0;
    background-color: var(--white);
}

.dashboard h3 {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--gray-800);
    margin-bottom: 3rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    text-align: center;
    border: 1px solid var(--gray-200);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .stat-label {
    color: var(--gray-500);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 800;
}

.stat-card .stat-value.green {
    color: var(--whatsapp-green);
}

.stat-card .stat-value.red {
    color: var(--dark-charcoal);
}

.stat-card .stat-value.blue {
    color: #3B82F6;
}

.stat-card .stat-value.yellow {
    color: #EAB308;
}

.chart-container {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}

.reservations-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gray-200);
}

.reservations-table thead {
    background-color: var(--gray-100);
}

.reservations-table th {
    padding: 1rem;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    font-weight: 600;
}

.reservations-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-600);
}

.reservations-table tbody tr:hover {
    background-color: var(--gray-50);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.confirmed {
    background-color: var(--whatsapp-green-light);
    color: var(--whatsapp-green-dark);
}

.status-badge.pending {
    background-color: #FEF3C7;
    color: #D97706;
}

.status-badge.cancelled {
    background-color: #e2e8f0;
    color: var(--dark-charcoal);
}

/* --- Footer --- */
.footer {
    background-color: var(--gray-800);
    color: var(--gray-400);
    font-size: 0.9rem;
}

.footer-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    display: inline-block;
}

@media (min-width: 768px) {
    .footer-logo {
        height: 40px;
    }
}

@media (max-width: 767px) {
    footer,
    .footer,
    .footer-container,
    .footer-section,
    .footer-column {
        text-align: center !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .footer-brand-link,
    .footer-logo {
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }

    .footer-social-links,
    .footer-nav-list {
        display: flex;
        flex-direction: column;
        align-items: center !important;
        justify-content: center !important;
    }

    [dir="rtl"] footer,
    [dir="rtl"] .footer,
    [dir="rtl"] .footer-container,
    [dir="rtl"] .footer-section,
    [dir="rtl"] .footer-column,
    [dir="rtl"] .footer-grid-inner,
    [dir="rtl"] .footer-col-brand,
    [dir="rtl"] .footer-col-links,
    [dir="rtl"] .footer-col-business,
    [dir="rtl"] .footer-col-contact,
    [dir="rtl"] .footer-col-brand p,
    [dir="rtl"] .footer-col-brand h4,
    [dir="rtl"] .footer-col-links h4,
    [dir="rtl"] .footer-col-business h4,
    [dir="rtl"] .footer-col-contact h4,
    [dir="rtl"] .footer-col-links li,
    [dir="rtl"] .footer-col-business li,
    [dir="rtl"] .footer-col-contact li,
    [dir="rtl"] .footer-col-links li a,
    [dir="rtl"] .footer-col-business li a,
    [dir="rtl"] .footer-col-contact li a {
        text-align: center !important;
        align-items: center !important;
        justify-content: center !important;
    }

    [dir="rtl"] .footer-brand-link,
    [dir="rtl"] .footer-logo,
    [dir="rtl"] .footer-col-brand a {
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }

    [dir="rtl"] .footer-social-links,
    [dir="rtl"] .footer-nav-list,
    [dir="rtl"] .footer-col-links ul,
    [dir="rtl"] .footer-col-business ul,
    [dir="rtl"] .footer-col-contact ul {
        display: flex;
        flex-direction: column;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* ============================================
   Restaurant Detail Page
   ============================================ */
.restaurant-detail {
    padding: 2rem 0 5rem;
    background-color: var(--gray-50);
    min-height: 60vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

.restaurant-detail-loading {
    text-align: center;
    padding: 4rem 0;
    font-size: 1.2rem;
    color: var(--gray-500);
}

.btn-back {
    display: inline-block;
    color: var(--whatsapp-green-dark);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.btn-back:hover {
    background-color: var(--whatsapp-green-light);
}

.restaurant-detail-header {
    display: flex;
    gap: 2.5rem;
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}

.restaurant-detail-img {
    width: 200px;
    height: 200px;
    min-width: 200px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--whatsapp-green-light), var(--dark-charcoal-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}

.restaurant-detail-info {
    flex: 1;
}

.restaurant-detail-info h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.restaurant-detail-info .cuisine {
    display: inline-block;
    background-color: var(--whatsapp-green-light);
    color: var(--whatsapp-green-dark);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    margin-bottom: 0.75rem;
}

.restaurant-detail-info .rating {
    color: #F59E0B;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.restaurant-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.meta-item {
    background-color: var(--gray-50);
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.restaurant-detail-desc {
    color: var(--gray-600);
    line-height: 1.7;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.btn-proceed-checkout {
    display: inline-block;
    background: linear-gradient(135deg, var(--whatsapp-green), var(--whatsapp-green-dark));
    color: var(--white);
    font-weight: 700;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.btn-proceed-checkout:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* --- Menu Section --- */
.menu-section {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-200);
}

.menu-section h3 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
}

.menu-category {
    margin-bottom: 2rem;
}

.menu-category:last-child {
    margin-bottom: 0;
}

.menu-category h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark-charcoal);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--dark-charcoal-bg);
}

.menu-items {
    display: grid;
    gap: 0.75rem;
}

.menu-item-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.menu-item-card:hover {
    border-color: var(--whatsapp-green);
    background-color: var(--white);
}

.menu-item-emoji {
    font-size: 1.75rem;
    width: 44px;
    text-align: center;
}

.menu-item-info {
    flex: 1;
}

.menu-item-name {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 1rem;
}

.menu-item-desc {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

.menu-item-price {
    font-weight: 700;
    color: var(--whatsapp-green-dark);
    font-size: 1.05rem;
    white-space: nowrap;
}

/* ============================================
   Checkout Page
   ============================================ */
.checkout-page {
    padding: 2rem 0 5rem;
    background-color: var(--gray-50);
    min-height: 60vh;
}

.checkout-page h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--gray-800);
    margin-bottom: 2rem;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}

.checkout-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

.checkout-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.checkout-subtitle {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Checkout Restaurant Info */
.checkout-restaurant-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--gray-50);
    border-radius: 10px;
    border: 1px solid var(--gray-200);
}

.checkout-restaurant-emoji {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--whatsapp-green-light), var(--dark-charcoal-bg));
    border-radius: 10px;
}

.checkout-restaurant-details h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
}

.checkout-restaurant-details .cuisine {
    font-size: 0.8rem;
}

.checkout-restaurant-details .rating {
    color: #F59E0B;
    font-size: 0.9rem;
}

/* Table Grid */
.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.table-option {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 1rem 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.table-option:hover {
    border-color: var(--whatsapp-green);
    background-color: var(--whatsapp-green-light);
}

.table-option.selected {
    border-color: var(--whatsapp-green);
    background: linear-gradient(135deg, var(--whatsapp-green), var(--whatsapp-green-dark));
    color: var(--white);
}

.table-option.selected .table-label,
.table-option.selected .table-desc {
    color: var(--white);
}

.table-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.table-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--gray-700);
}

.table-desc {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 0.2rem;
}

/* Date/Time Picker */
.datetime-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-700);
    margin-bottom: 0.4rem;
}

.form-input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-input:focus {
    border-color: var(--whatsapp-green);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.form-input:focus:not(:focus-visible) {
    outline: none;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Checkout Summary */
.checkout-summary {
    position: sticky;
    top: 100px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.95rem;
}

.summary-row:last-of-type {
    border-bottom: none;
}

.summary-row span:first-child {
    color: var(--gray-500);
}

.summary-row span:last-child {
    font-weight: 600;
    color: var(--gray-800);
}

.btn-confirm-booking {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, var(--whatsapp-green), var(--whatsapp-green-dark));
    color: var(--white);
    font-weight: 700;
    padding: 0.9rem;
    border-radius: 50px;
    border: none;
    font-size: 1.05rem;
    cursor: pointer;
    margin-top: 1.25rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.btn-confirm-booking:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.booking-result {
    margin-top: 1rem;
}

.booking-result .success {
    background-color: var(--whatsapp-green-light);
    color: var(--whatsapp-green-dark);
    padding: 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.booking-result .error {
    background-color: #fee2e2;
    color: var(--dark-charcoal);
    padding: 0.85rem;
    border-radius: 10px;
    font-size: 0.95rem;
}

.booking-result .loading {
    color: var(--gray-500);
    text-align: center;
    font-size: 0.95rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.5rem; /* text-2xl — compact for the exact-viewport hero */
        font-weight: 900; /* font-black */
        line-height: 1.2; /* tight leading */
        margin-bottom: 0.75rem; /* mb-3 — saves vertical real estate */
        max-width: 80%; /* max-w-[80%]: keeps the balanced 3-line format */
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    }

    .hero p {
        display: none; /* hidden md:block — free vertical space on mobile */
        font-size: 1rem;
    }

    .search-bar {
        border-radius: 20px;
        padding: 0.75rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .search-bar .search-item {
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
        padding: 0.5rem 0.75rem;
    }

    .search-bar .search-item:last-of-type {
        border-bottom: none;
    }

    .search-bar select,
    .search-bar input[type="date"],
    .search-bar input[type="text"] {
        width: 100%;
        min-width: unset;
    }

    .btn-letsgo {
        width: 100%;
        text-align: center;
    }

    .restaurant-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .restaurant-detail-img {
        width: 150px;
        height: 150px;
        min-width: 150px;
        font-size: 4rem;
    }

    .restaurant-meta {
        justify-content: center;
    }

    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-summary {
        position: static;
    }

    .datetime-picker {
        grid-template-columns: 1fr;
    }

    .table-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-nav a {
        margin-left: 1rem;
        font-size: 0.9rem;
    }
}

/* ============================================
   Admin Dashboard Styles
   ============================================ */
.admin-dashboard {
    padding: 2rem 0 5rem;
    background-color: var(--gray-50);
    min-height: 60vh;
}

.admin-dashboard h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.admin-subtitle {
    color: var(--gray-500);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.admin-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

.admin-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-100);
}

.admin-card-desc {
    color: var(--gray-500);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.admin-card-desc code {
    background-color: var(--gray-100);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--dark-charcoal);
}

/* Form Layout */
.admin-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.form-status {
    font-size: 0.9rem;
    font-weight: 500;
}

.form-status.success {
    color: var(--whatsapp-green-dark);
}

.form-status.error {
    color: #dc2626;
}

/* Admin Buttons */
.btn-admin-primary {
    background: linear-gradient(135deg, var(--whatsapp-green), var(--whatsapp-green-dark));
    color: var(--white);
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-admin-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-admin-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-admin-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-admin-secondary:hover {
    background-color: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-admin-refresh {
    background: transparent;
    color: var(--gray-500);
    border: 1px solid var(--gray-200);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-admin-refresh:hover {
    background-color: var(--gray-50);
    color: var(--gray-700);
}

/* CSV Upload Zone */
.csv-upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--gray-50);
    margin-bottom: 1rem;
}

.csv-upload-zone:hover,
.csv-upload-zone.drag-over {
    border-color: var(--whatsapp-green);
    background-color: var(--whatsapp-green-light);
}

.csv-upload-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.csv-upload-text {
    font-size: 1.05rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.csv-upload-text strong {
    color: var(--whatsapp-green-dark);
}

.csv-upload-hint {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.csv-upload-zone .btn-admin-secondary {
    margin: 0.25rem;
}

.csv-status {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.csv-status .success {
    color: var(--whatsapp-green-dark);
    font-weight: 500;
}

.csv-status .error {
    color: #dc2626;
    font-weight: 500;
}

.csv-preview {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--gray-50);
    border-radius: 10px;
    border: 1px solid var(--gray-200);
}

.csv-preview h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
}

.csv-preview .btn-admin-primary {
    margin-top: 1rem;
}

/* Admin Table */
.admin-table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.table-count {
    font-size: 0.9rem;
    color: var(--gray-500);
    font-weight: 500;
}

.table-count.success {
    color: var(--whatsapp-green-dark);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.admin-table thead {
    background-color: var(--gray-100);
}

.admin-table th {
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    font-weight: 600;
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-600);
    font-size: 0.95rem;
}

.admin-table tbody tr:hover {
    background-color: var(--gray-50);
}

.admin-table .table-empty {
    text-align: center;
    color: var(--gray-400);
    padding: 2rem;
    font-style: italic;
}

.resto-emoji {
    font-size: 1.25rem;
    margin-right: 0.35rem;
}

.cuisine-badge {
    display: inline-block;
    background-color: var(--whatsapp-green-light);
    color: var(--whatsapp-green-dark);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
}

.rating-stars {
    color: #F59E0B;
}

.btn-delete {
    background: none;
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background-color: #fee2e2;
    border-color: #dc2626;
}

/* CSV Preview Table */
.csv-preview-table {
    font-size: 0.9rem;
}

.csv-preview-table th {
    padding: 0.6rem 0.75rem;
}

.csv-preview-table td {
    padding: 0.5rem 0.75rem;
}

/* Responsive Admin */
@media (max-width: 768px) {
    .admin-form .form-row {
        grid-template-columns: 1fr;
    }

    .admin-table {
        font-size: 0.85rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.5rem 0.6rem;
    }

    .csv-upload-zone {
        padding: 1.5rem 1rem;
    }
}

/* ============================================
   Mobile Navigation & Side Drawer
   ============================================ */

/* Hamburger Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    z-index: 110;
    transition: transform 0.2s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
}

/* Mobile header actions: compact language switcher + hamburger grouped together */
.mobile-header-actions {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

/* Circular Language Switcher & Utility Buttons:
   Matches sleek Apple Glass styling with perfect 38px circular buttons */
#lang-toggle-btn,
.mobile-lang-toggle-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    color: #fff !important;
    font-weight: 800 !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
    padding: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    line-height: 1 !important;
    text-align: center !important;
}

#lang-toggle-btn:hover,
.mobile-lang-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    transform: scale(1.05);
}

/* Desktop User Profile Trigger: Perfect 40px circle matching utility icons */
.nav-profile-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.nav-profile-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    transform: scale(1.05);
}

/* Mobile Notification Bell button */
.mobile-notif-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    color: #fff !important;
    cursor: pointer !important;
    padding: 0 !important;
    position: relative !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.mobile-notif-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    transform: scale(1.05);
}

.mobile-menu-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    color: #fff !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    transform: scale(1.05);
}

    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    transform: scale(1.05);
}

/* Apple Glassmorphism Surfaces for Header Flyouts & Dropdowns */
.nav-flyout,
.nav-profile-dropdown,
.mobile-notif-flyout {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15) !important;
    border-radius: 20px !important;
    text-align: start;
}

.nav-flyout,
.nav-profile-dropdown {
    inset-inline-end: 0;
    inset-inline-start: auto;
}

.nav-flyout a:hover,
.nav-profile-dropdown a:hover,
.nav-profile-dropdown button:hover,
.mobile-notif-flyout a:hover {
    background: rgba(0, 0, 0, 0.04) !important;
}

/* Position mobile notifications flyout safely on small viewports */
.mobile-notif-flyout {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-end: -46px;
    inset-inline-start: auto;
    z-index: 350;
    width: 300px;
    max-width: calc(100vw - 24px);
}

/* Side Drawer Overlay */
.side-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.side-drawer-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* Side Drawer: Apple Glass Aesthetic */
.side-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 290px;
    max-width: 85vw;
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12) !important;
    border-radius: 0 24px 24px 0 !important;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    flex-direction: column;
    padding: 1.25rem 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.side-drawer.active {
    display: flex;
    transform: translateX(0);
}

/* English / LTR: drawer slides in from the RIGHT side */
html[dir="ltr"] .side-drawer,
html[lang="en"] .side-drawer {
    left: auto;
    right: 0;
    transform: translateX(100%);
    border-radius: 24px 0 0 24px !important;
}

html[dir="ltr"] .side-drawer.active,
html[lang="en"] .side-drawer.active {
    transform: translateX(0);
}

.side-drawer-close {
    align-self: flex-end;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-500);
    padding: 0;
    line-height: 1;
    transition: all 0.2s ease;
}

.side-drawer-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--gray-800);
}

.side-drawer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--whatsapp-green);
    margin: 0.5rem 0 1.25rem;
    letter-spacing: -0.5px;
}

.side-drawer-logo-img {
    max-height: 36px;
    width: auto;
}

.side-drawer-logo-demo {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--whatsapp-green, #25D366);
    opacity: 0.8;
    line-height: 1;
    white-space: nowrap;
}

.side-drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.side-drawer-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.side-drawer-group:last-child {
    border-bottom: none;
}

.side-drawer-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: 12px;
    transition: background 0.15s ease, color 0.15s ease;
}

.side-drawer-nav a svg {
    flex-shrink: 0;
    stroke: #64748B;
    transition: stroke 0.15s ease;
}

.side-drawer-nav a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #0F172A;
}

.side-drawer-nav a:hover svg {
    stroke: #0F172A;
}

/* ============================================
   Mobile Responsive Styles (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Hide standard nav links */
    .header-nav {
        display: none !important;
    }

    /* Show hamburger button */
    .mobile-menu-btn {
        display: block;
    }

    /* Show the mobile header actions group (language toggle + hamburger) */
    .mobile-header-actions {
        display: flex;
    }

    /* Logo: 40% smaller on mobile (40px → 24px), then scaled +15% → 28px
       (h-7); aspect ratio preserved. */
    .header-logo-img,
    .side-drawer-logo-img {
        max-height: 28px;
    }

    /* Hero Search Form - Mobile Layout */
    .search-bar {
        width: 90%;
        max-width: 400px;
        margin: 0 auto;
        overflow: visible;
        z-index: 10;
        border-radius: 16px;
        padding: 0.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .search-bar .search-item {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
        padding: 0.5rem 0.75rem;
    }

    .search-bar .search-item:last-of-type {
        border-bottom: none;
    }

    .search-bar select,
    .search-bar input[type="date"],
    .search-bar input[type="text"] {
        width: 100%;
        min-width: 0;
        padding: 0.4rem 0;
    }

    .search-bar .btn-letsgo {
        width: 100%;
        padding: 0.75rem 1.5rem;
        margin-top: 0.25rem;
    }

    /* Mobile hero: STABLE height that never recalculates on scroll. The old
       calc(100dvh - 64px) re-flowed every time the mobile address bar collapsed
       or expanded while scrolling — flickering the video/image layers. svh
       (small viewport height) is constant regardless of the browser chrome
       state; a fixed 600px pixel fallback covers browsers without svh. */
    .hero {
        /* Fixed/stabilized mobile viewport height (h-[600px] → 100svh). */
        min-height: 600px;
        min-height: calc(100svh - 64px);
        /* Strictly bounded: the absolute video + photo layers (w-full h-full
           object-cover inset-0) can never bleed or alter layout. The mobile
           search autocomplete is position:fixed (bottom sheet), so it escapes
           this clip without issue. */
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: center; /* items-center */
        padding: 3rem 1rem 1.25rem; /* header clearance top; 1.25rem safe-area bottom */
    }

    /* Hero content wrapper: horizontally centered title + search box with
       pb-6 breathing room from the bottom of the screen. */
    .hero .container,
    html[lang="ar"] .hero .container,
    [dir="rtl"] .hero .container {
        display: flex;
        flex-direction: column;
        align-items: center; /* items-center */
        text-align: center; /* text-center */
        padding-bottom: 1.5rem; /* pb-6 */
    }

    .hero-search-wrap {
        width: 100%; /* search card spans the wrapper inside the centered flex */
    }

    .hero h1 {
        font-size: 1.5rem; /* text-2xl — compact for the exact-viewport hero */
        font-weight: 900; /* font-black */
        line-height: 1.2; /* tight leading */
        margin-bottom: 0.75rem; /* mb-3 — saves vertical real estate */
        max-width: 80%; /* max-w-[80%]: keeps the balanced 3-line format */
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    }

    .hero p {
        display: none; /* hidden md:block — free vertical space on mobile */
        font-size: 1rem;
    }
}

/* ============================================
   Redesigned Restaurant Detail Page (Modern UI)
   ============================================ */

/* Hero Image Section */
.resto-hero {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
}

.resto-hero-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark-charcoal) 0%, var(--gray-900) 50%, #0f172a 100%);
    position: relative;
}

.resto-hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 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='%2325D366' fill-opacity='0.08'%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");
    pointer-events: none;
}

.resto-hero-emoji {
    font-size: 8rem;
    opacity: 0.3;
    filter: grayscale(0.5);
}

.resto-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 2rem 0 1.5rem;
    color: var(--white);
}

.resto-back-btn {
    display: inline-block;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    transition: color 0.2s;
}

.resto-back-btn:hover {
    color: var(--white);
}

.resto-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.resto-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.resto-badge {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.resto-badge.cuisine-badge {
    background: rgba(37, 211, 102, 0.85);
    color: var(--white);
}

.resto-badge.price-badge {
    background: rgba(255,255,255,0.2);
    color: var(--white);
    backdrop-filter: blur(4px);
}

.resto-badge.rating-badge {
    background: rgba(245, 158, 11, 0.85);
    color: var(--white);
}

/* Content Layout */
.resto-content {
    padding: 2rem 1rem 4rem;
}

.resto-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    align-items: start;
}

.resto-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

.resto-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-100);
}

.resto-desc {
    color: var(--gray-600);
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 1.25rem;
}

.resto-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.resto-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: 10px;
    border: 1px solid var(--gray-200);
}

.resto-meta-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.resto-meta-item div strong {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.resto-meta-item div p {
    font-size: 0.95rem;
    color: var(--gray-700);
    font-weight: 500;
}

/* Menu Section */
.resto-menu-category {
    margin-bottom: 1.5rem;
}

.resto-menu-category:last-child {
    margin-bottom: 0;
}

.resto-menu-category h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark-charcoal);
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--whatsapp-green-light);
}

.resto-menu-grid {
    display: grid;
    gap: 0.6rem;
}

.resto-menu-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.resto-menu-item:hover {
    border-color: var(--whatsapp-green);
    background: var(--white);
}

.resto-menu-item-emoji {
    font-size: 1.5rem;
    width: 36px;
    text-align: center;
    flex-shrink: 0;
}

.resto-menu-item-info {
    flex: 1;
    min-width: 0;
}

.resto-menu-item-name {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.95rem;
}

.resto-menu-item-desc {
    color: var(--gray-500);
    font-size: 0.8rem;
    margin-top: 0.1rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.resto-menu-item-price {
    font-weight: 700;
    color: var(--whatsapp-green-dark);
    font-size: 1rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Booking Widget (Sticky Sidebar) */
.resto-sidebar {
    position: sticky;
    top: 90px;
}

.resto-booking-widget {
    background: var(--white);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid var(--gray-200);
}

.resto-booking-widget h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.resto-booking-sub {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.resto-booking-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.resto-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-bottom: 0.3rem;
}

.resto-form-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: var(--white);
}

.resto-form-input:focus {
    border-color: var(--whatsapp-green);
    box-shadow: 0 0 0 3px rgba(37,211,102,0.1);
}

.resto-form-input:focus:not(:focus-visible) {
    outline: none;
}

.resto-book-btn {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, var(--whatsapp-green), var(--whatsapp-green-dark));
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37,211,102,0.3);
    margin-top: 0.5rem;
}

.resto-book-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,211,102,0.4);
}

/* Responsive: Restaurant Detail Page */
@media (max-width: 768px) {
    .resto-hero {
        height: 260px;
    }

    .resto-hero-title {
        font-size: 1.75rem;
        word-break: break-word;
    }

    .resto-layout {
        grid-template-columns: 1fr;
    }

    .resto-meta-grid {
        grid-template-columns: 1fr;
    }

    .resto-card {
        padding: 1.25rem;
    }

    .resto-card h3 {
        font-size: 1.15rem;
    }

    .resto-menu-item {
        padding: 0.65rem 0.75rem;
        gap: 0.6rem;
    }

    .resto-menu-item-emoji {
        font-size: 1.2rem;
        width: 28px;
    }

    .resto-menu-item-name {
        font-size: 0.85rem;
    }

    .resto-menu-item-desc {
        font-size: 0.75rem;
    }

    .resto-menu-item-price {
        font-size: 0.85rem;
    }

    .resto-booking-widget {
        padding: 1.25rem;
    }

    .resto-hero-overlay {
        padding: 1.25rem 0 1rem;
    }

    .resto-hero-badges {
        gap: 0.35rem;
    }

    .resto-badge {
        font-size: 0.75rem;
        padding: 0.2rem 0.65rem;
    }
}

/* ============================================
   About Company Section
   ============================================ */
.about-company-section {
    padding: 4rem 0;
    background: var(--white);
}

.about-company-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-company-text {
    text-align: center;
    margin-bottom: 3rem;
}

.about-company-text h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark-charcoal);
    margin-bottom: 0.5rem;
}

.about-company-tagline {
    font-size: 1.1rem;
    color: var(--whatsapp-green-dark);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.about-company-text p {
    color: var(--gray-600);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.about-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.about-stat {
    text-align: center;
}

.about-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--whatsapp-green-dark);
}

.about-stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--gray-500);
    font-weight: 500;
    margin-top: 0.25rem;
}

.about-company-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.about-value-card {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--gray-200);
}

.about-value-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.about-value-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark-charcoal);
    margin-bottom: 0.5rem;
}

.about-value-card p {
    color: var(--gray-500);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ============================================
   Responsive: About Sections
   ============================================ */
@media (max-width: 768px) {
    .about-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .about-company-values {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Unified Filter Bar - Responsive Grid Layout
   Mobile: 1 col | Tablet: 3 cols | Desktop: 7 cols
   All controls share identical h-11 (2.75rem) height
   and rounded-xl (0.75rem) radius with emerald focus ring
   ============================================ */
.filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2-col mobile grid */
    gap: 0.75rem;
    align-items: center;
    background: var(--white);
    border-radius: 1rem;
    padding: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-200);
    position: relative;
}

.filter-col {
    min-width: 0;
    position: relative;
    width: 100%;
}

.filter-col-name {
    grid-column: 1 / -1; /* search spans the full width on mobile */
}

.filter-col-date {
    grid-column: span 1;
}

.filter-input-wrap,
.filter-select-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.85rem;
    height: 2.75rem; /* h-11 */
    width: 100%;
    border: 2px solid var(--gray-200);
    border-radius: 0.75rem; /* rounded-xl */
    background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-input-wrap:focus-within,
.filter-select-wrap:focus-within {
    border-color: #10B981; /* emerald-500 */
    box-shadow: 0 0 0 2px #10B981; /* ring-2 ring-emerald-500 */
}

/* --- Search clear button: inner-right in LTR, inner-left in RTL --- */
.filter-input-wrap {
    position: relative;
}

.search-clear-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: var(--gray-200);
    color: var(--gray-600);
    font-size: 0.72rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease;
    z-index: 3;
}

.search-clear-btn:hover {
    background: var(--gray-300);
    color: var(--gray-800);
}

html[dir="ltr"] .search-clear-btn { right: 0.6rem; left: auto; }
[dir="rtl"] .search-clear-btn { left: 0.6rem; right: auto; }

/* Reserve room so typed text never runs underneath the clear button */
html[dir="ltr"] .filter-col-name .filter-input { padding-right: 2rem; box-sizing: border-box; }
[dir="rtl"] .filter-col-name .filter-input { padding-left: 2rem; box-sizing: border-box; }

/* --- Date picker clear button: inner-right in LTR, inner-left in RTL --- */
.date-clear-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: var(--gray-200);
    color: var(--gray-600);
    font-size: 0.7rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease;
    z-index: 3;
}

.date-clear-btn:hover {
    background: var(--gray-300);
    color: var(--gray-800);
}

html[dir="ltr"] .date-clear-btn { right: 1.5rem; left: auto; }
[dir="rtl"] .date-clear-btn { left: 1.5rem; right: auto; }

/* When a date scope is active the clear button sits beside the chevron — give the trigger
   label extra room so the text ellipsizes before reaching it. */
html[dir="ltr"] .filter-trigger-wrap.date-has-clear .filter-trigger { padding-right: 3.2rem; }
[dir="rtl"] .filter-trigger-wrap.date-has-clear .filter-trigger { padding-left: 3.2rem; }

.filter-icon {
    flex-shrink: 0;
}

.filter-input {
    border: none;
    font-size: 0.95rem;
    color: var(--gray-700);
    background: transparent;
    font-family: inherit;
    width: 100%;
    height: 100%;
}

.filter-input:focus {
    outline: none; /* Focus ring is rendered by .filter-input-wrap:focus-within */
}

.filter-input::placeholder {
    color: var(--gray-400);
}

/* --- Date inputs: perfect fit inside wrap + clickable anywhere --- */
.filter-date-input {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: 100%;
    cursor: pointer;
    font-size: 0.85rem; /* slightly smaller so mm/dd/yyyy + icon fit the 1/7 desktop column */
    padding-right: 0.35rem; /* small gap before the picker indicator */
    color-scheme: light;
    white-space: nowrap;
    overflow: hidden;
}

.filter-date-input::-webkit-calendar-picker-indicator {
    position: static; /* keep in-flow -- never overflows the border */
    transform: none;
    width: 16px;
    height: 16px;
    margin: 0 0 0 auto; /* push to the right edge, inside the border */
    padding: 0;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.filter-date-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Firefox fallback: keep the native controls subtle */
.filter-date-input::-moz-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
}

.filter-select {
    border: none;
    font-size: 0.95rem;
    color: var(--gray-700);
    background: transparent;
    font-family: inherit;
    width: 100%;
    height: 100%;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 1.25rem;
}

.filter-select:focus {
    outline: none; /* Focus ring is rendered by .filter-select-wrap:focus-within */
}

.filter-chevron {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    flex-shrink: 0;
}

.filter-btn-col {
    width: 100%;
}

.filter-btn {
    background: linear-gradient(135deg, var(--whatsapp-green), var(--whatsapp-green-dark));
    color: var(--white);
    border: none;
    padding: 0 1.75rem;
    height: 2.75rem; /* h-11 - matches input fields */
    width: 100%;
    border-radius: 0.75rem; /* rounded-xl */
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filter-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.filter-btn:focus:not(:focus-visible) {
    outline: none;
    box-shadow: 0 0 0 2px #10B981; /* ring-2 ring-emerald-500 */
}

.filter-btn:focus-visible {
    outline: 2px solid var(--whatsapp-green-dark, #1DA851);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #10B981;
}

/* --- Mobile: 2-col grid — search spans full width, date + Find side by side --- */
.filter-col-name {
    grid-column: 1 / -1;
}

/* Custom dropdown polish: subtler arrow, clean interaction */
.filter-select-wrap .filter-chevron {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.filter-select-wrap:hover .filter-chevron,
.filter-select-wrap:focus-within .filter-chevron {
    opacity: 0.9;
}

/* Desktop: clean 2-field layout + Find button (smart search · date · Find). */
@media (min-width: 1024px) {
    .filter-bar {
        grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto;
    }

    .filter-col-name { grid-column: 1; grid-row: 1; }
    .filter-col-date { grid-column: 2; grid-row: 1; }
    .filter-btn-col { grid-column: 3; grid-row: 1; }
}

/* Mobile: compact the search card (p-2.5 padding, gap-2 fields, 40px inputs,
   30vh cap) so it never pushes the hero content off the bottom of the viewport.
   The card is the containing block for the suggestions dropdown, which floats
   out of it (overflow: visible) so it never clips or scrolls internally. */
@media (max-width: 768px) {
    .filter-bar {
        padding: 0.625rem; /* p-2.5 */
        gap: 0.5rem; /* gap-2 — reduced vertical spacing between fields */
        max-height: 30vh; /* hard cap — cannot push the hero off-screen */
        overflow: visible; /* essential: let the absolute dropdown break out of
                               the card and float over the fields/button below */
        position: relative; /* containing block for the absolute dropdown */
    }

    .filter-input-wrap,
    .filter-select-wrap {
        height: 2.5rem; /* 40px max input height */
    }

    /* Suggestions dropdown: absolute so it floats OVER the date row and the
       Search button (never pushes them down). Capped at 40vh with its own
       internal scroll so it can't cover the whole screen. */
    .filter-autocomplete {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 9999;
        margin-top: 0.5rem;
        max-height: 40vh;
        overflow-y: auto;
    }
}

/* Autocomplete dropdown - modern redesigned UI */
.filter-autocomplete {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    z-index: 50;
    background: #ffffff;
    border: 1px solid #f1f5f9; /* border-slate-100 */
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.1); /* shadow-xl */
    margin-top: 0.25rem; /* mt-1 */
    padding: 0.5rem; /* p-2 */
    /* Constrain ONLY the popup list itself — any scrolling happens inside the
       dropdown, never on the page/hero section. */
    max-height: 380px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Slim scrollbar for the dropdown */
.filter-autocomplete::-webkit-scrollbar {
    width: 6px;
}

.filter-autocomplete::-webkit-scrollbar-track {
    background: transparent;
}

.filter-autocomplete::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 9999px;
}

.filter-autocomplete::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.filter-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    font-size: 0.875rem; /* text-sm */
    font-weight: 500;
    line-height: 1.15rem; /* reduced line height */
    color: var(--gray-700);
    cursor: pointer;
    border-radius: 0.5rem; /* rounded-lg */
    transition: background-color 0.15s ease, color 0.15s ease;
    min-width: 0;
}

.filter-autocomplete-emoji {
    flex-shrink: 0;
    font-size: 0.875rem;
    line-height: 1;
}

.filter-autocomplete-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; /* truncate / line-clamp-1 */
}

.filter-autocomplete-item:hover {
    background: #f8fafc; /* hover:bg-slate-50 */
    color: var(--gray-800);
}

.filter-autocomplete-empty {
    padding: 0.75rem 0.85rem;
    color: var(--gray-400);
    font-size: 0.875rem;
}


/* ============================================
   Filter Bar — Trigger Buttons & Dropdown Panels
   (location cascade + date quick-pills picker)
   ============================================ */
.filter-trigger-wrap {
    position: relative;
}

.filter-trigger {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    text-align: left;
    padding: 0 1.1rem 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-trigger:hover {
    color: var(--gray-900);
}

.filter-trigger-wrap .filter-chevron {
    right: 0.4rem;
}

.filter-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 60;
    min-width: 230px;
    width: max-content;
    max-width: calc(100vw - 2rem);
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
    padding: 0.5rem;
    max-height: 340px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* --- Date range dropdown: quick pills + From/To inputs --- */
.filter-date-dropdown {
    min-width: 280px;
}

.filter-quick-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
}

.filter-pill {
    border: 1px solid var(--gray-200);
    background: var(--gray-50);
    color: var(--gray-600);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.4rem 0.9rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.filter-pill:hover {
    border-color: #10B981;
    color: #047857;
}

.filter-pill.active {
    background: linear-gradient(135deg, var(--whatsapp-green), var(--whatsapp-green-dark));
    color: #fff;
    border-color: transparent;
}

.filter-date-pair {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.filter-date-pair label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gray-500);
    min-width: 36px;
    text-align: left;
}

.filter-date-pair .filter-date-input {
    flex: 1;
}

/* ============================================
   Autocomplete — rich media rows (thumbnail + title + sub-line)
   ============================================ */
.filter-autocomplete-item {
    gap: 0.65rem;
    padding: 0.5rem 0.6rem;
}

.filter-autocomplete-item.active,
.filter-autocomplete-item:hover {
    background: #ecfdf5;
    color: var(--gray-800);
}

.filter-autocomplete-media {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
}

.filter-autocomplete-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.filter-autocomplete-emoji {
    font-size: 1.05rem;
    line-height: 1;
}

.filter-autocomplete-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.filter-autocomplete-title {
    font-weight: 600;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-autocomplete-sub {
    font-size: 0.78rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   RTL / LTR dynamic alignment for the filter bar
   Arabic (dir="rtl") → strict right-to-left flow; English → left.
   ============================================ */
[dir="rtl"] .filter-bar {
    text-align: right;
}

[dir="rtl"] .filter-input,
[dir="rtl"] .filter-trigger,
[dir="rtl"] .filter-date-pair label,
[dir="rtl"] .filter-autocomplete,
[dir="rtl"] .filter-dropdown {
    text-align: right;
}

[dir="rtl"] .filter-trigger {
    padding: 0 0 0 1.1rem;
}

[dir="rtl"] .filter-trigger-wrap .filter-chevron {
    right: auto;
    left: 0.4rem;
}

[dir="rtl"] .filter-autocomplete-title,
[dir="rtl"] .filter-autocomplete-sub {
    text-align: right;
}

[dir="rtl"] .filter-dropdown {
    left: auto;
    right: 0;
}

[dir="rtl"] .filter-quick-pills {
    justify-content: flex-start;
}

html[dir="ltr"] .filter-input,
html[dir="ltr"] .filter-trigger,
html[dir="ltr"] .filter-autocomplete {
    text-align: left;
}


/* ============================================
   Bilingual event creation form (client dashboard + organizer portal)
   Sections group English & Arabic field pairs so both languages are always
   visible regardless of the active UI language.
   ============================================ */
.cd-form-section {
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    background: var(--white, #fff);
}

.cd-form-section-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--gray-800, #1f2937);
    margin: 0 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-100, #f3f4f6);
}

.cd-req-label {
    font-weight: 700;
}

/* Gated primary action — disabled look until the terms checkbox is accepted.
   Uses opacity/grayscale so it works over inline-styled buttons; clicks still
   fire so we can show a "please accept the terms" toast. */
.event-action-btn-disabled {
    opacity: 0.55;
    filter: grayscale(0.6);
    cursor: not-allowed !important;
}



/* ============================================
   Load More button (pagination) — centered below event grids.
   Shared by the /events catalog and ALL category pages (design system).
   ============================================ */
.load-more-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 2.5rem 0;
}

.load-more-wrap[hidden] {
    display: none;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--whatsapp-green), var(--whatsapp-green-dark));
    color: var(--white);
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.load-more-btn:hover:not(:disabled) {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.load-more-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

/* Inline spinner shown while the next batch is being fetched */
.load-more-btn.loading::after {
    content: '';
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Anti-FOUC i18n guard — hides the static default-locale [data-i18n] fallback
   text until client i18n has applied the ACTIVE locale. main.js adds the
   .i18n-applied class to <html> inside applyLanguage(); visibility keeps the
   layout stable (no reflow) while the text is swapped.
   ============================================ */
html:not(.i18n-applied) [data-i18n],
html:not(.i18n-applied) [data-i18n-html] {
    visibility: hidden;
}

/* ============================================
   Scroll Reveal & Micro-Interactions Engine
   IntersectionObserver triggered smooth entry
   ============================================ */
.reveal-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered transition delays for grid items and consecutive elements */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Accessibility guard: honor reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal-up {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ============================================
   HYBRID INFINITE SCROLL & PAGINATION CONTROLS
   Instagram / TikTok-style infinite scroll with
   Apple-glass manual break button and animations
   ============================================ */
#feed-pagination-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    position: relative;
    z-index: 10;
}

#feed-sentinel {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
    min-height: 24px;
}

#feed-spinner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
}

#feed-spinner svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #10b981;
}

#feed-spinner.hidden {
    display: none !important;
}

#btnLoadMoreEvents {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2.25rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.92), rgba(5, 150, 105, 0.92));
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.35), 0 8px 10px -6px rgba(16, 185, 129, 0.2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#btnLoadMoreEvents:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 1), rgba(5, 150, 105, 1));
    box-shadow: 0 14px 28px -4px rgba(16, 185, 129, 0.45);
    transform: translateY(-2px);
}

#btnLoadMoreEvents:active {
    transform: scale(0.95);
}

#btnLoadMoreEvents.hidden {
    display: none !important;
}

#feed-end-notice {
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 1rem 0;
    text-align: center;
}

#feed-end-notice.hidden {
    display: none !important;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* ============================================
   NEARBY LOCATION PICKER & DROPDOWN MENU
   Stacking context fix & RTL/LTR alignments
   ============================================ */
.home-heading-row {
    position: relative;
    z-index: 30;
}

.home-heading-row.has-dropdown-open,
.home-heading-row:has(.location-dropdown.open),
.home-heading-row:has(.location-dropdown-menu.open),
.home-heading-row:has(.location-selector-wrap.open) {
    z-index: 45 !important;
}

.for-you-tabs {
    position: relative;
    z-index: 10;
}

.location-selector-wrap {
    position: relative;
}

.location-selector-wrap.open,
.location-selector-wrap:has(.location-dropdown.open),
.location-selector-wrap:has(.location-dropdown-menu.open),
.location-selector-wrap:has([aria-expanded="true"]) {
    position: relative;
    z-index: 40 !important;
}

.location-dropdown,
.location-dropdown-menu,
#locationDropdown,
#locationDropdownMenu {
    display: none;
    position: absolute;
    z-index: 50 !important; /* Higher than tabs and event cards */
    top: calc(100% + 0.5rem);
    min-width: 240px;
    max-width: min(320px, calc(100vw - 2rem));
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 0.4rem;
    margin: 0;
}

/* RTL Alignment */
[dir="rtl"] .location-dropdown,
[dir="rtl"] .location-dropdown-menu,
[dir="rtl"] #locationDropdown,
[dir="rtl"] #locationDropdownMenu,
html[dir="rtl"] .location-dropdown,
html[dir="rtl"] .location-dropdown-menu,
html[dir="rtl"] #locationDropdown,
html[dir="rtl"] #locationDropdownMenu {
    right: 0;
    left: auto;
    transform: none;
}

/* LTR Alignment */
[dir="ltr"] .location-dropdown,
[dir="ltr"] .location-dropdown-menu,
[dir="ltr"] #locationDropdown,
[dir="ltr"] #locationDropdownMenu,
html[dir="ltr"] .location-dropdown,
html[dir="ltr"] .location-dropdown-menu,
html[dir="ltr"] #locationDropdown,
html[dir="ltr"] #locationDropdownMenu {
    left: 0;
    right: auto;
    transform: none;
}

.location-dropdown.open,
.location-dropdown-menu.open,
#locationDropdown.open,
#locationDropdownMenu.open {
    display: block !important;
}

/* ============================================
   DEMO MODE TOP BAR (Arabic-first, Cairo, Zero-Emoji)
   ============================================ */
.header.has-demo-bar {
    padding-top: 0 !important;
}

.demo-mode-topbar {
    width: 100%;
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: #f8fafc;
    border-bottom: 1px solid rgba(16, 185, 129, 0.35);
    font-family: 'Cairo', sans-serif;
    font-size: 0.78rem;
    line-height: 1.35;
    margin-bottom: 0.65rem;
    position: relative;
    z-index: 130;
}

.demo-mode-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.42rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.demo-mode-topbar-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    color: #a7f3d0;
}

.demo-mode-topbar-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    flex-shrink: 0;
}

.demo-mode-topbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.demo-topbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.24rem 0.65rem;
    border-radius: 9999px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.demo-topbar-btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.demo-topbar-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.demo-topbar-btn-live {
    background: #10b981;
    color: #ffffff;
    border: 1px solid #10b981;
}

.demo-topbar-btn-live:hover {
    background: #059669;
    border-color: #059669;
}

@media (max-width: 768px) {
    .demo-mode-topbar-inner {
        justify-content: center;
        padding: 0.4rem 0.65rem;
        gap: 0.4rem;
    }
    .demo-mode-topbar-status {
        font-size: 0.72rem;
    }
    .demo-mode-topbar-actions {
        justify-content: center;
        gap: 0.35rem;
    }
    .demo-topbar-btn {
        font-size: 0.69rem;
        padding: 0.2rem 0.52rem;
    }
}



