/* ----------------------------------------------------
   SeeEat - Core Design System & Master Stylesheet
   ---------------------------------------------------- */

:root {
    --bg-red-main: #87171E;
    --bg-red-light: #9C1C24;
    --bg-red-dark: #6E1016;
    --text-white: #FAF6F0;
    --brand-red: #87171E;
    --brand-text-red: #D52C3D;
    --pill-bg: rgba(255, 255, 255, 0.72);
    --pill-bg-hover: rgba(255, 255, 255, 0.88);
    --pill-border: rgba(255, 255, 255, 0.55);
    --pill-shadow: 0 12px 35px rgba(0, 0, 0, 0.28);
    --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    background-color: #F6EFE7 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

body {
    font-family: 'Rubik', 'Assistant', sans-serif;
    background-color: #F6EFE7 !important;
    color: var(--text-white);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* ----------------------------------------------------
   1. Floating Header Navigation Pill
   ---------------------------------------------------- */
.navbar-floating-pill {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1060px;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.navbar-pill-container {
    background: var(--pill-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50px;
    padding: 12px 28px;
    box-shadow: var(--pill-shadow), inset 0 1px 1px rgba(255, 255, 255, 0.9);
    border: 1.5px solid var(--pill-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

/* Brand Logo (Right side in RTL) */
.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.navbar-brand-img {
    height: 34px;
    width: auto;
    display: block;
    object-fit: contain;
    transition: var(--transition-smooth);
}

/* Navbar Actions (Left side in RTL) */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Desktop Customer Login Button */
.btn-customer-login {
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--brand-text-red);
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 30px;
    background: rgba(135, 23, 30, 0.08);
    border: 1.5px solid rgba(135, 23, 30, 0.18);
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.btn-customer-login:hover {
    background: var(--brand-red);
    color: #FFFFFF;
    border-color: var(--brand-text-red);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(135, 23, 30, 0.3);
}

/* Mobile User Icon Button */
.btn-user-icon {
    color: var(--brand-text-red);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(135, 23, 30, 0.08);
    border: 1.5px solid rgba(135, 23, 30, 0.18);
    transition: var(--transition-smooth);
    text-decoration: none;
}

.btn-user-icon:hover, .btn-user-icon:active {
    background: var(--brand-red);
    color: #FFFFFF;
    border-color: var(--brand-text-red);
}

/* Language Switcher Button (EN / HE) */
.btn-lang-toggle {
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--brand-text-red);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 20px;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-lang-toggle:hover {
    background: rgba(135, 23, 30, 0.08);
}

/* ----------------------------------------------------
   2. Desktop Scroll Behavior (Shrinking Header Pill)
   ---------------------------------------------------- */
@media (min-width: 769px) {
    .navbar-floating-pill.scrolled-compact {
        max-width: 680px;
        top: 12px;
    }

    .navbar-floating-pill.scrolled-compact .navbar-pill-container {
        padding: 8px 22px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    }

    .navbar-floating-pill.scrolled-compact .navbar-brand-img {
        height: 27px;
    }

    .navbar-floating-pill.scrolled-compact .btn-customer-login {
        padding: 6px 16px;
        font-size: 0.88rem;
    }

    .mobile-only {
        display: none !important;
    }
}

/* ----------------------------------------------------
   3. Mobile Responsive Styles
   ---------------------------------------------------- */
@media (max-width: 768px) {
    .navbar-floating-pill {
        width: 92% !important;
        max-width: 92% !important;
        top: 14px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    .navbar-pill-container {
        padding: 10px 18px !important;
    }

    .navbar-brand-img {
        height: 30px !important;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }
}

/* ----------------------------------------------------
   4. Main Hero Section (Responsive Multi-Layer Background System)
   ---------------------------------------------------- */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 105px 20px 20px;
    background-color: #F6EFE7;
    box-sizing: border-box;
    overflow: hidden;
}

/* Initially when restaurants grid is hidden, lock scroll to 100dvh with zero overflow */
html.initial-scroll-lock,
body.initial-scroll-lock {
    overflow: hidden !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    touch-action: pan-x;
}

.hero-section.initial-view {
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden !important;
}

/* Multi-Layer Responsive Background Container */
.hero-bg-layer-system {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
    z-index: 1;
}

.hero-bg-layer-system img {
    position: absolute;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
}

/* 1. Red Decorative Shapes Layer */
.shape-red-pizza {
    left: -14vw;
    top: 18%;
    width: 44vw;
    max-width: 600px;
    min-width: 280px;
    z-index: 1;
}

.shape-red-ramen {
    right: -8vw;
    top: -12vh;
    width: 42vw;
    max-width: 580px;
    min-width: 260px;
    z-index: 1;
}

.shape-red-burger {
    right: -10vw;
    bottom: -15vh;
    width: 38vw;
    max-width: 500px;
    min-width: 240px;
    z-index: 1;
}

/* 2. Main Food Cutout Assets Layer */
.food-pizza {
    left: -11vw;
    top: 22%;
    transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
    width: 44vw;
    max-width: 600px;
    min-width: 300px;
    z-index: 2;
}

.food-ramen {
    right: -5vw;
    top: -6vh;
    width: 34vw;
    max-width: 470px;
    min-width: 230px;
    z-index: 2;
}

.food-burger {
    right: -7vw;
    bottom: -8vh;
    width: 41vw;
    max-width: 560px;
    min-width: 270px;
    z-index: 2;
}

.bg-shape,
.bg-food,
.bg-crumbs,
.hero-center-wrapper {
    will-change: transform;
    transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
}

/* 3. Individual Basil Leaves Layer (Gentle Float Motion) */
@keyframes floatLeaf {
    0%, 100% {
        transform: translate3d(var(--px, 0px), var(--py, 0px), 0) translateY(0px) rotate(var(--leaf-rot, 0deg));
    }
    50% {
        transform: translate3d(var(--px, 0px), var(--py, 0px), 0) translateY(-11px) rotate(calc(var(--leaf-rot, 0deg) + 3.5deg));
    }
}

.leaf-top-left {
    left: 24.5vw;
    top: 17%;
    width: 4.8vw;
    max-width: 68px;
    min-width: 28px;
    --leaf-rot: 15deg;
    animation: floatLeaf 5.5s ease-in-out infinite;
    z-index: 3;
}

.leaf-bottom-left {
    left: 26vw;
    top: 39%;
    width: 4.2vw;
    max-width: 60px;
    min-width: 26px;
    --leaf-rot: -22deg;
    animation: floatLeaf 6.8s ease-in-out infinite 0.8s;
    z-index: 3;
}

.leaf-mid-right {
    right: 20.5vw;
    top: 38%;
    width: 4.6vw;
    max-width: 66px;
    min-width: 28px;
    --leaf-rot: 28deg;
    animation: floatLeaf 6.2s ease-in-out infinite 0.4s;
    z-index: 3;
}

/* 4. Spices & Croutons (Green Circle Area - Static) */
.croutons-green-circle {
    right: 28vw;
    top: 48%;
    width: 14vw;
    max-width: 210px;
    min-width: 90px;
    opacity: 0.95;
    z-index: 3;
}


.hero-center-wrapper {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 540px;
    margin-top: auto;
    margin-bottom: auto;
}

.hero-logo-large {
    width: 65%;
    max-width: 290px;
    height: auto;
    object-fit: contain;
    filter: none;
    user-select: none;
    -webkit-user-drag: none;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

/* Hover Effect: Mouse over logo scales it up slightly */
.hero-logo-large:hover {
    transform: scale(1.08);
    filter: none;
}

/* Hand-drawn red 360° graphic asset centered directly under main logo */
.hero-logo-tagline-img {
    width: 170px;
    max-width: 90vw;
    height: auto;
    object-fit: contain;
    display: block;
    margin-top: 10px; /* Gap between main logo and 360 asset: ~8-14px */
    margin-left: auto;
    margin-right: auto;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

@media (max-width: 768px) {
    .hero-logo-tagline-img {
        width: 125px; /* Mobile width: ~110-140px */
        margin-top: 8px;
    }
}

/* ----------------------------------------------------
   5. Discovery Section (Positioned at bottom edge of initial viewport)
   ---------------------------------------------------- */
.discovery-container {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 860px;
    margin-top: auto;
    margin-bottom: 0;
    text-align: center;
}

/* Title: מסעדות ב-SEEEAT */
.discovery-title {
    font-size: 2.1rem;
    font-weight: 900;
    color: var(--brand-text-red); /* Updated to #D52C3D */
    margin-bottom: 4px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.discovery-title .brand-text {
    font-weight: 900;
}

/* Subtitle: בחרו מסעדה וגלו את התפריט הדיגיטלי שלה ב-360° */
.discovery-subtitle {
    font-size: 1.05rem;
    font-weight: 700;
    color: #4D4245;
    margin-bottom: 16px;
}

/* Search Bar Wrapper */
.search-bar-wrapper {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto 16px;
}

.search-input {
    width: 100%;
    padding: 14px 50px 14px 24px;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 500;
    border-radius: 50px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.95);
    color: #211D1E;
    outline: none;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.28);
    transition: var(--transition-smooth);
}

html[dir="ltr"] .search-input {
    padding: 14px 24px 14px 50px;
}

.search-input::placeholder {
    color: #8E8588;
    font-weight: 400;
}

.search-input:focus {
    background: #FFFFFF;
    border-color: #FFFFFF;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.38);
}

.search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brand-text-red);
    display: flex;
    align-items: center;
    pointer-events: none;
}

html[dir="ltr"] .search-icon {
    right: auto;
    left: 18px;
}

/* Category Filter Pills Container (Infinite Marquee Auto-Ticker & Pointer Drag) */
.category-filters-container {
    width: 100vw;
    max-width: 100%;
    margin: 0 auto 18px;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    z-index: 50;
    padding: 8px 0 14px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-x;
}

.category-filters-container::-webkit-scrollbar {
    display: none;
}

.category-filters-scroll {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    width: max-content;
    animation: categoryMarqueeRTL 45s linear infinite;
    will-change: transform;
    pointer-events: auto !important;
}

html[dir="ltr"] .category-filters-scroll {
    animation-name: categoryMarqueeLTR;
}

.category-filters-container.is-paused .category-filters-scroll {
    animation-play-state: paused !important;
}

@media (hover: hover) {
    .category-filters-container:hover .category-filters-scroll {
        animation-play-state: paused !important;
    }
}

@keyframes categoryMarqueeRTL {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(50% + 6px));
    }
}

@keyframes categoryMarqueeLTR {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-50% - 6px));
    }
}

.category-pill {
    font-family: inherit;
    font-size: 1.0rem;
    font-weight: 800;
    padding: 9px 22px;
    border-radius: 30px;
    border: 1.5px solid #FFFFFF;
    background: #FFFFFF;
    color: var(--brand-text-red);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    cursor: pointer !important;
    transition: var(--transition-smooth);
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    z-index: 55;
    pointer-events: auto !important;
}

.category-pill:hover {
    background: rgba(255, 255, 255, 0.92);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Active Category Pill (Inverted: Translucent glass pill with white text) */
.category-pill.active {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #FFFFFF !important;
    border-color: rgba(255, 255, 255, 0.75) !important;
    box-shadow: none !important;
}

/* ----------------------------------------------------
   6. Restaurants Directory Grid & 360° Banner Component
   ---------------------------------------------------- */
.restaurants-section {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px 80px;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.restaurants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
}

.restaurant-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    overflow: hidden;
    color: #211D1E;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.restaurant-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.4);
}

/* 360° Rotating Banner Component (Smooth vertical page scrolling allowed) */
.restaurant-card-banner {
    position: relative;
    width: 100%;
    height: 230px;
    overflow: hidden;
    background: #0A0A0A;
    touch-action: auto !important;
    user-select: none;
    -webkit-user-select: none;
}

.banner-360-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

/* Navigation Arrow Buttons (White semi-transparent circle background, Red arrows) */
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    color: var(--brand-text-red);
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 25;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.banner-arrow svg {
    stroke: var(--brand-text-red);
    transition: stroke 0.2s ease;
}

.banner-arrow:hover {
    background: #FFFFFF;
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.arrow-prev {
    right: 14px;
}

.arrow-next {
    left: 14px;
}

/* Exact 360° Arc Dial Overlay (Matches Attached Screenshot 1:1) */
.overlay-360-container {
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    pointer-events: none;
    z-index: 10;
    line-height: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.52) 0%, rgba(0, 0, 0, 0.08) 70%, transparent 100%);
}

.overlay-360-exact-img {
    width: 84%;
    max-width: 330px;
    height: auto;
    display: block;
    mix-blend-mode: screen;
    pointer-events: none;
    animation: float360 2.6s ease-in-out infinite;
}

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

/* Swivel Drag-Hint Hand Indicator (Elegant Horizontal Sway) */
.overlay-swivel-container {
    bottom: 0 !important;
    padding-bottom: 10px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.54) 0%, rgba(0, 0, 0, 0.12) 65%, transparent 100%);
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.overlay-swivel-hand-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.overlay-swivel-hand-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.9));
    animation: swivelHandSway 2.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
    pointer-events: none;
    will-change: transform;
}

@keyframes swivelHandSway {
    0% {
        transform: translateX(-15px);
    }
    50% {
        transform: translateX(15px);
    }
    100% {
        transform: translateX(-15px);
    }
}

.banner-media-container.is-dragging .overlay-360-container {
    opacity: 0 !important;
    transition: opacity 0.2s ease;
}

/* Ensure central content stays on top of single background image */
.hero-center-wrapper,
.discovery-container {
    position: relative;
    z-index: 10;
}

/* Restaurant Info Content */
.restaurant-card-content {
    padding: 18px 22px;
    text-align: right;
}

html[dir="ltr"] .restaurant-card-content {
    text-align: left;
}

.restaurant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
}

.restaurant-info-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.restaurant-logo {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.restaurant-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #211D1E;
    margin-bottom: 2px;
}

.restaurant-cuisine {
    font-size: 0.9rem;
    font-weight: 600;
    color: #625A5C;
}

/* Button "לתפריט 360 ←" (Semi-light green background, white text on left side of card) */
.btn-menu-360-action {
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    color: #FFFFFF;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border: none;
    padding: 9px 18px;
    border-radius: 30px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.btn-menu-360-action:hover {
    background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.btn-menu-360-action .btn-arrow-icon-img {
    height: 18px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-menu-360-action:hover .btn-arrow-icon-img {
    transform: rotate(180deg) scale(1.1);
}

/* ----------------------------------------------------
   7. In-Page Menu Modal Overlay (Desktop Window vs Mobile Fullscreen)
   ---------------------------------------------------- */
.menu-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 30px 20px;
}

.menu-modal-overlay.active {
    display: flex !important;
    opacity: 1;
    pointer-events: auto;
}

.menu-modal-container {
    position: relative;
    width: 90vw;
    max-width: 440px; /* 2x narrower phone-like desktop modal view */
    height: 85vh;
    max-height: 840px;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.menu-modal-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.25s ease;
}

.menu-modal-loader.hidden {
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

.modal-spinner {
    width: 46px;
    height: 46px;
    border: 3.5px solid rgba(135, 23, 30, 0.15);
    border-top-color: var(--brand-text-red);
    border-radius: 50%;
    animation: modalSpin 0.75s linear infinite;
}

@keyframes modalSpin {
    to {
        transform: rotate(360deg);
    }
}

.menu-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--brand-text-red);
    border: none;
    font-size: 1.8rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
    line-height: 1;
}

html[dir="ltr"] .menu-modal-close {
    right: auto;
    left: 20px;
}

.menu-modal-close:hover {
    background: var(--brand-red);
    color: #FFFFFF;
    transform: scale(1.1);
}

.menu-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    flex: 1;
    background: #FFFFFF;
}

/* ----------------------------------------------------
   8. Mobile Responsive Styles (Fullscreen Modal on Mobile)
   ---------------------------------------------------- */
@media (max-width: 768px) {
    .menu-modal-overlay {
        padding: 0 !important;
        background: rgba(0, 0, 0, 0.75) !important;
    }

    .menu-modal-container {
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        border: none !important;
        background: #FFFFFF !important;
    }
}

@media (max-width: 768px) {
    .food-pizza {
        left: -18vw;
        top: 28%;
        width: 48vw;
        min-width: 170px;
    }

    .shape-red-pizza {
        left: -22vw;
        top: 24%;
        width: 50vw;
    }

    .food-ramen {
        right: -10vw;
        top: -3vh;
        width: 42vw;
        min-width: 150px;
    }

    .shape-red-ramen {
        right: -14vw;
        top: -6vh;
        width: 48vw;
    }

    .food-burger {
        right: -12vw;
        bottom: -4vh;
        width: 46vw;
        min-width: 160px;
    }

    .shape-red-burger {
        right: -14vw;
        bottom: -7vh;
        width: 48vw;
    }

    .leaf-top-left {
        left: 18vw;
        top: 15%;
        width: 6.5vw;
    }

    .leaf-bottom-left {
        left: 20vw;
        top: 36%;
        width: 6vw;
    }

    .leaf-mid-right {
        right: 15vw;
        top: 34%;
        width: 6.2vw;
    }

    .croutons-green-circle {
        right: 18vw;
        top: 57%;
        width: 22vw;
        max-width: 150px;
    }
}

@media (max-width: 600px) {
    .hero-section {
        padding: 85px 14px 20px;
    }

    .hero-center-wrapper {
        margin-bottom: 14px;
    }

    .hero-logo-large {
        width: 60%;
        max-width: 220px;
        filter: drop-shadow(0 15px 30px rgba(215, 30, 40, 0.70)) !important; /* Preserved on Mobile */
    }

    .hero-logo-tagline {
        font-size: 1.6rem;
        margin-top: -2px;
    }

    .discovery-title {
        font-size: 1.65rem;
    }

    .discovery-subtitle {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }

    .search-input {
        font-size: 0.9rem;
        padding: 10px 42px 10px 16px;
    }

    html[dir="ltr"] .search-input {
        padding: 12px 18px 12px 42px;
    }

    .category-filters-container {
        box-shadow: none !important;
        filter: none !important;
    }

    .category-pill {
        font-size: 0.92rem;
        padding: 8px 18px;
        box-shadow: none !important;
    }

    .category-filters-scroll {
        justify-content: flex-start;
        padding-left: 10px;
        padding-right: 10px;
    }

    .restaurant-card-banner {
        height: 190px;
    }
}

/* ----------------------------------------------------
   9. Accessibility Floating Widget & Action Menu System
   ---------------------------------------------------- */
.a11y-widget-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    direction: rtl;
}

html[dir="ltr"] .a11y-widget-container {
    right: auto;
    left: 24px;
}

/* Main Universal Person Trigger Button ♿ */
.a11y-trigger-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #FFFFFF;
    color: #211D1E;
    border: 2.5px solid #211D1E;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
    transition: var(--transition-smooth);
    outline: none;
}

.a11y-trigger-btn:hover {
    transform: scale(1.1);
    background: #211D1E;
    color: #FFFFFF;
    border-color: #FFFFFF;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.a11y-trigger-btn.active {
    background: var(--brand-red);
    color: #FFFFFF;
    border-color: #FFFFFF;
}

/* Expanded Sub-Categories Action Menu */
.a11y-actions-menu {
    position: absolute;
    bottom: 64px;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: var(--transition-smooth);
    opacity: 1;
    transform: translateY(0);
}

html[dir="ltr"] .a11y-actions-menu {
    right: auto;
    left: 0;
}

.a11y-actions-menu.hidden {
    display: none !important;
    opacity: 0;
    transform: translateY(15px);
    pointer-events: none;
}

/* Circular Sub-Category Button */
.a11y-action-btn {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #343436;
    color: #FFFFFF;
    border: 2px solid rgba(255, 255, 255, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    transition: var(--transition-smooth);
    outline: none;
    user-select: none;
}

.a11y-action-btn:hover {
    background: #4A4A4D;
    transform: scale(1.08);
    border-color: #FFFFFF;
}

.a11y-action-btn.active {
    background: var(--brand-red);
    border-color: #FFE600;
    box-shadow: 0 0 15px rgba(255, 230, 0, 0.6);
}

/* Icon / Symbol Inside Sub-Category Circle */
.a11y-btn-icon-box {
    font-size: 11px;
    font-weight: 900;
    background: #FFFFFF;
    color: #343436;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1.1;
}

.a11y-btn-icon-symbol {
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
}

.a11y-btn-icon-symbol.underlined-u {
    text-decoration: underline;
    font-size: 17px;
}

.a11y-btn-label {
    font-size: 9.5px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Mobile Sizing (Significantly Smaller as Requested) */
@media (max-width: 768px) {
    .a11y-widget-container {
        bottom: 14px !important;
        right: 14px !important;
    }

    html[dir="ltr"] .a11y-widget-container {
        right: auto !important;
        left: 14px !important;
    }

    .a11y-trigger-btn {
        width: 38px !important;
        height: 38px !important;
        border-width: 2px !important;
    }

    .a11y-trigger-btn svg {
        width: 20px !important;
        height: 20px !important;
    }

    .a11y-actions-menu {
        bottom: 48px !important;
        gap: 8px !important;
    }

    .a11y-action-btn {
        width: 44px !important;
        height: 44px !important;
        border-width: 1.5px !important;
        gap: 1px !important;
    }

    .a11y-btn-icon-box {
        font-size: 9px !important;
        padding: 1px 3px !important;
    }

    .a11y-btn-icon-symbol {
        font-size: 12px !important;
    }

    .a11y-action-btn svg {
        width: 16px !important;
        height: 16px !important;
    }

    .a11y-btn-label {
        font-size: 7.5px !important;
    }
}

/* Accessibility Mode Body Classes */

/* 1. Grayscale Mode */
body.a11y-grayscale, body.a11y-grayscale img, body.a11y-grayscale video {
    filter: grayscale(100%) !important;
}

/* 2. High Contrast Mode */
body.a11y-contrast {
    filter: contrast(170%) brightness(95%) !important;
}

/* 3. Highlight Links Mode */
body.a11y-highlight-links a,
body.a11y-highlight-links button,
body.a11y-highlight-links [role="button"] {
    text-decoration: underline !important;
    outline: 3px solid #FFE600 !important;
    outline-offset: 2px !important;
    background-color: rgba(255, 230, 0, 0.28) !important;
    color: #FFFFFF !important;
}

/* 4. Text Size Scaling (Universal Root & Element Scaling) */
html.a11y-font-scale-1, body.a11y-font-scale-1 {
    font-size: 118% !important;
}
html.a11y-font-scale-2, body.a11y-font-scale-2 {
    font-size: 135% !important;
}
html.a11y-font-scale-3, body.a11y-font-scale-3 {
    font-size: 152% !important;
}

.a11y-font-scale-1 h1, .a11y-font-scale-1 h2, .a11y-font-scale-1 h3, .a11y-font-scale-1 p, .a11y-font-scale-1 span, .a11y-font-scale-1 button, .a11y-font-scale-1 a, .a11y-font-scale-1 input {
    font-size: 1.15em !important;
}
.a11y-font-scale-2 h1, .a11y-font-scale-2 h2, .a11y-font-scale-2 h3, .a11y-font-scale-2 p, .a11y-font-scale-2 span, .a11y-font-scale-2 button, .a11y-font-scale-2 a, .a11y-font-scale-2 input {
    font-size: 1.30em !important;
}
.a11y-font-scale-3 h1, .a11y-font-scale-3 h2, .a11y-font-scale-3 h3, .a11y-font-scale-3 p, .a11y-font-scale-3 span, .a11y-font-scale-3 button, .a11y-font-scale-3 a, .a11y-font-scale-3 input {
    font-size: 1.45em !important;
}

/* ----------------------------------------------------
   10. Legal & Policy Floating Widget & Modal Drawer System
   ---------------------------------------------------- */
.legal-widget-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    direction: rtl;
}

html[dir="ltr"] .legal-widget-container {
    left: auto;
    right: 24px;
}

/* Main Up-Arrow Legal Trigger Button */
.legal-trigger-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #FFFFFF;
    color: var(--brand-text-red);
    border: 2.5px solid var(--brand-text-red);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
    transition: var(--transition-smooth);
    outline: none;
}

.legal-trigger-btn:hover {
    transform: scale(1.1);
    background: var(--brand-red);
    color: #FFFFFF;
    border-color: #FFFFFF;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.legal-trigger-btn.active {
    background: var(--brand-red);
    color: #FFFFFF;
    border-color: #FFFFFF;
}

.legal-trigger-btn .legal-arrow-icon {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.legal-trigger-btn.active .legal-arrow-icon {
    transform: rotate(180deg);
}

/* Expanded Legal Drawer Modal (Opens Upwards) */
.legal-drawer-modal {
    position: absolute;
    bottom: 64px;
    left: 0;
    width: min(90vw, 540px);
    max-height: 75vh;
    background: #FFFFFF;
    border: 1.5px solid rgba(135, 23, 30, 0.2);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition-smooth);
    opacity: 1;
    transform: translateY(0) scale(1);
    transform-origin: bottom left;
    z-index: 10001;
}

html[dir="ltr"] .legal-drawer-modal {
    left: auto;
    right: 0;
    transform-origin: bottom right;
}

.legal-drawer-modal.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px) scale(0.95);
}

.legal-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #FDF9F6;
    border-bottom: 1px solid rgba(135, 23, 30, 0.1);
}

.legal-drawer-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legal-drawer-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--brand-text-red);
    margin: 0;
}

.legal-drawer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s;
}

.legal-drawer-close:hover {
    color: var(--brand-text-red);
}

.legal-tabs-nav {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    background: #F6EFE7;
    overflow-x: auto;
    scrollbar-width: none;
}

.legal-tabs-nav::-webkit-scrollbar {
    display: none;
}

.legal-tab-btn {
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: transparent;
    color: #555;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.legal-tab-btn:hover {
    background: rgba(255, 255, 255, 0.7);
    color: var(--brand-text-red);
}

.legal-tab-btn.active {
    background: #FFFFFF;
    color: var(--brand-text-red);
    border-color: rgba(135, 23, 30, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.legal-content-body {
    padding: 16px 20px;
    overflow-y: auto;
    max-height: 52vh;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #333;
}

.legal-tab-panel {
    display: none;
}

.legal-tab-panel.active {
    display: block;
}

.legal-tab-panel h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--brand-text-red);
    margin-top: 0;
    margin-bottom: 10px;
}

.legal-tab-panel ul {
    padding-right: 18px;
    margin: 10px 0;
}

html[dir="ltr"] .legal-tab-panel ul {
    padding-right: 0;
    padding-left: 18px;
}

.legal-tab-panel li {
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .legal-widget-container {
        bottom: 14px !important;
        left: 14px !important;
    }

    html[dir="ltr"] .legal-widget-container {
        right: 14px !important;
        left: auto !important;
    }

    .legal-trigger-btn {
        width: 38px !important;
        height: 38px !important;
        border-width: 2px !important;
    }

    .legal-drawer-modal {
        bottom: 48px !important;
        width: calc(100vw - 28px) !important;
        max-height: 70vh !important;
    }
}
