/* Horizontal scrolling submenu */
.submenu-container {
    width: 100%;
    /* prevent flexbox from collapsing this to 0 height on tall pages (overflow-y:hidden gives it an auto min-height of 0) */
    flex: 0 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    background: white;
    border-bottom: 3px solid var(--highlight-color, #ccc);
    box-sizing: border-box;
}

.submenu-list {
    display: flex;
    list-style: none;
    margin: 0;
    /* calc() offset matches the heading's ~880-1600px ramp band so both scale together */
    padding: clamp(6px, calc(0.417vw + 2.33px), 9px) clamp(8px, calc(0.556vw + 3.11px), 12px);
    gap: clamp(5px, calc(0.417vw + 1.33px), 8px);
    min-width: min-content; /* allow horizontal scrolling */
}

.submenu-item {
    flex: 0 0 auto; /* don't shrink */
}

.submenu-item button {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 20px;
    padding: clamp(6px, calc(0.417vw + 2.33px), 9px) clamp(12px, calc(1.111vw + 2.22px), 20px);
    font-family: 'Quattrocento Sans', sans-serif;
    font-size: clamp(12px, calc(0.556vw + 7.11px), 16px);
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.submenu-item button:hover {
    background: #f0f0f0;
    border-color: var(--highlight-color, #999);
    transform: translateY(-2px);
}

.submenu-item.is-active button {
    background: var(--highlight-color, #ccc);
    color: #fff;
    border-color: var(--highlight-color, #ccc);
}