/* ==========================================================================
   RESPONSIVE NAVIGATION SYSTEM
   Modern, adaptive navigation that works on all screen sizes
   ========================================================================== */

/* --- HEADER LAYOUT --- */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    background: rgba(10, 20, 20, 0.98);
    border-bottom: 2px solid #557777;
    flex-shrink: 0;
    gap: 20px;
    height: 40px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* Logo / Site Title - Left side */
.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    height: 100%;
}

.site-logo .logo-text {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ccffff;
    text-shadow: 0 0 5px #00ffff;
    white-space: nowrap;
    margin: 0;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.site-logo .logo-text:hover {
    text-decoration: none;
    color: #ffffff;
    text-shadow: 0 0 8px #00ffff;
}

/* Navigation Container */
#main-nav {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: flex-end;
    height: 100%;
}

#main-nav .nav-links {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    height: 100%;
}

#main-nav .nav-link {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 15px;
    margin: 0;
    border-top: 2px solid transparent; /* Balance */
    border-bottom: 2px solid transparent;
    background-color: transparent;
    color: #88aaaa; /* Dimmer default */
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

#main-nav .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: #334444;
}
#main-nav .nav-link:first-child::before { display: none; }

#main-nav .nav-link:hover {
    color: #ccffff;
    background-color: rgba(0, 255, 255, 0.05);
    text-shadow: 0 0 5px #00ffff;
}

#main-nav .nav-link.active {
    color: #00ffff;
    text-shadow: 0 0 8px #00ffff;
    border-bottom: 2px solid #00ffff;
    background-color: rgba(0, 255, 255, 0.05);
}

/* Hamburger Menu Button - Hidden by default */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid #557777;
    cursor: pointer;
    z-index: 1001;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background-color: #aaffee;
    margin: 3px 0;
    transition: all 0.3s ease;
}

.nav-toggle:hover {
    border-color: #00ffff;
}

.nav-toggle:hover span {
    background-color: #00ffff;
}

/* Hamburger animation when open */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* --- TABLET BREAKPOINT --- */
@media (max-width: 1024px) {
    .site-header {
        padding: 0 10px;
    }
    
    #main-nav .nav-link {
        padding: 0 8px;
        font-size: 1rem;
    }
}

/* --- MOBILE BREAKPOINT --- */
@media (max-width: 768px) {
    .site-header {
        flex-wrap: nowrap;
        padding: 0 10px;
    }
    
    .site-logo .logo-text {
        font-size: 1.2rem;
    }
    
    /* Show hamburger menu */
    .nav-toggle {
        display: flex;
    }
    
    /* Mobile navigation panel */
    #main-nav {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(5, 10, 15, 0.98);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 50px;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        backdrop-filter: blur(5px);
    }
    
    #main-nav.nav-open {
        transform: translateX(0);
        box-shadow: 4px 0 15px rgba(0,0,0,0.5);
    }
    
    #main-nav .nav-links {
        flex-direction: column;
        width: 100%;
        padding: 20px 0;
        gap: 0;
        height: auto;
    }
    
    #main-nav .nav-link {
        display: flex;
        width: 100%;
        height: auto;
        padding: 15px 20px;
        font-size: 1.3rem;
        text-align: center;
        justify-content: center;
        border-top: none;
        border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    }
    
    #main-nav .nav-link:first-child {
        border-top: 1px solid rgba(0, 255, 255, 0.1);
    }
    
    #main-nav .nav-link::before {
        display: none;
    }
    
    #main-nav .nav-link.active {
        background-color: rgba(0, 255, 255, 0.1);
        border-bottom: 1px solid #00ffff;
        color: #ffffff;
    }
    
    /* Mobile nav header inside panel */
    .mobile-nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 20px;
        border-bottom: 1px dashed #557777;
        margin-bottom: 10px;
    }
    
    .mobile-nav-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: transparent;
        border: 1px solid #557777;
        color: #aaffee;
        font-size: 1.5rem;
        cursor: pointer;
    }
    
    .mobile-nav-close:hover {
        border-color: #00ffff;
        color: #00ffff;
    }
}

/* --- SMALL MOBILE BREAKPOINT --- */
@media (max-width: 480px) {
    .site-header {
        padding: 8px;
    }
    
    .site-logo .logo-text {
        font-size: 1.1rem;
    }
    
    .nav-toggle {
        width: 36px;
        height: 36px;
        padding: 6px;
    }
    
    .nav-toggle span {
        width: 18px;
        height: 2px;
        margin: 2px 0;
    }
    
    #main-nav .nav-link {
        font-size: 1.1rem;
        padding: 10px 12px;
    }
}

/* ==========================================================================
   CONTENT AREA ADJUSTMENTS FOR NEW LAYOUT
   ========================================================================== */

/* Adjust app-container to work with new header */
.responsive-layout #app-container {
    padding-top: 0;
}

.responsive-layout #data-views {
    padding-top: 10px;
}

/* Remove old navigation styling when using new layout */
.responsive-layout #navigation {
    display: none;
}

/* Adjust title for inline header */
.responsive-layout .page-title {
    display: none; /* Title is now in header */
}

/* Page subtitle adjustments */
.responsive-layout .subtitle {
    margin-top: 5px;
}

/* Search bar adjustments */
.responsive-layout .search-input {
    margin-top: 10px;
}

/* List container takes more space */
.responsive-layout .list-container {
    margin-top: 8px;
    padding-top: 10px;
}

/* Page content adjustments */
.responsive-layout .page-content {
    padding: 8px 15px;
}

/* ==========================================================================
   BODY SCROLL LOCK FOR MOBILE NAV
   ========================================================================== */

body.nav-open {
    overflow: hidden;
}

/* ==========================================================================
   SEASONAL THEME SUPPORT
   ========================================================================== */

html[data-season-preload] .site-logo .logo-text,
body[data-season] .site-logo .logo-text {
    color: var(--season-text);
    text-shadow: var(--season-text-shadow);
}

html[data-season-preload] #main-nav .nav-link,
body[data-season] #main-nav .nav-link {
    color: var(--season-text);
    text-shadow: 0 0 2px var(--season-glow);
}

html[data-season-preload] #main-nav .nav-link:hover,
body[data-season] #main-nav .nav-link:hover {
    color: var(--season-accent);
    text-shadow: 0 0 5px var(--season-glow);
    background-color: var(--season-background);
}

html[data-season-preload] #main-nav .nav-link.active,
body[data-season] #main-nav .nav-link.active {
    color: var(--season-primary);
    text-shadow: 0 0 8px var(--season-glow), 0 0 12px var(--season-glow);
    border-bottom-color: var(--season-primary);
}

html[data-season-preload] .nav-toggle span,
body[data-season] .nav-toggle span {
    background-color: var(--season-text);
}

html[data-season-preload] .nav-toggle:hover span,
body[data-season] .nav-toggle:hover span {
    background-color: var(--season-primary);
}
