/* ============================================
   SEOGraz - Mega-Menu Navigation
   ============================================ */

/* Mega-Menu Trigger */
.nav-wissen {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    text-decoration: none;
    padding: 0.5rem 0;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
    background: none;
    border: none;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-wissen::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(255,255,255,0.6);
    transition: transform 0.2s ease;
}

.nav-wissen:hover,
.nav-wissen[aria-expanded="true"] {
    color: #fff;
}

.nav-wissen[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Mega-Menu Panel */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-warm);
    border-top: 3px solid var(--accent-warm);
    box-shadow: 0 8px 30px rgba(26, 60, 52, 0.12);
    padding: 2rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    z-index: 200;
}

.mega-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Category Block in Mega-Menu */
.mega-menu-category {
    padding-bottom: 1rem;
}

.mega-menu-category h3 {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 0.6rem;
    margin-top: 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
}

.mega-menu-category h3 a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.mega-menu-category h3 a:hover {
    color: var(--accent-warm);
}

.mega-menu-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-category li {
    margin-bottom: 0.3rem;
}

.mega-menu-category a {
    color: var(--text-soft);
    font-size: 0.88rem;
    text-decoration: none;
    transition: color 0.15s ease;
    display: inline-block;
    padding: 0.1rem 0;
}

.mega-menu-category a:hover {
    color: var(--accent-warm);
}

.mega-menu-category .see-all {
    font-weight: 600;
    color: var(--accent);
    font-size: 0.82rem;
    margin-top: 0.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.mega-menu-category .see-all::after {
    content: '\2192';
    font-size: 0.9em;
}

.mega-menu-category .see-all:hover {
    color: var(--accent-warm);
}

/* Mega-Menu Overlay (click-outside to close) */
.mega-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 150;
    display: none;
}

.mega-menu-overlay.active {
    display: block;
}

/* Mobile Mega-Menu */
@media (max-width: 768px) {
    .nav-wissen {
        width: 100%;
        font-size: 1.1rem;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        color: rgba(255,255,255,0.8);
        justify-content: space-between;
    }

    .mega-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(255,255,255,0.05);
        border-top: none;
        box-shadow: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .mega-menu.open {
        max-height: 2000px;
    }

    .mega-menu-grid {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0.5rem 0 0.5rem 1rem;
    }

    .mega-menu-category {
        padding-bottom: 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .mega-menu-category h3 {
        color: rgba(255,255,255,0.9);
        border-bottom: none;
        padding: 0.75rem 0;
        margin: 0;
        font-size: 0.9rem;
    }

    .mega-menu-category h3 a {
        color: rgba(255,255,255,0.9);
    }

    .mega-menu-category ul {
        display: none;
    }

    .mega-menu-category .see-all {
        display: none;
    }
}
