/* ==========================================================
   Wintersport Deals – Core
   Stylesheet for everything the plugin renders itself.
   The site-wide design CSS lives in the Customizer (see additional-css.css).
   ========================================================== */

:root {
	--wsd-bg: #f4f9fd;
	--wsd-n: #003761;
	--wsd-b: #009fe3;
	--wsd-b-dark: #0077b6;
	--wsd-g: #9dc31a;
	--wsd-ice: #e8f5fd;
	--wsd-line: #d6e6f2;
	--wsd-text: #1c2b39;
	--wsd-muted: #4a5b69;
}

html body { background-color: var(--wsd-bg); }

.wsd-empty { grid-column: 1 / -1; }

/* ---------- Accommodatiepagina ---------- */
.single-accommodatie .entry-content > *:first-child { margin-top: 0; }
.wsd-acc-trail { font-size: 14px; color: var(--wsd-muted); margin: 0 0 12px; }
.wsd-acc-trail a { color: var(--wsd-b-dark); }
.wsd-gallery {
	display: grid; gap: 8px; margin: 0 0 24px; border-radius: 12px; overflow: hidden;
	grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 180px 180px;
}
.wsd-gallery__item { margin: 0; background: var(--wsd-ice); }
.wsd-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wsd-gallery__item:first-child { grid-row: 1 / 3; }
.wsd-gallery--1 { grid-template-columns: 1fr; grid-template-rows: 380px; }
.wsd-gallery--2 { grid-template-columns: 2fr 1fr; grid-template-rows: 180px 180px; }
.wsd-gallery--2 .wsd-gallery__item:nth-child(2) { grid-row: 1 / 3; }
.wsd-gallery--3 { grid-template-columns: 2fr 1fr; }
.wsd-gallery--4 .wsd-gallery__item:nth-child(4) { grid-column: 2 / 4; }
.wsd-acc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.wsd-acc-side { position: sticky; top: 24px; }
.wsd-facts { margin: 0; background: var(--wsd-ice); border-radius: 12px; padding: 18px 20px; }
.wsd-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--wsd-line); }
.wsd-facts div:last-child { border-bottom: 0; }
.wsd-facts dt { font-weight: 600; color: var(--wsd-n); margin: 0; }
.wsd-facts dd { margin: 0; text-align: right; color: var(--wsd-text); }
.wsd-acc-alt { margin-top: 40px; }
.wsd-map-link a { font-weight: 600; }

/* ---------- Accommodatiepagina op smalle schermen ---------- */
/* De tweekolomsindeling hierboven had geen mobiele variant. De zijbalk hield zijn volle
   300 pixels en minmax(0, 1fr) mag tot nul krimpen, dus op elke telefoon bleef er voor de
   hoofdkolom niets over: de kop "Beschikbaar bij" stond letter onder letter, 370 pixels hoog.
   Gemeten op 320 tot 430 pixels was de hoofdkolom 0 tot 38 pixels breed. */
@media (max-width: 880px) {
	.wsd-acc-grid { grid-template-columns: 1fr; gap: 24px; }
	.wsd-acc-side { position: static; top: auto; }
}

@media (max-width: 600px) {
	/* De desktopgalerij zet de eerste foto over twee rijen in een strook van drie kolommen;
	   op een telefoon wordt dat een reepje. Hier krijgt de eerste foto de volle breedte en
	   staat de rest eronder, met een indeling per aantal foto's (de sjabloon toont er
	   maximaal vijf, en die vallen onder de basisregel). */
	.wsd-gallery {
		grid-template-columns: repeat(2, 1fr);
		grid-template-rows: 200px 100px 100px;
		gap: 6px;
	}
	.wsd-gallery__item:first-child { grid-row: auto; grid-column: 1 / -1; }
	.wsd-gallery--1 { grid-template-columns: 1fr; grid-template-rows: 220px; }
	.wsd-gallery--2 { grid-template-columns: 1fr; grid-template-rows: 200px 130px; }
	.wsd-gallery--2 .wsd-gallery__item:nth-child(2) { grid-row: auto; grid-column: auto; }
	.wsd-gallery--3 { grid-template-columns: repeat(2, 1fr); grid-template-rows: 200px 110px; }
	.wsd-gallery--4 { grid-template-columns: repeat(3, 1fr); grid-template-rows: 200px 84px; }
	.wsd-gallery--4 .wsd-gallery__item:nth-child(4) { grid-column: auto; }

	/* Het label mag afbreken, de waarde niet: anders belandt "7,4 / 10" op twee regels. */
	.wsd-facts { padding: 14px 16px; }
	.wsd-facts div { gap: 16px; }
	.wsd-facts dd { white-space: nowrap; }
}

/* ---------- Witruimte op bestemmingspagina's ---------- */
.single-bestemming .entry-content .wsd-offers { margin-bottom: 44px; }
.single-bestemming .entry-content h2 { margin-top: 48px; }
.single-bestemming .entry-content .wsd-filter { margin-bottom: 40px; }
.single-bestemming .wsd-results__count { margin-top: 0; margin-bottom: 20px; }
.wsd-section-title { margin-top: 56px; }
.wsd-results + .wsd-section-title { margin-top: 64px; }

/* ---------- Uitklapbaar SEO-blok ---------- */
.wsd-seo {
	margin: 56px 0 0; background: #fff; border: 1px solid var(--wsd-line);
	border-radius: 12px; padding: 24px 28px; color: var(--wsd-text);
}
.wsd-seo > h2:first-child, .wsd-seo > h2 { margin-top: 0; }
.wsd-seo h3 { margin-top: 28px; }
.wsd-seo p:last-child { margin-bottom: 0; }
.wsd-seo--fold { padding: 0; }
.wsd-seo--fold > summary {
	cursor: pointer; list-style: none; padding: 20px 28px; font-weight: 600;
	color: var(--wsd-n); display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.wsd-seo--fold > summary::-webkit-details-marker { display: none; }
.wsd-seo--fold > summary::after {
	content: ""; width: 10px; height: 10px; flex: 0 0 auto;
	border-right: 2px solid var(--wsd-b); border-bottom: 2px solid var(--wsd-b);
	transform: rotate(45deg); transition: transform .2s;
}
.wsd-seo--fold[open] > summary::after { transform: rotate(-135deg); }
.wsd-seo--fold > .wsd-seo__body { padding: 0 28px 24px; }
.wsd-seo--fold > .wsd-seo__body > *:first-child { margin-top: 0; }

/* ---------- Interne links naar plaatsen ---------- */
.wsd-links { margin: 32px 0 0; }
.wsd-links h2 { margin-top: 0; }
.wsd-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.wsd-links li { margin: 0; }
.wsd-links a {
	display: inline-block; padding: 7px 14px; border-radius: 999px; background: #fff;
	border: 1px solid var(--wsd-line); color: var(--wsd-n); text-decoration: none; font-size: 15px;
}
.wsd-links a:hover, .wsd-links a:focus { background: var(--wsd-ice); border-color: var(--wsd-b); }

/* ---------- Archieflijst (skigebieden en blog) ---------- */
.wsd-vh {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wsd-archive-header .page-title { margin-bottom: 18px; }
.wsd-archive-intro { margin: 0; }
.wsd-archive-intro > *:last-child { margin-bottom: 0; }
.wsd-archive-header + .wsd-list { margin-top: 32px; }

.post-type-archive-skigebied .site-main > .wsd-list,
.blog .site-main > .wsd-list, .archive .site-main > .wsd-list { margin: 0; }

.wsd-list { display: flex; flex-direction: column; gap: 20px; }
.wsd-item {
	display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 24px; align-items: start;
	background: #fff; border: 1px solid var(--wsd-line); border-radius: 12px; padding: 20px 24px;
}
.wsd-item__media { display: block; border-radius: 8px; overflow: hidden; background: var(--wsd-ice); aspect-ratio: 4 / 3; }
.wsd-item__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wsd-item__body { min-width: 0; }
.wsd-item__title { font-size: 22px; line-height: 1.3; margin: 0 0 8px; }
.wsd-item__title a { color: var(--wsd-n); text-decoration: none; }
.wsd-item__title a:hover, .wsd-item__title a:focus { color: var(--wsd-b-dark); text-decoration: underline; }
.wsd-item__text { margin: 0 0 12px; color: var(--wsd-muted); }
.wsd-item__facts { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; color: var(--wsd-text); }
.wsd-item__facts li { margin: 0; display: flex; align-items: center; gap: 7px; }
.wsd-item__facts svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--wsd-b); }
.wsd-item__facts strong { color: var(--wsd-n); }
.wsd-item__pistes-list { gap: 14px; }
.wsd-item__pistes { display: inline-flex; align-items: center; gap: 6px; }
.wsd-item__unit { color: var(--wsd-muted); margin-left: -6px; }
.wsd-item__dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.wsd-item__dot--blauw { background: #2f80ed; }
.wsd-item__dot--rood { background: #eb5757; }
.wsd-item__dot--zwart { background: #2b3440; }
.wsd-item__cta {
	display: inline-block; background: var(--wsd-g); color: var(--wsd-n); font-weight: 700;
	padding: 9px 20px; border-radius: 999px; text-decoration: none;
}
.wsd-item__cta:hover, .wsd-item__cta:focus { background: #8cb016; color: var(--wsd-n); }
.wsd-item__more { font-weight: 600; color: var(--wsd-b-dark); text-decoration: none; }
.wsd-item__more:hover, .wsd-item__more:focus { text-decoration: underline; }

@media (max-width: 600px) {
	.wsd-item { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
	.wsd-item__media { aspect-ratio: 16 / 9; }
	.wsd-item__title { font-size: 20px; }
}

/* ---------- Datum en vorige/volgende weg bij berichten ---------- */
/* De datum blijft wel in de schema-gegevens staan, alleen niet meer zichtbaar. */
.single-post .entry-meta .posted-on,
.blog .entry-meta .posted-on,
.archive .entry-meta .posted-on,
.single-post .entry-meta .updated,
.single-post .post-navigation { display: none; }

/* ---------- Blogartikel ---------- */
/* Ruimte onder afbeeldingen, zodat een kop er niet tegenaan plakt. */
.single-post .entry-content img,
.single-post .entry-content figure,
.single-post .entry-content .wp-block-image { margin-bottom: 30px; }
.single-post .entry-content figure img { margin-bottom: 0; }
.single-post .entry-content .wsd-results { margin-bottom: 30px; }
.single-post .entry-content .wsd-results + p { margin-top: 30px; }

/* Gerelateerde artikelen onder het artikel. */
.wsd-related { margin: 48px 0 0; }
.wsd-related > h2 { margin-top: 0; }

/* Sticky zijbalk bij losse artikelen. */
@media (min-width: 769px) {
	.single-post .inside-right-sidebar,
	.single-post .inside-left-sidebar {
		position: sticky; top: var(--wsd-sticky-top, 24px);
		max-height: calc(100vh - var(--wsd-sticky-top, 24px) - 24px); overflow-y: auto;
		scrollbar-width: thin;
	}
}

/* ---------- Landingspagina's /skigebieden/<land>/ en de skigebiedlinks ---------- */
.wsd-landtabel-wrap { overflow-x: auto; margin: 24px 0 8px; }
.wsd-landtabel { width: 100%; border-collapse: collapse; font-size: 15px; }
.wsd-landtabel th, .wsd-landtabel td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--wsd-line); }
.wsd-landtabel th { background: var(--wsd-ice); font-weight: 600; color: var(--wsd-n); white-space: nowrap; }
.wsd-landtabel td:not(:first-child), .wsd-landtabel th:not(:first-child) { text-align: right; white-space: nowrap; }
.wsd-landtabel tbody tr:hover { background: var(--wsd-ice); }
.wsd-landtabel a { font-weight: 600; }
.wsd-landtabel__label { display: none; }  /* alleen op mobiel zichtbaar */

.wsd-ski-links { margin: 48px 0 0; }
.wsd-ski-links__lijst {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 24px;
}
.wsd-ski-links__lijst li { padding: 6px 0; border-bottom: 1px solid var(--wsd-line); }
.wsd-ski-links__km { color: var(--wsd-muted); font-size: 14px; white-space: nowrap; }
.wsd-ski-links__meer { font-weight: 600; }

@media (max-width: 600px) {
	/* Een tabel van vijf kolommen past niet op een telefoon; elke rij wordt een blokje
	   met het label ervoor. data-label staat al in de markup. */
	.wsd-landtabel, .wsd-landtabel tbody, .wsd-landtabel tr, .wsd-landtabel td { display: block; width: 100%; }
	.wsd-landtabel thead { display: none; }
	.wsd-landtabel tr { border: 1px solid var(--wsd-line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
	.wsd-landtabel td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 16px; text-align: right; }
	.wsd-landtabel__label { display: inline; font-weight: 600; color: var(--wsd-n); text-align: left; }
	.wsd-landtabel__naam { font-size: 17px; padding-bottom: 8px; }
	.wsd-ski-links__lijst { grid-template-columns: 1fr; }
}
