/* =====================================================
   SHARED SITE NAVIGATION
   Used by index.html, bugs.html, and future pages.
   ===================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    background-color: #2c444e;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-title {
    font-family: Georgia, serif;
    font-size: 2.5rem;
    color: #ffffff;
    letter-spacing: 1px;
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.6);
    margin-bottom: 8px;
}

.nav-menu {
    display: flex;
    gap: 25px;
    justify-content: center;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
    opacity: 0.85;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
    color: #e5e5e5;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

/* Dropdown items appear below the heading on desktop. */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #0b0b0b;
    min-width: 140px;
    padding: 5px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 2000;
}

.dropdown-content a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    text-align: center;
    padding: 8px 12px;
    font-size: 0.95rem;
    white-space: nowrap;
}

.dropdown-content a:hover,
.dropdown-content a.active-sub {
    background-color: #333333;
    color: #ffffff;
}

/* Hidden on desktop; shown on narrow screens. */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

@media (min-width: 769px) {
    .dropdown:hover .dropdown-content,
    .dropdown:focus-within .dropdown-content {
        display: block;
    }
}

/* Mobile menu: tap the hamburger, then tap a category. */
@media (max-width: 768px) {
    .site-header {
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 20px;
    }

    .header-title {
        font-size: 1.6rem;
        margin-bottom: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        box-sizing: border-box;
        background-color: #2c444e;
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-link {
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        padding: 15px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    .dropdown {
        width: 100%;
    }

    .dropdown-content {
        position: static;
        transform: none;
        min-width: 0;
        width: 100%;
        box-shadow: none;
    }

    .dropdown.mobile-open .dropdown-content {
        display: block;
    }

    .dropdown-content a {
        padding: 12px 20px;
    }
}
