/*
Theme Name: Roland 2026
Theme URI: https://www.roland-kamphuis.nl/
Author: OpenAI, voor Roland Kamphuis
Description: Een moderne, responsive herinterpretatie van PrimePress voor roland-kamphuis.nl. Content-first, snelle laadtijd, compacte sidebar en ondersteuning voor willekeurige headerafbeeldingen.
Version: 1.2.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
Text Domain: roland-2026
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --rk-bg: #f4f6f8;
  --rk-surface: #ffffff;
  --rk-surface-soft: #eef2f5;
  --rk-text: #18212b;
  --rk-muted: #65727f;
  --rk-line: #dce3e9;
  --rk-accent: #1769aa;
  --rk-accent-strong: #0e4f85;
  --rk-header: #101820;
  --rk-radius: 14px;
  --rk-shadow: 0 12px 32px rgba(25, 45, 65, .08);
  --rk-content: 760px;
  --rk-sidebar: 300px;
  --rk-wide: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--rk-text);
  background: var(--rk-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--rk-accent); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--rk-accent-strong); }
button, input, textarea, select { font: inherit; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus,
.skip-link:focus {
  top: 8px; left: 8px; width: auto; height: auto; clip: auto;
  padding: .65rem .9rem; background: #fff; color: #111; z-index: 9999;
  border-radius: 8px; box-shadow: var(--rk-shadow);
}
:focus-visible { outline: 3px solid rgba(23, 105, 170, .38); outline-offset: 3px; }

.site-shell { width: min(calc(100% - 32px), var(--rk-wide)); margin-inline: auto; }

/* Header */
.site-header { background: var(--rk-surface); border-bottom: 1px solid var(--rk-line); }
.masthead-row {
  min-height: 92px; display: flex; align-items: center; gap: 28px;
  justify-content: space-between;
}
.site-branding { min-width: 0; }
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo-link img { display: block; width: auto; max-height: 58px; }
.site-title {
  margin: 0; font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.05;
  letter-spacing: -.035em; font-weight: 780;
}
.site-title a { color: var(--rk-text); text-decoration: none; }
.site-description { margin: .35rem 0 0; color: var(--rk-muted); font-size: .92rem; }

.primary-nav { display: flex; align-items: center; gap: 12px; }
.primary-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.primary-menu li { position: relative; }
.primary-menu a {
  display: block; padding: .65rem .72rem; color: var(--rk-text); text-decoration: none;
  border-radius: 9px; font-weight: 650; font-size: .94rem;
}
.primary-menu a:hover, .primary-menu .current-menu-item > a, .primary-menu .current_page_item > a { background: var(--rk-surface-soft); color: var(--rk-accent-strong); }
.primary-menu .sub-menu,
.primary-menu .children {
  position: absolute; top: 100%; left: 0; z-index: 30; min-width: 220px;
  list-style: none; padding: 8px; margin: 0; background: #fff; border: 1px solid var(--rk-line);
  border-radius: 12px; box-shadow: var(--rk-shadow); opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(6px); transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.primary-menu li:hover > .sub-menu,
.primary-menu li:hover > .children,
.primary-menu li:focus-within > .sub-menu,
.primary-menu li:focus-within > .children {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
}
.primary-menu .sub-menu a,
.primary-menu .children a { white-space: nowrap; font-weight: 600; }
.submenu-toggle {
  display: none;
}
.menu-toggle {
  display: none; min-width: 44px; min-height: 44px; border: 1px solid var(--rk-line); border-radius: 10px;
  background: #fff; color: var(--rk-text); cursor: pointer;
}
.menu-toggle-lines, .menu-toggle-lines::before, .menu-toggle-lines::after {
  display: block; width: 20px; height: 2px; background: currentColor; border-radius: 5px; content: ""; margin: auto;
}
.menu-toggle-lines { position: relative; }
.menu-toggle-lines::before { position: absolute; top: -6px; }
.menu-toggle-lines::after { position: absolute; top: 6px; }

.header-photo {
  position: relative; min-height: clamp(180px, 25vw, 310px); background-color: #24313d;
  background-position: center; background-size: cover; overflow: hidden;
}
.header-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(9, 19, 27, .20), transparent 45%, rgba(9, 19, 27, .05));
  pointer-events: none;
}
.header-photo-inner { position: relative; z-index: 1; min-height: inherit; }
.header-photo-badge {
  position: absolute; left: 0; bottom: 18px; display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem .72rem; color: rgba(255,255,255,.92); background: rgba(7,16,24,.62);
  border: 1px solid rgba(255,255,255,.16); border-radius: 999px; backdrop-filter: blur(8px);
  font-size: .78rem; font-weight: 650; letter-spacing: .015em;
}

/* Main layout */
.site-main-wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--rk-sidebar); gap: 44px;
  align-items: start; padding-block: 48px 64px;
}
.content-area { min-width: 0; }
.page-header { margin-bottom: 30px; }
.page-title { margin: 0; font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.15; letter-spacing: -.035em; }
.archive-description { color: var(--rk-muted); }

/* Posts */
.post-card {
  background: var(--rk-surface); border: 1px solid var(--rk-line); border-radius: var(--rk-radius);
  overflow: clip; box-shadow: 0 2px 10px rgba(25,45,65,.035); margin-bottom: 28px;
}
.post-card-media { aspect-ratio: 16 / 8.5; background: var(--rk-surface-soft); overflow: hidden; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.post-card:hover .post-card-media img { transform: scale(1.012); }
.post-card-body { padding: clamp(22px, 4vw, 34px); }
.entry-title { margin: 0 0 .55rem; font-size: clamp(1.5rem, 3vw, 2.05rem); line-height: 1.18; letter-spacing: -.03em; }
.entry-title a { color: var(--rk-text); text-decoration: none; }
.entry-title a:hover { color: var(--rk-accent-strong); }
.entry-meta {
  display: flex; flex-wrap: wrap; gap: .35rem .9rem; align-items: center;
  color: var(--rk-muted); font-size: .83rem; margin-bottom: 1.25rem;
}
.entry-meta a { color: inherit; }
.entry-summary > :first-child, .entry-content > :first-child { margin-top: 0; }
.entry-summary > :last-child, .entry-content > :last-child { margin-bottom: 0; }
.entry-summary { color: #283746; }
.home-post-content { color: #283746; }
.home-post-content h2,
.home-post-content h3,
.home-post-content h4 { line-height: 1.3; letter-spacing: -.02em; margin-top: 1.8em; }
.home-post-content p { margin: 1.05em 0; }
.home-post-content pre { overflow-x: auto; padding: 1rem; background: #111923; color: #e9f0f5; border-radius: 10px; font-size: .88rem; }
.home-post-content blockquote { margin: 1.6rem 0; padding-left: 1.15rem; border-left: 4px solid var(--rk-accent); color: #344454; }
.home-post-content .wp-block-image,
.home-post-content figure { max-width: 100%; }
.home-post-content figcaption { color: var(--rk-muted); font-size: .8rem; margin-top: .4rem; }
.read-more,
.more-link { display: inline-flex; align-items: center; margin-top: 1.35rem; font-weight: 750; text-decoration: none; }
.home-post-content > p:has(> .more-link) { margin-bottom: 0; }
.post-taxonomy { padding-top: 1.3rem; margin-top: 1.5rem; border-top: 1px solid var(--rk-line); color: var(--rk-muted); font-size: .84rem; }

/* Single */
.single-article {
  background: var(--rk-surface); border: 1px solid var(--rk-line); border-radius: var(--rk-radius);
  overflow: hidden; box-shadow: var(--rk-shadow);
}
.single-hero img { width: 100%; display: block; max-height: 620px; object-fit: cover; }
.single-body { padding: clamp(24px, 5vw, 52px); }
.single-body .entry-title { font-size: clamp(2rem, 5vw, 3.4rem); }
.entry-content { font-size: 1.02rem; }
.entry-content h2, .entry-content h3, .entry-content h4 { line-height: 1.25; letter-spacing: -.025em; margin-top: 2.2em; }
.entry-content h2 { font-size: 1.65em; }
.entry-content h3 { font-size: 1.35em; }
.entry-content p { margin: 1.15em 0; }
.entry-content blockquote {
  margin: 1.8rem 0; padding: .1rem 0 .1rem 1.3rem; border-left: 4px solid var(--rk-accent);
  color: #344454; font-size: 1.06em;
}
.entry-content pre { overflow-x: auto; padding: 1rem; background: #111923; color: #e9f0f5; border-radius: 10px; font-size: .88rem; }
.entry-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.entry-content th, .entry-content td { padding: .65rem .75rem; border: 1px solid var(--rk-line); text-align: left; }
.entry-content .wp-caption, .entry-content figure { max-width: 100%; }
.entry-content figcaption { color: var(--rk-muted); font-size: .8rem; margin-top: .4rem; }

/* Sidebar */
.sidebar { position: sticky; top: 24px; align-self: start; }
@media (min-width: 901px) {
  .sidebar {
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
    scrollbar-width: thin;
  }
  body.admin-bar .sidebar {
    top: 56px;
    max-height: calc(100vh - 80px);
  }
}
.sidebar-card, .widget {
  padding: 20px; margin: 0 0 18px; background: var(--rk-surface); border: 1px solid var(--rk-line);
  border-radius: 12px;
}
.sidebar-title, .widget-title, .widget .wp-block-heading {
  margin: 0 0 12px; color: var(--rk-text); font-size: .78rem; line-height: 1.2;
  text-transform: uppercase; letter-spacing: .09em; font-weight: 800;
}
.widget ul, .sidebar-list { list-style: none; padding: 0; margin: 0; }
.widget li, .sidebar-list li { padding: .42rem 0; border-bottom: 1px solid #edf1f4; font-size: .9rem; line-height: 1.45; }
.widget li:last-child, .sidebar-list li:last-child { border-bottom: 0; }
.widget a, .sidebar-list a { color: #334658; text-decoration: none; }
.widget a:hover, .sidebar-list a:hover { color: var(--rk-accent); }
.widget_archive ul { max-height: 23rem; overflow: auto; }
.sidebar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-link {
  display: inline-flex; align-items: center; gap: .42rem; padding: .46rem .68rem;
  border: 1px solid var(--rk-line); border-radius: 999px; color: #425365; background: #fff;
  text-decoration: none; font-size: .8rem; font-weight: 720;
}
.pill-link:hover { border-color: #b6c6d4; background: var(--rk-surface-soft); }
.archive-details summary { cursor: pointer; font-weight: 700; font-size: .88rem; color: #334658; }
.archive-details ul { margin-top: 10px; }
.search-form { display: flex; gap: 8px; }
.search-field {
  width: 100%; min-width: 0; border: 1px solid #cfd9e1; border-radius: 9px; padding: .68rem .75rem;
  background: #fff; color: var(--rk-text);
}
.search-submit {
  border: 0; border-radius: 9px; padding: .68rem .82rem; background: var(--rk-accent); color: #fff;
  cursor: pointer; font-weight: 750;
}

/* Navigation + comments */
.posts-navigation, .post-navigation { margin: 30px 0; }
.nav-links { display: flex; justify-content: space-between; gap: 16px; }
.nav-links a { display: block; padding: .75rem 1rem; background: #fff; border: 1px solid var(--rk-line); border-radius: 9px; text-decoration: none; font-weight: 700; }
.comments-area { margin-top: 28px; padding: clamp(22px, 4vw, 34px); background: #fff; border: 1px solid var(--rk-line); border-radius: var(--rk-radius); }
.comment-list { padding-left: 1.2rem; }
.comment-body { padding: 1rem 0; border-bottom: 1px solid var(--rk-line); }
.comment-form textarea, .comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] { width: 100%; border: 1px solid #ccd6df; border-radius: 9px; padding: .7rem; }
.form-submit .submit { border: 0; border-radius: 9px; padding: .7rem 1rem; background: var(--rk-accent); color: #fff; font-weight: 750; cursor: pointer; }

/* Footer */
.site-footer { background: #111a23; color: #aeb9c3; padding: 36px 0; }
.footer-row { display: flex; justify-content: space-between; gap: 22px; align-items: center; }
.site-footer a { color: #e3ebf2; }
.footer-meta { font-size: .82rem; }
.footer-feed { opacity: .82; font-size: .82rem; }

/* Utility */
.empty-state { padding: 30px; background: #fff; border: 1px solid var(--rk-line); border-radius: var(--rk-radius); }
.wp-block-image img, .entry-content img { border-radius: 8px; }
.alignwide { width: min(100%, 980px); max-width: 980px; }
.alignfull { width: 100%; max-width: none; }

@media (max-width: 900px) {
  .site-shell { width: min(calc(100% - 24px), var(--rk-wide)); }
  .masthead-row { min-height: 76px; }
  .site-description { display: none; }
  .menu-toggle { display: grid; place-items: center; }
  .primary-menu {
    display: none; position: absolute; top: 68px; right: 12px; left: 12px; z-index: 50;
    padding: 10px; background: #fff; border: 1px solid var(--rk-line); border-radius: 12px;
    box-shadow: var(--rk-shadow); flex-direction: column; align-items: stretch;
  }
  .primary-menu.is-open { display: flex; }
  .primary-menu li { width: 100%; }
  .primary-menu li.menu-item-has-children,
  .primary-menu li.page_item_has_children { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .primary-menu a { padding: .78rem .85rem; }
  .submenu-toggle {
    display: grid; place-items: center; width: 42px; height: 42px; margin-right: 2px;
    border: 0; border-radius: 8px; background: transparent; color: var(--rk-text); cursor: pointer;
    font-size: 1.2rem; line-height: 1;
  }
  .submenu-toggle:hover { background: var(--rk-surface-soft); }
  .submenu-toggle::before { content: "+"; }
  .submenu-toggle[aria-expanded="true"]::before { content: "−"; }
  .primary-menu .sub-menu,
  .primary-menu .children {
    grid-column: 1 / -1; position: static; opacity: 1; visibility: visible; pointer-events: auto; transform: none;
    box-shadow: none; border: 0; padding: 0 0 0 .8rem; min-width: 0; display: none; background: transparent;
  }
  .primary-menu li.submenu-open > .sub-menu,
  .primary-menu li.submenu-open > .children { display: block; }
  .site-main-wrap { grid-template-columns: 1fr; gap: 28px; padding-block: 30px 48px; }
  .sidebar { position: static; }
  .header-photo-badge { left: 12px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .header-photo { min-height: 170px; }
  .header-photo-badge { bottom: 12px; font-size: .72rem; }
  .post-card { border-radius: 11px; margin-bottom: 20px; }
  .post-card-body { padding: 20px; }
  .single-body { padding: 22px 20px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .nav-links { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
