/* Menu Page Specific Styles */

/* Hero Section for Menu */
.menu-hero {
    position: relative;
    height: 65vh;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    width: 100%;
    margin: 0;
    padding: 0;
    padding-top: 8rem;
    color: white;
    text-align: center;
    overflow: hidden;
}

/* Background image with Ken Burns animation */
.menu-hero::after {
    content: '';
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-image: url('../assets/Web_Quality/indisches-restaurant-sanjha-tadka-erfurt-speisen-20.webp');
    background-size: cover;
    background-position: center center;
    z-index: 0;
    animation: menuHeroKenBurns 25s ease-in-out infinite alternate, baseFadeIn 1.5s ease-in-out forwards;
    opacity: 0;
    will-change: transform;
}

@keyframes menuHeroKenBurns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.08) translate(-1.5%, 1%);
    }
}

/* Overlay with subtle pulse */
.menu-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.25) 60%, rgba(0, 0, 0, 0.55) 100%);
    z-index: 1;
    animation: menuHeroPulse 6s ease-in-out infinite alternate, baseFadeIn 1.5s ease-in-out forwards;
    opacity: 0;
}

@keyframes menuHeroPulse {
    0% {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.25) 60%, rgba(0, 0, 0, 0.55) 100%);
    }

    100% {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.40) 0%, rgba(0, 0, 0, 0.20) 60%, rgba(0, 0, 0, 0.50) 100%);
    }
}

/* Content fade-in + slide-up */
.menu-hero-content {
    position: relative;
    z-index: 2;
    padding: 0 1rem;
    animation: menuHeroContentReveal 1.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    opacity: 0;
}

@keyframes menuHeroContentReveal {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* H1 white shimmer effect */
.menu-hero-title {
    font-family: var(--bs-heading-font-family);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    background: linear-gradient(90deg,
            #ffffff 0%,
            #ffffff 40%,
            #F1860D 50%,
            #ffffff 60%,
            #ffffff 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: menuTextShimmer 6s ease-in-out infinite;
}

@keyframes menuTextShimmer {
    0% {
        background-position: 200% center;
    }

    100% {
        background-position: -200% center;
    }
}

.menu-hero-subtitle {
    font-family: var(--bs-body-font-family);
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 300;
    letter-spacing: 1px;
    max-width: 800px;
    margin: 0 auto;
}

.pdf-download-btn {
    display: inline-flex;
    align-items: center;
    background-color: rgba(241, 134, 13, 0.9);
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-family: var(--bs-heading-font-family);
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(241, 134, 13, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.pdf-download-btn:hover {
    background-color: #f1860d;
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(241, 134, 13, 0.6);
}

.pdf-download-btn svg {
    margin-right: 12px;
    transition: transform 0.3s ease;
}

.pdf-download-btn:hover svg {
    transform: translateY(-2px);
}

/* Sticky Navigation & Filters */
.sticky-menu-wrapper {
    /* Fallback / Native */
    position: -webkit-sticky;
    position: sticky;
    top: 60px;
    z-index: 990;
    background-color: var(--bs-light);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(120, 18, 53, 0.1);
    width: 100%;
    transition: top 0.3s;
}

/* JS-Enforced Sticky */
.sticky-menu-wrapper.sticky-active {
    position: fixed;
    top: 55px;
    /* Matches scrolled header approx height */
    left: 0;
    width: 100%;
    animation: slideDownSticky 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

@keyframes slideDownSticky {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.category-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.category-nav .nav-item {
    font-family: var(--bs-heading-font-family);
    font-size: 1.1rem;
    color: var(--bs-dark);
    text-transform: uppercase;
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
    cursor: pointer;
    transition: color 0.3s;
}

.category-nav .nav-item:hover,
.category-nav .nav-item.active {
    color: var(--bs-primary);
}

.category-nav .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--bs-primary);
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
    display: flex;
}

.nav-dropdown-btn {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-icon {
    font-size: 0.7em;
    transition: transform 0.3s ease;
}

.nav-dropdown.open .dropdown-icon {
    transform: rotate(180deg);
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    min-width: 240px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    z-index: 1000;
    padding: 0.5rem 0;
    border: 1px solid #eee;
    margin-top: 5px;

    max-height: calc(100vh - 160px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
    /* Prevents parent scrolling */
}

.nav-dropdown.open .nav-dropdown-content {
    display: block;
    animation: fadeInDropdown 0.2s ease;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.nav-dropdown-content a {
    display: block;
    padding: 0.6rem 1.5rem;
    color: var(--bs-dark);
    text-decoration: none;
    font-family: var(--bs-body-font-family);
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
    text-align: left;
    text-transform: none;
    border-bottom: 1px solid #f9f9f9;
}

.nav-dropdown-content a:last-child {
    border-bottom: none;
}

.nav-dropdown-content a:hover {
    background-color: rgba(241, 134, 13, 0.1);
    /* Light primary */
    color: var(--bs-primary);
}

.desktop-sticky-status-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.desktop-sticky-status-bar::after {
    content: '';
    flex: 1;
    transition: flex 0.5s ease;
    pointer-events: none;
}

.desktop-sticky-status-bar.categories-active::after {
    flex: 0;
}

.desktop-dynamic-categories {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    overflow: hidden;
    padding: 0.3rem 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.desktop-dynamic-categories.visible {
    opacity: 1;
    visibility: visible;
}

.dynamic-cat {
    font-family: var(--bs-heading-font-family);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    padding: 0.3rem 0;
}

.dynamic-cat.current {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bs-primary);
}

.dynamic-cat.current::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--bs-primary);
}

.dynamic-cat.sibling {
    font-size: 1rem;
    color: var(--bs-secondary);
    opacity: 0.6;
}

.dynamic-cat.sibling:hover {
    color: var(--bs-primary);
    opacity: 1;
}

.desktop-filter-dropdown .filter-dropdown-content {
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    transform: none;
    min-width: 180px;
}

.mobile-sticky-status-bar {
    display: none;
}

/* Filter Styles - Shared across Desktop & Mobile */
.filter-dropdown-trigger {
    background: #fff;
    border: 1px solid rgba(120, 18, 53, 0.15);
    height: 44px;
    min-width: 44px;
    padding: 0 16px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-secondary);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.filter-dropdown-trigger:active,
.nav-dropdown.open .filter-dropdown-trigger {
    transform: scale(0.92);
    background: rgba(120, 18, 53, 0.05);
}

.filter-text {
    font-family: var(--bs-heading-font-family);
    font-weight: 700;
    font-size: 0.85rem;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-icon {
    position: relative;
}

.filter-active-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    background: var(--bs-primary);
    border-radius: 50%;
    border: 2px solid #fff;
    display: none;
    /* Show only when filters active */
    z-index: 2;
}

.filter-active-dot.active {
    display: block;
}

.filter-dropdown-content {
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    transform: none;
    min-width: 180px;
}

.filter-dropdown-item {
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f9f9f9;
    font-family: var(--bs-body-font-family);
    font-size: 0.95rem;
    color: var(--bs-dark);
    transition: all 0.2s ease;
}

.filter-dropdown-item:last-child {
    border-bottom: none;
}

@media (hover: hover) {
    .filter-dropdown-item:hover {
        background: rgba(0, 0, 0, 0.03);
        color: var(--bs-primary);
    }
}

.filter-dropdown-item.active {
    color: var(--bs-primary);
    background: rgba(241, 134, 13, 0.08); /* Distinct active background */
    font-weight: 600;
}

/* Checkmark styling */
.filter-check {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.filter-dropdown-item.active .filter-check {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.filter-dropdown-item.active .filter-check::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-label {
    font-weight: 600;
    color: var(--bs-secondary);
    margin-right: 0.5rem;
}

.filter-toggle {
    background: transparent;
    border: 1px solid var(--bs-secondary);
    color: var(--bs-secondary);
    padding: 0.4rem 1.2rem;
    border-radius: 2rem;
    font-family: var(--bs-body-font-family);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-toggle:hover,
.filter-toggle.active {
    background: var(--bs-secondary);
    color: white;
}

.filter-toggle .icon-leaf,
.filter-toggle .icon-fire {
    font-size: 1.1em;
}

/* Menu Content Container */
.menu-content-container {
    padding: 4rem 1.25rem;
    /* Added side padding for mobile/small screens */
    max-width: 1200px;
    margin: 0 auto;
}

.menu-section {
    margin-bottom: 6rem;
    scroll-margin-top: 200px;
    /* Offset for sticky header */
}

.main-category-title {
    padding-top: 2rem;
    font-size: clamp(3.2rem, 8vw, 5rem) !important;
    /* Larger and responsive */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 1.5rem;
    color: var(--bs-primary);
    text-shadow: 2px 2px 0 rgba(120, 18, 53, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.main-category-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--bs-secondary);
    margin-top: 1rem;
    border-radius: 2px;
}

.subcategory-block {
    padding-top: 5rem;
}

.category-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--bs-secondary);
    font-size: 3rem;
    position: relative;
    padding-top: 2rem;
}

.category-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--bs-primary);
    margin: 1rem auto 0;
}

/* Daily Menu Specifics */
.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title p {
    color: var(--bs-dark);
    font-style: italic;
}

.day-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.day-tab {
    background: white;
    border: 1px solid #ddd;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-family: var(--bs-heading-font-family);
    font-weight: 600;
    color: var(--bs-dark);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 60px;
}

.day-tab:hover {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.day-tab.active {
    background: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(241, 134, 13, 0.3);
}

/* Menu Labels (Sub-Categories within Main Categories) */
.menu-label-row {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-sub-label {
    font-family: var(--bs-heading-font-family);
    color: var(--bs-secondary);
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 0.5rem;
    margin: 0;
}

.menu-sub-label::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--bs-primary);
    margin: 0.5rem auto 0;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.menu-grid.single-item {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.menu-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--bs-primary);
    /* Brand Accent */
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.card-title {
    font-size: 1.25rem;
    color: var(--bs-dark);
    margin: 0;
    line-height: 1.3;
}

.card-price {
    font-family: var(--bs-body-font-family);
    font-weight: 700;
    color: var(--bs-secondary);
    font-size: 1.15rem;
    white-space: nowrap;
    text-align: right;
    line-height: 1.2;
}

.price-size {
    font-weight: 400;
    color: #888;
    font-size: 0.85rem;
    display: inline-block;
    margin-right: 2px;
}

.card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-desc {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 0.8rem;
    font-size: 0.85rem;
}

.allergens {
    color: #999;
    cursor: help;
    text-decoration: underline dotted;
}

.card-badges {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.badge {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    line-height: 1;
    white-space: nowrap;
}

.badge.vegan {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.badge.veg {
    background: #f1f8e9;
    color: #558b2f;
    border: 1px solid #dcedc8;
}

.badge.spicy {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
    font-size: 0.85rem;
    padding: 3px 10px;
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Divider Images – fullwidth parallax scroll window */
.menu-divider-img {
    width: 100%;
    height: 60vh;
    min-height: 350px;
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.menu-divider-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.25) 100%);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 2.5rem;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--bs-secondary);
    text-decoration: none;
    cursor: pointer;
}

.allergen-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.allergen-list li {
    font-size: 0.9rem;
    color: var(--bs-dark);
    display: flex;
    align-items: flex-start;
}

.allergen-list strong {
    color: var(--bs-secondary);
    display: inline-block;
    min-width: 40px;
    flex-shrink: 0;
}

.allergen-list li.highlight-relevant {
    background-color: var(--bs-primary);
    color: white;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(241, 134, 13, 0.2);
}

.allergen-list li.highlight-relevant strong {
    color: white;
}

/* Back to Top */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--bs-primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 990;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background: var(--bs-secondary);
    transform: translateY(-3px);
}

.mobile-reserve-btn {
    display: none;
}

/* Decorative Images for Main Category Headings - Redesigned */
.main-category-header {
    position: relative;
    padding: 3rem 0;
    margin: 4rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Decorative Images for Main Category Headings - High-End Designer Layout */
.main-category-header {
    position: relative;
    padding: 2rem 0;
    margin: 3rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.title-decor {
    position: absolute;
    max-width: 340px;
    height: auto;
    z-index: -1;
    opacity: 0.2;
    filter: drop-shadow(15px 15px 30px rgba(0, 0, 0, 0.12));
    pointer-events: none;
    transition: transform 1s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Base floating animation */
@keyframes floatDecor {

    0%,
    100% {
        transform: translateY(0) rotate(var(--r));
    }

    50% {
        transform: translateY(-20px) rotate(calc(var(--r) + 3deg));
    }
}

/* ASYMMETRIC DESKTOP ARRANGEMENT */
.decor-left {
    --r: -15deg;
    left: 5%;
    top: -20%;
    /* Offset Top */
    transform: rotate(var(--r));
    animation: floatDecor 10s ease-in-out infinite;
}

.decor-right {
    --r: 18deg;
    right: 5%;
    top: 50%;
    /* Offset Bottom */
    transform: rotate(var(--r));
    animation: floatDecor 14s ease-in-out infinite;
}

.decor-center {
    --r: 5deg;
    left: 45%;
    top: 15%;
    max-width: 200px; /* Reduced from 280px */
    opacity: 0.9;
    /* Increased for better visibility as requested */
    transform: translateX(-50%) rotate(var(--r));
    animation: floatDecor 16s ease-in-out infinite;
    z-index: -2;
}

/* Secondary Variation for the next section to avoid repetition */
#speisen .decor-left {
    top: 40%;
    left: 2%;
    --r: 12deg;
}

#speisen .decor-right {
    top: -35%;
    /* Moved higher up */
    right: -10%;
    /* Slightly more into the corner */
    --r: -15deg;
}

#speisen .decor-center {
    top: 70%;
    left: 55%;
    --r: -8deg;
    opacity: 0.8;
    /* Increased for better visibility */
}

.main-category-title {
    padding: 0 !important;
    font-size: clamp(3.5rem, 10vw, 6rem) !important;
    z-index: 2;
    position: relative;
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    letter-spacing: -2px;
    /* Soft glow to ensure readability even on dark image parts */
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.45));
}

.main-category-title::after {
    margin: 0.5rem auto 0;
    width: 80px;
    height: 4px;
    opacity: 0.5;
}

@media (max-width: 1200px) {
    .title-decor {
        max-width: 280px;
    }

    .decor-left {
        left: 0%;
    }

    .decor-right {
        right: 0%;
    }
}

/* MOBILE ARRANGEMENT (Step 52 - The version you liked) */
@media (max-width: 768px) {
    .main-category-header {
        padding: 3.5rem 0 !important;
        /* Reduced from 5rem for better flow */
        margin: 1.5rem 0 !important;
        overflow: visible !important;
        position: relative !important;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 120px;
    }

    .title-decor {
        position: absolute !important;
        max-width: 130px !important;
        /* Slightly smaller for better fit */
        opacity: 0.65 !important;
        filter: drop-shadow(5px 5px 15px rgba(0, 0, 0, 0.1));
        display: block !important;
        animation: none !important;
        z-index: 1 !important;
    }

    .decor-left {
        left: -5% !important;
        /* Slight bleed out for more width */
        top: -15px !important;
        transform: rotate(-12deg) !important;
    }

    .decor-right {
        right: -5% !important;
        bottom: -15px !important;
        top: auto !important;
        transform: rotate(12deg) !important;
    }

    .decor-center {
        position: absolute !important;
        top: 90% !important; /* Move it well below the title area */
        left: 50% !important;
        transform: translate(-50%, -20%) rotate(5deg) !important;
        max-width: 100px !important; /* Reduced from 130px */
        opacity: 0.65 !important; /* Matched to the other title-decor images */
        z-index: 1 !important;
    }

    .main-category-title {
        font-size: clamp(1.6rem, 8.5vw, 2.6rem) !important;
        line-height: 1.1 !important;
        letter-spacing: 0.5px !important;
        z-index: 5 !important; /* Ensure title is on top */
        position: relative !important;
        display: block !important;
        margin: 0 !important;
        padding: 1.2rem 0 !important;
        text-align: center;
        width: 100%;
        max-width: 90vw;
        font-weight: 800;
        word-wrap: break-word;
        hyphens: auto;
        /* Glow effect for mobile as well */
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.6));
    }

    .menu-hero {
        height: 50vh;
    }

    .menu-hero-title {
        font-size: clamp(1.8rem, 8vw, 2.2rem);
        word-wrap: break-word;
        hyphens: auto;
    }

    .category-nav {
        gap: 1.2rem;
        font-size: 0.95rem;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 0.4rem;
        padding-top: 0.4rem;
        margin-bottom: 0.3rem !important;
        -webkit-overflow-scrolling: touch;
        padding-left: 1rem;
        padding-right: 1rem;
        scrollbar-width: none;
    }

    .category-nav::-webkit-scrollbar {
        display: none;
    }

    .category-nav .nav-item {
        flex: 0 0 auto;
    }

    .sticky-menu-wrapper {
        top: 60px;
        /* Smaller header on mobile */
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }

    .subcategory-block {
        padding-top: 2.5rem !important;
    }

    .category-title {
        font-size: 2.2rem !important;
        margin-bottom: 2rem !important;
    }

    .menu-sub-label {
        font-size: 1.6rem !important;
    }

    .mobile-reserve-btn {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: var(--bs-secondary);
        color: white;
        text-align: center;
        padding: 1rem;
        font-weight: bold;
        text-transform: uppercase;
        z-index: 999;
        text-decoration: none;
    }

    #back-to-top {
        bottom: 70px;
        /* Above mobile btn */
    }

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

    .mobile-sticky-status-bar {
        display: flex;
        align-items: center;
        justify-content: space-between; /* Space for centering with spacers */
        padding: 0.3rem 0.75rem;
        width: 100%;
        background: transparent;
        border: none;
        box-shadow: none;
        position: relative;
        gap: 0.75rem;
    }

    .mobile-sticky-status-bar::after {
        content: '';
        flex: 1; /* Spacer to center the filter button against the badge */
        transition: flex 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
        pointer-events: none;
    }

    .mobile-sticky-status-bar.categories-active::after {
        flex: 0; /* Shrink spacer to move filter to the right */
    }

    .filter-dropdown-trigger {
        width: auto;
        min-width: 44px;
        padding: 0 16px;
        border-radius: 22px;
        flex-shrink: 0;
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

    .mobile-sticky-status-bar.categories-active .filter-dropdown-trigger {
        width: 44px;
        padding: 0;
        border-radius: 50%;
    }

    .filter-dropdown-trigger .filter-text {
        max-width: 100px;
        opacity: 1;
        overflow: hidden;
        transition: all 0.4s ease;
        white-space: nowrap;
    }

    .mobile-sticky-status-bar.categories-active .filter-dropdown-trigger .filter-text {
        max-width: 0;
        opacity: 0;
        margin: 0;
    }

    .current-subcategory-badge {
        font-family: var(--bs-heading-font-family);
        font-size: 1.1rem;
        font-weight: 800;
        color: var(--bs-secondary);
        background: transparent;
        border: none;
        padding: 0.4rem 0;
        border-left: 3px solid var(--bs-primary);
        padding-left: 0.8rem;
        border-radius: 0;
        flex: 1; /* Match the spacer's flex for centering */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        box-shadow: none;
        display: flex; 
        align-items: center;
        gap: 0.5rem;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        
        /* Visibility transition */
        opacity: 0;
        visibility: hidden;
        transform: translateX(-10px);
        transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
    }

    .mobile-sticky-status-bar.categories-active .current-subcategory-badge {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    /* Mobile Adjustments for Dropdowns */
    .nav-dropdown-content {
        position: fixed;
        top: 130px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-height: calc(100vh - 150px);
        overflow-y: auto;
        overscroll-behavior-y: contain;
    }

    .nav-dropdown.open .nav-dropdown-content {
        animation: fadeInDropdownMobile 0.2s ease;
    }

    @keyframes fadeInDropdownMobile {
        from {
            opacity: 0;
            transform: translate(-50%, -10px);
        }

        to {
            opacity: 1;
            transform: translate(-50%, 0);
        }
    }
}