:root {
    --bg-color: #0f172a;
    /* Deep Slate Blue */
    --text-primary: #f8fafc;
    /* Off-White */
    --text-secondary: #94a3b8;
    /* Slate Grey */
    --accent-color: #d4af37;
    /* Classic Gold */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.back-button {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.8rem 1.5rem;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 999px;
    transition: var(--transition);
}

.back-button:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    transform: translateX(-5px);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.back-button i {
    font-size: 1rem;
}

@media (max-width: 768px) {
    .back-button {
        top: 1rem;
        left: 1rem;
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
}

.header {
    text-align: center;
    padding: 3rem 1rem;
    width: 100%;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 1) 0%, rgba(15, 23, 42, 0) 100%);
    position: relative;
    z-index: 10;
}

h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, #d4af37 0%, #f97316 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.2rem;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.arabic-heading {
    font-family: 'Cairo', Arial, sans-serif;
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.subtitle {
    color: var(--accent-color);
    font-size: 1.2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.9;
}

.menu-container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    flex: 1;
}

.image-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.menu-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(166, 133, 32, 0.08);
    cursor: pointer;
    border: 1px solid rgba(166, 133, 32, 0.12);
    background: #ffffff;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition);
}

.menu-image-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.3);
}

/* First 3 images: Show full image (One by one) */
.menu-image-wrapper:nth-child(-n+3) {
    flex: 0 0 100%;
    max-width: 800px;
    /* Removed aspect-ratio constraint to allow full natural height */
}

.menu-image-wrapper:nth-child(-n+3) .menu-image {
    height: auto;
    object-fit: contain;
}

/* 4th and beyond: Two by Two layout */
.menu-image-wrapper:nth-child(n+4) {
    flex: 0 0 calc(50% - 1rem);
    /* Assumes 2rem gap from grid */
    max-width: calc(50% - 1rem);
}

.menu-image {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
    display: block;
}

.menu-image-wrapper:hover .menu-image {
    transform: scale(1.05);
    /* Slight internal zoom on hover */
}

/* Modal / Lightbox Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.modal.show {
    display: flex;
    /* Show when active */
    animation: fadeIn 0.3s ease forwards;
}

.modal-inner {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.show .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1005;
}

.close-btn:hover {
    color: var(--accent-color);
    transform: rotate(90deg) scale(1.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .menu-container {
        padding: 1rem;
    }

    .image-grid {
        gap: 1rem;
    }

    .menu-image-wrapper:nth-child(-n+3),
    .menu-image-wrapper:nth-child(n+4) {
        flex: 0 1 100%;
        /* Take full width on small screens */
        max-width: 100%;
    }

    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }

    .close-btn {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }

    .modal-content {
        max-width: 100%;
        max-height: 60vh;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 2.5rem 1rem;
    }

    .footer-title {
        font-size: 1.5rem;
    }

    .arabic-text {
        font-size: 1.1rem;
    }

    .location-text {
        font-size: 0.9rem;
    }

    .contact-info {
        padding: 1.2rem;
        border-radius: 20px;
    }

    .phones {
        flex-direction: column;
        gap: 0.8rem;
    }

    .separator {
        display: none;
    }
}

/* Colorful Aesthetic Background */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: linear-gradient(-45deg,
            #0f172a,
            /* Deep Slate Blue */
            #1e3a8a,
            /* Dark Blue */
            #3b82f6,
            /* Vibrant Blue */
            #fb923c,
            /* Peach / Orange */
            #ffedd5
            /* Light Peach */
        );
    background-size: 400% 400%;
    animation: gradientFlow 6s ease infinite;
    opacity: 0.95;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Footer Styling */
.footer {
    width: 100%;
    background: linear-gradient(to top, #0f172a 0%, rgba(15, 23, 42, 0.9) 100%);
    border-top: 2px solid rgba(212, 175, 55, 0.2);
    padding: 4rem 1.5rem;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--accent-color);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 1rem;
    display: inline-block;
}

.arabic-text {
    font-family: 'Cairo', Arial, sans-serif;
    font-size: 1.3rem;
    color: var(--text-primary);
    direction: rtl;
    line-height: 1.6;
}

.location-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
    font-weight: 300;
}

.location-text i {
    color: var(--accent-color);
    margin-right: 8px;
}

.contact-info {
    margin-top: 1rem;
    background: rgba(212, 175, 55, 0.04);
    padding: 1.5rem 3rem;
    border-radius: 50px;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.contact-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
}

.phones {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.phone-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.phone-link::before {
    content: '\f232';
    /* FontAwesome Whatsapp Icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.1rem;
    opacity: 0.8;
}

.phone-link:hover {
    color: #fff;
    transform: translateY(-2px);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.phone-link:hover::before {
    color: #25D366;
    /* WhatsApp standard green on hover */
    opacity: 1;
}

.separator {
    color: rgba(255, 255, 255, 0.2);
    font-size: 1.5rem;
}