/*
Theme Name: Dégage
Description: Eigen bloktheme van Dégage vzw, gebouwd naar het uitzicht van EcoNature 1.4.8, zonder code van cmsmasters. Alleen WordPress-blokken.
Author: Dégage vzw
Version: 0.1.1
Requires at least: 6.9
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: degage
*/

/* ---------- algemeen ---------- */
body { -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
a:hover { color: var(--wp--preset--color--grijs-licht); }
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin-block-start: 0; }
:where(.wp-site-blocks) > main { margin-block-start: 0; }
img { height: auto; max-width: 100%; }

/* ---------- kop ---------- */
.dg-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.95); box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.admin-bar .dg-header { top: 32px; }
.dg-topbar { font-size: 11px; line-height: 18px; min-height: 35px; border-bottom: 1px solid #f1f1f1; }
.dg-topbar a { color: var(--wp--preset--color--groen); font-family: var(--wp--preset--font-family--oxygen); font-size: 11px; }
.dg-topbar .wp-block-navigation__container { gap: 18px; }
.dg-headermid { min-height: 95px; }
.dg-headermid .wp-block-site-logo img { width: 160px; }
.dg-mainnav { font-family: var(--wp--preset--font-family--oxygen); font-size: 15px; font-weight: 300; }
.dg-mainnav a { color: #666; }
.dg-mainnav .current-menu-item > a, .dg-mainnav a:hover { color: var(--wp--preset--color--groen); }
.dg-mainnav .wp-block-navigation__container { gap: 50px; }

/* ---------- titelband ---------- */
.dg-titelband { background: var(--wp--preset--color--donker); }
.dg-titelband h1 { color: #fff; margin: 0; }

/* ---------- inhoud ---------- */
.dg-inhoud { padding-top: 40px; padding-bottom: 20px; }
.dg-row { padding-left: var(--wp--style--root--padding-left); padding-right: var(--wp--style--root--padding-right); } /* 09-11: kantlijn van 16px op gsm */
.dg-row .dg-row, .has-global-padding .dg-row { padding-left: 0; padding-right: 0; }
.dg-row + .dg-row { margin-top: 0; }
.dg-row > .wp-block-columns { margin-bottom: 0; }
.wp-block-columns { gap: 40px; }
.dg-tekst p { margin: 0 0 21px; }
.dg-tekst h1, .dg-tekst h2, .dg-tekst h3, .dg-tekst h4 { margin: 0 0 20px; }
.dg-tekst ul, .dg-tekst ol { margin: 0 0 21px; padding-left: 20px; }
.dg-tekst img.alignleft { float: left; margin: 0 20px 10px 0; }
.dg-tekst img.alignright { float: right; margin: 0 0 10px 20px; }
.dg-tekst img.aligncenter { display: block; margin: 0 auto 20px; }
.wp-block-image figcaption { font-size: 13px; color: #979ca4; }

/* knoppen zoals in EcoNature: rand, licht lettertype, kleuren wisselen bij hover */
.wp-block-button .wp-block-button__link { font-family: var(--wp--preset--font-family--oxygen); font-weight: 300; font-size: 19px; line-height: 44px; padding: 0 30px; text-transform: uppercase; border: 1px solid var(--wp--preset--color--groen); border-radius: 500px; transition: all .2s; }
.dg-btn-groen .wp-block-button__link { background: var(--wp--preset--color--groen); color: #fff; }
.dg-btn-groen .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--groen); }
.dg-btn-wit .wp-block-button__link { background: #fff; color: #666; border-color: var(--wp--preset--color--groen); }
.dg-btn-wit .wp-block-button__link:hover { background: var(--wp--preset--color--groen); color: #fff; }
.dg-featured .dg-btn-wit .wp-block-button__link, .dg-iconbox .dg-btn-wit .wp-block-button__link { color: var(--wp--preset--color--groen); border-color: #e8e8e8; font-size: 16px; line-height: 40px; }
.dg-featured .dg-btn-wit .wp-block-button__link:hover, .dg-iconbox .dg-btn-wit .wp-block-button__link:hover { background: var(--wp--preset--color--groen); color: #fff; border-color: #fff; }

/* zoekknop in het menu: alleen het icoon */
.dg-mainnav .wp-block-search__button { background: transparent; color: #666; padding: 0; border: 0; }
.dg-mainnav .wp-block-search__button svg { fill: #666; width: 22px; height: 22px; }

/* uitklappers (FAQ) */
.wp-block-details { border: 1px solid var(--wp--preset--color--rand); margin: 0 0 10px; padding: 0; }
.wp-block-details summary { font-family: var(--wp--preset--font-family--oxygen); font-size: 16px; font-weight: 400; color: var(--wp--preset--color--kop); padding: 14px 20px; cursor: pointer; list-style: none; position: relative; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; position: absolute; right: 20px; color: var(--wp--preset--color--groen); font-size: 20px; }
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details > :not(summary) { padding: 0 20px; }
.wp-block-details[open] { padding-bottom: 6px; }

/* groene tegels (icon box) */
.dg-iconbox { color: #fff; text-align: center; padding: 40px 20px 35px; min-height: 240px; display: flex; flex-direction: column; justify-content: center; }
.dg-iconbox h2, .dg-iconbox h1 { color: #fff; font-size: 22px; margin: 14px 0 22px; }
.dg-iconbox .dg-icoon svg { width: 46px; height: 46px; stroke: #fff; }
.dg-iconbox .wp-block-button__link { border-radius: 30px; text-transform: uppercase; font-size: 16px; padding: 10px 30px; }

/* tellers */
.dg-stats { text-align: left; }
.dg-stat { display: flex; align-items: center; gap: 14px; }
.dg-stat .dg-icoon svg { width: 44px; height: 44px; stroke: #4c5562; stroke-width: 1.2; }
.dg-stat-getal { font-family: var(--wp--preset--font-family--oxygen); font-size: 50px; line-height: 50px; font-weight: 300; color: var(--wp--preset--color--groen); display: block; }
.dg-stat-label { font-family: var(--wp--preset--font-family--oxygen); font-weight: 300; color: #666; }

/* uitgelicht blok */
.dg-featured { padding: 20px 50px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; border-radius: 3px; }
.dg-featured > * { margin: 0 !important; }
.dg-featured h1, .dg-featured h2, .dg-featured h3, .dg-featured h4, .dg-featured h5, .dg-featured h6, .dg-featured p, .dg-featured a:not(.wp-block-button__link) { color: inherit !important; margin: 0; }
/* 12-11: links uitlijnen alleen als de knop náást de tekst staat. Staat de knop in de tekst (de groene banner
   "Doe je mee?" op de home), dan volgt de tekst haar eigen uitlijning, zoals op de oude site: gecentreerd. */
.dg-featured:has(> .wp-block-buttons) :is(h1, h2, h3, h4, p) { text-align: left !important; }
.dg-featured:has(.dg-tekst .wp-block-buttons) .dg-tekst { width: 100%; }
.dg-featured .dg-tekst > :last-child { margin-bottom: 0; }
/* zonder aparte knop: alles gecentreerd, zoals in EcoNature */
.dg-featured:not(:has(.wp-block-buttons)) { justify-content: center; text-align: center; }
.dg-featured:not(:has(.wp-block-buttons)) .dg-tekst { width: 100%; }
.dg-featured:not(:has(.wp-block-buttons)) :is(h1, h2, h3, h4, p) { text-align: center !important; }
.dg-featured:not(:has(.wp-block-buttons)) :is(h2, h3, h4, p):not(:has(.wp-block-button)) { font-family: var(--wp--preset--font-family--oxygen); font-size: 16px; font-weight: 300; }
.dg-featured .wp-block-button { display: inline-block; margin-top: 14px; }
.dg-featured .dg-btn-wit .wp-block-button__link { color: var(--wp--preset--color--groen) !important; background: #fff; }
.dg-featured .dg-btn-wit .wp-block-button__link:hover { color: #fff !important; background: var(--wp--preset--color--groen); }

/* slider op de homepage, nu een vast beeld */
.dg-slider { margin-top: 0 !important; }
.dg-slider h1, .dg-slider h2 { font-family: Arial, Helvetica, sans-serif; font-weight: 700; line-height: 1; margin: 0; }
.dg-slider h1 { font-size: 133px; }
.dg-slider h2 { font-size: 90px; }
@media (max-width: 781px) { .dg-slider h1 { font-size: 56px; } .dg-slider h2 { font-size: 36px; } }

/* iconenlijst */
.dg-iconlist-item { display: grid; grid-template-columns: 60px 1fr; gap: 20px; margin-bottom: 30px; }
.dg-iconlist-item .dg-icoon { width: 60px; height: 60px; border: 1px solid var(--wp--preset--color--groen); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.dg-iconlist-item .dg-icoon svg { width: 28px; height: 28px; stroke: var(--wp--preset--color--groen); }
.dg-iconlist-item h2, .dg-iconlist-item h3, .dg-iconlist-item h4 { color: var(--wp--preset--color--kop); margin: 0 0 10px; }

/* getuigenissen */
.dg-quote figure.wp-block-image img { width: 90px; height: 90px; object-fit: cover; border-radius: 50%; }
.dg-quote .wp-block-quote { border: 0; padding: 0; font-style: italic; }
.dg-quote cite { font-style: normal; font-family: var(--wp--preset--font-family--oxygen); color: var(--wp--preset--color--groen); }

/* berichtenraster (posts slider, blog) */
.dg-posts .wp-block-post { border: 1px solid var(--wp--preset--color--rand); }
.dg-posts .wp-block-post-title { font-size: 16px; line-height: 26px; font-weight: 300; padding: 12px 15px 15px; margin: 0; }
.dg-posts .wp-block-post-title a { color: #4c5562; }
.dg-posts .wp-block-post-featured-image { margin: 0; }
.dg-posts .wp-block-post-date { font-size: 12px; color: #979ca4; padding: 0 15px 12px; }

/* tabel */
.wp-block-table td, .wp-block-table th { border: 1px solid var(--wp--preset--color--rand); padding: 10px 15px; }
.wp-block-table thead { background: var(--wp--preset--color--groen); color: #fff; }

/* voet */
.dg-footer { background: var(--wp--preset--color--donker); color: #fff; min-height: 61px; font-size: 15px; }
.dg-footer a { color: #fff; }
.dg-footer a:hover { color: #c8ccce; }
.dg-footer .wp-block-navigation__container { gap: 15px; }

/* ankers zacht laten scrollen, vervangt de plugin Easy Smooth Scroll Links */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media (max-width: 781px) {
	.dg-mainnav .wp-block-navigation__container { gap: 20px; }
	.dg-iconbox { min-height: 0; }
}
.wp-block-table th { text-align: left; font-weight: 700; }
.wp-block-table th.has-text-align-center { text-align: center; }

/* formulieren (Contact Form 7, MC4WP) zoals in EcoNature */
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 select, .wpcf7 textarea,
.mc4wp-form input[type="text"], .mc4wp-form input[type="email"] {
	width: 100%; box-sizing: border-box; border: 1px solid var(--wp--preset--color--rand); background: #fff;
	padding: 9px 12px; font: 15px/21px var(--wp--preset--font-family--verdana); color: #666; margin-top: 4px;
}
.wpcf7 textarea { min-height: 160px; }
.wpcf7 input[type="submit"], .mc4wp-form input[type="submit"] {
	font-family: var(--wp--preset--font-family--oxygen); font-weight: 300; font-size: 19px; text-transform: uppercase;
	background: #fff; color: #666; border: 1px solid var(--wp--preset--color--groen); border-radius: 500px; padding: 0 30px; line-height: 44px; cursor: pointer;
}
.wpcf7 input[type="submit"]:hover, .mc4wp-form input[type="submit"]:hover { background: var(--wp--preset--color--groen); color: #fff; }

/* 09-11: lange knoppen op gsm netjes over twee regels */
@media (max-width: 781px) { .wp-block-button .wp-block-button__link { line-height: 1.4; padding: 10px 24px; } }

/* 09-11: icoon voor de knoptekst (slotje bij Login, potlood bij Lid worden), zoals live */
.dg-icoon-slot .wp-block-button__link::before, .dg-icoon-potlood .wp-block-button__link::before {
	content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 8px; vertical-align: -3px;
	background-color: currentColor; -webkit-mask: var(--dg-icoon) center / contain no-repeat; mask: var(--dg-icoon) center / contain no-repeat;
}
.dg-icoon-slot { --dg-icoon: url(icons/lock.svg); }
.dg-icoon-potlood { --dg-icoon: url(icons/pencil.svg); }

/* 09-11: de hoofdfoto in de verhouding van de oude slider (1920 x 720), zonder minimumhoogte */
.dg-slider.wp-block-cover { min-height: 0; aspect-ratio: 1920 / 720; }

/* 09-11: carrousel van berichten, zoals de berichtenslider van de oude pagebuilder (eigen code, geen plugin) */
.dg-carrousel { position: relative; --dg-per: 4; }
.dg-carrousel.dg-kolommen-2 { --dg-per: 2; }
.dg-carrousel.dg-kolommen-3 { --dg-per: 3; }
.dg-carrousel .wp-block-post-template { display: flex !important; flex-wrap: nowrap; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 0; margin: 0; }
.dg-carrousel .wp-block-post-template::-webkit-scrollbar { display: none; }
.dg-carrousel .wp-block-post-template > li { flex: 0 0 calc((100% - (var(--dg-per) - 1) * 20px) / var(--dg-per)); scroll-snap-align: start; list-style: none; }
@media (max-width: 781px) { .dg-carrousel { --dg-per: 2 !important; } }
@media (max-width: 560px) { .dg-carrousel { --dg-per: 1 !important; } }
.dg-carrousel-knop { position: absolute; top: calc(50% - 22px); width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--wp--preset--color--rand); background: #fff; color: #4c5562; font-size: 22px; line-height: 36px; cursor: pointer; z-index: 2; opacity: .9; }
.dg-carrousel-knop:hover, .dg-carrousel-knop:focus-visible { background: var(--wp--preset--color--groen); color: #fff; }
.dg-carrousel-vorige { left: -20px; }
.dg-carrousel-volgende { right: -20px; }
@media (max-width: 781px) { .dg-carrousel-vorige { left: 4px; } .dg-carrousel-volgende { right: 4px; } }

/* Fase 3 (09-11): tekst, iconen en tellers als gewone blokken. Zelfde uitzicht als de oude HTML-blokken. */
.dg-tekst > * { margin-block-start: 0; }
.dg-tekst > .wp-block-list { padding-left: 20px; }
.wp-block-image.dg-icoon { margin: 0; }
.wp-block-image.dg-icoon img { display: block; height: auto; }
.dg-iconbox .wp-block-image.dg-icoon { margin: 0 auto 6px; }
.dg-iconbox .wp-block-image.dg-icoon img { margin: 0 auto; }
.dg-iconlist-item > .wp-block-image.dg-icoon { width: 60px; height: 60px; border: 1px solid var(--wp--preset--color--groen); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.dg-stat { gap: 14px; align-items: center; }
.dg-stat > .wp-block-group > p { margin: 0; }
.dg-stat-label { display: block; }
.wp-block-image.dg-simple-icon { margin: 0 auto; }
.wp-block-image.dg-simple-icon img { margin: 0 auto; }
