/* --- CSS VARIABLES & RESET --- */
/* Default Light Mode */
:root {
    --primary-color: #A30000;
    --text-color: #222222;
    --bg-main: #f8f9fa;
    --bg-card: #ffffff;
    --highlight: #D4AF37;
    --text-muted: #6c757d;
    --success: #4caf50;
    --nav-bg: rgba(255, 255, 255, 0.2);
    --border-color: #dddddd;
    --img-overlay: rgba(255, 255, 255, 0.65);
    --transition: all 0.4s ease;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --text-color: #ffffff;
    --bg-main: #111111;
    --bg-card: #000000;
    --text-muted: #cccccc;
    --nav-bg: rgba(0, 0, 0, 0.2);
    --border-color: #333333;
    --img-overlay: rgba(0, 0, 0, 0.65);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
    font-family: var(--font-body);
}

/* Apply the elegant serif font to headings, logo, and buttons */
h1,
h2,
h3,
h4,
h5,
h6,
.logo,
.btn {
    font-family: var(--font-heading);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(163, 0, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(163, 0, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(163, 0, 0, 0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background 0.4s ease;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 65px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.2));
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Keeps the link red and underlined when it is the active section */
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a.active::after {
    width: 100%;
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    background: linear-gradient(var(--img-overlay), var(--img-overlay)), url('https://images.unsplash.com/photo-1555939594-58d7cb561ad1?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeIn 1.5s ease;
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    animation: fadeIn 1.5s ease 0.5s forwards;
    opacity: 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-color);
}

.btn {
    padding: 1rem 2.5rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(163, 0, 0, 0.5);
}

/* --- MENU IMAGES & LIGHTBOX --- */
.menu-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.close-lightbox {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
}

.close-lightbox:hover {
    color: var(--primary-color);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.5rem;
    user-select: none;
}

.lightbox-nav:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.prev {
    left: -80px;
}

.next {
    right: -80px;
}

/* --- SECTIONS COMMON --- */
section {
    padding: 5rem 10%;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.section-title .line {
    width: 60px;
    height: 3px;
    background: var(--text-color);
    margin: 0 auto;
}

/* --- MENU SECTION --- */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.menu-item {
    background: var(--bg-card);
    padding: 0;
    border-radius: 8px;
    border: 1px solid var(--primary-color) !important;
    transition: var(--transition);
    overflow: hidden;
}

.menu-item:hover {
    transform: translateY(-10px);
    border-color: var(--highlight) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.menu-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dotted var(--border-color);
    padding-bottom: 0.5rem;
    margin: 1.5rem 1.5rem 1rem 1.5rem;
}

.price {
    color: var(--highlight);
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 1.5rem 2rem 1.5rem;
}

/* --- FOOD GALLERY --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-img {
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
    cursor: pointer;
}

.gallery-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-img:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-img:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h4 {
    color: #ffffff;
    font-size: 1.2rem;
}

/* --- REVIEWS --- */
.review-section {
    background-color: var(--bg-main);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reviews-slider {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.review-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 10px;
    width: 300px;
    border: 1px solid var(--primary-color) !important;
    text-align: center;
    transition: var(--transition);
}

.review-card:hover {
    border-color: var(--highlight) !important;
}

.stars {
    color: var(--highlight);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.quote {
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.author {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* --- BOOKING FORM --- */
.booking-section {
    background: url('https://images.unsplash.com/photo-1599487488170-d11ec9c172f0?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-attachment: fixed;
    position: relative;
}

.booking-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--img-overlay);
}

.form-container {
    position: relative;
    z-index: 2;
    background: var(--bg-card);
    padding: 3rem;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 10px;
    border: 1px solid var(--primary-color) !important;
    transition: var(--transition);
}

.form-container:hover {
    border-color: var(--highlight) !important;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 1px solid var(--primary-color) !important;
    color: var(--text-color) !important;
    /* FIXED */
    border-radius: 4px;
    transition: var(--transition);
}

.form-control::placeholder {
    color: var(--text-muted) !important;
    opacity: 1;
}

/* Fix for iOS Safari hiding Date and Time inputs */
input[type="date"],
input[type="time"] {
    -webkit-appearance: none;
    appearance: none;
    min-height: 50px;
    align-items: center;
    display: flex;
}

input[type="date"],
input[type="time"] {
    color: var(--text-muted) !important;
}

input[type="date"]:valid,
input[type="time"]:valid,
input[type="date"]:focus,
input[type="time"]:focus {
    color: var(--text-color) !important;
}

.form-control:hover,
.form-control:focus {
    outline: none;
    border-color: var(--highlight) !important;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.2);
}

select.form-control {
    background-color: var(--bg-card) !important;
}

select.form-control option {
    background-color: var(--bg-card) !important;
    color: var(--text-color) !important;
}

.split-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* --- LOCATION & CONTACT --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.icon {
    margin-right: 15px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    min-height: 350px;
    border: none;
    border-radius: 8px;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    /* FIXED */
    color: var(--text-muted);
}

/* --- UI FIXES & MODAL --- */
.btn.loading {
    background-color: #f39c12 !important;
    color: #fff !important;
    animation: none !important;
    border-color: #f39c12 !important;
}

.btn.success {
    background-color: var(--success) !important;
    color: #fff !important;
    animation: none !important;
    border-color: var(--success) !important;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 8px;
    border: 1px solid var(--primary-color);
    text-align: center;
    max-width: 400px;
    transform: translateY(-20px);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.modal-content p {
    margin-bottom: 1.5rem;
}

/* --- HAMBURGER MENU ICON --- */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
    border-radius: 2px;
}

/* Animates the lines into an X when clicked */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- FLOATING BUTTONS --- */
.floating-btn {
    position: fixed;
    bottom: 30px;
    width: 55px;
    /* Exact width */
    height: 55px;
    /* Exact height */
    background: var(--bg-card);
    color: var(--text-color);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    /* Makes it a perfect circle */
    cursor: pointer;
    z-index: 2000;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    /* Makes the icons bigger */
    text-decoration: none;
    padding: 0;
}

.floating-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(163, 0, 0, 0.6);
    transform: translateY(-5px);
}

.lang-float {
    left: 30px;
}

.theme-float {
    right: 30px;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .reviews-slider {
        flex-direction: column;
        align-items: center;
    }

    .mobile-stack {
        flex-direction: column !important;
    }

    .prev {
        left: 10px;
    }

    .next {
        right: 10px;
    }

    /* Ensure hamburger stays above the full-screen menu */
    .hamburger {
        display: flex;
        z-index: 1001;
    }

    /* Keep the logo on top of the full-screen menu */
    .logo {
        position: relative;
        z-index: 1001;
    }

    /* Full-Screen Solid Overlay Menu */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        /* Takes up the exact height of the screen */
        background: var(--bg-card) !important;
        /* Solid White or Black depending on theme */
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Centers everything vertically */
        align-items: center;
        /* Centers everything horizontally */
        gap: 2.5rem;
        /* Large spacing between links */
        transform: translateY(-100%);
        /* Hides it perfectly above the screen */
        transition: transform 0.4s ease-in-out;
        z-index: 999;
        /* Sits right under the hamburger X */
        padding: 0;
        border: none;
    }

    /* Slides down to completely cover the viewport */
    .nav-links.active {
        transform: translateY(0);
    }

    /* Make the mobile text massive and elegant */
    .nav-links a {
        font-size: 2rem;
        letter-spacing: 3px;
    }

    /* Shrink floating buttons on mobile */
    .floating-btn {
        bottom: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .lang-float {
        left: 15px;
    }

    .theme-float {
        right: 15px;
    }

    /* Fix mobile form squeezing */
    .form-container {
        padding: 2rem 1.5rem;
        /* Less padding so inputs stretch wider */
    }

    .mobile-stack {
        flex-direction: column !important;
        gap: 1.5rem !important;
        /* Forces Date and Time to stack on phones */
    }
}

/* --- ARABIC (RTL) STYLES --- */
[dir="rtl"] {
    --font-heading: 'Cairo', sans-serif;
    --font-body: 'Cairo', sans-serif;
}

/* Fixes the hamburger menu position for RTL */
[dir="rtl"] .hamburger {
    margin-right: auto;
    margin-left: 0;
}

/* Prevents Arabic letters from breaking apart on mobile */
[dir="rtl"] .nav-links a {
    letter-spacing: 0 !important;
}