/* ============================================
   Modern Header Styles
   Code Node (pvt) ltd - 2024
============================================ */

:root {
    --primary-color: #262262;
    --secondary-color: #6366f1;
    --dark-bg: #1a1a2e;
    --text-light: #ffffff;
    --text-gray: #9ca3af;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================
   Main Header
============================================ */

.modern-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(38, 34, 98, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.modern-header.scrolled {
    background: rgba(38, 34, 98, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.modern-header.hide {
    transform: translateY(-100%);
}

.main-nav {
    width: 100%;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    height: var(--header-height);
}

/* ============================================
   Logo
============================================ */

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.nav-logo a:hover {
    transform: scale(1.05);
}

.nav-logo img {
    height: 45px;
    width: auto;
}

.logo-text {
    display: flex;
    gap: 2px;
    font-size: 20px;
    font-weight: 700;
}

.text-primary {
    color: var(--text-light);
}

.text-accent {
    color: var(--secondary-color);
}

/* ============================================
   Desktop Navigation
============================================ */

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 5px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
}

.nav-link:hover i {
    transform: translateY(-2px);
}

.nav-link.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--secondary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--secondary-color);
}

/* Login Button Special Style */
.btn-login {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white !important;
    padding: 10px 20px;
    margin-left: 10px;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

/* ============================================
   Mobile Toggle Button
============================================ */

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-toggle.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   Mobile Sidebar
============================================ */

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--dark-bg) 100%);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 1002;
}

.mobile-sidebar.active {
    right: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-logo img {
    height: 35px;
}

.sidebar-logo span {
    color: var(--text-light);
    font-weight: 700;
    font-size: 18px;
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    margin: 5px 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--accent-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.sidebar-menu a:hover::before {
    transform: scaleY(1);
}

.sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.05);
    padding-left: 35px;
}

.sidebar-menu a i {
    font-size: 18px;
    width: 20px;
}

.sidebar-menu .login-item {
    margin-top: 20px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #059669 100%);
    border-radius: 8px;
    margin-left: 20px;
    margin-right: 20px;
}

.sidebar-menu .login-item:hover {
    padding-left: 25px;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.sidebar-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-gray);
    font-size: 13px;
}

/* ============================================
   Mobile Overlay
============================================ */

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   Responsive Design
============================================ */

@media (max-width: 1024px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 20px;
    }
    
    .nav-logo img {
        height: 35px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .mobile-sidebar {
        width: 85%;
    }
}

/* ============================================
   Animations
============================================ */

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   Accessibility
============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
.nav-link:focus,
.mobile-toggle:focus,
.close-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}
