/*
 * A4W In de kijker.
 * Foto in de A4W-vorm: schuin (15°, zoals de knoppen) met grote ronde hoeken. Het vak wordt schuin gezet,
 * de foto erin terug recht en net breder, zodat ze het schuine vak altijd vult.
 * Kleuren per palet als variabelen; lay-out per klasse; op tablet en gsm alles onder elkaar.
 */

.a4w-spot {
	--a4w-tan: .2679;                          /* tan(15°) */
	--a4w-pad: clamp(24px, 4vw, 56px);         /* binnenruimte van het kleurvlak */
	--a4w-space: clamp(24px, 4vw, 64px);       /* ruimte tussen foto en tekst */
	--a4w-rad: clamp(20px, 3vw, 40px);         /* hoeken van de schuine foto */
	--a4w-ov: clamp(24px, 4vw, 56px);          /* hoeveel de foto uitsteekt bij "overlap" */
	--a4w-cols: minmax(0, 1fr) minmax(0, 1fr);
	position: relative;
	color: var(--a4w-c);
}
.a4w-spot, .a4w-spot *, .a4w-spot *::before, .a4w-spot *::after { box-sizing: border-box; }
.a4w-spot--img-40 { --a4w-cols: minmax(0, 2fr) minmax(0, 3fr); }
.a4w-spot--img-60 { --a4w-cols: minmax(0, 3fr) minmax(0, 2fr); }

/* ---------- Kleurenpaletten ---------- */

.a4w-spot--p-zwart          { --a4w-bg: #010101; --a4w-c: #fff; --a4w-hl: #DF231D; }
.a4w-spot--p-donkergrijs    { --a4w-bg: #454445; --a4w-c: #fff; --a4w-hl: #fff; }
.a4w-spot--p-rood           { --a4w-bg: #DF231D; --a4w-c: #fff; --a4w-hl: #010101; }
.a4w-spot--p-lichtgrijs     { --a4w-bg: #F2F2F2; --a4w-c: #010101; --a4w-hl: #DF231D; }
.a4w-spot--p-wit            { --a4w-bg: #fff; --a4w-c: #010101; --a4w-hl: #DF231D; }
.a4w-spot--p-gradient-licht { --a4w-bg: linear-gradient(135deg, #fff 0%, #E4E4E4 100%); --a4w-c: #010101; --a4w-hl: #DF231D; }
.a4w-spot--p-gradient-donker{ --a4w-bg: linear-gradient(135deg, #454445 0%, #010101 100%); --a4w-c: #fff; --a4w-hl: #DF231D; }
.a4w-spot--p-gradient-rood  { --a4w-bg: linear-gradient(135deg, #DF231D 0%, #8F1511 100%); --a4w-c: #fff; --a4w-hl: #010101; }
.a4w-spot--p-geen           { --a4w-bg: transparent; --a4w-c: #010101; --a4w-hl: #DF231D; --a4w-pad: 0px; }
.a4w-spot--p-geen-wit       { --a4w-bg: transparent; --a4w-c: #fff; --a4w-hl: #DF231D; --a4w-pad: 0px; }

/* Knop: op licht zwart (hover wit met rode rand), op donker wit (hover transparant met rode rand),
   op rood zwart (hover wit met zwarte rand: een rode rand zou wegvallen). */
.a4w-spot {
	--a4w-btn-bg: #010101; --a4w-btn-c: #fff; --a4w-btn-b: #010101;
	--a4w-btn-hbg: #fff; --a4w-btn-hc: #010101; --a4w-btn-hb: #DF231D;
}
.a4w-spot--p-zwart, .a4w-spot--p-donkergrijs, .a4w-spot--p-gradient-donker, .a4w-spot--p-geen-wit {
	--a4w-btn-bg: #fff; --a4w-btn-c: #010101; --a4w-btn-b: #fff;
	--a4w-btn-hbg: transparent; --a4w-btn-hc: #fff; --a4w-btn-hb: #DF231D;
}
.a4w-spot--p-rood, .a4w-spot--p-gradient-rood {
	--a4w-btn-hbg: #fff; --a4w-btn-hc: #010101; --a4w-btn-hb: #010101;
}

/* ---------- Kleurvlak en tekst ---------- */

.a4w-spot__box {
	position: relative;
	display: grid;
	grid-template-columns: var(--a4w-cols);
	align-items: center;
	gap: var(--a4w-space);
	padding: var(--a4w-pad);
	border-radius: 20px;
	background: var(--a4w-bg);
	color: var(--a4w-c);
}
.a4w-spot__content { min-width: 0; }

.a4w-spot .a4w-spot__title {
	margin: 0 0 .45em;
	padding: 0;
	color: var(--a4w-c);
	font-family: 'Barlow', Helvetica, Arial, Lucida, sans-serif;
	font-size: clamp(28px, 3.4vw, 40px);
	font-weight: 500;
	line-height: 1;
	text-transform: uppercase;
	overflow-wrap: break-word;
	hyphens: auto;
}
.a4w-spot .a4w-spot__hl { color: var(--a4w-hl); }

.a4w-spot .a4w-spot__text,
.a4w-spot .a4w-spot__text p {
	color: var(--a4w-c);
	font-family: 'Neo Sans', Helvetica, Arial, Lucida, sans-serif;
	font-size: 18px;
	line-height: 1.3;
}
.a4w-spot .a4w-spot__text p { margin: 0 0 .8em; padding: 0; }
.a4w-spot .a4w-spot__text p:last-child { margin-bottom: 0; }
.a4w-spot .a4w-spot__text a { color: inherit; text-decoration: underline; }

.a4w-spot__actions { margin-top: 28px; }

/* Knop in de A4W-stijl; "Eigen stijl gebruiken" bij Ontwerp > Knop wint nog altijd. */
body #page-container .a4w-spot .a4w-spot__btn.et_pb_button,
body .a4w-spot a.a4w-spot__btn.et_pb_button {
	display: inline-block;
	margin: 0;
	padding: .3em 1em !important;
	border: 2px solid var(--a4w-btn-b);
	border-radius: 10px;
	background: var(--a4w-btn-bg);
	color: var(--a4w-btn-c) !important;
	font-family: 'Barlow', Helvetica, Arial, Lucida, sans-serif;
	font-size: 18px;
	font-weight: 900;
	font-style: normal;
	line-height: 1.7em;
	text-decoration: none;
	transform: skewX(-15deg);
	transition: transform .3s ease, color .3s ease, background-color .3s ease, border-color .3s ease;
}
body #page-container .a4w-spot .a4w-spot__btn.et_pb_button:hover,
body #page-container .a4w-spot--hover.a4w-spot--linked .a4w-spot__box:hover .a4w-spot__btn.et_pb_button,
body .a4w-spot a.a4w-spot__btn.et_pb_button:hover {
	padding: .3em 1em !important;
	border-color: var(--a4w-btn-hb) !important;
	background: var(--a4w-btn-hbg);
	color: var(--a4w-btn-hc) !important;
	transform: skewX(0deg);
}
body #page-container .a4w-spot .a4w-spot__btn.et_pb_button:focus-visible {
	outline: 2px solid #DF231D;
	outline-offset: 3px;
}
body #page-container .a4w-spot .a4w-spot__btn.et_pb_button:not(.et_pb_custom_button_icon)::before,
body #page-container .a4w-spot .a4w-spot__btn.et_pb_button:not(.et_pb_custom_button_icon)::after {
	display: none !important;
}

/* ---------- Foto ---------- */

.a4w-spot__media {
	position: relative;
	display: block;
	min-width: 0;
	text-decoration: none;
}
.a4w-spot__frame {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 5%;
	width: 100%;
	aspect-ratio: var(--a4w-r, 4/3);
	box-sizing: border-box;
}
.a4w-spot__panel {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	height: 100%;
	overflow: hidden;
	border-radius: 20px;
	background: rgba(127, 127, 127, .18);
	container-type: size;
	-webkit-mask-image: -webkit-radial-gradient(white, black); /* Safari: ronde hoeken ook tijdens het zoomen */
}
.a4w-spot__panel img,
.a4w-spot__panel .a4w-spot__img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
	transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.a4w-spot__empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: currentColor;
	opacity: .5;
}

/* Schuin: het vak past precies in de kolom (links en rechts een halve "schuinte" vrij). */
.a4w-spot--schuin .a4w-spot__frame,
.a4w-spot--duo .a4w-spot__frame {
	padding-inline: calc(50% * var(--a4w-tan) / var(--a4w-rn, 1.3333));
}
.a4w-spot--schuin .a4w-spot__panel,
.a4w-spot--duo .a4w-spot__panel {
	border-radius: var(--a4w-rad);
	transform: skewX(-15deg);
}
.a4w-spot--schuin .a4w-spot__panel img,
.a4w-spot--duo .a4w-spot__panel img,
.a4w-spot--schuin .a4w-spot__empty,
.a4w-spot--duo .a4w-spot__empty {
	left: calc(-50cqh * var(--a4w-tan));
	width: calc(100% + 100cqh * var(--a4w-tan));
	transform: skewX(15deg);
}
/* Twee delen: het rechterdeel iets korter, zoals de foto's op de homepage. */
.a4w-spot--duo .a4w-spot__panel + .a4w-spot__panel { height: 88%; }
.a4w-spot--duo { --a4w-rad: clamp(16px, 2.4vw, 32px); }

/* Hover: foto zoomt zacht in. */
.a4w-spot--hover .a4w-spot__box:hover .a4w-spot__panel img { transform: scale(1.05); }
.a4w-spot--hover.a4w-spot--schuin .a4w-spot__box:hover .a4w-spot__panel img,
.a4w-spot--hover.a4w-spot--duo .a4w-spot__box:hover .a4w-spot__panel img { transform: skewX(15deg) scale(1.05); }

/* ---------- Lay-outs ---------- */

/* Foto rechts. */
.a4w-spot--rechts .a4w-spot__box,
.a4w-spot--overlap-rechts .a4w-spot__box { grid-template-columns: var(--a4w-cols-r, minmax(0, 1fr) minmax(0, 1fr)); }
.a4w-spot--rechts.a4w-spot--img-40, .a4w-spot--overlap-rechts.a4w-spot--img-40 { --a4w-cols-r: minmax(0, 3fr) minmax(0, 2fr); }
.a4w-spot--rechts.a4w-spot--img-60, .a4w-spot--overlap-rechts.a4w-spot--img-60 { --a4w-cols-r: minmax(0, 2fr) minmax(0, 3fr); }
.a4w-spot--rechts .a4w-spot__media,
.a4w-spot--overlap-rechts .a4w-spot__media { order: 2; }

/* Overlap: de foto steekt boven en onder uit het kleurvlak. Het vlak sluit aan rond de tekst;
   de foto volgt de hoogte van het vlak (+ het uitsteken) en telt zelf niet mee voor die hoogte. */
.a4w-spot--overlap { padding-block: var(--a4w-ov); }
.a4w-spot--overlap .a4w-spot__box { min-height: clamp(220px, 22vw, 300px); }
.a4w-spot--overlap .a4w-spot__media {
	align-self: stretch;
	container-type: size;
}
.a4w-spot--overlap .a4w-spot__frame {
	position: absolute;
	top: calc(-1 * (var(--a4w-ov) + var(--a4w-pad)));
	bottom: calc(-1 * (var(--a4w-ov) + var(--a4w-pad)));
	left: 0;
	right: 0;
	width: auto;
	aspect-ratio: auto;
}
.a4w-spot--overlap.a4w-spot--schuin .a4w-spot__frame,
.a4w-spot--overlap.a4w-spot--duo .a4w-spot__frame {
	padding-inline: calc(var(--a4w-tan) * (100cqh + 2 * (var(--a4w-ov) + var(--a4w-pad))) / 2);
}
.a4w-spot--overlap.a4w-spot--p-geen,
.a4w-spot--overlap.a4w-spot--p-geen-wit { padding-block: 0; }
.a4w-spot--overlap.a4w-spot--p-geen .a4w-spot__media,
.a4w-spot--overlap.a4w-spot--p-geen-wit .a4w-spot__media { margin-block: 0; }

/* Foto boven (kaart). */
.a4w-spot--boven .a4w-spot__box {
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
	gap: clamp(20px, 3vw, 32px);
	height: 100%;
}
.a4w-spot--boven { height: 100%; }
.a4w-spot--boven .a4w-spot__title { font-size: clamp(26px, 2.6vw, 32px); }

/* Foto als achtergrond met tekstvak. */
.a4w-spot--banner .a4w-spot__box {
	display: flex;
	align-items: center;
	min-height: clamp(360px, 38vw, 520px);
	padding: clamp(24px, 5vw, 72px);
	overflow: hidden;
	background: #010101;
}
.a4w-spot--banner .a4w-spot__media {
	position: absolute;
	inset: 0;
}
.a4w-spot--banner .a4w-spot__frame { height: 100%; aspect-ratio: auto; }
.a4w-spot--banner .a4w-spot__panel { border-radius: 0; }
.a4w-spot--banner .a4w-spot__content {
	position: relative;
	width: 100%;
	max-width: 540px;
	padding: clamp(24px, 3.5vw, 48px);
	border-radius: 20px;
	background: var(--a4w-bg);
}
.a4w-spot--banner.a4w-spot--p-geen .a4w-spot__content { background: rgba(255, 255, 255, .92); }
.a4w-spot--banner.a4w-spot--p-geen-wit .a4w-spot__content { background: rgba(1, 1, 1, .72); }

/* Smalle balk. */
.a4w-spot--compact .a4w-spot__box {
	grid-template-columns: clamp(120px, 18%, 200px) minmax(0, 1fr) auto;
	gap: clamp(20px, 3vw, 40px);
	padding: clamp(20px, 2.5vw, 32px);
}
.a4w-spot--compact .a4w-spot__content { display: contents; }
.a4w-spot--compact .a4w-spot__title,
.a4w-spot--compact .a4w-spot__text { grid-column: 2; }
.a4w-spot--compact .a4w-spot__title { margin: 0; font-size: clamp(22px, 2.2vw, 28px); align-self: end; }
.a4w-spot--compact .a4w-spot__text { align-self: start; }
.a4w-spot--compact .a4w-spot__media { grid-column: 1; grid-row: 1 / span 2; }
.a4w-spot--compact .a4w-spot__actions { grid-column: 3; grid-row: 1 / span 2; margin: 0; }
.a4w-spot--compact .a4w-spot__box { row-gap: 8px; }
.a4w-spot--compact:not(:has(.a4w-spot__text)) .a4w-spot__title { align-self: center; grid-row: 1 / span 2; }

/* ---------- Tablet ---------- */

@media (max-width: 980px) {
	.a4w-spot--compact .a4w-spot__box { grid-template-columns: clamp(110px, 24%, 180px) minmax(0, 1fr); }
	.a4w-spot--compact .a4w-spot__media { grid-row: 1 / span 3; align-self: center; }
	.a4w-spot--compact .a4w-spot__actions { grid-column: 2; grid-row: 3; margin-top: 8px; }
	.a4w-spot--compact .a4w-spot__title { align-self: auto; }
}

/* ---------- Gsm: alles onder elkaar, foto boven ---------- */

@media (max-width: 767px) {
	.a4w-spot .a4w-spot__box,
	.a4w-spot--rechts .a4w-spot__box,
	.a4w-spot--overlap-rechts .a4w-spot__box {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}
	.a4w-spot .a4w-spot__media { order: 0; }
	.a4w-spot .a4w-spot__text, .a4w-spot .a4w-spot__text p { font-size: 17px; }
	.a4w-spot__actions { margin-top: 24px; }

	/* Op gsm liggend, anders wordt een staande foto te hoog. */
	.a4w-spot--overlap .a4w-spot__box { min-height: 0; }
	.a4w-spot--overlap .a4w-spot__media { container-type: normal; }
	.a4w-spot--overlap .a4w-spot__frame { position: relative; top: auto; bottom: auto; width: 100%; aspect-ratio: 4/3; --a4w-rn: 1.3333; }
	.a4w-spot--overlap.a4w-spot--schuin .a4w-spot__frame,
	.a4w-spot--overlap.a4w-spot--duo .a4w-spot__frame { padding-inline: calc(50% * var(--a4w-tan) / 1.3333); }

	.a4w-spot--overlap { padding-block: var(--a4w-ov) 0; }
	.a4w-spot--overlap .a4w-spot__media { margin-block: calc(-1 * (var(--a4w-ov) + var(--a4w-pad))) 0; }

	.a4w-spot--banner .a4w-spot__box { display: block; min-height: 0; padding: 0; background: var(--a4w-bg); }
	.a4w-spot--banner.a4w-spot--p-geen .a4w-spot__box,
	.a4w-spot--banner.a4w-spot--p-geen-wit .a4w-spot__box { background: transparent; }
	.a4w-spot--banner .a4w-spot__media { position: relative; }
	.a4w-spot--banner .a4w-spot__frame { aspect-ratio: 16/9; height: auto; }
	.a4w-spot--banner .a4w-spot__panel { border-radius: 20px 20px 0 0; }
	.a4w-spot--banner .a4w-spot__content { max-width: none; border-radius: 0 0 20px 20px; padding: 24px; }

	/* Smalle balk blijft compact: kleine foto naast de titel, tekst en knop eronder. */
	.a4w-spot--compact .a4w-spot__box,
	.a4w-spot--compact.a4w-spot--duo .a4w-spot__box { grid-template-columns: 96px minmax(0, 1fr); gap: 12px 16px; }
	.a4w-spot--compact .a4w-spot__media { grid-column: 1; grid-row: 1; align-self: center; }
	.a4w-spot--compact .a4w-spot__title { grid-column: 2; grid-row: 1; align-self: center; margin: 0; font-size: 22px; }
	.a4w-spot--compact .a4w-spot__text,
	.a4w-spot--compact .a4w-spot__actions { grid-column: 1 / -1; grid-row: auto; }
	.a4w-spot--compact .a4w-spot__actions { margin-top: 8px; }
	.a4w-spot--compact .a4w-spot__frame { aspect-ratio: 1/1; --a4w-rn: 1; }
	.a4w-spot--compact { --a4w-rad: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.a4w-spot__panel img,
	body #page-container .a4w-spot .a4w-spot__btn.et_pb_button { transition: none; }
}
