/* ===== RESET AND BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    direction: rtl;
    text-align: right;
}

/* ===== CUSTOM PROPERTIES ===== */
:root {
    --primary-green: #1a5f3c;
    --secondary-green: #2d7a4f;
    --light-green: #4a9c6b;
    --accent-green: #6bbf8a;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --dark-gray: #343a40;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* ===== HERO SECTION STYLES ===== */
.hero-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1414235077428-338989a2e8c0?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1920&h=600&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--primary-green);
    filter: brightness(0.5);
    z-index: 1;
} */

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent scrollbars */
    z-index: 1;
}

.hero-background video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the video covers the background */
    filter: brightness(0.5); /* same effect as image */
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    text-align: center;
    padding: 3rem 0;
}

.hero-logo {
    margin-bottom: 1rem;
}

.restaurant-logo {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: var(--white);
}

.tagline {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.95;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-description {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ===== LANGUAGE SWITCHER ===== */
.language-switcher {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.lang-btn.active {
    background: var(--white);
    color: var(--primary-green);
    border-color: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.lang-icon {
    font-size: 1.1rem;
}

.lang-text {
    font-weight: 600;
}

/* ===== NAVIGATION STYLES ===== */
.category-nav {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.category-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.nav-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-scroll::-webkit-scrollbar {
    display: none;
}

.nav-tabs {
    display: flex;
    gap: 0.8rem;
    padding: 0.5rem 0;
    min-width: max-content;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-tab {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 0.8rem 1.2rem;
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
    min-width: fit-content;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
}

.nav-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.nav-tab:hover::before {
    left: 100%;
}

.nav-tab::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.nav-tab:active::after {
    width: 300px;
    height: 300px;
    transition: width 0s, height 0s;
}

.nav-tab:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.nav-tab:hover i {
    transform: scale(1.1) rotate(5deg);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-tab:hover span {
    transform: translateX(2px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-tab.active {
    background-color: var(--white);
    color: var(--primary-green);
    border-color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px) scale(1.05);
    animation: tabActivate 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes tabActivate {
    0% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-4px) scale(1.08);
    }
    100% {
        transform: translateY(-2px) scale(1.05);
    }
}

.nav-tab i {
    font-size: 1.1rem;
    color: inherit;
}

.nav-tab span {
    font-weight: 600;
    letter-spacing: 0.5px;
}



/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 2rem 0;
    background-color: var(--light-gray);
    min-height: 60vh;
}

.menu-section {
    display: none;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== FOOD CARDS ===== */
.food-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.food-card:nth-child(1) { animation-delay: 0.1s; }
.food-card:nth-child(2) { animation-delay: 0.2s; }
.food-card:nth-child(3) { animation-delay: 0.3s; }
.food-card:nth-child(4) { animation-delay: 0.4s; }
.food-card:nth-child(5) { animation-delay: 0.5s; }
.food-card:nth-child(6) { animation-delay: 0.6s; }
.food-card:nth-child(7) { animation-delay: 0.7s; }
.food-card:nth-child(8) { animation-delay: 0.8s; }
.food-card:nth-child(9) { animation-delay: 0.9s; }
.food-card:nth-child(10) { animation-delay: 1.0s; }
.food-card:nth-child(11) { animation-delay: 1.1s; }
.food-card:nth-child(12) { animation-delay: 1.2s; }

.food-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.food-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.food-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.food-card:hover .food-image img {
    transform: scale(1.05);
}

.food-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.food-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.food-description {
    font-size: 0.9rem;
    color: var(--medium-gray);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.food-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: var(--light-gray);
    border-radius: 8px;
}

.price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-green);
}

.calories {
    font-size: 0.85rem;
    color: var(--medium-gray);
    font-weight: 500;
}

.food-actions {
    margin-top: auto;
}

.btn-add-cart {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-add-cart:hover {
    background: linear-gradient(135deg, var(--secondary-green), var(--primary-green));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 60, 0.3);
}

.btn-add-cart:active {
    transform: translateY(0);
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 3rem 0 1rem 0;
    text-align: center;
}

.footer p {
    margin: 0;
    font-weight: 400;
}

.footer-section {
    margin-bottom: 2rem;
    text-align: center;
}

.footer-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--white);
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background-color: var(--accent-green);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.contact-item:hover {
    color: var(--accent-green);
    transform: translateX(-5px);
}

.contact-item i {
    color: var(--accent-green);
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.working-hours {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.hours-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hours-item:last-child {
    border-bottom: none;
}

.hours-item .day {
    font-weight: 500;
    font-size: 0.9rem;
}

.hours-item .time {
    font-size: 0.85rem;
    color: var(--accent-green);
    font-weight: 600;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-link:hover {
    background-color: var(--accent-green);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large devices (desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero-section {
        min-height: 70vh;
    }
    
    .logo {
        font-size: 3rem;
    }
    
    .tagline {
        font-size: 1.3rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .food-title {
        font-size: 1.4rem;
    }
    
    .nav-tab {
        padding: 1rem 2rem;
        font-size: 1rem;
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .nav-tab span {
        font-size: 1rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .contact-item {
        justify-content: center;
    }
    
    .hours-item {
        justify-content: space-between;
        max-width: 300px;
        margin: 0 auto;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 1199px) {
    .logo {
        font-size: 3rem;
    }
    
    .tagline {
        font-size: 1.2rem;
    }
    
    .food-content {
        padding: 1.25rem;
    }
    
    .nav-tabs {
        justify-content: center;
        gap: 0.7rem;
    }
    
    .nav-tab {
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.25);
    }
    
    .footer-section {
        margin-bottom: 2.5rem;
    }
    
    .footer-title {
        font-size: 1.2rem;
    }
    
    .contact-item {
        font-size: 0.9rem;
    }
    
    .hours-item {
        flex-direction: column;
        gap: 0.3rem;
        text-align: center;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767px) {
    .hero-section {
        min-height: 70vh;
    }
    
    .logo {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1.1rem;
    }
    
    .nav-tabs {
        gap: 0.6rem;
        justify-content: center;
    }
    
    .nav-tab {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.25);
    }
    
    .nav-tab i {
        font-size: 0.9rem;
    }
    
    .nav-tab span {
        font-size: 0.8rem;
    }
    
    .food-card {
        margin-bottom: 1.5rem;
    }
    
    .footer {
        padding: 2rem 0 1rem 0;
    }
    
    .footer-section {
        margin-bottom: 2rem;
    }
    
    .footer-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .contact-item {
        font-size: 0.85rem;
        gap: 0.3rem;
    }
    
    .contact-item i {
        font-size: 0.9rem;
    }
    
    .hours-item {
        flex-direction: column;
        gap: 0.2rem;
        text-align: center;
        padding: 0.3rem 0;
    }
    
    .social-links {
        gap: 0.8rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575px) {
    .hero-section {
        min-height: 60vh;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .language-switcher {
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }
    
    .lang-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .nav-tabs {
        gap: 0.5rem;
        justify-content: flex-start;
        padding: 0.5rem 0;
    }
    
    .nav-tab {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        min-width: 90px;
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.3);
    }
    
    .nav-tab i {
        font-size: 0.9rem;
        margin: 0;
    }
    
    .nav-tab span {
        display: block;
        font-size: 0.75rem;
    }
    
    .food-content {
        padding: 1rem;
    }
    
    .food-title {
        font-size: 1.2rem;
    }
    
    .food-description {
        font-size: 0.85rem;
    }
    
    .food-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .price {
        font-size: 1rem;
    }
    
    .calories {
        font-size: 0.8rem;
    }
    
    .btn-add-cart {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .hero-section {
        min-height: 80vh;
    }
    
    .logo {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1.1rem;
    }
    
    .footer {
        padding: 1.5rem 0 1rem 0;
    }
    
    .footer-section {
        margin-bottom: 1.5rem;
    }
    
    .footer-title {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .contact-item {
        font-size: 0.8rem;
        gap: 0.2rem;
        flex-direction: column;
        text-align: center;
    }
    
    .contact-item i {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }
    
    .hours-item {
        flex-direction: column;
        gap: 0.2rem;
        text-align: center;
        padding: 0.2rem 0;
    }
    
    .hours-item .day {
        font-size: 0.8rem;
    }
    
    .hours-item .time {
        font-size: 0.75rem;
    }
    
    .social-links {
        gap: 0.6rem;
        margin-top: 0.8rem;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .footer-bottom {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
    
    .footer-bottom p {
        font-size: 0.8rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== FOCUS STYLES ===== */
.nav-tab:focus,
.btn-add-cart:focus {
    outline: 3px solid var(--accent-green);
    outline-offset: 2px;
}

/* ===== LOADING STATES ===== */
.food-image img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.food-image img.loaded {
    opacity: 1;
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-auto {
    margin-top: auto;
}

/* ===== RTL/LTR SUPPORT ===== */
[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

[dir="ltr"] .nav-tabs {
    flex-direction: row;
}

[dir="ltr"] .food-info {
    flex-direction: row;
}

[dir="ltr"] .cart-item {
    flex-direction: row;
}

[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .nav-tabs {
    flex-direction: row-reverse;
}

[dir="rtl"] .food-info {
    flex-direction: row-reverse;
}

[dir="rtl"] .cart-item {
    flex-direction: row-reverse;
}

/* ===== PRINT STYLES ===== */
@media print {
    .nav-tabs,
    .btn-add-cart,
    .footer {
        display: none;
    }
    
    .food-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
