/*
Theme Name: ESIP
Theme URI: https://esip.be
Author: ESIP BV
Description: Website van ESIP BV, Engineering Solutions in Industrial Programming. Blokthema zonder page builder: alles is aanpasbaar in de WordPress-editor. Bij de eerste activering worden de pagina's, afbeeldingen en het logo automatisch aangemaakt. Zie LEESMIJ.md.
Version: 1.4.3
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: esip
*/

/*
 * Inhoud van dit bestand
 * 1. Basis
 * 2. Header
 * 3. Blokstijlen (kies ze in de editor onder "Stijlen")
 * 4. Standaardlijsten en knoppen
 * 5. Tekstpagina's (voorwaarden, privacy)
 *
 * Kleuren en lettertypes staan in theme.json, niet hier.
 */

/* ---------- 1. Basis ---------- */

:root {
	--esip-ink: var(--wp--preset--color--ink);
	--esip-blue: var(--wp--preset--color--blue);
	--esip-line: var(--wp--preset--color--line);
	--esip-steel: var(--wp--preset--color--steel);
	--esip-header-h: 76px;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

[id] { scroll-margin-top: calc(var(--esip-header-h) + 1rem); }

:where(a, button, summary, .wp-block-navigation-item__content):focus-visible {
	outline: 2px solid var(--esip-blue);
	outline-offset: 3px;
}

/* ---------- 2. Header ---------- */

.esip-header-wrap { position: sticky; top: 0; z-index: 50; }
.admin-bar .esip-header-wrap { top: 32px; }
@media (max-width: 782px) { .admin-bar .esip-header-wrap { top: 0; position: relative; } }

.esip-header { border-bottom: 1px solid var(--esip-line); }
.esip-header .wp-block-navigation-item__content { text-decoration: none; color: var(--esip-ink); }
.esip-header .wp-block-navigation-item__content:hover { color: var(--esip-blue); text-decoration: underline; text-underline-offset: 6px; }
.esip-header .esip-lang .wp-block-navigation-item__content {
	border: 1px solid var(--esip-line);
	padding: 0.1rem 0.45rem;
	font-size: 0.9375rem;
	font-weight: 600;
}

@media (max-width: 600px) {
	.esip-header .wp-block-site-logo img { width: 112px !important; }
	.esip-header-right { gap: 0.75rem !important; }
	.esip-header-cta .wp-block-button__link { font-size: 0.9375rem; padding: 0.45rem 0.7rem !important; }
}

/* ---------- 3. Blokstijlen ---------- */

/* Groep: Tekenblad. Openingsblok met ruimte bovenaan. */
.is-style-tekenblad { padding-top: var(--wp--preset--spacing--60) !important; }
.is-style-tekenblad h1 { max-width: 13em; text-wrap: balance; }

/* Kolommen: Dienstrij. Lijn erboven; op gsm staat de afbeelding altijd eerst. */
.is-style-dienst,
.is-style-dienst-omgekeerd {
	border-top: 1px solid var(--esip-line);
	padding-top: var(--wp--preset--spacing--50);
	margin-top: var(--wp--preset--spacing--50) !important;
	margin-bottom: 0;
}
:where(.is-style-dienst, .is-style-dienst-omgekeerd) h3 { margin-top: 0; font-size: 1.75rem; }
@media (max-width: 781px) {
	.is-style-dienst-omgekeerd { flex-direction: column-reverse; }
}

/* Afbeelding: Tekening met kader. */
.wp-block-image.is-style-tekening img {
	background: #fff;
	border: 1px solid var(--esip-line);
	padding: 0.5rem;
}

/* Lijst: Technologiebalk. */
.is-style-technologie {
	list-style: none;
	margin: 0;
	padding: 0 !important;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 0;
	font-family: var(--wp--preset--font-family--barlow-semi-condensed);
	font-weight: 600;
	font-size: 1.0625rem;
}
.is-style-technologie { column-gap: 2rem !important; }
.is-style-technologie li { position: relative; padding-left: 1rem; }
.is-style-technologie li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 0.4rem;
	height: 0.4rem;
	background: var(--wp--preset--color--blue);
}
@media (max-width: 600px) {
	.is-style-technologie { display: grid; grid-template-columns: 1fr; }
}

/* Lijst: Genummerde stappen. Het vetgedrukte begin van elk item wordt de titel. */
.is-style-stappen {
	list-style: none;
	counter-reset: step;
	padding: 0 !important;
	margin: var(--wp--preset--spacing--50) 0 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}
.is-style-stappen li {
	counter-increment: step;
	border-top: 2px solid var(--esip-ink);
	padding-top: 0.9rem;
	color: var(--esip-steel);
}
.is-style-stappen li::before {
	content: counter(step);
	display: block;
	font-family: var(--wp--preset--font-family--barlow-semi-condensed);
	font-weight: 700;
	font-size: 2.5rem;
	line-height: 1;
	color: var(--esip-blue);
	margin-bottom: 0.6rem;
}
.is-style-stappen li strong { display: block; color: var(--esip-ink); font-size: 1.1875rem; margin-bottom: 0.2rem; }
@media (max-width: 900px) { .is-style-stappen { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .is-style-stappen { grid-template-columns: 1fr; } }

/* Lijst: Kenmerken met lijn. */
.is-style-kenmerken { list-style: none; padding: 0 !important; margin: 0; }
.is-style-kenmerken li {
	border-left: 3px solid var(--esip-blue);
	padding: 0.15rem 0 0.15rem 1rem;
	margin-bottom: 1.5rem;
	color: var(--esip-steel);
}
.is-style-kenmerken li strong { display: block; color: var(--esip-ink); font-size: 1.1875rem; }
.wp-block-column > .is-style-kenmerken:first-child { margin-top: 3.4rem; }
@media (max-width: 781px) { .wp-block-column > .is-style-kenmerken:first-child { margin-top: 0; } }

/* Paragraaf: Inleiding en Klein label. */
.is-style-inleiding {
	color: var(--esip-steel);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
	max-width: 36em;
}
.is-style-label {
	font-size: 0.75rem !important;
	line-height: 1.3;
	color: var(--esip-steel);
	margin: 0 0 0.15rem !important;
}

/* Paragraaf: Melding met lijn. Voor een korte, tijdgebonden waarschuwing. */
.is-style-melding {
	border-left: 3px solid #C0392B;
	background: #fff;
	padding: 0.8rem 1rem;
	font-size: 0.9375rem;
	color: var(--esip-steel);
	margin-top: var(--wp--preset--spacing--40) !important;
}
.is-style-melding strong { color: var(--esip-ink); }

/* Tabel: Projectlijst. Opgebouwd als een stuklijst. */
.wp-block-table.is-style-projectlijst { margin: var(--wp--preset--spacing--40) 0 0; }
.wp-block-table.is-style-projectlijst table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.wp-block-table.is-style-projectlijst th,
.wp-block-table.is-style-projectlijst td {
	border: 0;
	border-bottom: 1px solid var(--esip-line);
	padding: 1rem 1.25rem 1rem 0;
	text-align: left;
	vertical-align: top;
}
.wp-block-table.is-style-projectlijst thead { border-bottom: 0; }
.wp-block-table.is-style-projectlijst thead th {
	border-bottom: 2px solid var(--esip-ink);
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--esip-steel);
	padding-bottom: 0.5rem;
}
.wp-block-table.is-style-projectlijst td:first-child {
	width: 24%;
	font-family: var(--wp--preset--font-family--barlow-semi-condensed);
	font-weight: 600;
	font-size: 1.1875rem;
	line-height: 1.3;
}
.wp-block-table.is-style-projectlijst td:nth-child(2) { color: var(--esip-steel); }
.wp-block-table.is-style-projectlijst td:last-child { width: 22%; color: var(--esip-blue); font-weight: 600; padding-right: 0; }
@media (max-width: 781px) {
	.wp-block-table.is-style-projectlijst thead { display: none; }
	.wp-block-table.is-style-projectlijst tr { display: block; border-bottom: 1px solid var(--esip-line); padding: 1rem 0; }
	.wp-block-table.is-style-projectlijst td { display: block; width: auto !important; border: 0; padding: 0.15rem 0; }
}

/* Tabel: Gegevens (label + waarde). */
.wp-block-table.is-style-gegevens { margin: 0.5rem 0 0; }
.wp-block-table.is-style-gegevens table { border-collapse: collapse; width: 100%; border: 1px solid currentColor; }
.wp-block-table.is-style-gegevens td {
	border: 0;
	border-bottom: 1px solid color-mix(in srgb, currentColor 25%, transparent);
	padding: 0.7rem 1rem;
	vertical-align: top;
	text-align: left;
}
.wp-block-table.is-style-gegevens tr:last-child td { border-bottom: 0; }
.wp-block-table.is-style-gegevens td:first-child { width: 1%; white-space: nowrap; opacity: 0.65; }
@media (max-width: 480px) {
	.wp-block-table.is-style-gegevens td { display: block; width: auto !important; border: 0; padding: 0.1rem 1rem; }
	.wp-block-table.is-style-gegevens td:first-child { padding-top: 0.75rem; }
	.wp-block-table.is-style-gegevens tr:last-child td:last-child { padding-bottom: 0.75rem; }
}

/* Tabel: Tijdlijn (jaartal + omschrijving). */
.wp-block-table.is-style-tijdlijn { margin: 0; }
.wp-block-table.is-style-tijdlijn table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.wp-block-table.is-style-tijdlijn td {
	border: 0;
	border-top: 1px solid var(--esip-line);
	padding: 0.65rem 1rem 0.65rem 0;
	vertical-align: top;
	text-align: left;
	color: var(--esip-steel);
}
.wp-block-table.is-style-tijdlijn td:first-child {
	width: 6.5rem;
	white-space: nowrap;
	color: var(--esip-blue);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
.wp-block-table.is-style-tijdlijn tr:last-child td { border-bottom: 1px solid var(--esip-line); }

/* Details: Vraag en antwoord. */
.wp-block-details.is-style-vraag {
	border-top: 1px solid var(--esip-line);
	padding: 1rem 0;
	margin: 0 !important;
}
.wp-block-details.is-style-vraag:last-child { border-bottom: 1px solid var(--esip-line); }
.wp-block-details.is-style-vraag summary {
	font-family: var(--wp--preset--font-family--barlow-semi-condensed);
	font-weight: 600;
	font-size: 1.25rem;
	cursor: pointer;
	list-style: none;
	position: relative;
	padding-right: 2rem;
}
.wp-block-details.is-style-vraag summary::-webkit-details-marker { display: none; }
.wp-block-details.is-style-vraag summary::after {
	content: "+";
	position: absolute;
	right: 0.25rem;
	top: -0.1rem;
	font-size: 1.5rem;
	font-weight: 500;
	color: var(--esip-blue);
}
.wp-block-details.is-style-vraag[open] summary::after { content: "\2212"; }
.wp-block-details.is-style-vraag > :not(summary) { color: var(--esip-steel); margin-top: 0.6rem; max-width: 40em; }

/* Groep: Titelblok. Footer opgebouwd als het schriftveld van een schema. */
.is-style-titelblok {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1px;
	background: var(--esip-ink);
	border: 1px solid var(--esip-ink);
	font-size: 0.9375rem;
	line-height: 1.45;
}
.is-style-titelblok > * {
	background: #fff;
	padding: 0.7rem 0.9rem;
	margin: 0 !important;
	min-width: 0;
}
.is-style-titelblok > * > * { margin-top: 0; margin-bottom: 0; }
.is-style-titelblok > .titelblok-breed { grid-column: span 2; }
@media (max-width: 480px) { .is-style-titelblok > .titelblok-breed { grid-column: auto; } }
.is-style-titelblok .titelblok-naam { font-family: var(--wp--preset--font-family--barlow-semi-condensed); font-size: 1.25rem; }
.is-style-titelblok .wp-block-site-logo img { width: 150px; }
.is-style-titelblok a:hover { color: var(--esip-blue) !important; }
@media (max-width: 900px) { .is-style-titelblok { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .is-style-titelblok { grid-template-columns: 1fr; } }

/* ---------- 4. Standaardlijsten en knoppen ---------- */

/* Opsommingen zonder eigen stijl krijgen blauwe vierkantjes. */
.wp-block-post-content ul.wp-block-list:not([class*="is-style-"]),
.editor-styles-wrapper ul.wp-block-list:not([class*="is-style-"]) {
	list-style: none;
	padding-left: 0;
}
.wp-block-post-content ul.wp-block-list:not([class*="is-style-"]) > li,
.editor-styles-wrapper ul.wp-block-list:not([class*="is-style-"]) > li {
	position: relative;
	padding-left: 1.4rem;
	margin-bottom: 0.4rem;
}
.wp-block-post-content ul.wp-block-list:not([class*="is-style-"]) > li::before,
.editor-styles-wrapper ul.wp-block-list:not([class*="is-style-"]) > li::before {
	content: "";
	position: absolute;
	left: 0.1rem;
	top: 0.62em;
	width: 0.5rem;
	height: 0.5rem;
	background: var(--esip-blue);
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1px solid currentColor;
	background: transparent;
}
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) { color: var(--esip-blue); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: color-mix(in srgb, currentColor 10%, transparent); }

/* ---------- 5. Tekstpagina's ---------- */

.esip-doc h1 { margin-bottom: var(--wp--preset--spacing--40); }
.esip-doc h2 {
	font-size: 1.375rem;
	margin-top: var(--wp--preset--spacing--50);
	padding-top: 0.75rem;
	border-top: 1px solid var(--esip-line);
}
.esip-doc h3 { margin-top: var(--wp--preset--spacing--50); }
.esip-doc .esip-doc-intro { color: var(--esip-steel); }
.esip-doc .esip-clause { padding-left: 2.75rem; position: relative; margin-top: 0.6rem; }
.esip-doc .esip-clause-nr {
	position: absolute;
	left: 0;
	color: var(--esip-steel);
	font-variant-numeric: tabular-nums;
}
