/*
Theme Name: Drottningholmskolan
Theme URI: https://www.drottningholmskolan.se/
Author: Drottningholmskolan
Description: Blocktema för Drottningholmskolan – waldorfskola på Lovö. Förslag D (Saffran): palett byggd kring loggans saffransgula ton, rubriker i Antropos (om typsnittsfilen finns) annars Kalam. Allt redigeras i blockredigeraren.
Version: 2.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: drottningholmskolan
*/

/* ---------- Sidhuvud ---------- */
.dhs-topprad {
	background: var(--wp--preset--color--ljus-saffran);
	font-size: var(--wp--preset--font-size--small);
	padding-top: .4rem; padding-bottom: .4rem;
	gap: 1.5rem;
}
.dhs-topprad p { margin: 0; }
.dhs-topprad a { text-decoration: none; }
.dhs-topprad a:hover { text-decoration: underline; }
.dhs-sidhuvud { padding-top: 1rem; padding-bottom: 1rem; gap: 1.5rem; }
.dhs-logga img { display: block; height: auto; }

/* ---------- Strandkant: organisk våg i nederkant av en sektion ---------- */
.is-style-strand {
	position: relative;
	padding-bottom: calc(var(--wp--preset--spacing--60) + 28px) !important;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1200V18C1110 34 1010 38 900 26C780 13 690 6 580 18C470 30 380 40 270 30C170 21 80 10 0 20Z'/%3E%3C/svg%3E") bottom / 100% 40px no-repeat,
	              linear-gradient(#000, #000) top / 100% calc(100% - 39px) no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1200V18C1110 34 1010 38 900 26C780 13 690 6 580 18C470 30 380 40 270 30C170 21 80 10 0 20Z'/%3E%3C/svg%3E") bottom / 100% 40px no-repeat,
	              linear-gradient(#000, #000) top / 100% calc(100% - 39px) no-repeat;
}

/* ---------- Startsidans hjälte ---------- */
.dhs-hjalte { overflow: hidden; }
.dhs-hjalte .wp-block-image img { border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.dhs-hjalte h1 { font-size: var(--wp--preset--font-size--xx-large); }

/* ---------- Ledord: bild växelvis vänster/höger ---------- */
.dhs-ledord .wp-block-image img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.dhs-ledord .wp-block-columns { align-items: center !important; }

/* ---------- Snabblänkar ---------- */
.dhs-snabb .wp-block-column {
	border-radius: 22px;
	padding: 1.5rem 1.6rem;
}
.dhs-snabb h3 { margin-top: 0; }
.dhs-snabb h3 a { text-decoration: none; }
.dhs-snabb h3 a:hover { text-decoration: underline; }

/* ---------- Galleri ---------- */
.wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 14px; }

/* ---------- Kalendarium: lätt att skumma ---------- */
.dhs-kalender p { padding: .35rem 0; border-bottom: 1px dashed rgba(91,64,34,.25); margin: 0; }
.dhs-kalender strong { color: var(--wp--preset--color--umbra); }

/* ---------- Sidfot ---------- */
.dhs-sidfot { background: var(--wp--preset--color--salvia); }
.dhs-sidfot a { text-decoration: none; }
.dhs-sidfot a:hover { text-decoration: underline; }
.dhs-sidfot ul { list-style: none; padding-left: 0; }
.dhs-sidfot li { margin: .25rem 0; }

/* ---------- Tillgänglighet ---------- */
:where(a, button, .wp-block-button__link, input, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--umbra);
	outline-offset: 3px;
	border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

@media (max-width: 781px) {
	.dhs-topprad { justify-content: center !important; gap: 1rem; }
	.dhs-sidhuvud .wp-block-buttons { display: none; }
}

/* ---------- Sektioner ---------- */
.dhs-sektion { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--60); }
.dhs-sidband { padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--50); }
.dhs-sidband h1 { margin: 0; }
main > .wp-block-post-content > *:first-child.alignwide { margin-top: var(--wp--preset--spacing--40); }
.dhs-kort { border-radius: 22px; padding: 1.5rem 1.6rem; }
.dhs-kort > *:first-child { margin-top: 0; }
.dhs-kort h3, .dhs-kort h4 { margin-bottom: .4rem; }
.dhs-kort p { margin: .15rem 0; }
.dhs-ingress { font-size: 1.3rem; line-height: 1.55; }

@media (max-width: 781px) {
	.dhs-ledord .wp-block-columns { flex-direction: column; }
	.dhs-ledord .dhs-bild { order: -1; }
	.dhs-hjalte h1 { font-size: 2rem; }
}
