/* ==========================================================================
   Site B Detail Bar
   Structured for clarity and responsive behaviour
   ========================================================================== */

/* 01. Design Tokens ------------------------------------------------------ */
:root {
    --header-h: 90px;
    --sb-max-width: 1650px;
    --sb-nav-gap: 18px;
    --sb-nav-font-size: 17px;
    --detailbar-mobile-offset: clamp(36px, 11vw, 96px);
    --sb-dd-min-width: 220px;
}

/* 02. Header Shell ------------------------------------------------------- */
.sb-detailbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    width: 100%;
    color: #f0f0f0;
    background: rgba(30, 30, 30, 0.55);
    backdrop-filter: saturate(120%) blur(8px);
    will-change: transform, box-shadow, backdrop-filter;
    transition: transform 0.2s ease, box-shadow 0.2s ease, backdrop-filter 0.2s ease;
}

#site-header {
    background: transparent;
}

#site-header.detailbar--hidden,
#site-header.header--hidden,
.sb-detailbar.detailbar--hidden {
    transform: translateY(-100%);
}

#site-header.detailbar--at-top,
#site-header.header--at-top,
.sb-detailbar.detailbar--at-top {
    transform: translateY(0);
    box-shadow: none;
}

#site-header.detailbar--scrolled,
#site-header.header--scrolled,
.sb-detailbar.detailbar--scrolled {
    background: rgba(17, 17, 17, 0.92);
    color: #f0f0f0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

#site-header.detailbar--at-top {
    background: rgba(30, 30, 30, 0.55);
    color: #f0f0f0;
    box-shadow: none;
}

/* 03. Layout Blocks ------------------------------------------------------ */
.sb-bar-inner {
    max-width: var(--sb-max-width);
    margin: 0 auto;
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(12px, 2.5vw, 32px);
    padding: 0 clamp(16px, 3vw, 48px);
    position: relative;
}

.sb-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.sb-logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.sb-right {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.sb-user {
    display: inline-flex;
    align-items: center;
}

.sb-user-img {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    display: block;
    object-fit: cover;
}

/* 04. Navigation Track --------------------------------------------------- */
.sb-navWrap {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 8px;
    position: relative;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    overflow: visible;
}

.sb-navWrap::-webkit-scrollbar {
    display: none;
}

.sb-nav {
    display: flex;
    align-items: center;
    gap: var(--sb-nav-gap);
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: "Roboto", system-ui, sans-serif;
    font-weight: 700;
    font-size: var(--sb-nav-font-size);
    line-height: 1.2;
    white-space: nowrap;
    scroll-snap-type: none;
    overflow: visible;
    flex-wrap: nowrap;
    justify-content: center;
}

.sb-nav-arrow {
    display: none !important;
}

.sb-nav > li {
    position: relative;
    scroll-snap-align: center;
}

.sb-nav > li > a,
.sb-nav-btn,
.sb-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: inherit;
    text-decoration: none;
    background: transparent;
    border-radius: 6px;
    border: 0;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
    white-space: normal;
    text-wrap: balance;
    line-height: 1.25;
}

.sb-nav > li > a:hover,
.sb-nav-btn:hover,
.sb-nav__link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sb-nav-btn {
    font: inherit;
}

.sb-link-disabled {
    cursor: not-allowed;
    color: rgba(240, 240, 240, 0.62);
    background: rgba(240, 240, 240, 0.04);
}

.sb-nav__link.sb-link-disabled {
    background: rgba(240, 240, 240, 0.02);
}

.sb-link-disabled .sb-link-coming {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(240, 240, 240, 0.12);
    color: rgba(240, 240, 240, 0.7);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.sb-nav__link .sb-link-coming {
    display: none;
}

.sb-dd-item.sb-link-disabled {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
}

.sb-caret {
    width: 12px;
    height: 8px;
    opacity: 0.75;
    transform: translateY(1px);
}

.sb-nav-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(240, 240, 240, 0.06);
    color: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.sb-nav-arrow:hover {
    background: rgba(240, 240, 240, 0.12);
    border-color: rgba(255, 255, 255, 0.32);
}

.sb-nav-arrow:active {
    transform: scale(0.95);
}

.sb-nav-arrow svg {
    display: block;
}

/* 05. Dropdown Menu ------------------------------------------------------ */
.sb-has-dd {
    position: relative;
}

.sb-dd {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    padding: 10px;
    min-width: var(--sb-dd-min-width);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
    z-index: 9999999;
}

.sb-dd-item {
    display: block;
    padding: 8px 10px;
    color: #f0f0f0;
    text-decoration: none;
    border-radius: 6px;
    font: 600 15px/1.2 "Roboto", system-ui, sans-serif;
}

.sb-dd-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sb-dd-sep {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    margin: 6px 0;
}

/* 06. Language Switcher -------------------------------------------------- */
.sb-lang {
    position: relative;
}

.sb-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 12px;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: inherit;
}

.sb-lang-code {
    font: 600 20px/24px "Lato", system-ui, sans-serif;
    color: inherit;
}

.sb-lang-caret {
    width: 13px;
    height: 10px;
    transform: rotate(180deg);
}

.sb-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    padding: 6px;
    min-width: 64px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

.sb-lang-item {
    display: block;
    padding: 6px 10px;
    color: #f0f0f0;
    text-decoration: none;
    font: 600 16px/22px "Lato", system-ui, sans-serif;
    border-radius: 4px;
}

.sb-lang-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sb-lang-item.is-current {
    background: rgba(249, 193, 82, 0.18);
    border: 1px solid rgba(249, 193, 82, 0.6);
    color: #f9c152;
    font-weight: 700;
    cursor: default;
}

/* 07. Legacy Cleanup ----------------------------------------------------- */
.pill-rail,
.navpill {
    display: none !important;
}

/* 08. Hero Integration --------------------------------------------------- */
.sb-hero-bg {
    position: relative;
    min-height: 700px;
    background: #0f0f10 url("/static/_themes/site-b/img/hero/hero.png") center/cover no-repeat;
    overflow: hidden;
    margin-top: calc(-1 * var(--header-h));
    padding-top: var(--header-h);
}

@media (max-width: 1024px) {
    .sb-hero-bg {
        min-height: 460px;
    }
}

/* 09. Responsive --------------------------------------------------------- */
@media (max-width: 1400px) {
    :root {
        --sb-nav-gap: 20px;
        --sb-nav-font-size: 17px;
    }
    .sb-logo-img {
        height: 38px;
    }
}

@media (max-width: 1260px) {
    .sb-logo {
        margin-left: 18px;
    }
    .sb-right {
        margin-right: 18px;
        gap: 10px;
    }
    :root {
        --sb-nav-gap: 14px;
        --sb-nav-font-size: 16px;
    }
}

@media (max-width: 1140px) {
    :root {
        --sb-nav-gap: 16px;
        --sb-nav-font-size: 16px;
    }
    .sb-nav > li > a,
    .sb-nav-btn,
    .sb-nav__link {
        padding: 8px 10px;
    }
}

@media (max-width: 1180px) {
    :root {
        --sb-nav-gap: 12px;
        --sb-nav-font-size: 15px;
    }
    .sb-nav > li > a,
    .sb-nav-btn,
    .sb-nav__link {
        padding: 6px 9px;
    }
    .sb-right {
        gap: 8px;
    }
    .sb-logo-img {
        height: 36px;
    }
}

@media (max-width: 1080px) {
    :root {
        --sb-nav-gap: 10px;
        --sb-nav-font-size: 14.5px;
    }
    .sb-nav > li > a,
    .sb-nav-btn,
    .sb-nav__link {
        padding: 6px 8px;
    }
    .sb-right {
        gap: 8px;
    }
}

@media (max-width: 1024px) {
    :root {
        --header-h: 72px;
    }
    .sb-logo {
        display: inline-flex;
        margin-left: 12px;
    }
    .sb-logo-img {
        height: 32px;
    }
    .sb-bar-inner {
        padding: 0 clamp(12px, 3vw, 24px);
    }
    .sb-right {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: 1 1 auto;
        width: 100%;
    }
    .sb-right .sb-mobile-toggle {
        order: 0;
        margin-right: auto;
    }
    .sb-right .sb-user {
        order: 1;
        margin-left: auto;
    }
    .sb-right .sb-lang {
        order: 2;
        margin-left: 12px;
    }
    .sb-user-img {
        width: 32px;
        height: 32px;
    }
    .sb-lang-code {
        font-size: 18px;
    }
    .sb-dd {
        left: -8px;
        right: -8px;
        min-width: 0;
    }
    .sb-navWrap {
        justify-content: flex-start;
        padding: 0 6px;
    }
}

@media (max-width: 920px) {
    :root {
        --sb-nav-gap: 12px;
        --sb-nav-font-size: 15.5px;
    }
    .sb-navWrap {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0 4px;
    }
    .sb-nav {
        flex-wrap: nowrap;
        gap: 12px;
    }
    .sb-nav > li {
        flex: 0 0 auto;
    }
    .sb-nav > li > a,
    .sb-nav-btn,
    .sb-nav__link {
        padding: 8px 12px;
        font-size: 15px;
    }
    .sb-nav__link .sb-link-coming {
        display: inline-flex;
    }
}

@media (max-width: 760px) {
    :root {
        --header-h: 64px;
    }
    .sb-right {
        gap: 10px;
    }
    .sb-user-img {
        width: 28px;
        height: 28px;
    }
    .sb-lang-code {
        font-size: 16px;
    }
    .sb-navWrap {
        padding: 0 2px;
    }
    .sb-nav {
        gap: 10px;
    }
    .sb-nav > li > a,
    .sb-nav-btn,
    .sb-nav__link {
        padding: 6px 10px;
        font-size: 14.5px;
    }
}

@media (max-width: 640px) {
    .sb-navWrap {
        overflow-x: auto;
        gap: 6px;
    }
    .sb-nav {
        gap: 8px;
    }
    .sb-nav > li > a,
    .sb-nav-btn,
    .sb-nav__link {
        padding: 6px 9px;
        font-size: 14px;
    }
    .sb-right {
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .sb-lang-btn {
        padding: 0 8px;
    }
    .sb-lang-code {
        font-size: 15px;
    }
}

@media (max-width: 420px) {
    :root {
        --sb-nav-font-size: 14.5px;
    }
    .sb-nav {
        gap: 10px;
    }
}

/* 09. Mobile Drawer ------------------------------------------------------ */
.sb-mobile-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #f5f5f5;
    font: 600 0.82rem/1.1 "Poppins", system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.sb-mobile-toggle__label {
    pointer-events: none;
}
.sb-mobile-toggle__icon {
    width: 20px;
    height: 20px;
}
.sb-mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}
.sb-mobile-toggle.is-active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.7);
}
.sb-mobile-layer {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease;
    overflow: hidden;
}
.sb-mobile-layer.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.sb-mobile-scrim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.sb-mobile-layer.is-active .sb-mobile-scrim {
    opacity: 1;
}
.sb-mobile-drawer {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 100vh;
    background: rgba(12, 12, 12, 0.96);
    color: #f3f3f3;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.45);
    padding: clamp(28px, 9vw, 72px) clamp(20px, 7vw, 58px) clamp(36px, 11vw, 64px);
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
    border-radius: 0;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.sb-mobile-layer.is-active .sb-mobile-drawer {
    transform: translateX(0);
    position: fixed;
}
.sb-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.sb-mobile-title {
    font: 700 1rem/1.2 "Montserrat", system-ui, sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.sb-mobile-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}
.sb-mobile-close:hover {
    background: rgba(255, 255, 255, 0.15);
}
.sb-mobile-close svg {
    width: 18px;
    height: 18px;
}
.sb-mobile-menu {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.sb-mobile-link,
.sb-mobile-group-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    font: 700 1rem/1.35 "Montserrat", system-ui, sans-serif;
    letter-spacing: 0.05em;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.sb-mobile-link:last-child {
    border-bottom: none;
}
.sb-mobile-link.is-active {
    color: #9ff2b8;
}
.sb-mobile-group-btn {
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}
.sb-mobile-group-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}
.sb-mobile-group-btn.is-open svg {
    transform: rotate(180deg);
}
.sb-mobile-sub {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.6rem 0 0.9rem 0.5rem;
}
.sb-mobile-sub-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.82);
    font: 600 0.95rem/1.4 "Roboto", system-ui, sans-serif;
    text-decoration: none;
}
.sb-mobile-sub-link:hover {
    color: #bfffd3;
}

@media (min-width: 640px) {
    .sb-mobile-drawer {
        border-radius: 24px 24px 0 0;
        padding-top: clamp(36px, 10vw, 84px);
    }
}

@media (max-width: 1024px) {
    .sb-navWrap {
        display: none;
    }
    .sb-nav-arrow {
        display: none;
    }
    .sb-mobile-toggle {
        display: inline-flex;
    }
}
.sb-detailbar--drawer-open .sb-navWrap {
    display: none !important;
}
@media (min-width: 1025px) {
    .sb-mobile-layer {
        display: none !important;
    }
}

/* 10. Critical Dropdown Overrides --------------------------------------- */
/* IMPORTANT: this stays or dropdowns stop working */
#site-header,
.sb-navWrap,
.sb-bar-inner {
    overflow: visible !important;
}

.sb-dd {
    z-index: 2147483647 !important;
}

/* Hero offset so header stays translucent over imagery */
.sb-page-hero {
    margin-top: calc(-1 * var(--header-h));
    padding-top: var(--header-h);
}
