/* ==========================================
   ۱. تنظیمات عمومی و متغیرها
   ========================================== */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
}

:root { 
    --primary-bg: #0a0a14; 
    --secondary-bg: #12122b; 
    --neon-blue: #4d4dff; 
    --text-light: #e0e0e0; 
    --text-muted: #8a8a9d; 
}

body { 
    background-color: var(--primary-bg); 
    color: var(--text-light); 
    line-height: 1.6; 
    overflow-x: hidden; 
}

/* ==========================================
   ۲. هدر و نویگیشن
   ========================================== */
header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 16px 5%; 
    background-color: rgba(10,10,20,0.85); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    border-bottom: none; 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: row-reverse; 
}

.logo { 
    font-size: 26px; 
    font-weight: 800; 
    color: #fff; 
    letter-spacing: 2px; 
    cursor: pointer; 
    user-select: none;
    transition: 0.3s;
    font-family: 'Segoe UI', sans-serif;
}

.logo:hover { 
    color: var(--neon-blue); 
    text-shadow: 0 0 12px var(--neon-blue);
}

.logo.playing {
    color: var(--neon-blue);
    text-shadow: 0 0 15px var(--neon-blue);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

nav ul { 
    list-style: none; 
    display: flex; 
    gap: 22px; 
}

nav ul li a { 
    text-decoration: none; 
    color: var(--text-light); 
    font-size: 15px; 
    transition: 0.3s; 
    cursor: pointer; 
}

nav ul li a:hover { 
    color: var(--neon-blue); 
}

/* سیستم جابجایی صفحات */
.page-view { 
    display: none; 
}

.page-view.active { 
    display: block; 
    animation: fadeInPage 0.5s ease;
}

@keyframes fadeInPage { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}

/* ==========================================
   ۳. صفحه اصلی (خانه) - هدر متن بالا چپ
   ========================================== */
.hero-section { 
    min-height: 80vh; 
    display: flex; 
    align-items: flex-start; 
    direction: ltr; 
    justify-content: flex-start; 
    background: 
        linear-gradient(to top, var(--primary-bg) 0%, rgba(10,10,20,0) 25%),
        linear-gradient(to bottom, rgba(10,10,20,0.95) 0%, rgba(10,10,20,0) 25%),
        linear-gradient(to right, rgba(10,10,20,0.98) 0%, rgba(10,10,20,0.82) 45%, rgba(10,10,20,0.1) 100%), 
        url('images/hero-bg.jpg'); 
    background-size: cover; 
    background-position: right center; 
    background-repeat: no-repeat;
    padding: 60px 6% 0; 
    position: relative;
    overflow: hidden;
}

.hero-content { 
    max-width: 500px; 
    direction: ltr; 
    text-align: left; 
    z-index: 2;
}

.hero-content h1 { 
    font-size: clamp(2.4rem, 5vw, 4.2rem); 
    line-height: 1.15; 
    margin-bottom: 8px; 
    color: #fff; 
    font-family: serif; 
    letter-spacing: 1px;
    text-shadow: 0 2px 15px rgba(0,0,0,0.85); 
}

.hero-content .subtitle { 
    font-size: 1.1rem; 
    color: #cfcfdf; 
    margin-bottom: 0; 
    font-weight: 300; 
    letter-spacing: 0.5px;
}

/* ==========================================
   ۴. انیمیشن اسکرول نرم
   ========================================== */
.fade-in-section {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1), transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1), transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.fade-in-section.is-visible .fade-in-card:nth-child(1) { transition-delay: 0.15s; }
.fade-in-section.is-visible .fade-in-card:nth-child(2) { transition-delay: 0.3s; }
.fade-in-section.is-visible .fade-in-card:nth-child(3) { transition-delay: 0.45s; }

.fade-in-section.is-visible .fade-in-card {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   ۵. بخش کارت‌های منوی صفحه اصلی و دکمه جدید
   ========================================== */
.menu-section { 
    padding: 80px 5%; 
    text-align: center; 
}

.en-menu-title { 
    font-size: 3rem; 
    color: #fff; 
    margin-bottom: 40px; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 8px;
    text-transform: uppercase;
    font-weight: 800;
    text-shadow: 0 0 15px rgba(77, 77, 255, 0.3);
}

.menu-grid { 
    display: flex; 
    justify-content: center; 
    gap: 35px; 
    flex-wrap: wrap; 
    margin-bottom: 40px; 
}

.menu-card { 
    display: flex; 
    flex-direction: column; 
    width: 280px; 
    transition: transform 0.4s ease, box-shadow 0.4s ease; 
}

.menu-card:hover { transform: translateY(-8px); }

.menu-img { 
    width: 100%; 
    height: 250px; 
    object-fit: cover; 
    border-radius: 15px 15px 0 0; 
    position: relative; 
    z-index: 1; 
    background-color: #1a1a2e; 
} 

.menu-glassy-box { 
    flex: 1; 
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.08)); 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px); 
    padding: 35px 15px 20px; 
    border-radius: 0 0 15px 15px; 
    margin-top: -25px; 
    position: relative; 
    z-index: 2; 
    box-shadow: 0 15px 30px rgba(0,0,0,0.2); 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
}

.menu-glassy-box h3 { color: #fff; font-size: 1.3rem; margin-bottom: 5px; }
.menu-glassy-box p { color: var(--text-muted); font-size: 0.9rem; }

.btn-unique { 
    position: relative;
    display: inline-block; 
    margin-top: 15px;
    padding: 14px 55px; 
    background: transparent; 
    color: var(--neon-blue); 
    border: 2px solid var(--neon-blue); 
    border-radius: 50px; 
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.95rem; 
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    cursor: pointer; 
    transition: 0.5s ease; 
    text-decoration: none; 
    overflow: hidden;
    box-shadow: 0 0 15px rgba(77, 77, 255, 0.2);
}

.btn-unique::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: 0.6s ease;
}

.btn-unique:hover { 
    background: var(--neon-blue); 
    color: #fff; 
    box-shadow: 0 0 25px var(--neon-blue), 0 0 45px rgba(77, 77, 255, 0.4);
    transform: translateY(-3px);
}

.btn-unique:hover::before {
    left: 100%;
}

/* ==========================================
   ۶. بخش تصویر پاییزی کافه دانشگاهی
   ========================================== */
.about-banner {
    position: relative;
    width: 100%;
    min-height: 480px;
    background: url('images/about-pic.jpg') center right / cover no-repeat;
    display: flex;
    align-items: center;
    direction: ltr; 
    justify-content: flex-start;
    padding: 60px 8%;
    margin-top: 40px;
    border: none;
}

.about-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(to bottom, var(--primary-bg) 0%, rgba(10, 10, 20, 0) 22%),
        linear-gradient(to top, var(--primary-bg) 0%, rgba(10, 10, 20, 0) 22%),
        linear-gradient(to right, rgba(10, 10, 20, 0.95) 0%, rgba(10, 10, 20, 0.6) 42%, rgba(10, 10, 20, 0) 75%);
    z-index: 1;
    pointer-events: none;
}

.banner-overlay-content {
    position: relative;
    z-index: 2;
    max-width: 420px; 
    text-align: left;
}

.banner-tag {
    font-size: 0.85rem;
    color: var(--neon-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 10px;
}

.banner-overlay-content h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1.25;
    color: #fff;
    font-family: serif;
    margin-bottom: 14px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.9);
}

.banner-overlay-content p {
    font-size: 1rem;
    color: #cfcfdf;
    line-height: 1.6;
    margin-bottom: 0;
    font-weight: 300;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

/* ==========================================
   ۷. صفحه منوی کامل (زیگزاگی)
   ========================================== */
.category-filter { 
    display: flex; 
    justify-content: center; 
    gap: 15px; 
    flex-wrap: wrap; 
    padding: 40px 5%; 
}

.cat-btn { 
    background: rgba(255,255,255,0.05); 
    color: var(--text-light); 
    border: 1px solid rgba(77,77,255,0.3); 
    padding: 8px 25px; 
    border-radius: 50px; 
    cursor: pointer; 
    font-size: 1rem; 
    transition: 0.3s; 
    flex-shrink: 0;
}

.cat-btn:hover, .cat-btn.active { 
    background: var(--neon-blue); 
    color: #fff; 
    box-shadow: 0 0 15px rgba(77,77,255,0.3); 
}

.full-menu-list { 
    padding: 0 5% 80px; 
    display: flex; 
    flex-direction: column; 
    gap: 50px; 
    max-width: 1100px; 
    margin: 0 auto; 
    width: 100%; 
    overflow-x: hidden; 
}

.detailed-card { 
    display: flex; 
    flex-direction: row; 
    background: rgba(255,255,255,0.02); 
    border: 1px solid rgba(255,255,255,0.05); 
    border-radius: 15px; 
    overflow: hidden; 
    align-items: stretch;
    opacity: 0;
    transform: translateX(80px); 
    transition: opacity 1.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.detailed-card.reverse { 
    flex-direction: row-reverse; 
    transform: translateX(-80px); 
}

.detailed-card.is-visible {
    opacity: 1;
    transform: translateX(0) !important;
}

.card-img-area { 
    flex: 1; 
    min-width: 40%; 
    max-width: 50%; 
}

.card-img-area img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
    background-color: #1a1a2e; 
}

.card-text-area { 
    flex: 1; 
    padding: 40px 50px; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    text-align: right; 
}

.card-text-area h2 { font-size: 2.2rem; color: #fff; margin-bottom: 15px; }
.card-text-area p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 25px; line-height: 1.8; }

/* ==========================================
   ۸. فوتر
   ========================================== */
footer { 
    background-color: #05050a; 
    padding: 50px 5%; 
    text-align: center; 
    border-top: none; 
}

.info h3 { color: var(--neon-blue); margin-bottom: 15px; }
.info p { color: var(--text-muted); margin-bottom: 10px; direction: ltr; }

/* ==========================================
   ۹. تنظیمات دقیق موبایل
   ========================================== */
@media (max-width: 850px) {
    header { 
        flex-direction: row-reverse; 
        justify-content: space-between;
        align-items: center;
        padding: 14px 5%; 
        border-bottom: none;
    }

    .logo { font-size: 22px; }

    nav ul { 
        display: flex;
        flex-direction: row;
        gap: 14px; 
    }

    nav ul li a { font-size: 13px; }
    
    .hero-section { 
        min-height: auto;
        height: 250px; 
        display: flex; 
        align-items: flex-start; 
        direction: ltr; 
        justify-content: flex-start; 
        background: 
            linear-gradient(to top, var(--primary-bg) 0%, rgba(10,10,20,0) 25%),
            linear-gradient(to bottom, rgba(10,10,20,0.95) 0%, rgba(10,10,20,0) 30%),
            linear-gradient(to right, rgba(10,10,20,0.98) 0%, rgba(10,10,20,0.78) 55%, rgba(10,10,20,0.05) 100%), 
            url('images/hero-bg.jpg'); 
        background-size: cover; 
        background-position: right center; 
        background-repeat: no-repeat;
        padding: 25px 6% 0; 
        position: relative;
    }
    
    .hero-content { 
        width: 65%; 
        max-width: 65%; 
        direction: ltr; 
        text-align: left; 
    }

    .hero-content h1 { font-size: 1.55rem; line-height: 1.15; margin-bottom: 4px; }
    .hero-content .subtitle { font-size: 0.72rem; line-height: 1.35; }
    
    .en-menu-title { font-size: 1.8rem; letter-spacing: 4px; margin-bottom: 30px; }
    .btn-unique { padding: 12px 35px; font-size: 0.85rem; letter-spacing: 2px; }

    .menu-grid {
        flex-direction: row; 
        flex-wrap: nowrap; 
        justify-content: flex-start;
        align-items: stretch;
        gap: 15px;
        overflow-x: auto; 
        padding-bottom: 15px;
        scroll-snap-type: x mandatory; 
        -ms-overflow-style: none; 
        scrollbar-width: none;
    }
    
    .menu-grid::-webkit-scrollbar { display: none; }

    .menu-card { 
        flex-direction: column; 
        width: 220px; 
        min-width: 220px; 
        height: auto; 
        border-radius: 15px;
        background: transparent;
        border: none;
        margin: 0;
        scroll-snap-align: center; 
    }
    
    .menu-img {
        width: 100%; 
        min-width: 100%;
        height: 200px;
        border-radius: 15px 15px 0 0;
    }

    .menu-glassy-box {
        margin-top: -25px; 
        padding: 20px 15px 15px;
        background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.08));
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        box-shadow: 0 15px 30px rgba(0,0,0,0.2);
        justify-content: center;
        text-align: center;
        border-radius: 0 0 15px 15px;
    }

    .menu-glassy-box h3 { font-size: 1.1rem; margin-bottom: 5px; }
    .menu-glassy-box p { font-size: 0.8rem; }
    
    .about-banner {
        min-height: auto;
        aspect-ratio: 16 / 9;
        padding: 10px 5%;
        margin-top: 25px;
        background-position: center right; 
        background-size: cover; 
    }

    .banner-overlay-content { width: 44%; max-width: 44%; }
    .banner-tag { font-size: 0.55rem; margin-bottom: 2px; letter-spacing: 0.5px; }
    .banner-overlay-content h2 { font-size: 0.85rem; line-height: 1.15; margin-bottom: 4px; }
    .banner-overlay-content p { font-size: 0.58rem; line-height: 1.25; }

    /* ایجاد حالت اسکرول افقی برای دکمه‌های دسته‌بندی در موبایل */
    .category-filter {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 20px 5%;
        gap: 12px;
        -ms-overflow-style: none; 
        scrollbar-width: none;
    }

    .category-filter::-webkit-scrollbar {
        display: none; 
    }

    .cat-btn {
        font-size: 0.85rem;
        padding: 6px 20px;
    }

    .detailed-card { 
        flex-direction: row; 
        height: 130px; 
        max-width: 100%; 
        margin: 0 auto; 
        border-radius: 12px;
        transform: translateX(40px); 
    }

    .detailed-card.reverse { 
        flex-direction: row-reverse; 
        transform: translateX(-40px); 
    }

    .detailed-card.is-visible { transform: translateX(0) !important; }
    
    .card-img-area { min-width: 120px; max-width: 120px; }
    .card-img-area img { border-radius: 0; }
    
    .card-text-area { padding: 10px 15px; text-align: right; justify-content: center; }
    .card-text-area h2 { font-size: 1.1rem; margin-bottom: 5px; }
    
    .card-text-area p { 
        font-size: 0.75rem; 
        line-height: 1.4;
        margin-bottom: 8px; 
        display: -webkit-box;
        -webkit-line-clamp: 2; 
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}