/*======================================================================//
// fur-museum.css                                                       //
// Indlæses KUN på furmuseum.dk (multisite site 5).                     //
// Se stom_child_furmuseum_enqueue_handler() i functions.php.           //
//                                                                      //
// Sektionerne styles automatisk efter type, så de kan genbruges på     //
// alle sider uden ekstra klasser:                                      //
//                                                                      //
//   Sektion: Basis          H1 som første element = intro i to         //
//                           kolonner (overskrift venstre, tekst højre) //
//                           Vandret linje (hr) = streg i sitets brune  //
//   Sektion: Basis - Smal   Smal tekstkolonne, ekstra luft med         //
//                           baggrundsfarve                             //
//   Sektion: Billede & Tekst  Afrundet billede 50 %, tekst centreret   //
//   Sektion: Slider         Inden for indholdsbredden, 16:9            //
//                                                                      //
// Én klasse (skrives i feltet "Class"):                                //
//   info-kort   på "Kolonner & kasser": kort med billede øverst        //
//               (billedet vælges i "Baggrundsfil"), overskrift, tekst  //
//               og link, der altid står i bunden.                      //
//                                                                      //
// Et afsnit, der kun består af et link, vises som "Læs mere"-link      //
// med cirkel og pil.                                                   //
//======================================================================*/

:root {
	--fm-muld: #584732;
	--fm-kulstof: #2c2c2b;
	--fm-fossil: #fffcf1;
	--fm-radius: 10px;
	--fm-gap: clamp(24px, 4vw, 60px);
	--fm-luft: clamp(28px, 4.7vw, 45px); /* halv afstand mellem sektioner (90px i alt) */
	--fm-pil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='10.5' fill='none' stroke='%23000'/%3E%3Cpath d='M9.6 17c-.2 0-.4-.1-.6-.2-.3-.3-.3-.9 0-1.2l4.6-4.5-4.6-4.6c-.3-.3-.3-.9 0-1.2.3-.3.9-.3 1.2 0l5.3 5.1c.3.3.3.9 0 1.2l-5.3 5.2c-.2.2-.4.2-.6.2z'/%3E%3C/svg%3E");
}


/* Fælles: typografi, lister og links i de designede sektioner
   ---------------------------------------------------------------------- */

.section-wrap > .section:has(> h1:first-child),
.stom-billede-sektion,
.section-smal,
.info-kort {
	color: var(--fm-kulstof);
}

.section-wrap > .section:has(> h1:first-child) > h1,
.stom-billede-sektion h2,
.section-smal h2,
.info-kort h2,
.info-kort h3 {
	font-weight: 600;
	letter-spacing: 0;
	text-transform: uppercase;
	line-height: 1.2;
	overflow-wrap: break-word;
	color: inherit;
}

.stom-billede-sektion h2,
.section-smal h2 {
	font-size: clamp(26px, 2.4vw + 10px, 35px);
	margin: 0 0 30px;
}

/* Punktliste med runde prikker */
.stom-billede-sektion ul,
.section-smal ul {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}

.stom-billede-sektion ul li,
.section-smal ul li {
	position: relative;
	padding-left: 18px;
	margin: 0 0 5px;
}

.stom-billede-sektion ul li::before,
.section-smal ul li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.5em;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
}

/* Afsnit der kun er et link: fed tekst + cirkel med pil */
.stom-billede-sektion p > a:only-child,
.section-smal p > a:only-child,
.info-kort .overlay p > a:only-child {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	font-weight: 600;
	text-decoration: none;
	color: var(--fm-muld);
}

.stom-billede-sektion p > a:only-child::after,
.section-smal p > a:only-child::after,
.info-kort .overlay p > a:only-child::after {
	content: '';
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	background: currentColor;
	-webkit-mask: var(--fm-pil) center / contain no-repeat;
	mask: var(--fm-pil) center / contain no-repeat;
	transition: transform 0.2s ease-out;
}

.stom-billede-sektion p > a:only-child:hover::after,
.section-smal p > a:only-child:hover::after,
.info-kort .overlay p > a:only-child:hover::after {
	transform: translateX(3px);
}

/* På baggrundsfarve følger linket tekstfarven */
.section-wrap[style*="background-color"] p > a:only-child {
	color: inherit;
}


/* Sektion: Basis med H1 øverst = intro i to kolonner
   ---------------------------------------------------------------------- */

.section-wrap > .section:has(> h1:first-child) {
	display: grid;
	grid-template-columns: minmax(0, 420fr) minmax(0, 720fr);
	column-gap: var(--fm-gap);
	align-items: start;
	padding-top: clamp(16px, 3vw, 45px);
	padding-bottom: 0;
}

.section-wrap > .section:has(> h1:first-child)::after {
	display: none;
}

.section-wrap > .section:has(> h1:first-child) > h1 {
	grid-column: 1;
	grid-row: 1 / span 20;
	font-size: clamp(34px, 3vw + 12px, 50px);
	margin: 0;
}

.section-wrap > .section:has(> h1:first-child) > :not(h1) {
	grid-column: 2;
	font-size: clamp(18px, 0.4vw + 15px, 20px);
	line-height: 1.4;
	margin: 0 0 1em;
}

.section-wrap > .section:has(> h1:first-child) > :last-child {
	margin-bottom: 0;
}


/* Sektion: Basis med vandret linje (hr) og centreret billede
   ---------------------------------------------------------------------- */

.section-wrap > .section > hr {
	height: 0;
	border: 0;
	border-top: 1px solid var(--fm-muld);
	margin: 0 0 60px;
	background: none;
}

.section-wrap > .section > p > img.aligncenter {
	display: block;
	margin: 0 auto;
}


/* Sektion: Basis - Smal
   ---------------------------------------------------------------------- */

.section-wrap.section-smal .section,
.section-wrap.section-smal.section-fullpage .section {
	box-sizing: border-box;
	width: 100%;
	max-width: calc(870px + 2 * clamp(20px, 4vw, 30px));
	margin-left: auto;
	margin-right: auto;
	padding-left: clamp(20px, 4vw, 30px);
	padding-right: clamp(20px, 4vw, 30px);
}

/* Med baggrundsfarve: 90px luft over og under (mindre på mobil) */
.section-wrap.section-smal[style*="background-color"] {
	margin: var(--fm-luft) 0;
}

.section-wrap.section-smal[style*="background-color"] .section {
	padding-top: clamp(48px, 6vw, 90px);
	padding-bottom: clamp(48px, 6vw, 90px);
}

.section-wrap.section-smal .section > :first-child {
	margin-top: 0;
}

.section-wrap.section-smal .section > :last-child {
	margin-bottom: 0;
}


/* Sektion: Slider (i sidens indhold, ikke topslideren i headeren)
   ---------------------------------------------------------------------- */

body:not(.home) #main-content .page-slider-section {
	box-sizing: border-box;
	max-width: 1140px;
	margin: clamp(24px, 4vw, 60px) auto var(--fm-luft);
}

body:not(.home) #main-content .page-slider-section .slider-inner {
	border-radius: var(--fm-radius);
	overflow: hidden;
}

body:not(.home) #main-content .page-slider-section .slick-list,
body:not(.home) #main-content .page-slider-section .slide-element {
	max-height: none;
	min-height: 0;
}

body:not(.home) #main-content .page-slider-section .slide-element .element-spacer {
	padding-top: 56.25% !important;
}

body:not(.home) #main-content .page-slider-section .slide-element .image-aligner {
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 100%;
	padding-top: 0 !important;
	transform: none;
}

body:not(.home) #main-content .page-slider-section .slide-element img {
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
}

/* Prikker: hvide firkanter i bunden af billedet */
body:not(.home) #main-content .page-slider-section .slick-dots {
	top: auto;
	bottom: 20px;
}

body:not(.home) #main-content .page-slider-section .slick-dots li {
	margin: 0 5px;
}

body:not(.home) #main-content .page-slider-section .slick-dots li button {
	width: 20px;
	height: 20px;
	padding: 0;
}

body:not(.home) #main-content .page-slider-section .slick-dots li button::before {
	box-sizing: border-box;
	width: 20px;
	height: 20px;
	padding: 2px;
	border: 1px solid #fff;
	border-radius: 5px;
	background: transparent;
	background-clip: content-box;
	opacity: 1;
}

body:not(.home) #main-content .page-slider-section .slick-dots li.slick-active button::before {
	background-color: #fff;
}


/* Sektion: Billede & Tekst (billede 50 %, tekst lodret centreret)
   ---------------------------------------------------------------------- */

.section-wrap.stom-billede-sektion {
	padding: 0;
}

.section-wrap.stom-billede-sektion .section {
	display: flex;
	align-items: stretch;
	gap: var(--fm-gap);
	padding-top: var(--fm-luft);
	padding-bottom: var(--fm-luft);
}

.section-wrap.stom-billede-sektion .section::after {
	display: none;
}

.section-wrap.stom-billede-sektion.picture-left .stom-picture {
	order: -1;
}

.section-wrap.stom-billede-sektion .stom-cols-6 {
	display: flex;
	align-items: center;
	float: none;
	flex: 1 1 0;
	width: auto;
	height: auto !important;
	margin: 0;
	padding: clamp(0px, 4.7vw, 90px) 0;
}

.section-wrap.stom-billede-sektion .stom-center-box {
	display: block;
}

.section-wrap.stom-billede-sektion .stom-center-box > :last-child {
	margin-bottom: 0;
}

.section-wrap.stom-billede-sektion .stom-picture {
	position: relative !important;
	float: none;
	flex: 0 0 50%;
	width: 50%;
	height: auto !important;
	min-height: 400px;
	left: auto !important;
	right: auto !important;
	background-image: none !important;
	border-radius: var(--fm-radius);
	overflow: hidden;
}

.section-wrap.stom-billede-sektion .stom-picture img {
	visibility: visible;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}


/* Klasse info-kort på "Kolonner & kasser"
   ---------------------------------------------------------------------- */

.section-wrap.info-kort .section {
	padding-top: var(--fm-luft);
	padding-bottom: var(--fm-luft);
}

.info-kort .section > h2 {
	font-size: clamp(30px, 3vw + 10px, 50px);
	color: #000;
	margin: 0 0 clamp(24px, 3vw, 40px);
}

body .section-wrap.info-kort .section .grid-elements {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px 30px;
	margin: 0;
}

body .section-wrap.info-kort .section .grid-elements::after,
body .section-wrap.info-kort .section .grid-elements::before {
	display: none;
}

body .section-wrap.info-kort .section .grid-element {
	display: flex;
	flex-direction: column;
	float: none;
	width: auto !important;
	height: auto !important;
	min-height: 0;
	margin: 0 !important;
	padding: 0;
	background: none !important; /* billedet vises som <img> herunder */
	overflow: visible;
}

/* Baggrundsfilen: kvadratisk billede med runde hjørner */
body .section-wrap.info-kort .section .grid-element > img {
	display: block;
	visibility: visible !important;
	position: static;
	width: 100%;
	height: auto;
	max-width: none;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: var(--fm-radius);
	margin: 0 0 20px;
}

body .section-wrap.info-kort .section .overlay {
	position: static;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 0;
	background: none;
	color: var(--fm-kulstof);
	text-align: left;
}

body .section-wrap.info-kort .section .overlay::after,
body .section-wrap.info-kort .section .overlay::before {
	display: none;
}

.info-kort h3 {
	font-size: clamp(21px, 1vw + 14px, 25px);
	margin: 0 0 15px;
}

body .section-wrap.info-kort .section .overlay p {
	margin: 0 0 20px;
}

/* Sidste afsnit (linket) skubbes i bund, så det flugter på tværs af kortene */
body .section-wrap.info-kort .section .overlay > :last-child {
	margin: auto 0 0;
}


/* Tablet og mobil
   ---------------------------------------------------------------------- */

@media (max-width: 999px) {
	/* info-kort: vandret karrusel med swipe; næste kort titter frem */
	body .section-wrap.info-kort .section .grid-elements {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: minmax(260px, 44%);
		gap: 20px;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		padding-bottom: 12px;
		scrollbar-width: thin;
		scrollbar-color: var(--fm-muld) transparent;
	}

	body .section-wrap.info-kort .section .grid-element {
		scroll-snap-align: start;
	}
}

@media (max-width: 900px) {
	.section-wrap > .section:has(> h1:first-child) {
		grid-template-columns: 1fr;
		row-gap: 20px;
	}

	.section-wrap > .section:has(> h1:first-child) > h1,
	.section-wrap > .section:has(> h1:first-child) > :not(h1) {
		grid-column: 1;
		grid-row: auto;
	}

	/* Samme sidemargen som sitets øvrige indhold (30px tablet / 20px mobil) */
	body:not(.home) #main-content .page-slider-section,
	.section-wrap.stom-billede-sektion .section {
		padding-left: 30px;
		padding-right: 30px;
	}

	.section-wrap.stom-billede-sektion .section {
		flex-direction: column;
		gap: 24px;
	}

	.section-wrap.stom-billede-sektion .stom-picture {
		order: -1;
		flex: none;
		width: 100%;
		min-height: 0;
		aspect-ratio: 4 / 3;
	}

	.section-wrap.stom-billede-sektion .stom-cols-6 {
		padding: 0;
	}

	.section-wrap > .section > hr {
		margin-bottom: 40px;
	}
}

@media (max-width: 600px) {
	body:not(.home) #main-content .page-slider-section,
	.section-wrap.stom-billede-sektion .section {
		padding-left: 20px;
		padding-right: 20px;
	}

	body .section-wrap.info-kort .section .grid-elements {
		grid-auto-columns: 82%;
		gap: 16px;
	}

	body .section-wrap.info-kort .section .grid-element > img {
		aspect-ratio: 4 / 3;
	}
}