/* Global Styles */
:root {
    --primary-color: #feaf0e;
    --secondary-color: #f47e31;
    --accent-color: #cb4122;
    --dark-color: #181717;
    --light-color: #ffffff;
    --text-color: #181717;
    --footer-text-color: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--primary-color);
    color: var(--text-color);
    position: relative;
    min-height: 100vh;
    padding-bottom: 80px;
    overflow-x: hidden; /* Prevent horizontal scroll for the body */
}

/* Language Selector */
.language-selector {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
    display: flex;
    gap: 5px;
}

.language-selector button {
    background-color: var(--secondary-color);
    color: var(--light-color);
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.language-selector button.active {
    background-color: var(--accent-color);
}

.language-selector button:hover {
    opacity: 0.9;
}

/* Header Styles */
header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 60px; /* Add padding to push logo down from language selector */
}

.logo-img {
    width: 150px;
    height: auto;
    max-width: 80%; /* Ensure logo scales down on smaller screens */
}

/* Navigation Styles */
nav {
    margin: 20px 0;
    position: relative; /* Needed to position the fade effect */
}

/* Fade effect for mobile scrolling */
nav::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50px; /* Width of the fade */
    background: linear-gradient(to left, var(--primary-color), transparent);
    pointer-events: none; /* Allows clicks to go through to the tabs underneath */
    z-index: 2;
}

.tab-container {
    display: flex;
    justify-content: flex-start; /* Align tabs to the start for scrolling */
    flex-wrap: nowrap;
    gap: 15px;
    overflow-x: auto;
    padding: 0 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tab-container::-webkit-scrollbar {
    display: none;
}

.tab {
    margin: 10px;
    flex-shrink: 0;
    background-color: var(--secondary-color);
    color: var(--light-color);
    border: 3px solid var(--dark-color);
    padding: 15px 25px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    text-align: center;
    box-shadow: 7px 7px 0px var(--dark-color);
}

.tab:hover {
    transform: translateY(-3px);
    box-shadow: 10px 10px 0px var(--dark-color);
}

.tab.active {
    background-color: var(--accent-color);
    box-shadow: 7px 7px 0px var(--accent-color);
}

/* Menu Section Styles */
main {
    margin: 20px;
    background-color: var(--light-color);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.menu-section {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.menu-section.active {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

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

.menu-item-image {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    margin-right: 15px;
    cursor: pointer;
}

.item-content {
    flex-grow: 1;
}

.item-name {
    font-weight: bold;
    font-size: 1.2rem;
}

.item-price {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--accent-color);
}

.item-description {
    font-size: 0.9rem;
    color: #666;
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 10px;
}

.dish-category {
    grid-column: 1 / -1;
    margin-bottom: 20px;
}

.dish-category h3 {
    background-color: var(--secondary-color);
    color: var(--light-color);
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.new-tag {
    background-color: var(--accent-color);
    color: var(--light-color);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    display: inline-block;
    margin-left: 10px;
}

/* --- NEW BURGER STYLES START HERE --- */
.burger-options {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Space between size options */
    width: 100%;
}

.burger-option {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: bold;
}

.burger-option span:last-child {
    color: var(--accent-color);
}
/* --- NEW BURGER STYLES END HERE --- */


/* Footer Styles */
footer {
    background-color: var(--dark-color);
    color: var(--footer-text-color);
    text-align: center;
    padding: 20px;
    position: absolute;
    bottom: 0;
    width: 100%;
}

/* RTL Support */
.rtl {
    direction: rtl;
}

.rtl .language-selector {
    right: auto;
    left: 15px;
}

.rtl nav::after {
    right: auto;
    left: 0;
    background: linear-gradient(to right, var(--primary-color), transparent);
}

.rtl .menu-item-image {
    margin-right: 0;
    margin-left: 15px;
}

.rtl .new-tag {
    margin-left: 0;
    margin-right: 10px;
}

/* Image Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    transform: scale(0.7);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    object-fit: contain;
}

.modal.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.close-modal-btn:hover,
.close-modal-btn:focus {
    color: #bbb;
}

body.modal-open {
    overflow: hidden;
}

/* --- MOBILE RESPONSIVE STYLES --- */
@media (max-width: 768px) {
    /* Language selector on mobile */
    .language-selector {
        width: calc(100% - 30px);
        justify-content: flex-end;
        top: 15px;
        right: 15px;
    }

    .language-selector button {
        padding: 6px 10px;
        font-size: 0.9rem;
    }

    header {
        padding-top: 80px;
    }

    .logo-img {
        width: 120px;
    }

    /* Navigation tabs on mobile - horizontal scroll */
    .tab-container {
        justify-content: flex-start;
        padding-bottom: 10px;
    }

    .tab {
        min-width: 120px;
        font-size: 1rem;
        padding: 12px 20px;
    }

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


/* --- DESKTOP STYLES --- */
@media (min-width: 769px) {
    /* Center the tabs on desktop */
    .tab-container {
        justify-content: center;
    }
    
    /* Hide the fade effect on desktop */
    nav::after {
        display: none;
    }

    /* Make menu items wider on large screens */
    .menu-section.active {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }

    main {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
}
