.subnav {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(10, 10, 12, 0.96);
}

.subnav-fixed {
    position: fixed;
    top: var(--header-height, 60px);
    left: 0;
    right: 0;
    z-index: 999;
    margin-top: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Calculate subnav height (approximately 50px including padding and borders) */
:root {
    --subnav-height: 50px;
}

/* Add padding to site-content when subnav is fixed to prevent content overlap */
body:has(.subnav-fixed) .site-content {
    padding-top: calc(var(--header-height, 60px) + var(--subnav-height, 50px));
}

/* Fallback for browsers without :has() support */
.subnav-fixed ~ .site-content {
    padding-top: calc(var(--header-height, 60px) + var(--subnav-height, 50px));
}

/* Same horizontal spacing as .fullwidth (homepage) – no centered max-width */
.subnav-inner {
    width: 100%;
    margin: 0;
    padding: 0 var(--gap, 24px);
    display: flex;
    justify-content: flex-start;
}

.subnav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 10px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.subnav-menu::-webkit-scrollbar {
    height: 4px;
}

.subnav-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
}

.subnav-item a {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.subnav-item a:hover {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.4);
}

.subnav-item.is-active a {
    color: #ffffff;
    border-bottom-color: var(--color-accent, #a8d5ba);
}


