/*
 * Site themes (Layanan, Warisan): shared header, navigation, mobile drawer and footer.
 * Loaded only for branches that use one of these themes, together with
 * theme-layanan.css or theme-warisan.css, which set the tokens below.
 * See includes/site_theme.php.
 */

.st-theme {
    --st-shell: 1280px;
    --st-gutter: 48px;
    --st-font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --st-display: var(--st-font);
    --st-ink: #1E2A27;
    --st-muted: #56625E;
    --st-surface: #FFFFFF;
    --st-line: #E1E7E4;
    --st-line-strong: #D3DBD7;
    --st-accent: #0B6B76;
    --st-accent-hover: #095A63;
    --st-on-accent: #FFFFFF;
    --st-tint: #EDF3F2;
    --st-focus: #1E2A27;
    --st-focus-on-dark: #FEA86F;
    --st-radius-btn: 999px;
    --st-radius-panel: 16px;
    --st-radius-chip: 12px;
    --st-footer-bg: #0E3A3F;
    --st-footer-ink: #FFFFFF;
    --st-footer-muted: #BFD3D5;
    --st-footer-heading: #FFFFFF;
    --st-footer-line: rgba(255, 255, 255, 0.22);
}

/* Visible keyboard focus everywhere; the old stylesheet removes it. */
.st-theme a:focus-visible,
.st-theme button:focus-visible,
.st-theme input:focus-visible,
.st-theme select:focus-visible,
.st-theme textarea:focus-visible,
.st-theme [tabindex]:focus-visible {
    outline: 3px solid var(--st-focus);
    outline-offset: 3px;
}

.st-theme .st-footer a:focus-visible,
.st-theme .st-footer button:focus-visible,
.st-theme .st-footer input:focus-visible,
.st-theme .st-on-dark a:focus-visible,
.st-theme .st-on-dark button:focus-visible,
.st-theme .st-on-dark input:focus-visible {
    outline-color: var(--st-focus-on-dark);
}

#st-content:focus {
    outline: none;
}

/* The old stylesheet capitalises every heading and paragraph; themed pages use sentence case. */
.st-theme h1,
.st-theme h2,
.st-theme h3,
.st-theme h4,
.st-theme h5,
.st-theme h6,
.st-theme p,
.st-theme label {
    text-transform: none;
}

.st-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.st-skip {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 2000;
    padding: 10px 16px;
    border-radius: var(--st-radius-btn);
    background: var(--st-ink);
    color: #FFFFFF;
    font-family: var(--st-font);
    font-size: 15px;
    font-weight: 700;
}

.st-skip:focus {
    top: 12px;
    color: #FFFFFF;
}

/* ---------------------------------------------------------------- Header */

.st-header,
.st-footer {
    font-family: var(--st-font);
}

.st-header *,
.st-header *::before,
.st-header *::after,
.st-footer *,
.st-footer *::before,
.st-footer *::after {
    box-sizing: border-box;
}

.st-header {
    position: relative;
    z-index: 1000;
    background: var(--st-surface);
    border-bottom: 1px solid var(--st-line);
    color: var(--st-ink);
}

.st-header__bar {
    max-width: var(--st-shell);
    margin: 0 auto;
    padding: 14px var(--st-gutter) 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 28px;
}

.st-header.is-inline .st-header__bar {
    flex-wrap: nowrap;
    padding-bottom: 14px;
}

.st-brand {
    order: 1;
    display: flex;
    flex-shrink: 0;
}

.st-brand img {
    display: block;
    height: 44px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
    transition: none;
}

.st-actions {
    order: 2;
    margin-left: auto;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
}

/* Two rows by default: the menu sits under the logo when it does not fit beside it. */
.st-nav {
    order: 3;
    flex: 1 0 100%;
    margin-top: 12px;
}

.st-nav::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--st-line);
}

.st-header.is-inline .st-nav {
    order: 2;
    flex: 0 0 auto;
    margin-top: 0;
}

.st-header.is-inline .st-nav::before {
    display: none;
}

.st-header.is-inline .st-actions {
    order: 3;
}

.st-nav__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0 0 0 -12px;
    padding: 6px 0 0;
}

.st-header.is-inline .st-nav__list {
    flex-wrap: nowrap;
    margin-left: 0;
    padding-top: 0;
}

.st-nav__item {
    position: relative;
}

.st-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--st-radius-btn);
    background: transparent;
    color: var(--st-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.st-nav__link:hover,
.st-nav__item:hover > .st-nav__link {
    color: var(--st-accent);
}

.st-nav__item.is-current > .st-nav__link {
    color: var(--st-accent);
    font-weight: 700;
}

.st-caret {
    flex-shrink: 0;
    transition: transform .15s ease;
}

.st-nav__item.is-open > .st-nav__link .st-caret {
    transform: rotate(180deg);
}

.st-sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 30;
    min-width: 240px;
    max-width: 320px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: var(--st-surface);
    border: 1px solid var(--st-line);
    border-radius: var(--st-radius-panel);
    box-shadow: 0 18px 40px rgba(20, 34, 28, 0.14);
}

.st-nav__item:nth-last-child(-n+2) > .st-sub {
    left: auto;
    right: 0;
}

.st-nav__item.has-children:hover > .st-sub,
.st-nav__item.has-link:focus-within > .st-sub,
.st-nav__item.is-open > .st-sub {
    display: block;
}

.st-sub a {
    display: block;
    padding: 10px 12px;
    border-radius: calc(var(--st-radius-panel) - 6px);
    color: var(--st-ink);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none;
    transition: background-color .15s ease;
}

.st-sub a:hover {
    background: var(--st-tint);
    color: var(--st-ink);
}

.st-sub a[aria-current="page"] {
    color: var(--st-accent);
    font-weight: 700;
}

.st-sub__deep a {
    padding-left: 28px;
    color: var(--st-muted);
    font-size: 14px;
}

.st-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--st-radius-btn);
    background: transparent;
    color: var(--st-ink);
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.st-icon-btn:hover,
.st-icon-btn[aria-expanded="true"] {
    background: var(--st-tint);
    color: var(--st-ink);
}

.st-menu-btn {
    display: none;
    border-color: var(--st-line-strong);
}

.st-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--st-line-strong);
    border-radius: var(--st-radius-btn);
    background: transparent;
    color: var(--st-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .15s ease, color .15s ease;
}

.st-link-btn:hover {
    border-color: var(--st-accent);
    color: var(--st-accent);
}

.st-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: var(--st-radius-btn);
    background: var(--st-accent);
    color: var(--st-on-accent);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease;
}

.st-btn:hover,
.st-btn:focus {
    background: var(--st-accent-hover);
    color: var(--st-on-accent);
}

.st-search {
    border-top: 1px solid var(--st-line);
    background: var(--st-surface);
}

.st-search__inner {
    max-width: var(--st-shell);
    margin: 0 auto;
    padding: 14px var(--st-gutter);
    display: flex;
    gap: 8px;
}

.st-field {
    flex: 1 1 auto;
    min-width: 0;
    height: 48px;
    padding: 0 18px;
    border: 1px solid var(--st-line-strong);
    border-radius: var(--st-radius-btn);
    background: var(--st-surface);
    color: var(--st-ink);
    font: inherit;
    font-size: 16px;
}

.st-search .st-btn {
    min-height: 48px;
}

.st-drawer {
    border-top: 1px solid var(--st-line);
    background: var(--st-surface);
}

.st-drawer__inner {
    max-width: var(--st-shell);
    margin: 0 auto;
    padding: 4px var(--st-gutter) 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.st-drawer__list,
.st-drawer__list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.st-drawer__list > li {
    border-bottom: 1px solid var(--st-line);
}

.st-drawer__list a,
.st-drawer__group {
    display: block;
    padding: 13px 0;
    color: var(--st-ink);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
}

.st-drawer__group {
    padding-bottom: 2px;
    color: var(--st-muted);
    font-size: 14px;
    font-weight: 700;
}

.st-drawer__list ul {
    padding: 0 0 8px 14px;
}

.st-drawer__list ul a {
    padding: 9px 0;
    font-size: 15px;
    font-weight: 500;
}

.st-drawer__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---------------------------------------------------------------- Footer */

.st-footer {
    background: var(--st-footer-bg);
    color: var(--st-footer-ink);
}

.st-footer__inner {
    max-width: var(--st-shell);
    margin: 0 auto;
    padding: 56px var(--st-gutter) 32px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.st-footer__cols {
    display: flex;
    flex-wrap: wrap;
    gap: 36px 48px;
}

.st-footer__brand {
    flex: 1.6 1 260px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.st-footer__logo {
    align-self: flex-start;
    display: inline-flex;
    padding: 10px 14px;
    border-radius: var(--st-radius-chip);
    background: #FFFFFF;
}

.st-footer__logo img {
    display: block;
    height: 38px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.st-footer__text {
    margin: 0;
    max-width: 30em;
    color: var(--st-footer-muted);
    font-size: 15px;
    font-style: normal;
    line-height: 1.7;
}

address.st-footer__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.st-footer__col {
    flex: 1 1 140px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    line-height: 1.45;
}

.st-theme .st-footer__heading {
    margin: 0 0 4px;
    color: var(--st-footer-heading);
    font-family: var(--st-font);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0;
}

.st-footer a {
    color: var(--st-footer-ink);
    text-decoration: none;
    transition: none;
}

.st-footer a:hover {
    color: var(--st-footer-ink);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.st-footer address a {
    color: var(--st-footer-muted);
}

.st-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--st-footer-line);
    color: var(--st-footer-muted);
    font-size: 13px;
}

.st-social {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.st-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--st-radius-btn);
    font-size: 17px;
}

.st-social a:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

/* Newsletter band above the link columns (Warisan). */
.st-news {
    margin: 0;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--st-footer-line);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px 48px;
}

.st-news__intro {
    flex: 1 1 300px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.st-theme .st-news__title {
    margin: 0;
    font-size: 19px;
}

.st-news__fields {
    flex: 2 1 560px;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.st-news__field {
    flex: 1 1 200px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.st-theme .st-news__label {
    margin: 0;
    color: var(--st-footer-ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    cursor: default;
}

.st-news__input {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #FFFFFF;
    border-radius: var(--st-radius-btn);
    background: #FFFFFF;
    color: #182019;
    font: inherit;
    font-size: 15px;
}

.st-news__submit {
    height: 48px;
    padding: 0 20px;
    border: 0;
    border-radius: var(--st-radius-btn);
    background: #D6B25E;
    color: #10301F;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.st-news__submit:hover {
    background: #C9A24A;
    color: #10301F;
}

.st-news__submit:disabled {
    opacity: .7;
    cursor: progress;
}

.st-theme .st-news__status {
    flex: 1 1 100%;
    margin: -4px 0 0;
    min-height: 1.5em;
    color: var(--st-footer-muted);
    font-size: 14px;
    line-height: 1.5;
}

/* ---------------------------------------------------------------- Sizes */

@media (max-width: 1099.98px) {
    .st-theme {
        --st-gutter: 20px;
    }

    .st-header__bar,
    .st-header.is-inline .st-header__bar {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .st-nav {
        display: none;
    }

    .st-menu-btn {
        display: inline-flex;
    }
}

@media (min-width: 1100px) {
    .st-drawer {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .st-hide-sm {
        display: none !important;
    }

    .st-brand img {
        height: 38px;
        max-width: 190px;
    }

    .st-footer__inner {
        padding-top: 44px;
    }

    .st-footer__cols {
        gap: 28px 32px;
    }

    .st-footer__col {
        flex: 1 1 140px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .st-header *,
    .st-footer *,
    .st-home * {
        transition: none !important;
        animation: none !important;
    }
}
