/* ========================================
   HEADER STYLES
======================================== */

.header {
    background-color: var(--primary-color);
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 94%;
    max-width: 1300px;
    border-radius: 16px;
    padding: 0.8rem 0;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.6s ease-out;
    transition: all 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

/* Logo */
.logo {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    animation: fadeInScale 0.8s ease-out 0.2s backwards;
}

.logo h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
    margin: 0;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: var(--bg-light);
    font-weight: 400;
}

/* Desktop Nav */
.nav-menu {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    animation: slideInRight 0.5s ease-out backwards;
}

.nav-menu li:nth-child(1) {
    animation-delay: 0.3s;
}

.nav-menu li:nth-child(2) {
    animation-delay: 0.4s;
}

.nav-menu li:nth-child(3) {
    animation-delay: 0.5s;
}

.nav-menu li:nth-child(4) {
    animation-delay: 0.6s;
}

.nav-menu li:nth-child(5) {
    animation-delay: 0.7s;
}

.nav-menu li:nth-child(6) {
    animation-delay: 0.8s;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding-bottom: 5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

/* CTA Button */
.btn-cta {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    animation: fadeInScale 0.8s ease-out 0.8s backwards, pulse 2s ease-in-out 1.5s infinite;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    /* پیش فرض در دسکتاپ */
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    z-index: 1001;
    animation: fadeInScale 0.6s ease-out 0.4s backwards;
}

.hamburger span {
    width: 26px;
    height: 2.5px;
    background-color: var(--white);
    border-radius: 3px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a8a 100%);
    z-index: 999;
    transition: right 0.4s ease;
    padding-top: 120px;
}

.mobile-menu-overlay.active {
    right: 0;
}

.mobile-menu {
    list-style: none;
    padding: 2rem;
}

.mobile-menu li {
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateX(50px);
    transition: var(--transition);
}

.mobile-menu-overlay.active .mobile-menu li {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu li:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-menu li:nth-child(2) {
    transition-delay: 0.2s;
}

.mobile-menu li:nth-child(3) {
    transition-delay: 0.3s;
}

.mobile-menu li:nth-child(4) {
    transition-delay: 0.4s;
}

.mobile-menu li:nth-child(5) {
    transition-delay: 0.5s;
}

.mobile-link {
    color: var(--white);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    transition: var(--transition);
}

.mobile-link:hover {
    color: var(--secondary-color);
    padding-right: 10px;
}

/* ========================================
   BOTTOM NAVIGATION (Mobile)
======================================== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    width: 92%;
    max-width: 400px;
    animation: slideUpBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.bottom-nav-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 58, 138, 0.95) 100%);
    padding: 0.6rem 0.5rem;
    border-radius: 50px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    list-style: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bottom-nav-item {
    flex: 1;
    text-align: center;
    animation: popIn 0.5s backwards;
}

.bottom-nav-item:nth-child(1) {
    animation-delay: 0.2s;
}

.bottom-nav-item:nth-child(2) {
    animation-delay: 0.3s;
}

.bottom-nav-item:nth-child(3) {
    animation-delay: 0.4s;
}

.bottom-nav-item:nth-child(4) {
    animation-delay: 0.5s;
}

.bottom-nav-item:nth-child(5) {
    animation-delay: 0.6s;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.3rem;
}

.bottom-nav-link i {
    font-size: 1.1rem;
    margin-bottom: 2px;
    transition: 0.3s;
}

.bottom-nav-link span {
    font-size: 0.6rem;
    font-weight: 500;
}

.bottom-nav-link.active {
    color: var(--secondary-color);
    transform: translateY(-5px);
}

.bottom-nav-link.active i {
    font-size: 1.3rem;
    color: var(--secondary-color);
}

/* ========================================
   RESPONSIVE MEDIA QUERIES
======================================== */
@media (max-width: 992px) {

    .nav-menu,
    .btn-cta {
        display: none !important;
        /* Force hide desktop menu */
    }

    .hamburger {
        display: flex !important;
        /* Force show hamburger */
    }

    .bottom-nav {
        display: block !important;
    }

    .header {
        width: 92%;
        top: 20px;
        padding: 0.6rem 0;
    }

    .logo h1 {
        font-size: 1.4rem;
    }
}

/* ========================================
   KEYFRAME ANIMATIONS
======================================== */
@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes slideDown {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUpBounce {
    0% {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }

    60% {
        transform: translateX(-50%) translateY(-10px);
    }

    80% {
        transform: translateX(-50%) translateY(5px);
    }

    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0) translateY(20px);
    }

    50% {
        transform: scale(1.1) translateY(-5px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    }

    50% {
        box-shadow: 0 6px 25px rgba(245, 158, 11, 0.5);
    }
}
