/* ===== HACKNOW - PROFESSIONAL HEADER STYLES ===== */
/* Version: 3.0 | Author: Professional Frontend Developer */

/* ===== HEADER COMPONENT ===== */
header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-primary);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-normal);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    gap: var(--space-xl);
    min-height: 70px;
}

/* ===== ENHANCED LOGO ===== */
.logo a {
    font-family: var(--font-jersey);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-normal);
    white-space: nowrap;
    text-shadow: 0 0 15px var(--primary-glow);
    position: relative;
    display: inline-block;
}

.logo a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transition: width var(--transition-normal);
}

.logo a:hover::before {
    width: 100%;
}

.logo a:hover {
    color: var(--primary-light);
    text-shadow: 0 0 25px var(--primary-glow), 0 0 35px var(--primary-glow);
    transform: scale(1.05);
}

/* ===== ENHANCED NAVIGATION ===== */
.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-nav ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: clamp(14px, 1.5vw, 16px);
    font-weight: 500;
    flex-wrap: wrap;
}

.header-nav ul li {
    display: flex;
    align-items: center;
    position: relative;
}

.header-nav ul li a {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-normal);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    position: relative;
    white-space: nowrap;
    font-weight: 500;
    background: transparent;
    line-height: 1;
}

.header-nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transition: all var(--transition-normal);
    transform: translateX(-50%);
}

.header-nav ul li a:hover::before,
.header-nav ul li a:focus::before {
    width: 80%;
}

.header-nav ul li a:hover,
.header-nav ul li a:focus {
    color: var(--primary-color);
    background-color: var(--primary-transparent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.1);
}

/* ===== FIXED ICON ALIGNMENT ===== */
.header-nav ul li a .material-icons,
.header-nav ul li a .material-symbols-outlined {
    transition: transform var(--transition-normal);
    font-size: clamp(18px, 2vw, 22px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    line-height: 1;
}

.header-nav ul li a:hover .material-icons,
.header-nav ul li a:hover .material-symbols-outlined {
    transform: scale(1.1) rotate(5deg);
}

/* ===== ENHANCED DROPDOWN MENU ===== */
.dropdown {
    position: relative;
    display: block;
}

.dropbtn {
    background: none;
    border: none;
    font-size: clamp(14px, 1.5vw, 16px);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    white-space: nowrap;
    font-weight: 500;
    position: relative;
    font-family: inherit;
    line-height: 1;
}

/* ===== FIXED DROPDOWN ICON ALIGNMENT ===== */
.dropbtn .material-icons,
.dropbtn .material-symbols-outlined {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    line-height: 1;
    font-size: clamp(18px, 2vw, 22px);
}

.dropbtn::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: var(--space-xs);
    transition: transform var(--transition-normal);
    align-self: center;
    flex-shrink: 0;
}

.dropdown:hover .dropbtn::after {
    transform: rotate(180deg);
}

.dropbtn:hover,
.dropbtn:focus {
    background-color: var(--primary-transparent);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.1);
}

.dropbtn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--background-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-primary);
    min-width: 200px;
    z-index: var(--z-dropdown);
    backdrop-filter: blur(20px);
    animation: fadeInUp 0.3s ease;
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-normal);
    border-bottom: 1px solid var(--border-secondary);
    white-space: nowrap;
    line-height: 1;
}

.dropdown-content a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 0;
    background: var(--primary-color);
    transition: height var(--transition-normal);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover,
.dropdown-content a:focus {
    background-color: var(--primary-transparent);
    color: var(--primary-color);
    padding-left: calc(var(--space-md) + 8px);
}


/* ===== FIXED DROPDOWN CONTENT ICON ALIGNMENT ===== */
.dropdown-content a .material-icons,
.dropdown-content a .material-symbols-outlined {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    line-height: 1;
    font-size: clamp(16px, 1.8vw, 20px);
}

.dropdown-content a:hover .material-icons,
.dropdown-content a:hover .material-symbols-outlined {
    transform: scale(1.1);
}

/* ===== DESKTOP DROPDOWN BEHAVIOR ===== */
@media (min-width: 769px) {
    .dropdown:hover .dropdown-content,
    .dropdown.active .dropdown-content {
        display: block;
    }
    
    .dropdown-content:hover {
        display: block;
    }
}

/* ===== MOBILE DROPDOWN BEHAVIOR ===== */
@media (max-width: 768px) {
    .dropdown-content {
        position: static;
        background: transparent;
        border: none;
        box-shadow: none;
        display: none;
        animation: none;
    }
    
    .dropdown.active .dropdown-content {
        display: block;
    }
}

/* ===== BURGER MENU BUTTON ===== */
.burger {
    display: none;
    background: none;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    z-index: 1001;
}

.burger:hover {
    background-color: var(--primary-transparent);
    border-color: var(--primary-light);
    transform: scale(1.05);
}

.burger svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
    transition: all var(--transition-normal);
}

.burger:hover svg {
    color: var(--primary-light);
    transform: scale(1.1);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .header-container {
        padding: 0 var(--space-md);
    }
    
    .header-nav ul {
        gap: var(--space-lg);
    }
    
    .header-nav ul li a {
        padding: var(--space-xs) var(--space-sm);
    }
    
    .dropbtn {
        padding: var(--space-xs) var(--space-sm);
    }
}

@media (max-width: 1024px) {
    .header-nav ul {
        gap: var(--space-md);
    }
    
    .header-nav ul li a {
        font-size: 14px;
        padding: var(--space-xs);
    }
    
    .dropbtn {
        font-size: 14px;
        padding: var(--space-xs);
    }
    
    .logo a {
        font-size: clamp(1.5rem, 3.5vw, 2rem);
    }
}

@media (max-width: 768px) {
    .header-nav {
        display: none;
    }
    
    .burger {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .header-wrapper {
        gap: var(--space-md);
    }
    
    .logo a {
        font-size: clamp(1.3rem, 3vw, 1.8rem);
    }
    
    .burger svg {
        width: 20px;
        height: 20px;
    }
    
    .header-container {
        padding: 0 var(--space-sm);
    }
}

@media (max-width: 480px) {
    .header-wrapper {
        gap: var(--space-sm);
        min-height: 60px;
    }
    
    .logo a {
        font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    }
    
    .burger {
        padding: 6px;
    }
    
    .burger svg {
        width: 18px;
        height: 18px;
    }
    
    .header-container {
        padding: 0 var(--space-xs);
    }
}

/* ===== SIDEBAR STYLES ===== */
.sideBar-frame {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.sideBar-frame.active {
    display: block;
    opacity: 1;
}

.sideBar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 350px;
    height: 100vh;
    background: linear-gradient(135deg, var(--background-primary), var(--background-secondary));
    border-left: 1px solid var(--border-primary);
    box-shadow: var(--shadow-primary);
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    overflow-y: auto;
    z-index: 1001;
}

.sideBar-frame.active .sideBar {
    transform: translateX(0);
}

.sideBar .head {
    display: flex;
    justify-content: flex-end;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-secondary);
}

.closeSideBar_btn {
    background: none;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.closeSideBar_btn:hover {
    background-color: var(--primary-transparent);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.closeSideBar_btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
}

.sideBar .menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sideBar .menu li {
    border-bottom: 1px solid var(--border-secondary);
}

.sideBar .menu li a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-normal);
    font-weight: 500;
    line-height: 1;
}

.sideBar .menu li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 0;
    background: var(--primary-color);
    transition: height var(--transition-normal);
}

.sideBar .menu li a:hover {
    padding-left: calc(var(--space-lg) + 8px);
}

.sideBar .menu li a:hover::before {
    height: 100%;
}

/* ===== FIXED SIDEBAR ICON ALIGNMENT ===== */
.sideBar .menu .material-icons,
.sideBar .menu .material-symbols-outlined {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    line-height: 1;
    font-size: clamp(18px, 2vw, 22px);
    color: var(--text-primary);
    transition: all var(--transition-normal);
}

.sideBar .menu li a:hover .material-icons,
.sideBar .menu li a:hover .material-symbols-outlined {
    transform: scale(1.1);
}

/* ===== SIDEBAR DROPDOWN STYLES ===== */
.sideBar-frame .dropdown-content {
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    display: none;
    animation: none;
    padding-left: var(--space-lg);
}

.sideBar-frame .dropdown.active .dropdown-content {
    display: block;
}

.sideBar-frame .dropdown-content a {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-secondary);
}

.sideBar-frame .dropdown-content a:hover {
    color: var(--primary-color);
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .sideBar,
    .sideBar-frame,
    .dropdown-content,
    .header-nav ul li a,
    .dropbtn {
        transition: none;
    }
}

.header-nav ul li a:focus,
.dropbtn:focus,
.sideBar .menu li a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-contrast: high) {
    header {
        border-bottom: 2px solid var(--primary-color);
    }
    
    .dropdown-content {
        border: 2px solid var(--primary-color);
    }
    
    .sideBar {
        border-left: 2px solid var(--primary-color);
    }
}

/* ===== SCROLL EFFECTS ===== */
header.scrolled {
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(30px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

/* ===== LOADING STATES ===== */
.header-nav ul li a.loading,
.dropbtn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.header-nav ul li a.loading::after,
.dropbtn.loading::after {
    content: '';
    position: absolute;
    right: var(--space-xs);
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}