/*
Theme Name: Crepi België
Theme URI: https://www.crepibelgie.be/
Description: Licht, handgeschreven thema voor crepibelgie.be. Geen buildstap, geen pagebuilder, geen externe verbindingen. Materiaalpalet zand + terracotta.
Author: Qonvert
Version: 1.1.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
Text Domain: crepibelgie
*/

/* ---------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------- */
:root {
  --zandwit:      #F7F3EC;
  --greige:       #E8DFD2;
  --warmgrijs:    #C4B5A0;
  --donkerbruin:  #2E2A26;
  --terracotta:   #B4552D;
  --terra-donker: #8F4021;
  --wit:          #FFFFFF;

  --tekst:        var(--donkerbruin);
  --tekst-zacht:  #5C544B;
  --rand:         var(--warmgrijs);

  --kop: 'Fraunces', Georgia, 'Times New Roman', serif;
  --tekst-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --breedte: 1140px;
  --smal: 720px;
  --gutter: 1rem;
  --radius: 4px;

  --schaduw: 0 1px 2px rgba(46, 42, 38, .06), 0 4px 16px rgba(46, 42, 38, .06);
}

/* ---------------------------------------------------------------
   2. Fonts
   --------------------------------------------------------------- */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------------
   3. Basis
   --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--zandwit);
  color: var(--tekst);
  font-family: var(--tekst-font);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg, iframe, video { max-width: 100%; height: auto; display: block; }
iframe { border: 0; }

h1, h2, h3, h4 {
  font-family: var(--kop);
  font-weight: 600;
  line-height: 1.18;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.7vw, 2.3rem); margin-top: 2.2em; }
h3 { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.45rem); margin-top: 1.8em; }
h2:first-child, h3:first-child { margin-top: 0; }

p, ul, ol { margin: 0 0 1.15em; }
p { max-width: 68ch; }
li { margin-bottom: .4em; }

a { color: var(--terra-donker); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--terracotta); }

:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 2px; border-radius: 2px; }

blockquote {
  margin: 2em 0;
  padding: 1.25em 1.5em;
  border-left: 3px solid var(--terracotta);
  background: var(--greige);
  font-family: var(--kop);
  font-size: 1.15rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}
blockquote p:last-child { margin-bottom: 0; }

hr { border: 0; border-top: 1px solid var(--rand); margin: 2.5em 0; }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--donkerbruin); color: var(--zandwit);
  padding: .75rem 1.25rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------
   4. Layout
   --------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--breedte); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--smal { max-width: var(--smal); }

.sectie { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.sectie--greige { background: var(--greige); }
.sectie--wit { background: var(--wit); }

.grid { display: grid; gap: 1.5rem; }
@media (min-width: 620px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.kaart {
  background: var(--wit);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.kaart h3 { margin-top: 0; }
.kaart > :last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------
   5. Knoppen
   --------------------------------------------------------------- */
.knop {
  display: inline-block;
  font-family: var(--tekst-font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  padding: .9em 1.6em;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: var(--terracotta);
  color: var(--wit);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease;
}
.knop:hover, .knop:focus { background: var(--terra-donker); color: var(--wit); }
.knop--rand {
  background: transparent;
  color: var(--donkerbruin);
  border-color: var(--warmgrijs);
}
.knop--rand:hover, .knop--rand:focus { background: var(--wit); color: var(--donkerbruin); border-color: var(--donkerbruin); }

/* ---------------------------------------------------------------
   6. Header
   --------------------------------------------------------------- */
.site-header {
  background: var(--zandwit);
  border-bottom: 1px solid var(--rand);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}

.wordmark { display: inline-flex; align-items: baseline; gap: .1em; text-decoration: none; color: var(--donkerbruin); }
.wordmark:hover { color: var(--donkerbruin); }
.wordmark__naam { font-family: var(--kop); font-weight: 600; font-size: 1.35rem; letter-spacing: -.01em; }
.wordmark__land { font-family: var(--kop); font-weight: 500; font-size: 1.35rem; color: var(--terracotta); }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--rand); border-radius: var(--radius);
  padding: .5rem .8rem; font: inherit; font-size: .95rem; color: var(--tekst); cursor: pointer;
}
.nav-toggle__streepjes { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.nav-toggle__streepjes::before,
.nav-toggle__streepjes::after { content: ''; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
.nav-toggle__streepjes::before { top: -6px; }
.nav-toggle__streepjes::after  { top: 6px; }

.hoofdnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.6rem; align-items: center; }
.hoofdnav a { color: var(--tekst); text-decoration: none; font-size: .98rem; padding-block: .4rem; }
.hoofdnav a:hover { color: var(--terra-donker); text-decoration: underline; text-underline-offset: .3em; }
.hoofdnav .current-menu-item > a,
.hoofdnav .current_page_item > a,
.hoofdnav .current_page_ancestor > a { color: var(--terra-donker); font-weight: 600; }
.hoofdnav .knop { color: var(--wit); }
.hoofdnav .knop:hover { color: var(--wit); text-decoration: none; }

@media (max-width: 860px) {
  .nav-toggle { order: 2; }
  .hoofdnav {
    order: 3; flex-basis: 100%; display: none;
    border-top: 1px solid var(--rand); padding-block: .75rem;
  }
  .hoofdnav.is-open { display: block; }
  .hoofdnav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .hoofdnav li { border-bottom: 1px solid var(--rand); }
  .hoofdnav li:last-child { border-bottom: 0; padding-top: .75rem; }
  .hoofdnav a { display: block; padding: .8rem 0; }
  .site-header .wrap { flex-wrap: wrap; padding-block: .5rem; }
}
@media (min-width: 861px) { .nav-toggle { display: none; } }

/* ---------------------------------------------------------------
   7. Hero
   --------------------------------------------------------------- */
.hero { background: var(--greige); border-bottom: 1px solid var(--rand); }
.hero .wrap { display: grid; gap: 2rem; padding-block: clamp(2.25rem, 1.5rem + 3.5vw, 4rem); }
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1.05fr .95fr; align-items: center; gap: 3rem; }
}
.hero h1 { margin-bottom: .35em; }
.hero__intro { font-size: 1.15rem; color: var(--tekst-zacht); max-width: 52ch; }
.hero__formulier { min-width: 0; scroll-margin-top: 84px; }
.hero__formulier .offerte__kader { margin-top: 0; }
.hero__formulier .offerte__slot { padding: 1rem; }
/* Formulierhoogte bij de eerste stap; Solvari past hem daarna zelf aan. */
.hero__formulier .offerte__slot iframe { min-height: 434px; }

/* ---------------------------------------------------------------
   8. Solvari-blok
   Eigen, afgebakend blok. Het formulier brengt zijn eigen blauw mee
   (#1a4389) en is van buitenaf niet te stylen, dus we doen ook niet
   alsof het onderdeel van de pagina is.
   --------------------------------------------------------------- */
.offerte { background: var(--greige); border-block: 1px solid var(--rand); }
.offerte__kop { text-align: center; max-width: 60ch; margin-inline: auto; }
.offerte__kop h2 { margin-top: 0; }
.offerte__kop p { margin-inline: auto; }

.offerte__kader {
  background: var(--wit);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  box-shadow: var(--schaduw);
  margin-top: 2rem;
  overflow: hidden;
}
.offerte__label {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--rand);
  background: var(--zandwit);
  font-size: .9rem; color: var(--tekst-zacht);
}
.offerte__label strong { color: var(--tekst); font-weight: 600; }
.offerte__slot { padding: .5rem; }
.offerte__slot iframe { width: 100%; min-height: 620px; }

.offerte__voorwaarden {
  list-style: none; padding: 0; margin: 1.5rem auto 0; max-width: 60ch;
  font-size: .95rem; color: var(--tekst-zacht);
}
.offerte__voorwaarden li { padding-left: 1.6rem; position: relative; }
.offerte__voorwaarden li::before {
  content: '✓'; position: absolute; left: 0; color: var(--terracotta); font-weight: 700;
}

/* ---------------------------------------------------------------
   9. Stadspagina
   --------------------------------------------------------------- */
.stad-feiten { display: grid; gap: 1rem; margin: 2rem 0; }
@media (min-width: 620px) { .stad-feiten { grid-template-columns: repeat(3, 1fr); } }
.stad-feit {
  background: var(--wit); border: 1px solid var(--rand);
  border-radius: var(--radius); padding: 1.1rem 1.25rem;
}
.stad-feit__label { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tekst-zacht); margin: 0 0 .25rem; }
.stad-feit__waarde { font-family: var(--kop); font-size: 1.3rem; font-weight: 600; margin: 0; }

.steden-lijst { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.steden-lijst a {
  display: inline-block; padding: .45em .9em;
  background: var(--wit); border: 1px solid var(--rand); border-radius: var(--radius);
  text-decoration: none; color: var(--tekst); font-size: .95rem;
}
.steden-lijst a:hover { border-color: var(--terracotta); color: var(--terra-donker); }

/* ---------------------------------------------------------------
   10. Inhoud
   --------------------------------------------------------------- */
.inhoud > :first-child { margin-top: 0; }
.inhoud img { border-radius: var(--radius); margin-block: 1.75rem; }
.inhoud table { width: 100%; border-collapse: collapse; margin-block: 1.75rem; font-size: .97rem; }
.inhoud th, .inhoud td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--rand); }
.inhoud th { font-weight: 600; background: var(--greige); }

.kruimels { font-size: .9rem; color: var(--tekst-zacht); padding-block: 1rem; }
.kruimels a { color: var(--tekst-zacht); }
.kruimels ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.kruimels li + li::before { content: '/'; margin-right: .4rem; color: var(--warmgrijs); }

.faq { margin-top: 2rem; }
.faq details {
  border: 1px solid var(--rand); border-radius: var(--radius);
  background: var(--wit); margin-bottom: .6rem;
}
.faq summary {
  cursor: pointer; padding: 1rem 1.25rem; font-weight: 600;
  font-family: var(--kop); font-size: 1.08rem; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--terracotta); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details > div { padding: 0 1.25rem 1rem; }
.faq details > div > :last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------
   11. Footer
   --------------------------------------------------------------- */
.site-footer {
  background: var(--donkerbruin); color: var(--greige);
  padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem); margin-top: 0;
}
.site-footer a { color: var(--zandwit); }
.site-footer a:hover { color: var(--wit); }
.site-footer h2 { font-size: 1.05rem; margin: 0 0 .9rem; font-family: var(--tekst-font); font-weight: 600; letter-spacing: .02em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45em; font-size: .96rem; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.6fr 1fr; } }
.footer-slot { border-top: 1px solid rgba(232, 223, 210, .18); margin-top: 2.5rem; padding-top: 1.5rem; font-size: .9rem; color: var(--warmgrijs); }
.footer-slot p { margin: 0; max-width: none; }

/* ---------------------------------------------------------------
   12. Knop in de lopende tekst
   Staat na de eerste alinea van een stadspagina en na de prijstabel.
   Ruim genoeg eromheen zodat hij als pauze leest, niet als onderbreking.
   --------------------------------------------------------------- */
.tekst-knop {
  margin-block: 2rem;
  max-width: none;
}
.tekst-knop .knop { text-decoration: none; }

/* Hero als vergelijker (homepage): tekst, vinkjes en foto links, formulierkaart rechts */
.hero--vergelijker .wrap { grid-template-areas: "tekst" "form" "foto"; gap: 22px; align-items: start; }
@media (min-width: 900px) {
  .hero--vergelijker .wrap { grid-template: "tekst form" auto "foto form" 1fr / minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px 56px; align-items: start; }
}
.hero--vergelijker .hero__tekst { grid-area: tekst; }
.hero--vergelijker .hero__formulier { grid-area: form; background: var(--wit); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schaduw); padding: 16px 16px 8px; }
.hero--vergelijker .offerte__kader { border: 0; box-shadow: none; border-radius: 0; margin-top: 0; }
.hero--vergelijker .offerte__slot { padding: 0; }
.hero__belofte { font-size: 1.15rem; color: var(--tekst); max-width: 34em; margin: 0 0 1.1em; }
.hero__vinkjes { list-style: none; padding: 0; margin: 0; }
.hero__vinkjes li { position: relative; padding-left: 32px; margin-bottom: 8px; font-weight: 600; font-size: 1.05rem; }
.hero__vinkjes li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: #1F7A45 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.3l2.6 2.6L13 6.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.hero__beeld { grid-area: foto; margin: 0; }
.hero__beeld img { display: block; width: 100%; height: auto; aspect-ratio: 1.85 / 1; object-fit: cover; border-radius: 12px; }
.hero__formulierkop { font-family: var(--kop); font-size: 1.5rem; font-weight: 600; line-height: 1.25; color: var(--tekst); margin: 2px 0 18px; }
.hero__bijformulier { margin: 0; padding: 10px 12px 2px; text-align: center; font-weight: 600; font-size: .98rem; color: var(--tekst); }
.hero__slotregel { margin: 0; padding: 2px 8px 8px; text-align: center; font-size: .84rem; line-height: 1.5; color: var(--tekst-zacht); }
.hero__slotregel svg { display: inline-block; vertical-align: -2px; margin-right: 6px; }

/* Balk "Zo werkt het" direct onder de hero (homepage) */
.werkwijze { background: var(--zandwit); border-bottom: 1px solid var(--rand); }
.werkwijze .wrap { display: flex; flex-direction: column; gap: 12px; padding-block: 20px; }
.werkwijze__kop { font-family: var(--kop); font-weight: 600; font-size: 1.15rem; line-height: 1.2; color: var(--tekst); margin: 0; white-space: nowrap; }
.werkwijze__stappen { list-style: none; counter-reset: stap; margin: 0; padding: 0; display: grid; gap: 10px 28px; flex: 1; }
.werkwijze__stappen li { counter-increment: stap; position: relative; padding-left: 40px; min-height: 28px; display: flex; align-items: center; font-size: .98rem; line-height: 1.35; margin: 0; }
.werkwijze__stappen li::before { content: counter(stap); position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; background: var(--terracotta); color: var(--wit); font-weight: 700; font-size: .9rem; display: flex; align-items: center; justify-content: center; }
@media (min-width: 900px) {
  .werkwijze .wrap { flex-direction: row; align-items: center; gap: 36px; }
  .werkwijze__stappen { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Feitenrij van een stadspagina, als strook direct onder de hero */
.stad-feitenbalk { background: var(--wit); border-bottom: 1px solid var(--rand); }
.stad-feitenbalk .stad-feiten { margin: 1.25rem 0; }

/* Groene tegel met het rekenvoorbeeld op de prijzenpagina */
.bespaar-tegel { background: #EAF4EC; border: 1px solid #B9D8C2; border-left: 6px solid #1F7A45; border-radius: var(--radius); padding: 1.5rem 1.5rem 1.4rem; margin: 2rem 0; }
.bespaar-tegel h3 { margin-top: 0; color: #17592F; }
.bespaar-tegel > :last-child, .bespaar-tegel .wp-block-buttons { margin-bottom: 0; }
.bespaar-tegel .wp-block-button__link { background: #1F7A45; color: #fff; border-radius: var(--radius); font-weight: 600; text-decoration: none; }
.bespaar-tegel .wp-block-button__link:hover, .bespaar-tegel .wp-block-button__link:focus { background: #17592F; color: #fff; }

/* Minder witruimte tussen het kruimelpad en de paginatitel */
.kruimels + .sectie { padding-top: 1rem; }
