/*
 * HEADER ICON NAVIGATION — Soft Sage × Deep Olive
 * Version: 2.0
 * Letzte Änderung: 2026-02
 */

/* ============================================
   HEADER STRUKTUR
   ============================================ */

.site-header {
    width: 100%;
    max-width: 100%;
}

/* Block 1: Ticker */
.ticker-wrap-container {
    width: 100%;
    height: 48px;
    background-color: var(--ticker-bg, #0E1A0B);
    border-bottom: 1px solid var(--ticker-border-color, #1F3519);
}

/* Block 2: Icon Navigation */
.main-header-content {
    width: 100%;
    max-width: 1200px;
    height: 96px;
    background-color: var(--header-bg, #1A2517);
    display: flex;
    align-items: center;
    padding: 0 12px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ============================================
   ICON NAVIGATION LAYOUT
   ============================================ */

.header-inner-group {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Logo: klein neben Navigation */
.logo-link {
    display: inline-block;
    margin-right: 12px;
    flex-shrink: 0;
}

.site-logo {
    height: 44px;
    width: auto;
    display: block;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}
.logo-link:hover .site-logo { opacity: 1; }

/* Navigation Container */
.main-nav {
    width: 100%;
    display: flex;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    width: 100%;
    justify-content: center;
}

/* ============================================
   ICON ITEMS (Icon + Text)
   ============================================ */

.main-nav li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
    max-width: 96px;
    margin: 0;
    padding: 0;
}

.main-nav li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 70px;
    text-decoration: none;
    position: relative;
    padding-top: 6px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.main-nav li a:hover {
    background-color: rgba(172, 200, 162, 0.08);
}

/* Icon via ::before */
.main-nav li a::before {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 3px;
    flex-shrink: 0;
    border-radius: 4px;
    /* Fallback-Hintergrund bis Icons geladen */
    background-color: rgba(172, 200, 162, 0.15);
}

/* Icon Bilder */
.main-nav li:nth-child(1) a::before { background-image: url('../images/ui/start-icon.png'); }
.main-nav li:nth-child(2) a::before { background-image: url('../images/ui/images-icon.png'); }
.main-nav li:nth-child(3) a::before { background-image: url('../images/ui/video-icon.png'); }
.main-nav li:nth-child(4) a::before { background-image: url('../images/ui/audio-icon.png'); }
.main-nav li:nth-child(5) a::before { background-image: url('../images/ui/games-icon.png'); }
.main-nav li:nth-child(6) a::before { background-image: url('../images/ui/kontakt-icon.png'); }
.main-nav li:nth-child(7) a::before { background-image: url('../images/ui/register-icon.png'); }

/* ============================================
   TEXT UNTER ICONS
   ============================================ */

.main-nav li a span {
    font-size: 9px;
    font-weight: 500;
    color: var(--color-sage-500, #72976C);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
    white-space: nowrap;
    font-family: var(--font-heading);
    transition: color 0.2s ease;
}

/* Aktive Seite — Soft Sage */
.main-nav li a.active::before,
.main-nav li a[aria-current="page"]::before {
    background-color: rgba(172, 200, 162, 0.2);
}

.main-nav li a.active span,
.main-nav li a[aria-current="page"] span {
    color: var(--accent-color, #ACC8A2);
    font-weight: 700;
}

/* Aktiv-Indikator: deaktiviert */
.main-nav li a.active::after,
.main-nav li a[aria-current="page"]::after {
    display: none;
}

/* Hover Text */
.main-nav li a:hover span {
    color: var(--accent-color, #ACC8A2);
}

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */

.header-controls {
    display: flex;
    align-items: center;
    margin-left: auto;
    padding-right: 8px;
    flex-shrink: 0;
}

.theme-toggle-button {
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid rgba(172, 200, 162, 0.3);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--accent-color, #ACC8A2);
    transition: all 0.25s ease;
}

.theme-toggle-button:hover {
    background-color: rgba(172, 200, 162, 0.1);
    border-color: rgba(172, 200, 162, 0.6);
    transform: scale(1.05);
}

.theme-toggle-button:active {
    transform: scale(0.95);
}

/* ============================================
   RESPONSIVE — Schmal (< 768px)
   ============================================ */

@media (max-width: 768px) {
    .main-header-content {
        height: 75px;
        padding: 0 8px;
    }

    .main-nav li {
        max-width: 72px;
    }

    .main-nav li a {
        min-height: 56px;
    }

    .main-nav li a::before {
        width: 32px;
        height: 32px;
    }

    .main-nav li a span {
        font-size: 8px;
    }

    .logo-link {
        display: none;
    }
}

/* ============================================
   DARK MODE (nutzt CSS-Variablen automatisch)
   ============================================ */

[data-theme="dark"] .main-nav li a span {
    color: var(--color-sage-600, #577B51);
}

[data-theme="dark"] .main-nav li a.active span,
[data-theme="dark"] .main-nav li a[aria-current="page"] span {
    color: var(--accent-color, #ACC8A2);
}

/* ============================================
   OVERRIDES für main.css Konflikte
   ============================================ */

/* Separator-Striche ("-") zwischen Nav-Items entfernen */
.site-header .main-nav li:not(:last-child)::after {
    display: none;
}

/* Border-bottom Linie unter aktivem/gehoverten Link entfernen */
.site-header .main-nav li a,
.site-header .main-nav li a.active,
.site-header .main-nav li a:hover {
    border-bottom: none;
    text-decoration: none;
}
