/* Universal SceneLink Header - Canonical Styling */
/* Single Source of Truth for All Header Styles */

/* CSS Variables */
:root {
    --accent-gold: #D4AF37;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --bg-dark: #0a0a0a;
    --bg-header: rgba(20, 20, 20, 0.95);
    --border-gold: rgba(212, 175, 55, 0.1);
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Base Header Structure */
.header-enhanced {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-header);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-gold);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-enhanced {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-xl);
    max-width: 1400px;
    margin: 0 auto;
    height: 70px;
}

/* Navigation Layout */
.nav-left {
    flex-shrink: 0;
}

.nav-center {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--spacing-xl);
    flex: 1;
    justify-content: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-shrink: 0;
}

/* Logo Styling - Enhanced */
.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
    transform: scale(1.3);
}

.logo-container:hover {
    transform: scale(1.35);
}

.logo-main {
    height: 58px;
    width: auto;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.3));
}

/* Navigation Links */
.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.1);
}

.nav-link.active {
    color: var(--accent-gold);
    font-weight: 600;
}

/* Active State Underline - Perfectly Aligned */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--accent-gold);
    border-radius: 2px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 30px;
        opacity: 1;
    }
}

/* Navigation Icon Buttons - Enhanced for Consistency */
.nav-icon-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: rgba(212, 175, 55, 0.05) !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    color: var(--accent-gold) !important;
    stroke: var(--accent-gold) !important;
    fill: var(--accent-gold) !important;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.nav-icon-btn:hover {
    color: #F4E4A6 !important;
    stroke: #F4E4A6 !important;
    fill: #F4E4A6 !important;
    border-color: var(--accent-gold) !important;
    background: rgba(212, 175, 55, 0.15) !important;
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3) !important;
}

/* Icon-Specific Animations */
.nav-social-feed:hover {
    transform: translateY(-2px) rotate(-10deg);
}

.nav-my-lists:hover {
    animation: heartbeat 0.6s ease;
}

.nav-profile:hover {
    transform: translateY(-2px) rotate(10deg);
}

@keyframes heartbeat {
    0%, 100% { transform: translateY(-2px) scale(1); }
    50% { transform: translateY(-2px) scale(1.1); }
}

/* Sign Up Button */
.btn-header-primary {
    background: linear-gradient(135deg, var(--accent-gold), #b8941f);
    color: var(--bg-dark);
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-header-primary:hover {
    background: linear-gradient(135deg, #b8941f, var(--accent-gold));
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover span {
    background: var(--accent-gold);
}

/* Mobile Responsive Design */
@media (max-width: 1024px) {
    .nav-center {
        gap: var(--spacing-lg);
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}

@media (max-width: 768px) {
    .nav-enhanced {
        padding: 0 var(--spacing-md);
        height: 65px;
    }
    
    .nav-center {
        display: none;
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        background: rgba(20, 20, 20, 0.98);
        flex-direction: column;
        gap: 0;
        padding: var(--spacing-lg);
        border-bottom: 1px solid var(--border-gold);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        z-index: 999;
    }
    
    .nav-center.active {
        display: flex;
    }
    
    .nav-link {
        display: block;
        width: 100%;
        padding: var(--spacing-md);
        border-radius: var(--radius-md);
        text-align: center;
        font-size: 1rem;
    }
    
    .nav-link.active::after {
        display: none;
    }
    
    .nav-link.active {
        background: rgba(212, 175, 55, 0.2);
        border: 1px solid var(--accent-gold);
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-right {
        gap: var(--spacing-sm);
    }
    
    .nav-icon-btn {
        width: 35px;
        height: 35px;
    }
    
    .logo-main {
        height: 35px;
    }
    
    .btn-header-primary {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .nav-enhanced {
        padding: 0 var(--spacing-sm);
    }
    
    .logo-main {
        height: 30px;
    }
    
    .nav-icon-btn {
        width: 30px;
        height: 30px;
    }
    
    .nav-icon-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .btn-header-primary {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.75rem;
    }
}

/* Enhanced Hover Effects */
.nav-icon-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.nav-icon-btn:hover::before {
    width: 100%;
    height: 100%;
}

/* Scroll Effects */
.header-enhanced.scrolled {
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

/* Focus States for Accessibility */
.nav-link:focus,
.nav-icon-btn:focus,
.btn-header-primary:focus,
.mobile-menu-btn:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Loading Animation */
.nav-link, .nav-icon-btn, .btn-header-primary {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.nav-link:nth-child(1) { animation-delay: 0.1s; }
.nav-link:nth-child(2) { animation-delay: 0.15s; }
.nav-link:nth-child(3) { animation-delay: 0.2s; }
.nav-link:nth-child(4) { animation-delay: 0.25s; }
.nav-link:nth-child(5) { animation-delay: 0.3s; }
.nav-link:nth-child(6) { animation-delay: 0.35s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Menu Animation */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}