/*
Theme Name: MSPB Editie
Description: Thema voor de Duitse en Engelse editie van MSP Business (mspbusiness.com/de en /en), in de stijl van mspbusiness.com. Met taalschakelaar NL/DE/EN, hreflang en REST-velden voor de Nieuwseditor.
Version: 1.0.9
Author: Marcel Debets
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: mspb-editie
*/

:root {
    --primary: #e84743;
    --secondary: #612f4d;
    --light: #deb3d2;
    --tekst: #293133;
    --grijs: #555;
    --lijn: #ccc;
    --lijn-licht: #ddd;
    --link: #1d70b7;
    --breedte: 1150px;
}

/* ---------- Basis ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: Lato, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--tekst);
    background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5 { margin: 0 0 .5rem; font-weight: 700; line-height: 1.2; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; }
button { font-family: inherit; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 10000; background: #fff; padding: 8px 12px; }
.skip-link:focus { left: 10px; top: 10px; }

.container { width: 100%; max-width: var(--breedte); margin: 0 auto; padding: 0 30px; }

.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.row > [class^="col-"] { padding: 0 15px; }
.col-4 { width: 33.3333%; }
.col-6 { width: 50%; }

.btn {
    display: inline-block;
    padding: 12px 18px;
    border: 2px solid transparent;
    font-size: 11.25px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    background: transparent;
    text-decoration: none !important;
    transition: background .15s, color .15s;
}
.btn-dark { background: #343a40; border-color: #343a40; color: #fff; }
.btn-dark:hover { background: #23272b; }
.btn-outline-dark { border-color: #343a40; color: #343a40; }
.btn-outline-dark:hover { background: #343a40; color: #fff; }
.btn-block { display: block; width: 100%; }

.form-control {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    font: inherit;
    color: var(--tekst);
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 0;
}
.input-group { display: flex; }
.input-group .form-control { flex: 1; }
.input-group .btn { flex-shrink: 0; }

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

.site-header-wrap { position: relative; z-index: 40; height: 105px; }
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 999; background: var(--primary); color: #fff; }
.admin-bar .site-header { top: 32px; }
.site-header-container { display: flex; align-items: center; height: 105px; transition: height .2s; }
.site-header.sticky .site-header-container { height: 75px; }

.site-header-logo { display: inline-flex; align-items: center; height: 100%; flex-shrink: 0; margin-right: 15px; color: #fff; text-decoration: none !important; }
.site-header-logo .logo { height: 70px; width: auto; transition: height .2s; }
.site-header-logo .logo-small { display: none; height: 40px; width: auto; }
.site-header.sticky .site-header-logo .logo { display: none; }
.site-header.sticky .site-header-logo .logo-small { display: block; }

.site-header-content { display: flex; align-items: center; flex: 1; padding: 0 0 0 25px; }
.main-nav { flex: 1; }
.main-nav-list { list-style: none; display: flex; flex-wrap: wrap; }
.main-nav-list a {
    display: block;
    padding: 6.75px 7.5px;
    margin-right: 15px;
    color: #fff;
    font-size: 13.125px;
    font-weight: 700;
    text-transform: uppercase;
}
.main-nav-list a:hover, .main-nav-list .current-menu-item > a { text-decoration: underline; text-underline-offset: 4px; }

.main-search, .mobile-search-btn { color: #fff; display: inline-flex; padding: 8px; }
.main-search:hover { opacity: .85; }
.mobile-search-btn, .toggle-mobile-nav-btn { display: none; }
.toggle-mobile-nav-btn { background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }

.lang-switch ul { list-style: none; display: flex; align-items: center; }
.lang-switch li { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; }
.lang-switch li + li::before { content: ''; display: inline-block; width: 1px; height: 12px; margin: 0 8px; background: currentColor; opacity: .5; vertical-align: middle; }
.lang-switch a { color: inherit; opacity: .8; }
.lang-switch a:hover { opacity: 1; }
.lang-switch .current span { border-bottom: 2px solid currentColor; padding-bottom: 1px; }
.site-header .lang-switch { margin: 0 12px; color: #fff; }

/* ---------- Subnavigatie ---------- */

.sub-nav-wrap { background: var(--light); position: relative; z-index: 30; }
.sub-nav-list { list-style: none; display: flex; flex-wrap: wrap; }
.sub-nav-list li + li { margin-left: 5px; }
.sub-nav-list a {
    display: block;
    position: relative;
    padding: 13px 10px 15px;
    color: var(--tekst);
    font-size: 14.025px;
    text-decoration: none !important;
}
.sub-nav-list a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: transparent; }
.sub-nav-list a:hover::after { background: #aaa; }
.sub-nav-list .current-menu-item > a, .sub-nav-list .current-cat > a { font-weight: 700; }
.sub-nav-list .current-menu-item > a::after, .sub-nav-list .current-cat > a::after { background: var(--primary); }

/* ---------- Opbouw ---------- */

.main-container { display: flex; align-items: flex-start; padding-top: 37.5px; }
.main-content { width: calc(100% - 290px); min-width: 0; }
.main-sidebar { width: 290px; padding-left: 30px; flex-shrink: 0; }

/* ---------- Slider ---------- */

.main-teaser-slider { position: relative; overflow: hidden; margin-bottom: 30px; background: #000; }
.main-teaser-track { display: flex; transition: transform .5s ease; }
.main-teaser { position: relative; flex: 0 0 100%; }
.main-teaser-link { display: block; color: #fff; }
.main-teaser-image { position: relative; aspect-ratio: 16 / 9; }
.main-teaser-image img, .main-teaser-image .beeld-leeg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.main-teaser-header {
    position: absolute;
    left: 0;
    right: 50px;
    bottom: 60px;
    max-width: 540px;
    padding: 10px 30px 12px;
    background: rgba(0, 0, 0, .75);
    color: #fff;
    z-index: 2;
}
.main-teaser-header::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--primary); }
.main-teaser-title { font-size: 22.5px; line-height: 1.3; font-weight: 400; margin: 0; }
.main-teaser-link:hover .main-teaser-title { text-decoration: underline; }

.slider-arrow {
    position: absolute;
    top: 50%;
    margin-top: -33px;
    z-index: 5;
    padding: 6px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .75);
    cursor: pointer;
}
.slider-arrow:hover { color: #fff; }
.slider-prev { left: 4px; }
.slider-next { right: 4px; }
.slider-dots { position: absolute; left: 30px; bottom: 24px; z-index: 5; display: flex; gap: .5rem; list-style: none; }
.slider-dots button {
    display: block;
    width: 14px;
    height: 14px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, .75);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}
.slider-dots button:hover { border-color: #fff; }
.slider-dots button.active { background: #fff; }

/* ---------- Teasers ---------- */

.teaser-link { display: block; color: var(--tekst); text-decoration: none !important; }
.teaser-link:hover .teaser-title { text-decoration: underline; }
.teaser-image { position: relative; aspect-ratio: 16 / 9; background: #f0f2f3; overflow: hidden; }
.teaser-image img { width: 100%; height: 100%; object-fit: cover; }
.beeld-leeg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--light), #f0f2f3); }

.teaser-subtitle {
    display: flex;
    max-width: 100%;
    margin: 0;
    padding-top: .125rem;
    overflow: hidden;
    font-size: 11.25px;
    font-weight: 400;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.teaser-category { color: var(--primary); margin-right: 4px; }
.teaser-label { font-weight: 300; }
.teaser-image .teaser-subtitle { position: absolute; left: 0; bottom: 0; padding: .5rem .5rem 0 0; background: #fff; }
.teaser-title { margin: 7.5px 0 0; font-size: 15px; font-weight: 400; line-height: 1.4; }
.teaser-excerpt { margin-top: 8px; font-size: 14px; line-height: 1.55; }
.teaser-date { margin-top: 6px; font-size: 13px; color: var(--grijs); }

.curated-row { margin-bottom: 40px; row-gap: 25px; }

/* Categorieblokken op de homepage */
.category-teasers { border-top: 1px solid var(--lijn); padding-top: 2rem; margin-bottom: 3.5rem; }
.category-title { font-size: 26.25px; font-weight: 700; margin: 0 0 1.5rem; }
.category-title a { color: inherit; }
.category-teaser-lg .teaser-header { margin-top: 10px; }
.category-teaser-lg .teaser-title { font-size: 18px; font-weight: 700; }

.teaser-row { padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--lijn-licht); }
.teaser-row .teaser-link { display: flex; gap: 14px; }
.teaser-row .teaser-image { width: 33.333%; flex-shrink: 0; align-self: flex-start; }
.teaser-row .teaser-header { flex: 1; min-width: 0; }
.teaser-row .teaser-title { margin-top: 6px; }
.small-category-teasers .teaser-row:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.more-category-news-btn { margin-top: 1.5rem; }

/* Archief- en zoeklijsten */
.archive-header { margin-bottom: 1.5rem; }
.archive-header .category-title { margin-bottom: .75rem; }
.archive-description { color: var(--grijs); }
.archive-header .search-form { max-width: 520px; margin-top: 1rem; }
.teaser-row-intro { padding-bottom: 1.5rem; margin-bottom: 1.5rem; }
.teaser-row-intro .teaser-image { width: 38%; }
.teaser-row-intro .teaser-title { font-size: 18px; font-weight: 700; }

.pagination { margin: 2rem 0; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers { display: inline-block; min-width: 40px; padding: 8px 12px; border: 1px solid #343a40; color: #343a40; text-align: center; font-size: 13px; font-weight: 700; text-decoration: none; }
.pagination .page-numbers.current, .pagination a.page-numbers:hover { background: #343a40; color: #fff; }
.pagination .page-numbers.dots { border-color: transparent; }
.mt { margin-top: 1.5rem; }

/* ---------- Zijbalk ---------- */

.sidebar-block { margin-bottom: 30px; }
.sidebar-block-title {
    margin: 0 0 15px;
    border-bottom: 1px solid #999;
    font-size: 13.125px;
    font-weight: 700;
    text-transform: uppercase;
}
.sidebar-block-title span { display: inline-block; padding-bottom: 8px; margin-bottom: -1px; border-bottom: 2px solid var(--primary); }
.sidebar-block-newsletter { padding: 25px 20px 30px; background: var(--primary); color: #fff; font-size: 14.025px; }
.sidebar-block-newsletter .sidebar-block-title { border-bottom: 0; color: #fff; }
.sidebar-block-newsletter .sidebar-block-title span { border-bottom: 0; padding-bottom: 0; }
.most-read-list { list-style: none; }
.most-read-list li { padding: 10px 0; border-bottom: 1px solid var(--lijn-licht); }
.most-read-list li:first-child { padding-top: 0; }
.most-read-list h4 { margin: 0; font-size: 14.025px; font-weight: 400; line-height: 1.4; }
.most-read-list h4 a { color: var(--tekst); }
.most-read-list .time { margin-top: 3px; font-size: 12px; color: #999; }
.main-sidebar .widget ul { list-style: none; }
.main-sidebar .widget li { padding: 6px 0; border-bottom: 1px solid var(--lijn-licht); }

/* ---------- Artikel ---------- */

.post-header { padding-right: 50px; }
.post-subtitle { margin: 0 0 7.5px; font-size: 13.125px; font-weight: 700; text-transform: uppercase; }
.post-subtitle .teaser-label { font-weight: 300; }
.post-title { margin: 0 0 7.5px; font-size: 33.75px; font-weight: 900; line-height: 1.1; }
.post-date { font-size: 14.025px; color: var(--grijs); }
.post-author-top { margin-left: 8px; }
.post-article-without-hero .post-header { padding-bottom: 25px; margin-bottom: 10px; border-bottom: 1px solid var(--lijn); }
.post-hero { position: relative; margin-top: 20px; }
.post-hero-image img { width: 100%; }
.mspb-video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.mspb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mspb-video-oembed { aspect-ratio: auto; background: none; }
.mspb-video-oembed iframe { position: static; height: auto; aspect-ratio: 16 / 9; }
.post-hero-caption { position: relative; max-width: 90%; margin-top: -30px; }
.post-hero-caption .image-caption { display: inline-block; padding: 6px 25px 6px 12px; background: #fff; font-size: 14px; color: var(--grijs); }

.post-content { margin: 0 100px; padding: 20px 0; font-size: 15.9375px; line-height: 1.7; overflow-wrap: break-word; }
.post-content-page { margin: 0; }
.post-content p { margin: 0 0 15px; }
.post-content h2 { font-size: 30px; margin: 1.5rem 0 7.5px; }
.post-content h3 { font-size: 24px; margin: 1.5rem 0 7.5px; }
.post-content h4 { font-size: 20px; margin: 1.5rem 0 7.5px; }
.post-content a { color: #343434; font-weight: 700; text-decoration: underline; text-decoration-color: var(--primary); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.post-content a:hover { color: var(--primary); }
.post-content ul, .post-content ol { margin: 0 0 15px; padding-left: 1.4em; }
.post-content li { margin-bottom: 4px; }
.post-content img { margin: 1rem 0; }
.post-content figure, .post-content .wp-caption { max-width: 100%; margin: 1.25rem 0; }
.post-content figure img, .post-content .wp-caption img { margin: 0; }
.post-content figcaption, .post-content .wp-caption-text { margin-top: .25em; font-size: 14px; color: var(--grijs); }
.post-content blockquote {
    position: relative;
    margin: 1.5rem 0;
    padding-left: 20px;
    border-left: 5px solid var(--primary);
    font-size: 28px;
    line-height: 1.4;
    font-weight: 300;
}
.post-content blockquote p { display: inline; }
.post-content blockquote::before { content: '\201C'; color: var(--primary); }
.post-content blockquote::after { content: '\201D'; color: var(--primary); }
.post-content table { width: 100%; border-collapse: collapse; margin: .5em 0 1em; font-size: 14.5px; }
.post-content td, .post-content th { border: 1px solid #999; padding: 6px 10px; vertical-align: top; }
.post-content iframe { max-width: 100%; }
.post-content .wp-block-embed__wrapper iframe, .post-content .wp-block-embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }

.post-content .mspb-markering { padding: 8px 12px; background: #f0f2f3; border-left: 4px solid var(--primary); font-size: 14px; }
.post-origineel { margin-top: 2rem !important; padding: 12px 16px; background: #f0f2f3; border-left: 4px solid var(--light); font-size: 14px; line-height: 1.5; }

.post-tags { margin-top: 15px; padding: 15px 0; border-top: 1px solid var(--lijn); border-bottom: 1px solid var(--lijn); }
.post-tags h5 { margin: 0 0 5px; font-size: 13px; text-transform: uppercase; }
.post-tags ul { list-style: none; padding: 0; margin: 0; }
.post-tags li { display: inline-block; margin: 3px 2px 3px 0; }
.post-tags a { display: inline-block; padding: 6px 12px; border: 1px solid var(--tekst); color: var(--tekst); font-size: .875rem; font-weight: 400; text-transform: uppercase; text-decoration: none; }
.post-tags a:hover { background: var(--tekst); color: #fff; }

.newsletter-cta { display: flex; margin-top: 60px; background: var(--primary); color: #fff; }
.newsletter-cta .title-col { width: 50%; padding: 30px; display: flex; align-items: center; }
.newsletter-cta .title-col h2 { margin: 0; font-size: 30px; font-weight: 900; line-height: 1.15; }
.newsletter-cta .form-col { width: 50%; padding: 30px; background: var(--secondary); }
.newsletter-cta .form-col h4 { font-size: 15px; }
.newsletter-cta .form-control { margin: 12px 0; }

.related-posts { margin-top: 50px; }
.related-posts .row { row-gap: 25px; }

/* ---------- Nieuwsbriefbalk en footer ---------- */

.bottom-newsletter { margin-top: 60px; padding: 30px 0; background: var(--primary); color: #fff; }
.bottom-newsletter .container { display: flex; align-items: center; gap: 30px; }
.bottom-newsletter-tekst { flex: 7; }
.bottom-newsletter h4 { font-size: 20px; font-weight: 900; margin: 0 0 4px; }
.bottom-newsletter p { margin: 0; }
.bottom-newsletter form { flex: 5; }

.site-footer { padding: 75px 0 90px; background: var(--secondary); color: #fff; font-size: 14.025px; font-weight: 300; }
.bottom-newsletter + .site-footer { margin-top: 0; }
body:not(:has(.bottom-newsletter)) .site-footer { margin-top: 60px; }
.footer-row { display: flex; flex-wrap: wrap; gap: 30px; }
.footer-col { flex: 1 1 160px; }
.footer-col-about { flex: 2 1 240px; }
.footer-col-logo { flex: 2 1 240px; }
.site-footer h4 { margin: 0 0 15px; font-size: 14.025px; font-weight: 700; text-transform: uppercase; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; }
.footer-nav li { margin-bottom: 6px; }
.footer-nav li + li { margin-left: 0; }
.footer-nav a { font-weight: 300; padding: 0; font-size: 14.025px; color: #fff; }
.footer-nav a::after { display: none; }
.footer-logo { display: inline-block; margin-bottom: 20px; color: #fff; text-decoration: none !important; }
.footer-logo .logo { height: 60px; width: auto; }
.footer-logo .logo-small { display: none; }
.lang-switch-footer { margin-bottom: 15px; }
.inline-footer-nav ul { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.copyright { margin-top: 15px; opacity: .7; font-size: 13px; }

/* ---------- Mobiel menu ---------- */

#side-overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    z-index: 1100;
    overflow-y: auto;
    background: var(--secondary);
    color: #fff;
    transform: translateX(-100%);
    transition: transform .25s ease;
}
.side-overlay-open #side-overlay { transform: none; }
.side-overlay-backdrop { position: fixed; inset: 0; z-index: 1050; background: rgba(0, 0, 0, .5); opacity: 0; visibility: hidden; transition: opacity .25s; }
.side-overlay-open .side-overlay-backdrop { opacity: 1; visibility: visible; }
.side-header { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.close-mobile-nav-btn { background: none; border: 0; color: #fff; cursor: pointer; padding: 4px; margin-left: auto; }
.main-nav-mobile { padding: 10px 20px 30px; }
.mobile-nav-list, .main-nav-mobile .sub-nav-list { list-style: none; display: block; }
.mobile-nav-list a, .main-nav-mobile .sub-nav-list a { display: block; padding: 10px 0; color: #fff; font-size: 17px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.mobile-nav-list:first-child a { text-transform: uppercase; font-weight: 700; font-size: 15px; }
.mobile-nav-sub, .main-nav-mobile .sub-nav-list { margin-top: 20px; }
.main-nav-mobile .sub-nav-list li + li { margin-left: 0; }
.main-nav-mobile .sub-nav-list a::after { display: none; }

/* ---------- Responsief ---------- */

@media (max-width: 1199px) {
    .main-content { width: calc(100% - 250px); }
    .main-sidebar { width: 250px; padding-left: 20px; }
    .post-content { margin: 0 40px; }
    .site-header-content { padding-left: 15px; }
    .main-nav-list a { margin-right: 6px; }
}

@media (max-width: 991px) {
    .site-header-wrap, .site-header-container, .site-header.sticky .site-header-container { height: 60px; }
    .site-header-container { padding: 0 5px; justify-content: space-between; }
    .site-header-content { display: none; }
    .toggle-mobile-nav-btn, .mobile-search-btn { display: inline-flex; }
    .site-header-logo { margin: 0 auto; }
    .site-header-logo .logo, .site-header.sticky .site-header-logo .logo { display: block; height: 32px; }
    .site-header.sticky .site-header-logo .logo-small { display: none; }
    .admin-bar .site-header { top: 46px; }

    .sub-nav-wrap { overflow: hidden; height: 48px; }
    .sub-nav-wrap .container { padding: 0; max-width: 100%; }
    .sub-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 20px; }
    .sub-nav-list { flex-wrap: nowrap; white-space: nowrap; padding: 0 10px; }
    .sub-nav-list li + li { margin-left: 2px; }

    .main-container { flex-direction: column; }
    .main-content { width: 100%; }
    .main-sidebar { width: 100%; padding-left: 0; margin-top: 40px; }
    .post-header { padding-right: 0; }
}

@media (max-width: 767px) {
    .container { padding: 0 15px; }
    .main-container { padding-top: 20px; }
    .row { margin: 0 -10px; }
    .row > [class^="col-"] { padding: 0 10px; }
    .col-4, .col-6 { width: 100%; }
    .curated-row .col-4 { margin-bottom: 0; }

    .main-teaser-slider { margin-left: -15px; margin-right: -15px; }
    .main-teaser-header { bottom: 40px; right: 0; padding-left: 15px; }
    .main-teaser-header::before { display: none; }
    .main-teaser-title { font-size: 18px; }
    .slider-arrow { display: none; }
    .slider-dots { left: 15px; bottom: 15px; }

    .category-teaser-lg { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--lijn); }
    .small-category-teasers { margin-top: 0; }
    .teaser-row-intro .teaser-image { width: 33.333%; }
    .teaser-row-intro .teaser-title { font-size: 15px; }
    .teaser-row-intro .teaser-excerpt { display: none; }

    .post-title { font-size: 26px; }
    .post-hero { margin-left: -15px; margin-right: -15px; }
    .post-hero-caption .image-caption { font-size: 12px; }
    .post-content { margin: 0; font-size: 16px; }
    .post-content blockquote { font-size: 22px; }
    .post-content table { display: block; overflow-x: auto; }
    .newsletter-cta { flex-direction: column; }
    .newsletter-cta .title-col, .newsletter-cta .form-col { width: 100%; }

    .bottom-newsletter .container { flex-direction: column; align-items: stretch; gap: 15px; }
    .site-footer { padding: 50px 0 60px; }
}
