/*
Theme Name: AdMathZo
Theme URI: https://admathzo.nl
Author: WISCH
Description: Block theme (Site Editor) voor AdMathZo B.V., vervanger van Breakdance Zero.
Version: 0.2.0
Requires at least: 6.5
Requires PHP: 8.0
License: GPLv2 or later
Text Domain: admathzo
*/

/* Houd extra CSS minimaal: stijl via theme.json en de Site Editor. Waarden zijn gemeten op de live (Breakdance) site. */

/* Header, inhoud en footer sluiten direct op elkaar aan */
.wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }

/* Secties in de pagina sluiten direct op elkaar aan (afstand zit in de sectie-padding) */
.wp-block-post-content > * { margin-block-start: 0; margin-block-end: 0; }

/* Mobiel: lange woorden ("administratiekantoor") in koppen mogen niet buiten beeld lopen (Breakdance: 36px op telefoon) */
@media (max-width: 600px) {
	h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }
	h1 { font-size: 2.25rem !important; }
}

/* Telefoon (<480px): sectie-padding uit Breakdance, knoppen onder elkaar, topbalk verborgen */
@media (max-width: 479px) {
	.bd-m-pad { padding-top: var(--m-pt) !important; padding-bottom: var(--m-pb) !important; }
}
@media (max-width: 767px) {
	.admathzo-topbar { display: none; }
	.wp-block-buttons { flex-direction: column; align-items: flex-start; }
}

/* Logo (SVG heeft geen intrinsieke afmetingen) */
.wp-block-site-logo img { width: 220px; height: auto; }

/* Topbalk: iconen via mask, zodat de tekst gewoon bewerkbaar blijft */
.admathzo-topbar { font-size: 14px; }
.admathzo-topbar p { margin: 0; line-height: 1.6; font-size: 14px; }
.admathzo-topbar a { text-decoration: none; color: inherit; }
.ico::before {
	content: ""; display: inline-block; width: 1em; height: 1em; margin-right: 8px; vertical-align: -0.15em;
	background-color: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
.ico-clock { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'><circle cx='12' cy='12' r='9.5'/><path d='M12 6.5V12l3.5 2'/></svg>"); }
.ico-phone { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25c1.1.37 2.3.57 3.6.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.58a1 1 0 0 1-.25 1z'/></svg>"); }
.ico-pin { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path fill='black' d='M16 0C10.5 0 6 4.5 6 10c0 10 10 22 10 22s10-12 10-22c0-5.5-4.5-10-10-10zm0 16a6 6 0 1 1 0-12 6 6 0 0 1 0 12z'/></svg>"); }
.bd-iconlist .ico::before { background-color: var(--wp--preset--color--primary); margin-right: 12px; }
.bd-iconlist p { margin: 0; }
.ico-mail { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'><rect x='2.5' y='4.5' width='19' height='15' rx='2'/><path d='M3 6l9 7 9-7'/></svg>"); }

/* Navigatie: link 20px/500 met 20px padding; Contact als knop */
.admathzo-header .wp-block-navigation { gap: 0; }
.admathzo-header .wp-block-navigation .wp-block-navigation-item__content {
	padding: 20px; font-size: 1.25rem; font-weight: 500; line-height: 20px; color: rgba(0, 0, 0, .81); text-decoration: none;
}
.admathzo-header .wp-block-navigation .is-style-button { margin-left: 10px; }
.admathzo-header .wp-block-navigation .is-style-button > a {
	background: var(--wp--preset--color--primary); color: var(--wp--preset--color--base);
	border: 1px solid transparent; border-radius: 3px; padding: 14px 24px; font-size: 1rem; line-height: 1;
}

/* Footer: 18px links/adres, adresregels met regelhoogte 36px (gemeten op live) */
.admathzo-footer-nav .wp-block-navigation-item__content { font-size: 18px; line-height: 1.6; padding: 0 0 0 0; text-decoration: none; color: inherit; }
.admathzo-footer-contact p { font-size: 18px; line-height: 36px; margin: 0; }
.admathzo-footer-contact a { text-decoration: underline; }

/* Mobiel menu: hamburger tot 1119px (Breakdance: breakpoint "tablet landscape") en een dropdown onder de header,
   met scheidingslijnen en Contact als volle-breedte knop. Core-navigatie klapt standaard pas onder 600px in. */
@media (max-width: 1119px) {
	.admathzo-header { position: relative; }
	.admathzo-header .wp-block-navigation { position: static; }
	.admathzo-header .wp-block-navigation__responsive-container-open { display: flex !important; }
	.admathzo-header .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }

	.admathzo-header .wp-block-navigation__responsive-container.is-menu-open {
		position: absolute; top: 100%; left: 0; right: 0; bottom: auto; height: auto; padding: 0;
		background: #fff; color: #000; overflow: visible; z-index: 100000;
		box-shadow: 0 12px 24px rgba(0, 0, 0, .12);
	}
	.admathzo-header .is-menu-open .wp-block-navigation__responsive-container-content {
		padding: 0; align-items: stretch; width: 100%;
		--navigation-layout-justification-setting: flex-start; --navigation-layout-align: stretch; --navigation-layout-justify: flex-start;
	}
	.admathzo-header .is-menu-open .wp-block-navigation__responsive-dialog { margin: 0; padding: 0; }
	.admathzo-header .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 0 !important; }
	.admathzo-header .wp-block-navigation__responsive-container.is-menu-open { animation: none !important; opacity: 1 !important; }
	.admathzo-header .is-menu-open .wp-block-navigation__container { flex-direction: column; align-items: stretch !important; justify-content: flex-start; width: 100%; gap: 0; }
	.admathzo-header .is-menu-open .wp-block-navigation-item { align-items: stretch !important; box-sizing: border-box; }
	.admathzo-header .is-menu-open .wp-block-navigation-item { display: block; width: 100%; margin: 0; border-bottom: 1px solid #e5e7eb; }
	.admathzo-header .is-menu-open .wp-block-navigation-item__content { display: block; padding: 18px 20px !important; font-size: 1.125rem; font-weight: 500; line-height: 1.3; color: #000; }
	.admathzo-header .is-menu-open .wp-block-navigation-item.is-style-button { margin: 0 !important; padding: 20px 15px !important; border-bottom: 0; }
	.admathzo-header .is-menu-open .is-style-button > a { display: block; text-align: center; padding: 14px 24px !important; font-size: 1rem; line-height: 1; color: var(--wp--preset--color--base); }
	html.has-modal-open .admathzo-header .wp-block-navigation__responsive-container-open { visibility: hidden; }
	/* sluitknop komt precies boven de hamburger te staan (in de header) */
	.admathzo-header .wp-block-navigation__responsive-container-close { position: absolute; top: -52px; right: 20px; padding: 0; color: #000; }
}

/* Kolommen stapelen onder 1120px (Breakdance: tablet landscape); de call-to-action (.bd-grid) pas op telefoon */
@media (max-width: 1119px) {
	.wp-block-columns:not(.bd-grid) { flex-wrap: wrap !important; }
	.wp-block-columns:not(.bd-grid) > .wp-block-column { flex-basis: 100% !important; flex-grow: 1 !important; }
}
@media (max-width: 767px) {
	.wp-block-columns.bd-grid { flex-wrap: wrap !important; }
	.wp-block-columns.bd-grid > .wp-block-column { flex-basis: 100% !important; flex-grow: 1 !important; }
}
/* Hamburger: groter en in merkkleur (live: 32px) */
.admathzo-header .wp-block-navigation__responsive-container-open svg, .admathzo-header .wp-block-navigation__responsive-container-close svg { width: 32px; height: 32px; }
.admathzo-header .wp-block-navigation__responsive-container-open { color: var(--wp--preset--color--primary); }

/* Knoppen: outline heeft 2px rand maar dezelfde padding */
.wp-block-button.is-style-outline > .wp-block-button__link { padding: 14px 24px; border-width: 2px; }

/* Afbeeldingen vullen hun kolom */
.wp-block-column > .wp-block-image img { width: 100%; height: auto; }

/* Contact Form 7 */
/* CF7 verpakt alles in één <p> met <br>'s: de <p> wordt het grid, de <br>'s verdwijnen */
.wpcf7 form .form1, .wpcf7 form .form1 > p { display: grid; gap: 13px; margin: 0; }
.wpcf7 form .form1 br { display: none; }
.wpcf7 form.init .wpcf7-response-output { display: none; }
.wpcf7 label { display: block; font-weight: 500; }
.wpcf7 label .req { color: #b91c1c; }
.wpcf7 label .wpcf7-form-control-wrap { display: block; margin-top: 8px; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea {
	width: 100%; box-sizing: border-box; padding: 12px 16px; font: inherit;
	border: 1px solid #d1d5db; border-radius: 3px; background: #fff;
}
.wpcf7 label, .wpcf7 input, .wpcf7 textarea { line-height: 1.2; }
.wpcf7 textarea { height: 110px; min-height: 110px; }
.wpcf7 input[type="submit"] {
	background: var(--wp--preset--color--primary); color: var(--wp--preset--color--base);
	border: 1px solid transparent; border-radius: 3px; padding: 14px 24px; font: inherit; font-size: 1rem; font-weight: 500; line-height: 1; cursor: pointer;
}
