/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #8b4513 0%, #654321 100%);
    --secondary-gradient: linear-gradient(135deg, #d4c4a8 0%, #e8dcc0 100%);
    --accent-gradient: linear-gradient(135deg, #a0522d 0%, #8b4513 100%);
    --dark-gradient: linear-gradient(135deg, #5d2e0c 0%, #3d1f08 100%);
    --light-gradient: linear-gradient(135deg, #f5f1e8 0%, #e8dcc0 100%);
    --glass-bg: rgba(245, 241, 232, 0.1);
    --glass-border: rgba(139, 69, 19, 0.2);
    --text-primary: #8b4513;
    --text-secondary: #654321;
    --shadow-light: 0 8px 32px rgba(139, 69, 19, 0.15);
    --shadow-medium: 0 12px 40px rgba(139, 69, 19, 0.25);
    --shadow-heavy: 0 20px 60px rgba(139, 69, 19, 0.35);
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--light-gradient);
    background-attachment: fixed;
    min-height: 100vh;
    direction: rtl;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(139, 69, 19, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 69, 19, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(139, 69, 19, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* Floating Elements Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.container::before,
.container::after {
    content: '';
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--accent-gradient);
    filter: blur(80px);
    opacity: 0.2;
    animation: float 6s ease-in-out infinite;
    z-index: -1;
}

.container::before {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.container::after {
    bottom: 10%;
    right: 10%;
    animation-delay: 3s;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    /* Ensure header stays in place and doesn't move */
    transform: none !important;
}

.header:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.header:hover::before {
    left: 100%;
}

.logo {
    position: absolute;
    right: 40px;
    z-index: 2;
}

.logo-circle {
    width: 100px;
    height: 100px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-medium);
    transition: all 0.4s ease;
    overflow: hidden;
}

.logo-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--accent-gradient);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.logo-circle:hover::before {
    opacity: 1;
}

.logo-circle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-heavy);
}

.logo-text {
    font-size: 14px;
    font-weight: 700;
    color: #f5f1e8;
    letter-spacing: 2px;
    margin-bottom: 4px;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.logo-icon {
    color: #f5f1e8;
    font-size: 20px;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.title {
    color: var(--text-primary);
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    position: relative;
    z-index: 2;
    text-shadow: 0 4px 8px rgba(255, 255, 255, 0.8);
    letter-spacing: 3px;
    background: linear-gradient(45deg, #8b4513, #654321, #8b4513);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
    margin: 0 120px 0 0; /* Add right margin to prevent overlap with logo */
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.qr-section {
    display: none;
}

/* Navigation Styles */
.menu-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    position: relative;
}

.category-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 18px 30px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
    min-width: 180px;
    justify-content: center;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.category-btn:hover::before {
    left: 100%;
}

.category-btn:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: var(--shadow-heavy);
    background: var(--primary-gradient);
    border-color: rgba(139, 69, 19, 0.4);
    color: #f5f1e8;
}

.category-btn.active {
    background: var(--accent-gradient);
    box-shadow: var(--shadow-heavy);
    border-color: rgba(139, 69, 19, 0.5);
    transform: translateY(-5px) scale(1.02);
    font-weight: 600;
    color: #f5f1e8;
}

.category-btn.active i {
    animation: pulse 2s ease-in-out infinite;
}

.category-btn i {
    font-size: 20px;
    transition: all 0.3s ease;
}

.category-btn:hover i {
    transform: scale(1.2) rotate(10deg);
}

/* Menu Content Styles */
.menu-content {
    position: relative;
}

.menu-section {
    display: none;
    animation: slideInUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.menu-section.active {
    display: block;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 30px 40px;
    border-radius: 25px 25px 0 0;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    /* Ensure header stays in place and doesn't move */
    transform: none !important;
}

.section-header:hover {
    background: rgba(245, 241, 232, 0.15);
    transform: translateY(-2px);
}

.section-header::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.6s ease;
}

.section-header:hover::before {
    left: 100%;
}

.section-header h2 {
    color: var(--text-primary);
    font-size: 2.2rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
    letter-spacing: 2px;
}

.section-icon {
    position: relative;
    z-index: 2;
}

.section-icon i {
    color: var(--text-primary);
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.section-header:hover .section-icon i {
    transform: scale(1.1) rotate(10deg);
}

.menu-items {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-top: none;
    padding: 40px;
    border-radius: 0 0 25px 25px;
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.menu-items:hover {
    background: rgba(245, 241, 232, 0.12);
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 69, 19, 0.2);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.menu-item:last-child {
    margin-bottom: 0;
}

.menu-item::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.6s ease;
}

.menu-item:hover::before {
    left: 100%;
}

.menu-item:hover {
    transform: translateX(-10px) scale(1.02);
    box-shadow: var(--shadow-heavy);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(139, 69, 19, 0.4);
}

.item-info h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.menu-item:hover .item-info h3 {
    transform: translateX(5px);
}

.item-description {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
    transition: all 0.3s ease;
}

.menu-item:hover .item-description {
    color: var(--text-primary);
}

.item-price {
    background: var(--accent-gradient);
    color: #f5f1e8;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: var(--shadow-medium);
    min-width: 100px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.item-price::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.menu-item:hover .item-price::before {
    left: 100%;
}

.menu-item:hover .item-price {
    transform: scale(1.1) rotate(2deg);
    box-shadow: var(--shadow-heavy);
}

/* Footer Styles */
.footer {
    display: none;
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
    color: var(--text-primary);
    font-weight: 500;
    border-top: 1px solid rgba(139, 69, 19, 0.2);
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: var(--shadow-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 25px;
        text-align: center;
        padding: 30px 20px;
    }
    
    .title {
        font-size: 2.2rem;
        margin: 0; /* Remove margin on mobile */
        order: 1; /* Put title first */
    }
    
    .logo {
        position: relative;
        right: auto;
        order: 2; /* Put logo second */
        margin-top: 10px;
    }
    
    .logo-circle {
        width: 80px;
        height: 80px;
    }
    
    .logo-text {
        font-size: 12px;
    }
    
    .logo-icon {
        font-size: 16px;
    }
    
    .menu-nav {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .category-btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 25px 20px;
    }
    
    .menu-item {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 20px;
    }
    
    .item-price {
        align-self: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 25px 15px;
        border-radius: 20px;
    }
    
    .title {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
    
    .logo-circle {
        width: 70px;
        height: 70px;
    }
    
    .logo-text {
        font-size: 10px;
    }
    
    .logo-icon {
        font-size: 14px;
    }
    
    .menu-items {
        padding: 25px 20px;
        border-radius: 0 0 20px 20px;
    }
    
    .menu-item {
        padding: 20px;
        border-radius: 15px;
    }
    
    .item-info h3 {
        font-size: 1.2rem;
    }
    
    .item-price {
        font-size: 1.1rem;
        padding: 10px 20px;
        border-radius: 25px;
    }
    
    .section-header {
        border-radius: 20px 20px 0 0;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(245, 241, 232, 0.1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gradient);
    border-radius: 5px;
    border: 2px solid rgba(245, 241, 232, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-gradient);
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-section.active .menu-item {
    animation: fadeInUp 0.6s ease forwards;
}

.menu-section.active .menu-item:nth-child(1) { animation-delay: 0.1s; }
.menu-section.active .menu-item:nth-child(2) { animation-delay: 0.2s; }
.menu-section.active .menu-item:nth-child(3) { animation-delay: 0.3s; }
.menu-section.active .menu-item:nth-child(4) { animation-delay: 0.4s; }
.menu-section.active .menu-item:nth-child(5) { animation-delay: 0.5s; }
.menu-section.active .menu-item:nth-child(6) { animation-delay: 0.6s; }
.menu-section.active .menu-item:nth-child(7) { animation-delay: 0.7s; }
.menu-section.active .menu-item:nth-child(8) { animation-delay: 0.8s; } 