/* ==============================
   WILA SECOND HEADER (Sub Navigation)
================================ */

.wila-sh {
    --wsh-top: 80px;
    --wsh-z: 999;
    --wsh-scroll-offset: 145px;
    --wsh-active-weight: 700;
    --wsh-ul-color: #0d3b36;
    --wsh-ul-h: 2px;
    --wsh-ul-bottom: 9px;

    position: relative;
    width: 100%;
}

.wila-sh,
.wila-sh * {
    box-sizing: border-box;
}

/* Bar */

.wila-sh__bar {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    z-index: var(--wsh-z);
}

/* Stuck state (toggled by JS; works regardless of parent container height) */

.wila-sh.is-stuck .wila-sh__bar {
    position: fixed;
    top: var(--wsh-top);
    left: 0;
    right: 0;
}

/* Inner scroll container */

.wila-sh__inner {
    max-width: 1280px;
    min-height: 52px;
    margin: 0 auto;
    padding: 0 15px;

    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 32px;

    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;

    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
}

.wila-sh__inner::-webkit-scrollbar {
    display: none;
}

/* Alignment (auto margins keep overflow scrollable on small screens) */

.wila-sh-align-center .wila-sh__link:first-of-type,
.wila-sh-align-end .wila-sh__link:first-of-type {
    margin-left: auto;
}

.wila-sh-align-center .wila-sh__link:last-of-type {
    margin-right: auto;
}

/* Links */

.wila-sh__link {
    position: relative;
    flex-shrink: 0;

    display: inline-flex;
    align-items: center;

    padding: 17px 0 15px;

    color: #334155;
    font-family: "Plus Jakarta Sans", Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;

    text-decoration: none;
    box-shadow: none;
    cursor: pointer;

    transition: color 0.25s ease;
}

.wila-sh__link:hover,
.wila-sh__link:focus-visible,
.wila-sh__link.is-active {
    color: #0d3b36;
    text-decoration: none;
}

.wila-sh__link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Label — reserves bold width so the bar doesn't shift on hover/active */

.wila-sh__label {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.wila-sh__label::before {
    content: attr(data-text);
    content: attr(data-text) / "";
    height: 0;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
    user-select: none;
    font-weight: var(--wsh-active-weight);
}

.wila-sh__link:hover .wila-sh__label,
.wila-sh__link:focus-visible .wila-sh__label,
.wila-sh__link.is-active .wila-sh__label {
    font-weight: var(--wsh-active-weight);
}

/* Sliding underline — a single indicator that follows the active item */

.wila-sh__indicator {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: var(--wsh-ul-h);

    background: var(--wsh-ul-color);
    border-radius: 20px;

    pointer-events: none;
    will-change: transform, width;
}

.wila-sh.is-ready .wila-sh__indicator {
    transition: transform 0.3s ease, width 0.3s ease;
}

/* Hover underline — grows from the center on non-active links (the active link uses the sliding indicator) */

.wila-sh__link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: var(--wsh-ul-bottom);

    width: 0;
    height: var(--wsh-ul-h);

    background: var(--wsh-ul-color);
    border-radius: 20px;

    transform: translateX(-50%);
    transition: width 0.25s ease;
    pointer-events: none;
}

.wila-sh__link:not(.is-active):hover::after,
.wila-sh__link:not(.is-active):focus-visible::after {
    width: 100%;
}

@media (prefers-reduced-motion: reduce) {
    .wila-sh__link,
    .wila-sh__link::after,
    .wila-sh.is-ready .wila-sh__indicator {
        transition: none;
    }
}

/* Tablet */

@media (max-width: 1024px) {
    .wila-sh__inner {
        gap: 26px;
    }

    .wila-sh__link {
        font-size: 13px;
    }
}

/* Mobile */

@media (max-width: 767px) {
    .wila-sh {
        --wsh-top: 70px;
        --wsh-ul-bottom: 7px;
    }

    .wila-sh__inner {
        min-height: 48px;
        padding: 0 16px;
        gap: 25px;
    }

    .wila-sh__link {
        font-size: 12px;
        padding: 15px 0 13px;
    }
}