/**
 * OUI Tabbed category layout — extends landing.css.
 * Scoped to body.layout-tabbed. Restyles the Bootstrap tab nav and the
 * tab-content panel using landing design tokens; keeps Bootstrap's tab
 * JS behaviour (data-bs-toggle="tab") untouched.
 */

body.layout-tabbed {
    background: transparent;
}

/* ===== Tab bar: active title (left) + tab pills (right) ================== */

body.layout-tabbed .oui-landing-page .tabbed-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.25rem;
    margin-bottom: 1.25rem;
}

body.layout-tabbed .oui-landing-page .tabbed-active-title {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    max-width: 40%;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.04em;
    color: var(--landing-ink);
    min-height: 1.4em;
}
body.layout-tabbed .oui-landing-page .tabbed-active-title__item {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: translateY(.25em);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
}
body.layout-tabbed .oui-landing-page .tabbed-active-title__item.is-active {
    opacity: 1;
    transform: none;
    position: relative;
}

body.layout-tabbed .oui-landing-page .tabbed-nav-wrapper {
    position: relative;
    z-index: 5;
}

body.layout-tabbed .oui-landing-page .tabbed-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    padding: 0;
    margin: 0;
    list-style: none;
    border: none;
}

/* Glassmorphism tabs — translucent surface + blur over the warm landing bg. */
body.layout-tabbed .oui-landing-page .tabbed-nav .nav-link {
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    padding: .75rem 1.25rem;
    font-weight: 800;
    font-size: .95rem;
    color: var(--landing-ink);
    background: rgba(255, 255, 255, .28);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 8px 24px rgba(16, 16, 20, .06);
    transition: all .25s ease;
    white-space: nowrap;
}

body.layout-tabbed .oui-landing-page .tabbed-nav .nav-link:hover {
    background: rgba(255, 255, 255, .55);
    border-color: rgba(255, 255, 255, .7);
    transform: translateY(-1px);
}

body.layout-tabbed .oui-landing-page .tabbed-nav .nav-link.active {
    background: rgba(16, 16, 20, .82);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-color: rgba(16, 16, 20, .9);
    color: #fff;
    box-shadow: 0 12px 32px rgba(16, 16, 20, .18);
}

body.layout-tabbed .oui-landing-page .tabbed-nav .nav-link.active:hover {
    background: var(--landing-gradient);
    border-color: var(--landing-mid);
    color: #fff;
}

/* Classic-tab variant (when tab_style param = "tabs") */
body.layout-tabbed .oui-landing-page .tabbed-nav.nav-tabs {
    justify-content: flex-start;
    border-bottom: 1px solid var(--landing-line);
    border-radius: 0;
    padding: 0;
    gap: .25rem;
}
body.layout-tabbed .oui-landing-page .tabbed-nav.nav-tabs .nav-link {
    border-radius: .75rem .75rem 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    background: transparent;
    margin-bottom: -1px;
}
body.layout-tabbed .oui-landing-page .tabbed-nav.nav-tabs .nav-link.active {
    background: #fff;
    border-color: var(--landing-line);
    color: var(--landing-deep);
}

/* ===== Tab content panel ================================================ */

body.layout-tabbed .oui-landing-page .tabbed-content {
    background: #fff;
    border: 1px solid var(--landing-line);
    border-radius: clamp(1.4rem, 3vw, 2rem);
    box-shadow: 0 30px 80px rgba(16, 16, 20, .08);
    overflow: hidden;
}

body.layout-tabbed .oui-landing-page .tabbed-content .tab-pane {
    height: auto;
    min-height: clamp(28rem, 60vh, 44rem);
    opacity: 0;
    transition: opacity .25s ease;
}
body.layout-tabbed .oui-landing-page .tabbed-content .tab-pane.active {
    opacity: 1;
}

body.layout-tabbed .oui-landing-page .article-tab-pane {
    display: flex;
    flex-direction: column;
    height: 100%;
}

body.layout-tabbed .oui-landing-page .article-tab-body {
    flex: 1;
    overflow-y: auto;
    padding: clamp(1.5rem, 3vw, 2.5rem);
}

body.layout-tabbed .oui-landing-page .article-tab-body::-webkit-scrollbar {
    width: 8px;
}
body.layout-tabbed .oui-landing-page .article-tab-body::-webkit-scrollbar-track {
    background: transparent;
}
body.layout-tabbed .oui-landing-page .article-tab-body::-webkit-scrollbar-thumb {
    background: rgba(16, 16, 20, .15);
    border-radius: 4px;
}
body.layout-tabbed .oui-landing-page .article-tab-body::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 16, 20, .3);
}

body.layout-tabbed .oui-landing-page .article-tab-content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #3b3833;
}
body.layout-tabbed .oui-landing-page .article-tab-content p {
    margin-bottom: 1.1rem;
}
body.layout-tabbed .oui-landing-page .article-tab-content h2,
body.layout-tabbed .oui-landing-page .article-tab-content h3,
body.layout-tabbed .oui-landing-page .article-tab-content h4 {
    margin-top: 1.6rem;
    margin-bottom: .75rem;
    color: var(--landing-ink);
    letter-spacing: -.02em;
}
body.layout-tabbed .oui-landing-page .article-tab-content img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 1rem 0;
}

/* Article hero h2 — match the homepage hero scale. */
body.layout-tabbed .oui-landing-page .article-tab-content h2 {
    font-size: clamp(2.6rem, 6.5vw, 6.4rem);
    line-height: .88;
    letter-spacing: -.07em !important;
    font-weight: 900;
    margin-top: 0;
    margin-bottom: 1.25rem;
    color: var(--landing-ink);
}

/* Hero figure inside an article (right column of the row pattern). */
body.layout-tabbed .oui-landing-page .article-tab-content .article-figure {
    margin: 0;
    overflow: hidden;
    height: clamp(20rem, 36vw, 30rem);

}
body.layout-tabbed .oui-landing-page .article-tab-content .article-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    margin: 0;
}

/* Overflow image pattern (Services article): the image juts past the panel
   edge instead of sitting framed in a card. The .tabbed-content has
   overflow:hidden so the image gets cleanly cropped at the panel's right. */
body.layout-tabbed .oui-landing-page .article-row-overflow {
    position: relative;
}
body.layout-tabbed .oui-landing-page .article-overflow-col {
    position: relative;
    min-height: clamp(18rem, 32vw, 28rem);
}
body.layout-tabbed .oui-landing-page .article-overflow-img {
    position: absolute;
    top: 50%;
    right: -25vw;
    transform: translateY(-50%);
    max-width: none;
    width: clamp(28rem, 50vw, 52rem);
    height: auto;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
}
@media (max-width: 991px) {
    body.layout-tabbed .oui-landing-page .article-overflow-col {
        min-height: 0;
    }
    body.layout-tabbed .oui-landing-page .article-overflow-img {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
    }
}

/* Cards inside an article inherit landing's .card-oui — make link-cards behave. */
body.layout-tabbed .oui-landing-page .article-tab-content a.card-oui {
    transition: .2s ease;
}
body.layout-tabbed .oui-landing-page .article-tab-content a.card-oui:hover {
    transform: translateY(-3px);
    background: #fff;
    box-shadow: 0 24px 70px rgba(16, 16, 20, .08);
}
body.layout-tabbed .oui-landing-page .article-tab-content ul,
body.layout-tabbed .oui-landing-page .article-tab-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}
body.layout-tabbed .oui-landing-page .article-tab-content li {
    margin-bottom: .4rem;
}

body.layout-tabbed .oui-landing-page .article-tab-footer {
    padding: 1rem clamp(1.5rem, 3vw, 2.5rem) 1.5rem;
    border-top: 1px solid var(--landing-line);
    flex-shrink: 0;
}

/* Empty state */
body.layout-tabbed .oui-landing-page .tabbed-empty {
    text-align: center;
    padding: clamp(3rem, 8vw, 6rem) 0;
}

/* The tabbed layout has no hero — first .section sits close to the chrome. */
body.layout-tabbed .oui-landing-page > .section:first-of-type {
    padding-top: clamp(2rem, 4vw, 3.5rem);
}

/* Newsletter module inside the final-cta block. */
body.layout-tabbed .oui-landing-page .newsletter-position {
    color: #fff;
}
body.layout-tabbed .oui-landing-page #cf_5 {
    background: transparent;
}
body.layout-tabbed .oui-landing-page .newsletter-position input,
body.layout-tabbed .oui-landing-page .newsletter-position textarea {
    background: rgba(255, 255, 255, .92);
    border-radius: .75rem;
    border: 1px solid rgba(255, 255, 255, .25);
}
body.layout-tabbed .oui-landing-page .newsletter-position .cf-btn {
    background: var(--landing-gradient) !important;
    border-color: var(--landing-mid) !important;
    border-radius: 999px !important;
    font-weight: 800;
    color: #fff !important;
}

@media (max-width: 991px) {
    body.layout-tabbed .oui-landing-page .tabbed-bar {
        flex-direction: column;
        align-items: stretch;
        gap: .75rem;
        min-height: 0;
    }
    body.layout-tabbed .oui-landing-page .tabbed-active-title {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        max-width: 100%;
    }
    body.layout-tabbed .oui-landing-page .tabbed-nav {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    body.layout-tabbed .oui-landing-page .tabbed-nav::-webkit-scrollbar {
        display: none;
    }
}
