/* Top Banner */
.top-banner {
    background: linear-gradient(180deg, rgba(232, 232, 232, 0.95) 0%, rgba(240, 240, 240, 0.9) 100%);
    padding: 0.75rem 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.banner-link {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    transition: color var(--transition-base);
}

.banner-link:hover {
    color: var(--color-text);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 3rem;
    gap: 2rem;
    transition: all 0.3s ease;
}

.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
}

.mobile-menu-toggle svg {
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-toggle .icon-hamburger {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.mobile-menu-toggle .icon-close {
    opacity: 0;
    transform: rotate(-90deg) scale(0.8);
}

.mobile-menu-toggle.active .icon-hamburger {
    opacity: 0;
    transform: rotate(90deg) scale(0.8);
}

.mobile-menu-toggle.active .icon-close {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 49.6125px;
    width: auto;
    max-width: 168px;
    object-fit: contain;
}

.main-nav,
.secondary-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-family: 'Vazir', Tahoma, sans-serif;
    font-size: var(--text-sm);
    color: var(--color-text);
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0;
    direction: rtl;
    position: relative;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background-color: var(--color-text);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: var(--color-text-secondary, #666);
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 2rem;
    padding: 2rem;
}

.mobile-nav-link {
    font-family: 'Vazir', Tahoma, sans-serif;
    font-size: 1.5rem;
    color: var(--color-text);
    font-weight: 500;
    letter-spacing: 0;
    direction: rtl;
    opacity: 0;
    transform: translateY(20px);
    position: relative;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background-color: var(--color-text);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active .mobile-nav-link {
    animation: fadeInUp 0.5s ease forwards;
}

.mobile-menu-overlay.active .mobile-nav-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(2) { animation-delay: 0.2s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(3) { animation-delay: 0.3s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(4) { animation-delay: 0.4s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(5) { animation-delay: 0.5s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(6) { animation-delay: 0.6s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(7) { animation-delay: 0.7s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(8) { animation-delay: 0.8s; }

.mobile-nav-link:hover {
    color: var(--color-text-secondary, #666);
    transform: translateX(-4px);
}

.mobile-nav-link:hover::after {
    width: 100%;
    left: 0;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Navigation */
@media (max-width: 1024px) {
    .header {
        padding: 1rem 1.5rem;
    }

    .main-nav,
    .secondary-nav {
        gap: 1.5rem;
    }

    .nav-link {
        font-size: 0.8125rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        z-index: 1002;
    }

    .main-nav,
    .secondary-nav {
        display: none;
    }

    .header {
        padding: 1rem 1.5rem;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1002;
    }

    .logo img {
        height: 49.6125px;
        max-width: 157.5px;
    }
}



/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .header {
        padding: 1rem 2rem;
    }
    
    .main-nav,
    .secondary-nav {
        gap: 1.25rem;
    }

    .logo img {
        height: 52.92px;
        max-width: 168px;
    }
}

/* Small mobile phones */
@media (max-width: 480px) {
    .logo img {
        height: 44.1px;
        max-width: 136.5px;
    }
}
