/* General Page Styles */
body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #fdfae1;
    background-image: linear-gradient(315deg, #fdfae1 0%, #f3e5ca 74%);
    /* Prevents horizontal scrollbar when menu is off-screen */
    overflow-x: hidden; 
}

.rtl {
    direction: rtl;
}

.title-gradient {
    background: -webkit-linear-gradient(45deg, #c1650c, #d83a3a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
    
.speaker-icon {
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}
.speaker-icon:hover {
    transform: scale(1.1);
}
.speaker-icon.loading, .speaker-icon.speaking {
    color: #d83a3a;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Footer Styles */
footer {
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-icons {
    margin-bottom: 15px;
    display: flex;
}

.social-icons img {
    width: 25px;
    height: 25px;
    margin: 0 8px;
    transition: transform 0.3s;
}

/* --- HEADER STYLES (MATCHING FOOD PAGE THEME) --- */
/* This part remains themed for the desktop view */
header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(253, 250, 225, 0.85);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid #e0d5b9;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    min-height: 70px;
}

.logo img {
    height: 50px;
    margin-left: 10px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0 15px;
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: #a55d1b; /* Themed color for desktop */
    font-size: 16px;
    font-weight: 600;
    padding: 8px 12px;
    display: block;
    transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: #ffffff;
    color: #d83a3a;
    border-radius: 4px;
}

/* Desktop Dropdown */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.95);
    min-width: 180px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    z-index: 1;
    border-radius: 6px;
    border: 1px solid #e0d5b9;
}

.dropdown-content a {
    color: #a55d1b;
    padding: 12px 16px;
    text-align: center;
    display: block;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* --- MOBILE RESPONSIVE HEADER (THEMED FOR FOOD PAGE) --- */
/* FIX: This section now has the correct theme and functionality */

.mobile-menu {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    cursor: pointer;
    z-index: 1002;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #a55d1b; /* Themed bar color */
    margin: 4px 0;
    transition: 0.4s;
}

@media screen and (max-width: 768px) {
    /* Show hamburger icon on mobile */
    .mobile-menu {
        display: flex;
    }

    /* Style the mobile navigation panel WITH THEME */
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100%;
        width: 75%;
        max-width: 280px;
        background-color: #f3e5ca; /* Themed background */
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 100px;
        
        /* Hide it off-screen */
        transform: translateX(100%);
        transition: transform 0.35s ease-in-out;
        
        display: flex; 
        border-left: 2px solid #e0d5b9; /* Themed border */
    }

    /* Class to slide the menu into view */
    .nav-links.active {
        transform: translateX(0);
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    }
    
    /* Ensure link text has the correct theme color */
    .nav-links a {
        color: #a55d1b;
    }

    .nav-links li {
        margin: 15px 0;
        width: 90%;
        text-align: center;
    }

    /* Mobile Dropdown adjustments (themed) */
    .dropdown-content {
        position: static;
        display: none; 
        background-color: rgba(255, 255, 255, 0.5); /* Lighter themed color */
        box-shadow: none;
        border-radius: 4px;
        margin-top: 10px;
        width: 100%;
        transform: none;
        border: none;
    }

    /* Disable hover on mobile */
    .dropdown:hover .dropdown-content {
        display: none;
    }
    
    /* Show submenu when parent has 'open' class from JS */
    .dropdown.open > .dropdown-content {
        display: block;
    }
    .lang-switcher.open > .dropdown-content {
        display: block;
    }
}
