/* Global tokens + scroll fix + tame legacy theme chrome */

:root {
    --site-max: 1120px;
    --site-gutter: 1.75rem;
    --home-max: var(--site-max);
    --home-ink: #1a171b;
    --home-sand: #bdb699;
    --home-cream: #f4f1ec;
    --home-muted: #5c5660;
    --font-sans: Ubuntu, Arial, sans-serif;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    padding: 0.75rem 1rem;
    background: #8b1e1e;
    color: #fff !important;
    text-decoration: none;
    font-family: var(--font-sans);
    font-weight: 700;
}

.skip-link:focus {
    left: var(--site-gutter);
    top: 0.75rem;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

:focus-visible {
    outline: 2px solid #8b1e1e;
    outline-offset: 2px;
}

.embed-placeholder {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.85rem;
    min-height: 220px;
    padding: 1.25rem;
    background: #ebe6df;
    border: 1px solid rgba(26, 23, 27, 0.08);
    border-radius: 4px;
    color: #1a171b;
}

.embed-placeholder p {
    margin: 0;
    max-width: 28rem;
    line-height: 1.5;
}

.page-video-placeholder {
    aspect-ratio: 16 / 9;
    min-height: 0;
    width: 100%;
}

.page-video-placeholder--thumb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    background: #1a171b;
    border: 0;
}

.page-video-placeholder__thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.page-video-placeholder--thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(26, 23, 27, 0.38);
    pointer-events: none;
}

.page-video-placeholder__play {
    position: relative;
    z-index: 1;
    gap: 0.55rem;
    box-shadow: 0 8px 24px rgba(26, 23, 27, 0.28);
}

.page-video-placeholder__play .fa {
    font-size: 0.95rem;
}

.site-footer__split-map .embed-placeholder,
.site-footer__split-map iframe {
    width: 100%;
    height: 100%;
    min-height: 280px;
    border: 0;
}

@media (min-width: 1600px) {
    :root {
        --site-max: 1320px;
    }
}

@media (min-width: 2200px) {
    :root {
        --site-max: 1680px;
        --site-gutter: 2.5rem;
    }
}

@media (min-width: 3000px) {
    :root {
        --site-max: 2100px;
    }
}

.site-wrap {
    max-width: var(--site-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--site-gutter);
    padding-right: var(--site-gutter);
    box-sizing: border-box;
    width: 100%;
}

/* Do NOT set overflow-x on html/body — it creates a scrollport that
   clips position:fixed header children (e.g. the hanging badge). */
html {
    height: auto !important;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    font-family: var(--font-sans);
}

body {
    overflow: visible !important;
    height: auto !important;
    min-height: 100%;
    position: relative;
    margin: 0;
    background: #f4f1ec !important;
    background-image: none !important;
    font-family: var(--font-sans);
}

/* Override legacy theme faces (Klavika, Helvetica, Roboto, Open Sans) */
body,
button,
input,
select,
textarea,
h1, h2, h3, h4, h5, h6,
.btn,
.title,
.middentext,
.toolbar,
.home,
.site-header,
.site-footer,
.site-nav,
.page-hero,
.page-article,
.page-content,
.trix-content,
.nieuws-page,
.agenda-page,
.cookie-banner,
.topic-card,
.home-quick-card {
    font-family: var(--font-sans);
}

body.page-home {
    background: #1a171b !important;
}

#wrapper.site-wrapper {
    overflow-x: clip;
    overflow-y: visible;
    height: auto !important;
    max-height: none !important;
    background: transparent !important;
}

/* Inner pages: no gap above hero — fixed header overlays the hero band */
body.page-inner #wrapper.site-wrapper {
    padding-top: 0;
    background: #f4f1ec !important;
}

body.page-inner #main,
body.page-inner #main[role="main"] {
    margin: 0;
    padding: 0 0 0;
    width: 100%;
    max-width: none;
    float: none;
    position: relative;
    top: 0 !important;
}

body.page-inner #main:has(> .page-hero),
body.page-inner #main[role="main"]:has(> .page-hero) {
    padding-top: 0;
}

body.page-inner #main:not(:has(> .page-hero)),
body.page-inner #main[role="main"]:not(:has(> .page-hero)) {
    padding-top: 90px;
}

body.page-inner .page-hero {
    margin-top: 0;
    padding-top: 90px;
    box-sizing: border-box;
}

/* Bootstrap containers follow site max-width on all pages */
body.page-inner .container,
body.page-inner .container-fluid {
    max-width: var(--site-max) !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: var(--site-gutter) !important;
    padding-right: var(--site-gutter) !important;
    box-sizing: border-box;
}

/*
 * Reset legacy .hoofdDiv hero chrome on inner pages.
 * Old theme used fixed vw height/margins for the homepage overlay —
 * that clips modern content into a short dark strip.
 */
body.page-inner #hoofdDiv.hoofdDiv,
body.page-inner .hoofdDiv {
    background-color: transparent !important;
    background-image: none !important;
    margin: 0 !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    width: 100% !important;
    max-width: none !important;
    position: relative !important;
    align-content: normal !important;
    padding: 1.75rem 0 3rem;
}

/* Replaced by page-hero — hide legacy top tile grids */
body.page-inner #hoofdDiv.hoofdDiv.smallerpages {
    display: none !important;
}

body.page-inner .hoofdDiv.smallerpages,
body.page-inner .hoofdDiv.hoofdDivMainContent {
    height: auto !important;
    margin-top: 0 !important;
}

body.page-inner .container-marginup {
    top: 0 !important;
    position: static !important;
    padding-top: 0.5rem;
    padding-bottom: 2.5rem;
}

body.page-inner .hoofdDiv .title,
body.page-inner .hoofdDiv h1,
body.page-inner .hoofdDiv h2,
body.page-inner .hoofdDiv h3,
body.page-inner .hoofdDiv p,
body.page-inner .hoofdDiv li,
body.page-inner .hoofdDiv .toolbar,
body.page-inner .hoofdDiv .toolbar a,
body.page-inner .hoofdDiv a:not(.btn):not(.home-btn) {
    color: #1a171b;
}

body.page-inner .hoofdDiv a:not(.btn):not(.home-btn):hover {
    color: #8b1e1e;
}

body.page-inner .hp-back a,
body.page-inner .hp-meta,
body.page-inner .hp-event-meta {
    color: #5c5650;
}

/* Hide duplicate scraped page titles (hero shows the title) */
body.page-inner #contentPanel > .container > .row:first-child .middentext,
body.page-inner #content > .row:first-child .center-block:has(.middentext) {
    display: none !important;
}

/* Legacy scraped page titles were white-on-dark; force dark text on light bg */
body.page-inner .middentext,
body.page-inner .bluecolor,
body.page-inner h1.middentext,
body.page-inner h1.middentext b,
body.page-inner h1.middentext span {
    color: #1a171b !important;
    top: 0 !important;
    position: static !important;
    font-size: clamp(1.75rem, 3vw, 2.35rem) !important;
    letter-spacing: normal !important;
}

/* Legacy .pink content panel used fixed vw offsets from old homepage layout */
body.page-inner #contentPanel.pink,
body.page-inner .pink {
    left: auto !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto 2rem !important;
    position: relative !important;
    background-color: transparent !important;
    padding: 0;
}

/* Kill negative top offsets that pulled content over the hero */
body.page-inner #main-content,
body.page-inner #main-content.row,
body.page-inner .floated,
body.page-inner #maincontainer {
    top: 0 !important;
    margin-top: 0 !important;
    position: relative !important;
    left: auto !important;
    float: none !important;
    width: 100% !important;
    max-width: none !important;
}

/* Scraped breadcrumbs replaced by site-breadcrumbs */
body.page-inner #NavigationDiv,
body.page-inner .navigatie,
body.page-inner .container.info2:has(#NavigationDiv) {
    display: none !important;
}

body.page-inner #content {
    padding-top: 0.5rem;
}

/* Content that follows the hero/breadcrumb must clear the hero band */
body.page-inner .page-hero + #main,
body.page-inner .site-breadcrumbs + #main,
body.page-inner .site-breadcrumbs + .page-section,
body.page-inner .site-breadcrumbs + .page-body,
body.page-inner .site-breadcrumbs + .nieuws-page,
body.page-inner .site-breadcrumbs + .agenda-page {
    clear: both;
}

/* Kill legacy vw paragraph widths — do not put max-width:100% on
   .page-content itself or it overrides .site-wrap's --site-max. */
body.page-inner .page-content {
    width: auto !important;
    font-size: inherit !important;
    line-height: 1.65 !important;
}

body.page-inner .page-content p,
body.page-inner .page-content li {
    width: auto !important;
    font-size: inherit !important;
    line-height: 1.65 !important;
}

/* Long-form text: readable measure inside the site container */
body.page-inner .page-section.page-content > :where(p, h2, h3, ul, ol, blockquote, table),
body.page-inner .page-article > :where(p, h2, h3, ul, ol, blockquote, table) {
    max-width: 42rem !important;
}

/* Ensure every content band respects the shared site container */
body.page-inner .site-wrap {
    max-width: var(--site-max) !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: var(--site-gutter) !important;
    padding-right: var(--site-gutter) !important;
    box-sizing: border-box !important;
}

body.page-inner .hp-article {
    max-width: none;
}

/* Kill legacy header/footer positioning from theme CSS */
.mKerkHead,
.divNavBar,
.divNavBarPhone,
.mKerkBadge,
.mKerkSocialMediaText {
    display: none !important;
}

footer.site-footer .footer-fixed-bottom,
.footer-fixed-bottom {
    position: static !important;
    height: auto !important;
    min-height: 0 !important;
}

/* Force footer copy text white against legacy theme rules */
.site-footer,
.site-footer p,
.site-footer span,
.site-footer a,
.site-footer li {
    color: #fff !important;
}

.site-footer .site-footer__heading {
    color: #bdb699 !important;
}
