/* =====================================
   MENU PAGE - MOBILE-FIRST QR CODE OPTIMIZED
   ===================================== */

/* Base Styles - Fix white space under footer */
html {
    height: 100%;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.menu-page-content {
    flex: 1;
}

/* Menu Header */
.menu-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: 0.6rem;
}

/* Breadcrumb Navigation */
.breadcrumb {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    z-index: 98;
    padding: 0.5rem 0;
}

.breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item a {
    color: #047857;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.breadcrumb-item a:hover {
    color: #065f46;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #595959;
    font-weight: 600;
}

.breadcrumb-separator {
    color: #9ca3af;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
}

.menu-header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-logo .brand-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: #0f0f0f;
    letter-spacing: 2px;
}

.back-home {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #047857;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    transition: all 0.2s;
    min-height: 44px;
}

.back-home:hover {
    background: rgba(4, 120, 87, 0.1);
}

.back-home i {
    font-size: 1.1rem;
}

/* Category Navigation */
.category-nav {
    position: fixed;
    top: 107px; /* Adjusted for breadcrumb */
    left: 0;
    right: 0;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    z-index: 99;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #047857 #e5e7eb;
}

/* Custom scrollbar for webkit browsers (Chrome, Safari, Edge) */
.category-nav::-webkit-scrollbar {
    height: 6px;
}

.category-nav::-webkit-scrollbar-track {
    background: #e5e7eb;
    border-radius: 3px;
}

.category-nav::-webkit-scrollbar-thumb {
    background: #047857;
    border-radius: 3px;
    transition: background 0.2s;
}

.category-nav::-webkit-scrollbar-thumb:hover {
    background: #065f46;
}

.category-nav.sticky {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.category-nav-container {
    display: flex;
    gap: 0.25rem;
    padding: 0.75rem;
    max-width: 1200px;
    margin: 0 auto;
    min-width: min-content;
}

.cat-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.65rem 1.1rem;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: #2d2d2d;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
    min-height: 44px;
}

.cat-link i {
    font-size: 1.25rem;
    color: #047857;
}

.cat-link:hover,
.cat-link:active {
    background: #047857;
    color: #fff;
    border-color: #047857;
}

.cat-link:hover i,
.cat-link:active i {
    color: #fff;
}

/* Main Content */
.menu-page-content {
    padding-top: 182px; /* Adjusted for breadcrumb */
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.menu-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

/* Page Header */
.menu-page-header {
    text-align: center;
    padding: 1rem 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .menu-page-header {
        padding: 1.5rem 1rem;
    }
}

.menu-page-header h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 8vw, 3rem);
    color: #0f0f0f;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.menu-page-header h1 i {
    color: #047857;
}

.menu-subtitle {
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Category Sections */
.menu-category {
    margin-bottom: 3rem;
    scroll-margin-top: 150px;
}

.category-header {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    color: #fff;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.2);
}

.category-header h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: 1px;
}

/* Menu Item Cards */
.menu-item-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.menu-item-card:hover {
    border-color: #047857;
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.1);
}

.menu-item-card.featured {
    border-color: #047857;
    background: linear-gradient(135deg, rgba(4, 120, 87, 0.03) 0%, rgba(5, 150, 105, 0.05) 100%);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.item-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f0f0f;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.item-price {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: #047857;
    font-weight: 400;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.item-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.calories {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
}

.calories i {
    color: #f59e0b;
    font-size: 0.9rem;
}

/* Menu Table Layout */
.menu-table {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.table-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row:hover {
    background: rgba(4, 120, 87, 0.03);
}

.table-cell {
    font-size: 0.95rem;
}

.table-cell.item-name {
    font-weight: 600;
    color: #0f0f0f;
}

.table-cell.item-price {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.25rem;
    color: #047857;
    font-weight: 400;
}

.table-cell.item-calories {
    color: #666;
    font-size: 0.85rem;
    text-align: right;
}


.info-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-card i {
    font-size: 2rem;
    color: #047857;
}

.info-card div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-card strong {
    color: #0f0f0f;
    font-size: 0.9rem;
    font-weight: 700;
}

.info-card a,
.info-card span {
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
}

.info-card a:hover {
    color: #047857;
    text-decoration: underline;
}

/* Menu Footer */
.menu-footer {
    background: #0f0f0f;
    color: #fff;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: auto;
    width: 100%;
}

.menu-footer p {
    margin: 0;
    font-size: 0.9rem;
    color: #999;
}

/* =====================================
   RESPONSIVE DESIGN
   ===================================== */

/* Tablet */
@media (max-width: 768px) {
    .menu-header {
        padding: 0.75rem;
    }

    .menu-logo .brand-text {
        font-size: 1.5rem;
    }

    .back-home {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }

    .breadcrumb {
        top: 60px;
        padding: 0.4rem 0;
    }

    .breadcrumb-list {
        font-size: 0.8rem;
    }

    .category-nav {
        top: 102px; /* Adjusted for smaller breadcrumb */
    }

    .cat-link {
        font-size: 0.75rem;
        padding: 0.6rem 0.9rem;
        min-height: 48px;
    }

    .cat-link i {
        font-size: 1.15rem;
    }

    .menu-page-content {
        padding-top: 172px; /* Adjusted for breadcrumb */
    }

    .menu-footer-info {
        grid-template-columns: 1fr;
    }

    .table-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .table-cell.item-name {
        font-size: 1rem;
    }

    .table-cell.item-price {
        font-size: 1.4rem;
    }

    .table-cell.item-calories {
        text-align: left;
        font-size: 0.8rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .menu-container {
        padding: 0.75rem;
    }

    .menu-page-header {
        padding: 1.5rem 0.75rem;
        margin-bottom: 1.5rem;
    }

    .category-header {
        padding: 0.75rem 1rem;
    }

    .menu-item-card {
        padding: 1rem;
    }

    .item-header h3 {
        font-size: 1rem;
    }

    .item-price {
        font-size: 1.3rem;
    }

    .item-description {
        font-size: 0.9rem;
    }

    .info-card i {
        font-size: 1.5rem;
    }

    .info-card strong {
        font-size: 0.85rem;
    }

    .info-card a,
    .info-card span {
        font-size: 0.85rem;
    }
}

/* Print Styles for Menu */
@media print {
    /* Hide navigation elements */
    .menu-header,
    .category-nav,
    .back-home,
    .breadcrumb {
        display: none !important;
    }

    /* Reset spacing */
    .menu-page-content {
        padding-top: 0 !important;
        background: #fff !important;
    }

    .menu-container {
        max-width: 100% !important;
        padding: 1cm !important;
    }

    /* Page breaks */
    .menu-category {
        page-break-inside: avoid;
        page-break-after: auto;
        margin-bottom: 1.5cm;
    }

    .menu-item-card {
        page-break-inside: avoid;
        border: 1px solid #e5e7eb !important;
        margin-bottom: 0.3cm;
    }

    .table-row {
        page-break-inside: avoid;
    }

    /* Headers */
    .category-header {
        background: #047857 !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        color-adjust: exact;
        page-break-after: avoid;
    }

    .menu-page-header {
        page-break-after: avoid;
        margin-bottom: 1cm;
        border-bottom: 2px solid #047857;
        padding-bottom: 0.5cm;
    }

    /* Ensure colors print correctly */
    .item-price {
        color: #047857 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Body */
    body {
        background: #fff !important;
        font-size: 11pt;
    }

    /* Add print header */
    .menu-page-content::before {
        content: "VAMA9 Restaurant - Meniu | Strada Teplitei 66, Sighetu Marmației | Tel: 0749 557 541";
        display: block;
        text-align: center;
        font-weight: bold;
        font-size: 12pt;
        margin-bottom: 1cm;
        padding-bottom: 0.3cm;
        border-bottom: 2px solid #047857;
    }

    /* Add page numbers */
    @page {
        margin: 1.5cm;
        @bottom-right {
            content: counter(page) " / " counter(pages);
        }
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .menu-page-header h1 {
        font-size: 1.5rem;
    }

    .category-header h2 {
        font-size: 1.25rem;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .cat-link {
        border-width: 3px;
    }

    .menu-item-card {
        border-width: 3px;
    }

    .category-header {
        border: 3px solid #047857;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}