/* Swop Canvas magazinelaag (0.30.0). Child-thema's sturen het uiterlijk met de --mag-variabelen. */
:root {
	--mag-accent: var(--wp--preset--color--primary);
	--mag-accent-d: color-mix(in srgb, var(--mag-accent) 84%, #000);
	--mag-accent-t: color-mix(in srgb, var(--mag-accent) 10%, #fff);
	--mag-ink: var(--wp--preset--color--text);
	--mag-ink2: color-mix(in srgb, var(--mag-ink) 78%, #fff);
	--mag-mute: var(--wp--preset--color--text-muted);
	--mag-paper: var(--wp--preset--color--surface);
	--mag-card: #fff;
	--mag-line: var(--wp--preset--color--surface-alt);
	--mag-dark: var(--mag-ink);
	--mag-dark-card: color-mix(in srgb, var(--mag-dark) 88%, #fff);
	--mag-r: 18px;
	--mag-sh: 0 1px 0 rgba(0, 0, 0, .05), 0 12px 32px -14px rgba(0, 0, 0, .25);
	--mag-head: var(--wp--preset--font-family--heading);
	--mag-body: var(--wp--preset--font-family--body);
	--mag-read: var(--mag-body);
	--mag-measure: 680px;
}

.swop-mag-posts { display: grid; gap: 16px; }
.swop-mag-posts a { color: inherit; text-decoration: none; }
.mag-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mag-img--leeg { background: linear-gradient(135deg, var(--mag-line), color-mix(in srgb, var(--mag-line) 70%, var(--mag-ink) 8%)); }
.mag-title { font-family: var(--mag-head); letter-spacing: -.02em; line-height: 1.12; margin: 0; font-weight: 700; }
.mag-meta { font-size: 13px; color: var(--mag-mute); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mag-meta b { color: var(--mag-ink2); font-weight: 600; }
.mag-tag { display: inline-flex; align-items: center; font: 700 11px/1 var(--mag-body); text-transform: uppercase; letter-spacing: .08em; padding: 6px 9px; border-radius: 6px; background: #fff; color: var(--mag-ink); }
.mag-tag--tint { background: var(--mag-accent-t); color: var(--mag-accent-d); }
.mag-ic { width: 18px; height: 18px; flex: none; }
/* Beeldvakken: vaste verhouding, beeld vult het vak (ook bij afwijkende afmetingen van oude uploads). */
.swop-mag-posts .mag-im, .mag-next .mag-im, .mag-also .mag-im { position: relative; overflow: hidden; display: block; }
.swop-mag-posts .mag-im > .mag-img, .mag-next .mag-im > .mag-img, .mag-also .mag-im > .mag-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Tegel: beeld met tekst eroverheen */
.mag-tile { position: relative; display: block; overflow: hidden; border-radius: var(--mag-r); box-shadow: var(--mag-sh); background: #2a2630; color: #fff; min-height: 220px; height: 100%; }
.mag-tile .mag-img { position: absolute; inset: 0; transition: transform .6s; }
.mag-tile:hover .mag-img { transform: scale(1.03); }
.mag-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .82)); }
.mag-tile .mag-tag { position: absolute; top: 16px; left: 16px; z-index: 2; }
.mag-tile .mag-in { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; z-index: 2; display: flex; flex-direction: column; gap: 10px; }
.mag-tile .mag-title { font-size: 21px; color: #fff; }
.mag-tile .mag-meta, .mag-tile .mag-meta b { color: rgba(255, 255, 255, .85); }

/* Kaart */
.mag-card { background: var(--mag-card); border-radius: var(--mag-r); overflow: hidden; box-shadow: var(--mag-sh); display: flex; flex-direction: column; }
.mag-card .mag-im { aspect-ratio: 16/10; position: relative; background: var(--mag-line); }
.mag-card .mag-im .mag-tag { position: absolute; top: 14px; left: 14px; z-index: 2; }
.mag-card .mag-bd { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.mag-card .mag-title { font-size: 20px; }

/* Genummerd (populair) */
.mag--numbered { grid-template-columns: repeat(5, 1fr); }
.mag-numbered { background: var(--mag-card); border-radius: var(--mag-r); box-shadow: var(--mag-sh); overflow: hidden; display: flex; flex-direction: column; }
.mag-numbered .mag-im { aspect-ratio: 4/3; position: relative; background: var(--mag-line); overflow: visible !important; }
.mag-numbered .mag-im > .mag-img { border-radius: 0; }
.mag-numbered .mag-n { z-index: 1; position: absolute; left: 12px; bottom: -22px; width: 48px; height: 48px; border-radius: 14px; background: var(--mag-accent); color: #fff; font: 900 24px/48px var(--mag-head); text-align: center; box-shadow: 0 6px 16px -6px var(--mag-accent); }
.mag-numbered .mag-bd { padding: 32px 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.mag-numbered .mag-title { font-size: 16px; }

/* Compacte lijst */
.mag--list { gap: 0; }
.mag-list { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--mag-line); }
.mag-list:first-child { border-top: 0; padding-top: 0; }
.mag-list .mag-im { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--mag-line); }
.mag-list .mag-title { font-size: 16px; }

/* Rij (categorieoverzicht) */
.mag--row { gap: 0; }
.mag-row { display: grid; grid-template-columns: 220px 1fr; gap: 20px; padding: 22px 0; border-top: 1px solid var(--mag-line); align-items: center; }
.mag-row .mag-im { aspect-ratio: 4/3; border-radius: 14px; overflow: hidden; background: var(--mag-line); }
.mag-row .mag-title { font-size: 21px; margin: 8px 0; }

/* Ranglijst (zijkolom) */
ol.mag--rank { list-style: none; counter-reset: mag; margin: 0; padding: 0; gap: 0; }
.mag-rank { counter-increment: mag; display: grid; grid-template-columns: 36px 1fr; gap: 8px; padding: 12px 0; border-top: 1px solid var(--mag-line); font-weight: 600; font-size: 15px; line-height: 1.35; }
.mag-rank:first-child { border-top: 0; }
.mag-rank::before { content: counter(mag); font: 900 28px/1 var(--mag-head); color: var(--mag-accent); }

/* Artikel */
.mag-dek { font: 400 21px/1.45 var(--mag-read); color: var(--mag-ink2); margin: 0 0 18px; }
.mag-cap { font-size: 12px; color: var(--mag-mute); margin: 8px 0 24px; }
.mag-byline { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--mag-line); border-bottom: 1px solid var(--mag-line); flex-wrap: wrap; }
.mag-byline .mag-meta { flex: 1; min-width: 180px; }
.mag-av { width: 42px; height: 42px; border-radius: 50%; background: var(--mag-accent); color: #fff; display: flex; align-items: center; justify-content: center; font: 800 15px var(--mag-head); flex: none; }
.mag-share { display: flex; gap: 6px; }
.mag-share a, .mag-share button { height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--mag-line); background: #fff; color: var(--mag-ink); display: inline-flex; align-items: center; font: 700 12px var(--mag-body); cursor: pointer; text-decoration: none; }
.mag-share .mag-share-wa { background: #25d366; border-color: #25d366; color: #fff; }
.mag-crumbs { font-size: 13px; color: var(--mag-mute); }
.mag-crumbs a { color: inherit; text-decoration: none; }
.mag-crumbs a:hover { color: var(--mag-accent); }
.mag-kort { background: var(--mag-accent-t); border-radius: 16px; padding: 20px 22px; max-width: var(--mag-measure); margin: 0 0 28px; }
.mag-kort b { font: 800 15px var(--mag-head); color: var(--mag-accent-d); display: block; margin-bottom: 8px; }
.mag-kort ul { margin: 0; padding: 0 0 0 18px; }
.mag-kort li { margin: 6px 0; font-size: 15px; }
.mag-also { display: grid; grid-template-columns: 130px 1fr; gap: 16px; align-items: center; background: var(--mag-card); border-radius: 14px; overflow: hidden; margin: 28px 0; box-shadow: var(--mag-sh); max-width: var(--mag-measure); font: 700 17px/1.3 var(--mag-head); color: var(--mag-ink) !important; text-decoration: none !important; }
.mag-also .mag-im { display: block; height: 96px; background: var(--mag-line); }
.mag-also .mag-bd { padding-right: 16px; }
.mag-also small { display: block; font: 700 11px var(--mag-body); letter-spacing: .1em; text-transform: uppercase; color: var(--mag-accent); margin-bottom: 4px; }
.mag-searches { max-width: var(--mag-measure); background: var(--mag-card); border-radius: 16px; padding: 20px; margin: 36px 0; box-shadow: var(--mag-sh); }
.mag-searches b { font: 800 19px var(--mag-head); }
.mag-searches p { font-size: 14px; color: var(--mag-mute); margin: 2px 0 12px; }
.mag-searches .mag-q { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mag-searches .mag-q a { display: flex; gap: 8px; align-items: center; border: 1px solid var(--mag-line); border-radius: 10px; padding: 11px 12px; font-weight: 600; font-size: 14px; color: var(--mag-ink); text-decoration: none; }
.mag-searches .mag-q a::before { content: "⌕"; color: var(--mag-accent); font-size: 18px; line-height: 1; }
.mag-next { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--mag-r); overflow: hidden; background: var(--mag-dark); color: #fff !important; margin: 36px 0; max-width: var(--mag-measure); text-decoration: none !important; }
.mag-next .mag-im { min-height: 220px; background: #2a2630; }
.mag-next .mag-bd { padding: 24px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.mag-next small { font: 700 11px var(--mag-body); letter-spacing: .12em; text-transform: uppercase; color: var(--mag-accent); }
.mag-next .mag-title { font-size: 22px; font-weight: 800; color: #fff; }
.mag-go { font-weight: 700; color: var(--mag-accent); }
.mag-progress { position: sticky; top: var(--mag-progress-top, 0px); z-index: 45; height: 4px; }
.mag-progress i { display: block; height: 4px; width: 0; background: var(--mag-accent); border-radius: 0 4px 4px 0; transition: width .1s linear; }
.mag-notice { background: var(--mag-card); border-left: 4px solid var(--mag-accent); border-radius: 10px; padding: 16px 18px; font-size: 14px; color: var(--mag-ink2); }
.mag-notice p { margin: 4px 0 0; }
.mag-checked { display: block; margin-top: 8px; font-size: 13px; color: var(--mag-mute); }
.mag-source { display: inline-flex; gap: 10px; align-items: center; padding: 10px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--mag-line); font: 600 14px var(--mag-body); color: var(--mag-ink) !important; text-decoration: none !important; }

/* Paginering */
.mag-pager { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 28px 0 56px; }
.mag-pager .page-numbers { min-width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; font-weight: 700; background: #fff; border: 1px solid var(--mag-line); padding: 0 14px; color: var(--mag-ink); text-decoration: none; }
.mag-pager .page-numbers.current { background: var(--mag-ink); color: #fff; border-color: var(--mag-ink); }
.mag-pager .page-numbers.next { background: var(--mag-accent); border-color: var(--mag-accent); color: #fff; }
.mag-pager .page-numbers.dots { background: transparent; border: 0; }

/* Zoeken */
.mag-search-form { display: flex; background: #fff; border-radius: 14px; padding: 6px 6px 6px 14px; gap: 8px; align-items: center; color: var(--mag-ink); }
.mag-search-form input { flex: 1; border: 0; outline: 0; font: 500 16px var(--mag-body); min-width: 0; background: transparent; color: var(--mag-ink); padding: 8px 0; }
.mag-search-form button { border: 0; background: var(--mag-ink); color: #fff; font: 700 14px var(--mag-body); padding: 12px 16px; border-radius: 10px; cursor: pointer; }
.mag-search--mini .mag-search-form { border: 2px solid var(--mag-ink); padding: 6px 12px; }
.mag-search-title { font-family: var(--mag-head); font-size: 28px; font-weight: 800; line-height: 1.1; margin: 0; }
.mag-trending { display: flex; flex-wrap: wrap; gap: 6px; font: 600 12px var(--mag-body); }
.mag-trending a { background: rgba(255, 255, 255, .18); padding: 5px 10px; border-radius: 999px; color: inherit; text-decoration: none; }

/* Subcategorieën */
.mag-terms { display: flex; gap: 8px; flex-wrap: wrap; }
.mag-terms a { padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--mag-line); font-weight: 600; font-size: 14px; color: var(--mag-ink); text-decoration: none; }
.mag-terms a.is-on { background: var(--mag-accent); color: #fff; border-color: var(--mag-accent); }

/* Plekken: vaste ruimte zodat de pagina niet verspringt */
.swop-slot { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.swop-slot > * { width: 100%; }
.swop-slot--lb { min-height: 110px; }
.swop-slot--rect { min-height: 280px; }
.swop-slot--sky { min-height: 600px; }
.swop-slot--in { min-height: 260px; }
.swop-slot--form.swop-slot--voorbeeld { min-height: 54px; }
.swop-slot:has(ins[data-ad-status="unfilled"]) { display: none; }
.swop-slot-label { display: none; }
.swop-slot--voorbeeld { background: repeating-linear-gradient(45deg, #f0ebe4, #f0ebe4 10px, #e9e3da 10px, #e9e3da 20px); border: 1px dashed #cdc4b6; border-radius: 12px; }
.swop-slot--voorbeeld .swop-slot-label { display: block; color: #9a917f; font: 600 11px var(--mag-body); letter-spacing: .14em; text-transform: uppercase; text-align: center; margin: 0; }

@media (max-width: 1060px) {
	.mag--numbered { grid-template-columns: repeat(5, minmax(240px, 38%)); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
	.mag--numbered .mag-numbered { scroll-snap-align: start; }
}
@media (max-width: 640px) {
	.mag--numbered { grid-template-columns: repeat(5, minmax(230px, 46%)); }
	.mag-row { grid-template-columns: 110px 1fr; gap: 14px; }
	.mag-row .mag-title { font-size: 17px; }
	.mag-also { grid-template-columns: 96px 1fr; font-size: 15px; }
	.mag-searches .mag-q { grid-template-columns: 1fr; }
	.mag-next { grid-template-columns: 1fr; }
	.mag-next .mag-im { min-height: 180px; }
	.swop-slot--sky { min-height: 280px; }
}

/* Ruimte rond de magazineblokken. WordPress zet in een flow-layout ':root :where(.is-layout-flow) > *' op de marges
   (zelfde gewicht als één klasse, maar later geladen). Daarom hier dezelfde marges met :root ervoor.
   Gemaakt met de marge-declaraties hierboven; pas bij een wijziging van een marge hierboven ook deze regel aan. */
:root .mag-title { margin: 0; }
:root .mag-row .mag-title { margin: 8px 0; }
:root ol.mag--rank { margin: 0; }
:root .mag-dek { margin: 0 0 18px; }
:root .mag-cap { margin: 8px 0 24px; }
:root .mag-kort { margin: 0 0 28px; }
:root .mag-kort b { margin-bottom: 8px; }
:root .mag-kort ul { margin: 0; }
:root .mag-kort li { margin: 6px 0; }
:root .mag-also { margin: 28px 0; }
:root .mag-also small { margin-bottom: 4px; }
:root .mag-searches { margin: 36px 0; }
:root .mag-searches p { margin: 2px 0 12px; }
:root .mag-next { margin: 36px 0; }
:root .mag-notice p { margin: 4px 0 0; }
:root .mag-checked { margin-top: 8px; }
:root .mag-pager { margin: 28px 0 56px; }
:root .mag-search-title { margin: 0; }
:root .swop-slot--voorbeeld .swop-slot-label { margin: 0; }
