*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: clip;
}

@supports not (overflow-x: clip) {
    html,
    body {
        overflow-x: hidden;
    }
}

:root {
    --kst-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --kst-font-serif: Georgia, "Times New Roman", Times, serif;
    --kst-radius: 8px;
    --kst-width: 1160px;
    --kst-bg: #f7f2e9;
    --kst-surface: #fffaf1;
    --kst-surface-strong: #efe2cd;
    --kst-text: #201811;
    --kst-muted: #6f5c48;
    --kst-line: #d6c2a5;
    --kst-brand: #c99029;
    --kst-brand-strong: #8e5618;
    --kst-green: #26724a;
    --kst-header-bg: rgba(255, 250, 241, 0.92);
    --kst-shadow: 0 24px 70px rgba(70, 45, 21, 0.14);
}

@media (prefers-color-scheme: dark) {
    :root {
        --kst-bg: #12100d;
        --kst-surface: #1d1813;
        --kst-surface-strong: #2b2117;
        --kst-text: #fff8ea;
        --kst-muted: #c9b99f;
        --kst-line: #4a3826;
        --kst-brand: #e1aa3d;
        --kst-brand-strong: #f0bd55;
        --kst-green: #3c9f67;
        --kst-header-bg: rgba(18, 16, 13, 0.92);
        --kst-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
    }
}

html[data-kst-theme="light"] {
    --kst-bg: #f7f2e9;
    --kst-surface: #fffaf1;
    --kst-surface-strong: #efe2cd;
    --kst-text: #201811;
    --kst-muted: #6f5c48;
    --kst-line: #d6c2a5;
    --kst-brand: #c99029;
    --kst-brand-strong: #8e5618;
    --kst-green: #26724a;
    --kst-header-bg: rgba(255, 250, 241, 0.92);
    --kst-shadow: 0 24px 70px rgba(70, 45, 21, 0.14);
}

html[data-kst-theme="dark"] {
    --kst-bg: #12100d;
    --kst-surface: #1d1813;
    --kst-surface-strong: #2b2117;
    --kst-text: #fff8ea;
    --kst-muted: #c9b99f;
    --kst-line: #4a3826;
    --kst-brand: #e1aa3d;
    --kst-brand-strong: #f0bd55;
    --kst-green: #3c9f67;
    --kst-header-bg: rgba(18, 16, 13, 0.92);
    --kst-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

body.kst-theme {
    background: var(--kst-bg);
    color: var(--kst-text);
    font-family: var(--kst-font-sans);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

body.kst-theme.admin-bar .kst-header {
    top: 32px;
}

.kst-site {
    background:
        linear-gradient(180deg, rgba(225, 170, 61, 0.08), transparent 420px),
        var(--kst-bg);
    min-height: 100vh;
}

.kst-site,
.kst-header,
.kst-main,
.kst-footer {
    max-width: 100%;
    overflow-x: clip;
}

.kst-container {
    box-sizing: border-box;
    margin: 0 auto;
    max-width: var(--kst-width);
    padding-left: 22px;
    padding-right: 22px;
    width: 100%;
}

.kst-skip-link {
    background: var(--kst-brand);
    color: #1b1309;
    left: 16px;
    padding: 10px 12px;
    position: fixed;
    top: -100px;
    z-index: 10000;
}

.kst-skip-link:focus {
    top: 16px;
}

.kst-header {
    backdrop-filter: blur(16px);
    background: var(--kst-header-bg);
    border-bottom: 1px solid var(--kst-line);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.kst-header__inner {
    align-items: center;
    display: grid;
    gap: 18px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin: 0 auto;
    max-width: var(--kst-width);
    min-height: 76px;
    padding: 0 22px;
}

.kst-brand {
    align-items: center;
    color: var(--kst-text);
    display: inline-flex;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
}

.kst-brand__mark {
    align-items: center;
    background: var(--kst-brand);
    border-radius: 50%;
    color: #1b1309;
    display: inline-flex;
    font-size: 24px;
    font-weight: 900;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.kst-brand__logo img {
    display: block;
    height: auto;
    max-height: 52px;
    max-width: 170px;
}

.kst-brand__text {
    display: grid;
    line-height: 1.1;
}

.kst-brand__text strong {
    font-family: var(--kst-font-serif);
    font-size: 18px;
}

.kst-brand__text small,
.kst-kicker {
    color: var(--kst-brand);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.kst-nav {
    justify-self: end;
}

.kst-menu,
.kst-footer-menu {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.kst-menu a,
.kst-footer-menu a {
    border-radius: var(--kst-radius);
    color: var(--kst-muted);
    display: inline-flex;
    font-family: var(--kst-font-serif);
    font-weight: 700;
    min-height: 40px;
    padding: 8px 10px;
    text-decoration: none;
}

.kst-menu a:hover,
.kst-menu .current-menu-item > a,
.kst-footer-menu a:hover {
    background: var(--kst-surface-strong);
    color: var(--kst-text);
}

.kst-menu-toggle,
.kst-theme-toggle {
    background: var(--kst-surface);
    border: 1px solid var(--kst-line);
    border-radius: var(--kst-radius);
    color: var(--kst-text);
    cursor: pointer;
    min-height: 42px;
}

.kst-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    padding: 0 10px;
    width: 44px;
}

.kst-menu-toggle span:not(.screen-reader-text) {
    background: var(--kst-text);
    display: block;
    height: 2px;
    width: 20px;
}

.kst-theme-toggle {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    justify-content: center;
    padding: 0 10px;
}

.kst-theme-toggle--desktop {
    width: 54px;
}

.kst-theme-toggle--desktop .kst-theme-toggle__label {
    display: none;
}

.kst-nav__theme-toggle {
    display: none;
}

.kst-theme-toggle__sun,
.kst-theme-toggle__moon {
    border-radius: 50%;
    display: block;
    height: 14px;
    width: 14px;
}

.kst-theme-toggle__sun {
    background: var(--kst-brand);
}

.kst-theme-toggle__moon {
    border: 2px solid var(--kst-muted);
}

.kst-main {
    min-height: 60vh;
}

.kst-home-hero,
.kst-page-hero {
    border-bottom: 1px solid var(--kst-line);
    overflow: hidden;
    position: relative;
}

.kst-home-hero {
    background:
        radial-gradient(circle at 82% 20%, rgba(60, 159, 103, 0.26), transparent 28%),
        linear-gradient(135deg, var(--kst-surface) 0%, var(--kst-bg) 46%, var(--kst-surface-strong) 100%);
}

.kst-home-hero__grid {
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) 340px;
    min-height: 520px;
    padding-bottom: 54px;
    padding-top: 64px;
}

.kst-home-hero__copy {
    align-self: center;
    max-width: 720px;
}

.kst-home-hero h1,
.kst-page-hero h1,
.kst-entry h1,
.kst-entry h2 {
    color: var(--kst-text);
    font-family: var(--kst-font-serif);
    line-height: 1.05;
    margin: 0;
}

.kst-home-hero h1 {
    font-size: clamp(46px, 9vw, 96px);
}

.kst-home-hero p {
    color: var(--kst-muted);
    font-size: 20px;
    margin: 18px 0 0;
    max-width: 660px;
}

.kst-home-hero__panel {
    align-self: end;
    background: var(--kst-surface);
    border: 1px solid var(--kst-line);
    border-radius: var(--kst-radius);
    box-shadow: var(--kst-shadow);
    padding: 22px;
}

.kst-home-hero__panel span {
    color: var(--kst-brand);
    display: block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.kst-home-hero__panel strong {
    display: block;
    font-size: 26px;
    line-height: 1.1;
    margin-top: 6px;
}

.kst-home-hero__panel p {
    font-size: 15px;
    margin-top: 12px;
}

.kst-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.kst-button,
.kst-entry__content .wp-block-button__link,
.kst-search-submit {
    align-items: center;
    background: var(--kst-brand);
    border: 1px solid var(--kst-brand);
    border-radius: var(--kst-radius);
    color: #1b1309;
    cursor: pointer;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-height: 44px;
    padding: 10px 15px;
    text-decoration: none;
}

.kst-button:hover,
.kst-entry__content .wp-block-button__link:hover {
    background: var(--kst-brand-strong);
    color: #1b1309;
}

.kst-button--ghost {
    background: transparent;
    color: var(--kst-text);
}

.kst-button--ghost:hover {
    background: var(--kst-surface-strong);
    color: var(--kst-text);
}

.kst-page-hero {
    background: linear-gradient(135deg, var(--kst-surface) 0%, var(--kst-bg) 100%);
    padding: 52px 0;
}

.kst-page-hero h1 {
    font-size: clamp(34px, 6vw, 62px);
    max-width: 900px;
}

.kst-page-hero p {
    color: var(--kst-muted);
    max-width: 720px;
}

.kst-content-layout,
.kst-front-content,
.kst-single {
    padding-bottom: 58px;
    padding-top: 34px;
}

.kst-front-intro {
    color: var(--kst-muted);
    font-size: 20px;
    max-width: 860px;
}

.kst-front-intro p {
    margin: 0 0 24px;
}

.kst-post-list {
    display: grid;
    gap: 18px;
}

.kst-entry,
.kst-empty {
    background: var(--kst-surface);
    border: 1px solid var(--kst-line);
    border-radius: var(--kst-radius);
    box-shadow: var(--kst-shadow);
    padding: 24px;
}

.kst-entry--page {
    box-shadow: none;
}

.kst-entry__media {
    border-radius: var(--kst-radius);
    display: block;
    margin-bottom: 18px;
    overflow: hidden;
}

.kst-entry__media img {
    display: block;
    height: auto;
    width: 100%;
}

.kst-entry h2 {
    font-size: 30px;
}

.kst-entry h2 a {
    color: inherit;
    text-decoration: none;
}

.kst-entry__meta {
    color: var(--kst-muted);
    font-size: 13px;
    margin-top: 8px;
}

.kst-entry__content {
    color: var(--kst-text);
    margin-top: 18px;
}

.kst-entry__content,
.kst-entry,
.kst-empty {
    max-width: 100%;
    min-width: 0;
}

.kst-entry__content > *:first-child {
    margin-top: 0;
}

.kst-entry__content > *:last-child {
    margin-bottom: 0;
}

.kst-entry__content a,
.kst-footer a {
    color: var(--kst-brand-strong);
}

html[data-kst-theme="dark"] .kst-entry__content a,
html[data-kst-theme="dark"] .kst-footer a {
    color: var(--kst-brand);
}

.kst-entry__content img,
.kst-entry__content iframe,
.kst-entry__content video,
.kst-entry__content embed,
.kst-entry__content object {
    height: auto;
    max-width: 100%;
}

.kst-entry__content pre,
.kst-entry__content code {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.kst-entry__content table {
    border-collapse: collapse;
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.kst-entry__content th,
.kst-entry__content td {
    border: 1px solid var(--kst-line);
    padding: 8px 10px;
}

.kst-feature-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 24px;
}

.kst-feature {
    background: var(--kst-surface);
    border: 1px solid var(--kst-line);
    border-radius: var(--kst-radius);
    padding: 18px;
}

.kst-feature strong {
    color: var(--kst-brand);
    display: block;
    font-size: 22px;
}

.kst-feature span {
    color: var(--kst-muted);
}

.kst-pagination {
    margin-top: 24px;
}

.kst-pagination .nav-links,
.kst-single .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.kst-pagination a,
.kst-pagination span,
.kst-single .nav-links a {
    background: var(--kst-surface);
    border: 1px solid var(--kst-line);
    border-radius: var(--kst-radius);
    color: var(--kst-text);
    display: inline-flex;
    padding: 8px 11px;
    text-decoration: none;
}

.kst-pagination .current {
    background: var(--kst-brand);
    color: #1b1309;
}

.kst-footer {
    background: var(--kst-surface);
    border-top: 1px solid var(--kst-line);
    color: var(--kst-muted);
}

.kst-footer__inner {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin: 0 auto;
    max-width: var(--kst-width);
    padding: 28px 22px;
}

.kst-footer p {
    margin: 4px 0;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

/* Plugin compatibility: keep spacing only, let Kloek Sports own its component CSS. */
.kst-entry__content > .kloek-sports,
.kst-front-content > .kloek-sports {
    margin-bottom: 22px;
    margin-top: 22px;
}

@media (max-width: 900px) {
    body.kst-theme.admin-bar .kst-header {
        top: 46px;
    }

    .kst-header__inner {
        grid-template-columns: auto auto auto;
    }

    .kst-menu-toggle {
        display: inline-flex;
        justify-self: end;
    }

    .kst-nav {
        background: #12100d;
        border-bottom: 1px solid #3d3329;
        border-top: 1px solid #3d3329;
        box-sizing: border-box;
        display: none;
        grid-column: 1 / -1;
        justify-self: stretch;
        margin-left: 0;
        margin-right: 0;
        padding: 22px 0 24px;
        width: 100%;
    }

    .kst-nav.is-open {
        display: block;
    }

    .kst-menu {
        align-items: stretch;
        display: grid;
        gap: 8px;
        width: 100%;
    }

    .kst-menu a {
        align-items: center;
        box-sizing: border-box;
        color: #fff8ea;
        font-family: var(--kst-font-serif);
        font-size: 22px;
        font-weight: 400;
        justify-content: center;
        min-height: 50px;
        padding: 10px 16px;
        text-align: center;
        width: 100%;
    }

    .kst-menu a:hover,
    .kst-menu .current-menu-item > a {
        background: transparent;
        color: var(--kst-brand);
    }

    .kst-theme-toggle--desktop {
        display: none;
        justify-self: end;
    }

    .kst-nav__theme-toggle {
        display: flex;
        justify-content: center;
        margin-top: 14px;
        width: 100%;
    }

    .kst-theme-toggle--mobile {
        background: transparent;
        border-color: #6c5946;
        color: #fff8ea;
        font-family: var(--kst-font-serif);
        min-height: 44px;
        padding: 0 14px;
        width: auto;
    }

    .kst-theme-toggle__label {
        display: inline;
    }

    .kst-home-hero__grid {
        grid-template-columns: 1fr;
        min-height: 0;
        padding-bottom: 34px;
        padding-top: 42px;
    }

    .kst-home-hero__panel {
        align-self: auto;
    }

    .kst-feature-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    body.kst-theme.admin-bar .kst-header {
        top: 0;
    }

    .kst-container,
    .kst-header__inner,
    .kst-footer__inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .kst-brand__text strong {
        font-size: 16px;
    }

    .kst-brand__logo img {
        max-height: 44px;
        max-width: 138px;
    }

    .kst-brand__text small {
        display: none;
    }

    .kst-home-hero h1 {
        font-size: 46px;
    }

    .kst-home-hero p {
        font-size: 17px;
    }

    .kst-page-hero {
        padding: 38px 0;
    }

    .kst-entry,
    .kst-empty {
        padding: 18px;
    }

    .kst-footer__inner {
        grid-template-columns: 1fr;
    }
}
