/* Header Styles - Shared across all pages */
header {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    border-bottom: 1px solid #2a2a2e;
    position: sticky;
    top: 0;
    z-index: 998;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    height: 90px;
    min-height: 90px;
}

/* Hide nav inside header-container - it should be outside */
header .header-container nav,
.header-container > nav {
    display: none !important;
    visibility: hidden !important;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-img {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.site-title {
    font-size: 1.5em;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

/* Sidebar Menu Toggle Button */
.sidebar-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s ease;
}

.sidebar-menu-toggle:hover {
    opacity: 0.8;
}

.sidebar-menu-toggle span {
    width: 100%;
    height: 3px;
    background: #b0b0b0;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.sidebar-menu-toggle:hover span {
    background: #00d4ff;
}

.sidebar-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(9px, 9px);
    background: #00d4ff;
}

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

.sidebar-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
    background: #00d4ff;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Sidebar Navigation - Completely hidden by default */
nav:not(.active) {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 280px !important;
    max-width: 85vw;
    height: 100vh !important;
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%) !important;
    border-right: 1px solid #2a2a2e;
    z-index: 1001 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    will-change: transform;
    pointer-events: none !important;
    display: block !important;
    visibility: visible;
    /* Prevent any horizontal display */
    flex-direction: column !important;
}

/* Hide nav if it's incorrectly placed inside header-container */
header .header-container nav,
.header-container > nav {
    display: none !important;
    visibility: hidden !important;
    position: static !important;
    transform: none !important;
}

/* Show nav when it's correctly placed (sibling of header-container) */
header > nav {
    display: block !important;
}

nav.active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 280px !important;
    max-width: 85vw;
    height: 100vh !important;
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%) !important;
    border-right: 1px solid #2a2a2e;
    z-index: 1001 !important;
    transform: translateX(0) !important;
    pointer-events: auto !important;
    display: block !important;
    visibility: visible !important;
}

nav ul {
    display: flex !important;
    flex-direction: column !important;
    list-style: none !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 20px 0 !important;
    /* Prevent horizontal layout */
    flex-wrap: nowrap !important;
    width: 100% !important;
}

nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    width: 100% !important;
    display: block !important;
}

nav li:last-child {
    border-bottom: none;
}

nav a {
    color: #b0b0b0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 14px 20px;
    font-size: 0.95em;
    position: relative;
}

nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #00d4ff, #7b2cbf);
    opacity: 0;
    transition: opacity 0.3s ease;
}

nav a:hover,
nav a.active {
    color: #ffffff;
    background: rgba(0, 212, 255, 0.1);
    padding-left: 24px;
}

nav a:hover::before,
nav a.active::before {
    opacity: 1;
}

nav a.active {
    background: rgba(0, 212, 255, 0.15);
    font-weight: 600;
}

.new-badge {
    display: inline-block;
    background: linear-gradient(135deg, #00d4ff, #7b2cbf);
    color: #ffffff;
    font-size: 0.65em;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 212, 255, 0.3);
}

/* Language Switcher in Sidebar */
nav .language-switcher {
    margin: 15px 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

nav .language-switcher select {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.9em;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .header-container {
        height: 64px;
        padding: 0 15px;
    }

    .logo-img {
        height: 50px;
    }

    .site-title {
        font-size: 1.1em;
    }

    nav {
        width: 260px;
        max-width: 80vw;
    }

    nav a {
        padding: 12px 18px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .header-container {
        height: 56px;
        padding: 0 12px;
    }

    .logo-img {
        height: 44px;
    }

    .site-title {
        font-size: 0.95em;
    }

    nav {
        width: 240px;
        max-width: 75vw;
    }

    nav a {
        padding: 12px 16px;
        font-size: 0.85em;
    }
}



/* Language Switcher */
.language-switcher {
    margin: 0;
}

.language-switcher select {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #e0e0e0;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    width: 100%;
}

.language-switcher select:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.5);
}

.language-switcher select:focus {
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

.language-switcher option {
    background: #1a1a1a;
    color: #e0e0e0;
    padding: 8px 12px;
    font-weight: 500;
}

.language-switcher option:checked {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    font-weight: 600;
}
