/*
Theme Name: Kundby Lokalforum
Theme URI: http://kundbylokalforum.dk/
Author: Kundby Lokalforum
Description: Blok-tema til Kundby Lokalforum. Farver, logo og landskab fra foreningens grafiske udtryk. Sammen skaber vi mere.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kundby-lokalforum
Tags: block-patterns, full-site-editing, one-column, custom-colors, editor-style
*/

/* ---------- Generelt ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(a):focus-visible { outline: 2px solid var(--wp--preset--color--oliven); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--wp--preset--color--salvie); color: var(--wp--preset--color--papir); }

/* Lille versal-overlinje ("eyebrow") */
.kl-eyebrow {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 0.8125rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

/* Olivenstreg under overskrifter */
.kl-streg {
	width: 72px !important;
	max-width: 72px !important;
	height: 3px !important;
	background: var(--wp--preset--color--oliven) !important;
	border: 0 !important;
	opacity: 1 !important;
	margin-left: 0 !important;
	margin-top: 1.1rem !important;
	margin-bottom: 1.1rem !important;
}
.has-text-align-center + .kl-streg, .kl-streg.aligncenter { margin-left: auto !important; margin-right: auto !important; }

/* Byerne: Marke · Torslunde · Trønninge · Sandby */
.kl-byer {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-size: 0.8125rem;
}

/* ---------- Sidehoved ---------- */
.kl-header {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: saturate(1.2) blur(8px);
	-webkit-backdrop-filter: saturate(1.2) blur(8px);
	background: color-mix(in srgb, var(--wp--preset--color--creme) 88%, transparent) !important;
	border-bottom: 1px solid var(--wp--preset--color--streg);
}
.admin-bar .kl-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .kl-header { top: 46px; } }
.kl-brand { text-decoration: none !important; color: inherit !important; }
.kl-brand img { display: block; height: 52px; width: auto; }
.kl-wordmark {
	font-family: var(--wp--preset--font-family--heading);
	line-height: 1.05;
	text-transform: uppercase;
}
.kl-wordmark strong { display: block; font-size: 1.3rem; font-weight: 800; letter-spacing: 0.12em; }
.kl-wordmark span { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.32em; }
.kl-header .wp-block-navigation a:hover,
.kl-header .wp-block-navigation .current-menu-item > a { text-decoration: underline; text-decoration-color: var(--wp--preset--color--oliven); text-decoration-thickness: 2px; text-underline-offset: 6px; }
@media (max-width: 600px) {
	.kl-brand img { height: 40px; }
	.kl-wordmark strong { font-size: 1.05rem; }
	.kl-wordmark span { font-size: 0.62rem; }
}

/* ---------- Hero ---------- */
.kl-hero.wp-block-cover { min-height: min(86vh, 760px) !important; align-items: center; }
.kl-hero .wp-block-cover__image-background { object-position: 0% 100% !important; }
.kl-hero .kl-hero-tekst { margin-left: auto !important; max-width: 520px; }
.kl-hero h1 {
	font-size: clamp(2.6rem, 6vw, 5rem);
	letter-spacing: 0.08em;
	line-height: 1.02;
	margin: 0;
}
.kl-hero h1 .kl-h1-lille {
	display: block;
	font-size: 0.62em;
	letter-spacing: 0.1em;
	font-weight: 600;
	margin-top: 0.15em;
}
@media (max-width: 900px) {
	/* På mobil/tablet: tekst øverst på den cremefarvede himmel, landskabet nederst */
	.kl-hero.wp-block-cover { align-items: flex-start; min-height: 0 !important; padding-bottom: 82vw !important; }
	.kl-hero .wp-block-cover__image-background {
		top: auto !important; bottom: 0 !important; left: 0 !important;
		width: 175% !important; max-width: none !important; height: auto !important;
		aspect-ratio: 1736 / 906; object-fit: cover; object-position: 0 100% !important;
	}
	.kl-hero .kl-hero-tekst { margin-left: 0 !important; max-width: 560px; }
}
@media (min-width: 600px) and (max-width: 900px) {
	.kl-hero.wp-block-cover { padding-bottom: 58vw !important; }
	.kl-hero .wp-block-cover__image-background { width: 120% !important; }
}

/* ---------- Fire søjler ---------- */
.kl-soejle img { width: 64px; height: 64px; }
.kl-soejle h3 {
	font-size: 0.9375rem !important;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin-top: 0.9rem !important;
}
.kl-soejle p { font-size: 0.975rem; max-width: 28ch; margin-left: auto; margin-right: auto; }

/* ---------- Kort (nyheder, arrangementer, bestyrelse) ---------- */
.kl-kort {
	height: 100%;
	transition: transform .2s ease, box-shadow .2s ease;
}
.kl-kort:hover { transform: translateY(-2px); }
.kl-kort .wp-block-post-featured-image { margin: 0; overflow: hidden; }
.kl-kort .wp-block-post-featured-image img { aspect-ratio: 3/2; object-fit: cover; transition: transform .4s ease; }
.kl-kort:hover .wp-block-post-featured-image img { transform: scale(1.03); }
.kl-kort .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.kl-kort { position: relative; }
.kl-kort .wp-block-post-terms a { position: relative; z-index: 1; }
.wp-block-post-template.is-flex-container > li { display: flex; }
.wp-block-post-template.is-flex-container > li > * { flex: 1; }

/* Arrangement: datobrik */
.kl-dato {
	min-width: 64px;
	text-align: center;
	line-height: 1.1;
	font-family: var(--wp--preset--font-family--heading);
}

/* Bestyrelse */
.kl-person .wp-block-image img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; }
.kl-person h3 { font-size: 1.125rem !important; margin-bottom: 0 !important; }
.kl-person .kl-rolle { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--wp--preset--color--oliven); margin-top: 0.25rem !important; }

/* Dokumentliste */
.kl-dokumenter .wp-block-file {
	display: flex; align-items: center; justify-content: space-between; gap: 1rem;
	padding: 0.9rem 1.1rem; margin: 0;
	border-bottom: 1px solid var(--wp--preset--color--streg);
	background: var(--wp--preset--color--papir);
}
.kl-dokumenter .wp-block-file:first-child { border-radius: 10px 10px 0 0; }
.kl-dokumenter .wp-block-file:last-child { border-radius: 0 0 10px 10px; border-bottom: 0; }
.kl-dokumenter .wp-block-file a:not(.wp-block-file__button) { font-weight: 600; color: var(--wp--preset--color--skov); }
.kl-dokumenter .wp-block-file__button { background: transparent !important; color: var(--wp--preset--color--mos) !important; border: 1px solid var(--wp--preset--color--salvie) !important; border-radius: 999px !important; font-size: 0.8rem !important; padding: 0.35rem 0.9rem !important; }

/* WPForms – tilpasset temaets farver */
.wpforms-container .wpforms-field input,
.wpforms-container .wpforms-field textarea,
.wpforms-container .wpforms-field select {
	background: var(--wp--preset--color--papir) !important;
	border: 1px solid var(--wp--preset--color--streg) !important;
	border-radius: 8px !important;
	font-family: inherit !important;
}
.wpforms-container .wpforms-field input:focus,
.wpforms-container .wpforms-field textarea:focus { border-color: var(--wp--preset--color--oliven) !important; box-shadow: 0 0 0 3px rgba(131,137,58,.2) !important; }
.wpforms-container .wpforms-submit {
	background: var(--wp--preset--color--skov) !important; color: var(--wp--preset--color--creme) !important;
	border: 0 !important; border-radius: 999px !important; padding: 0.8rem 1.8rem !important;
	font-family: var(--wp--preset--font-family--heading) !important; font-weight: 700 !important;
	letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.875rem !important;
}
.wpforms-container .wpforms-submit:hover { background: var(--wp--preset--color--mos) !important; }

/* ---------- Sidefod ---------- */
.kl-footer a { color: var(--wp--preset--color--creme); text-decoration-color: rgba(248,242,233,.35); text-underline-offset: 3px; }
.kl-footer a:hover { text-decoration-color: var(--wp--preset--color--creme); }
.kl-footer .kl-footer-logo img { filter: brightness(0) invert(95%) sepia(6%) saturate(400%) hue-rotate(340deg); }
.kl-footer ul { list-style: none; padding: 0; margin: 0; }
.kl-footer li { margin: 0.35rem 0; }

/* Indlæg */
.single .wp-block-post-content > p:first-child { font-size: 1.2rem; line-height: 1.6; }
.wp-block-post-content img { border-radius: 10px; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
