/*
Theme Name: Kantoor Balm
Description: One-page thema voor Administratiekantoor Balm & Zn. B.V. Bij activeren worden de pagina, het menu, het logo en de instellingen automatisch ingericht.
Version: 2.3.0
Requires at least: 6.6
Requires PHP: 7.4
Author: Tim
Text Domain: kantoorbalm
License: GPL-2.0-or-later
*/

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
main.wp-block-group, .wp-site-blocks > * + * { margin-block-start: 0; }
a:focus-visible, .wp-element-button:focus-visible { outline: 3px solid var(--wp--preset--color--messing); outline-offset: 3px; }

/* Secties: ankers vallen niet onder de vaste header */
[id] { scroll-margin-top: 90px; }
.wp-block-post-content > .alignfull + .alignfull { margin-block-start: 0; }
.wp-block-post-content > h2.wp-block-heading { margin-block-start: var(--wp--preset--spacing--50); }
.wp-block-post-content > h2.wp-block-heading:first-child { margin-block-start: 0; }

/* Header */
.balm-header { border-bottom: 1px solid var(--wp--preset--color--lijn); }
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 50; }
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 46px; } }
@media (max-width: 600px) { .wp-site-blocks > header.wp-block-template-part { position: static; } }
.balm-header .balm-logo img { height: 48px; width: auto; display: block; }
@media (max-width: 600px) { .balm-header .balm-logo img { height: 40px; } }
.balm-header .wp-block-navigation a { text-decoration: none; }
.balm-header .wp-block-navigation a:hover { text-decoration: underline; text-decoration-color: var(--wp--preset--color--messing); text-underline-offset: .35em; text-decoration-thickness: 2px; }
.balm-header .balm-belknop { white-space: nowrap; }
@media (max-width: 900px) { .balm-header .balm-belknop { display: none; } }

/* Kleine kop boven een titel */
.balm-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: var(--wp--preset--font-size--klein); font-weight: 600; color: var(--wp--preset--color--messing-donker); margin-bottom: .5rem; }
.has-blauw-background-color .balm-eyebrow { color: var(--wp--preset--color--ijs); }
.balm-lead { font-size: var(--wp--preset--font-size--groot); line-height: 1.55; }

/* Feitjesregel in de hero */
.balm-feiten { border-top: 1px solid var(--wp--preset--color--lijn); }
.balm-feiten p { margin: 0; font-weight: 600; color: var(--wp--preset--color--blauw); }
.balm-feiten p::before { content: ""; display: inline-block; width: .5em; height: .5em; background: var(--wp--preset--color--messing); margin-right: .6em; vertical-align: .12em; }

/* Lijsten met vinkje */
ul.balm-vink { list-style: none; padding-left: 0; }
ul.balm-vink li { position: relative; padding-left: 1.75em; margin-bottom: .55em; }
ul.balm-vink li::before { content: ""; position: absolute; left: 0; top: .42em; width: .95em; height: .55em; border-left: 2px solid var(--wp--preset--color--messing-donker); border-bottom: 2px solid var(--wp--preset--color--messing-donker); transform: rotate(-45deg); }

/* Contact (donkere sectie) */
.balm-contact a { color: inherit; text-underline-offset: .2em; }
.balm-contact h3 { font-family: var(--wp--preset--font-family--sans); font-size: var(--wp--preset--font-size--klein); text-transform: uppercase; letter-spacing: .14em; color: var(--wp--preset--color--ijs); font-weight: 600; margin-bottom: .6rem; }
.balm-contact p { margin: 0 0 .35em; }
.balm-contact .balm-groot { font-family: var(--wp--preset--font-family--serif); font-size: var(--wp--preset--font-size--xl); font-weight: 600; line-height: 1.3; }
.balm-tijden table { border-collapse: collapse; width: 100%; }
.balm-tijden td { border: 0; border-bottom: 1px solid rgba(255,255,255,.18); padding: .35em 0; }
.balm-tijden td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.balm-contact .wp-block-button.is-style-outline .wp-block-button__link { color: #fff; }

/* NOAB */
.balm-noab img { width: 72px; height: auto; }

/* Footer */
.balm-footer a { color: inherit; text-underline-offset: .2em; }
.balm-footer p { margin: 0; }

/* ===================================================================
   Schermvullende secties (alleen op de homepage)
   =================================================================== */
:root { --balm-header-h: 80px; }
@media (min-width: 900px) and (min-height: 600px) {
	html:has(body.home) { scroll-snap-type: y mandatory; scroll-padding-top: var(--balm-header-h); }
	body.home .wp-block-post-content > .alignfull {
		min-height: calc(100vh - var(--balm-header-h));
		min-height: calc(100svh - var(--balm-header-h));
		display: flex; flex-direction: column; justify-content: center;
		scroll-snap-align: start; position: relative; box-sizing: border-box;
	}
	body.home .wp-block-post-content > .alignfull > *:not(.balm-volgende) { width: 100%; }
	body.home footer { scroll-snap-align: end; }
	body.home .wp-block-post-content > .alignfull:first-child h1 { font-size: clamp(2.6rem, 5.2vw, 4.4rem); }
}
.admin-bar { --balm-header-h: 112px; }
[id] { scroll-margin-top: 0; }

/* Inhoud schuift zacht naar binnen (alleen met JavaScript, niet bij 'minder beweging') */
.balm-js .balm-in { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--balm-vertraging, 0ms); }
.balm-js .balm-in.is-zichtbaar { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .balm-js .balm-in { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* Knop naar de volgende sectie */
.balm-volgende { display: none; }
@media (min-width: 900px) and (min-height: 600px) {
	.balm-volgende { display: grid; place-items: center; margin: 0 !important; max-width: none !important; box-sizing: border-box; position: absolute; left: 50%; bottom: 1.25rem; transform: translateX(-50%); width: 44px; height: 44px; border-radius: 50%; color: var(--wp--preset--color--blauw); border: 1px solid var(--wp--preset--color--lijn); background: rgba(255,255,255,.7); text-decoration: none; animation: balm-wip 2.4s ease-in-out infinite; }
	.balm-volgende:hover { border-color: var(--wp--preset--color--messing); }
	.has-blauw-background-color .balm-volgende { color: #fff; background: transparent; border-color: rgba(255,255,255,.3); }
}
@keyframes balm-wip { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 5px); } }
@media (prefers-reduced-motion: reduce) { .balm-volgende { animation: none; } }

/* Stippen-navigatie */
.balm-stippen { display: none; }
@media (min-width: 900px) and (min-height: 600px) {
	.balm-stippen { display: flex; flex-direction: column; gap: 14px; position: fixed; right: 24px; top: 50%; transform: translateY(-50%); z-index: 40; }
	.balm-stippen a { display: block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--wp--preset--color--blauw); background: transparent; transition: background .25s, transform .25s; }
	.balm-stippen a:hover { transform: scale(1.25); }
	.balm-stippen a.is-actief { background: var(--wp--preset--color--blauw); }
	.balm-stippen.op-donker a { border-color: #fff; }
	.balm-stippen.op-donker a.is-actief { background: #fff; }
}

/* ===================================================================
   Contactformulier
   =================================================================== */
.balm-formulier { margin-top: var(--wp--preset--spacing--40); }
.balm-formulier p { margin: 0 0 1rem; }
.balm-formulier__rij { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 600px) { .balm-formulier__rij { grid-template-columns: 1fr; } }
.balm-formulier label { display: block; font-size: var(--wp--preset--font-size--klein); font-weight: 600; margin-bottom: .35rem; }
.balm-formulier__optioneel { font-weight: 400; opacity: .75; }
.balm-formulier input[type="text"], .balm-formulier input[type="email"], .balm-formulier input[type="tel"], .balm-formulier textarea {
	width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; color: var(--wp--preset--color--tekst);
	background: #fff; border: 1px solid var(--wp--preset--color--lijn); border-radius: 4px; padding: .7em .85em;
}
.balm-formulier textarea { resize: vertical; min-height: 7.5em; }
.balm-formulier input:focus, .balm-formulier textarea:focus { outline: 3px solid var(--wp--preset--color--messing); outline-offset: 1px; border-color: transparent; }
.balm-formulier__voet { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.balm-formulier__knop { cursor: pointer; border: 0; }
.has-blauw-background-color .balm-formulier__knop { background: var(--wp--preset--color--wit); color: var(--wp--preset--color--blauw); }
.has-blauw-background-color .balm-formulier__knop:hover { background: var(--wp--preset--color--ijs); }
.balm-formulier__knop[disabled] { opacity: .7; cursor: wait; }
.balm-formulier__privacy { font-size: var(--wp--preset--font-size--klein); opacity: .85; flex: 1 1 220px; }
.balm-formulier__pot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.balm-formulier__melding { padding: .8em 1em; border-radius: 4px; font-weight: 600; margin: 0 0 1rem; }
.balm-formulier__melding.is-goed { background: #E6F2EA; color: #1D5631; }
.balm-formulier__melding.is-fout { background: #FBEAEA; color: #8A1F1F; }
.balm-contact .wp-block-shortcode { margin: 0; }
.balm-contact .wp-block-column > p:empty { display: none; }
.balm-formulier [hidden] { display: none !important; }
