/*
Theme Name: Brudbrödets Samfällighetsförening
Theme URI: https://brudbrodet.se/
Author: Styrelsen för Brudbrödets Samfällighetsförening
Description: Eget tema för Brudbrödets Samfällighetsförening. All information på en sida, nyheter hämtas från inläggen.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: brudbrodet
*/

/* ------------------------------------------------------------------
   Typsnitt (ligger lokalt i temat)
------------------------------------------------------------------ */
@font-face {
	font-family: "Fraunces";
	src: url("assets/fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Fraunces";
	src: url("assets/fonts/fraunces-latin-opsz-italic.woff2") format("woff2");
	font-weight: 100 900;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: "Inter";
	src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

/* ------------------------------------------------------------------
   Färger och mått
------------------------------------------------------------------ */
:root {
	--paper: #F7F4EE;
	--paper-2: #EFEAE0;
	--card: #FFFDF9;
	--ink: #1F2A24;
	--ink-soft: #4E5B53;
	--ink-mute: #7A857E;
	--line: #E3DCCD;
	--forest: #2E4A3B;
	--forest-deep: #223A2E;
	--moss: #7A9A7E;
	--sage: #DCE3D6;
	--sand: #D9CBB0;
	--clay: #A85F3C;
	--clay-soft: #F2E1D5;

	--g-gul: #D9A93A;
	--g-gron: #5E8F62;
	--g-bla: #4F7BA3;
	--g-rod: #B9533F;

	--serif: "Fraunces", "Iowan Old Style", Georgia, serif;
	--sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--radius: 18px;
	--radius-sm: 10px;
	--shadow: 0 1px 2px rgba(31, 42, 36, .04), 0 8px 24px -12px rgba(31, 42, 36, .18);
	--shadow-lg: 0 2px 4px rgba(31, 42, 36, .04), 0 24px 48px -24px rgba(31, 42, 36, .28);
	--header-h: 76px;
	--gutter: clamp(16px, 4vw, 40px);
}

/* ------------------------------------------------------------------
   Bas
------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 16px);
	-webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.65;
	font-feature-settings: "ss01", "cv11";
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--clay); }

:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
	font-family: var(--serif);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.01em;
	margin: 0 0 .5em;
	color: var(--ink);
	font-variation-settings: "opsz" 72;
}
h3 { font-size: 1.3rem; font-variation-settings: "opsz" 36; }
h4 { font-family: var(--sans); font-size: .95rem; font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link {
	position: absolute; left: 16px; top: -60px; z-index: 100;
	background: var(--forest); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; color: #fff; }

.container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 var(--gutter);
}
.container--narrow { max-width: 760px; }

.bb-icon { width: 22px; height: 22px; flex: none; }

/* ------------------------------------------------------------------
   Knappar och små element
------------------------------------------------------------------ */
.btn {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 14px 22px;
	border-radius: 999px;
	font-weight: 550; font-size: .98rem;
	text-decoration: none;
	border: 1.5px solid transparent;
	transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn .bb-icon { width: 18px; height: 18px; transition: transform .2s ease; }
.btn:hover .bb-icon { transform: translateX(3px); }
.btn--primary { background: var(--forest); color: #fff; }
.btn--primary:hover { background: var(--forest-deep); color: #fff; transform: translateY(-1px); }
.btn--ghost { border-color: rgba(46, 74, 59, .28); color: var(--forest); background: rgba(255,255,255,.4); }
.btn--ghost:hover { border-color: var(--forest); color: var(--forest); }
.btn--light { background: var(--paper); color: var(--forest); }
.btn--light:hover { background: #fff; color: var(--forest-deep); }
.btn--outline-light { border-color: rgba(255,255,255,.35); color: #fff; }
.btn--outline-light:hover { border-color: #fff; color: #fff; }

.eyebrow {
	font-family: var(--sans);
	font-size: .78rem; font-weight: 600;
	letter-spacing: .14em; text-transform: uppercase;
	color: var(--clay);
	margin: 0 0 14px;
	display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: currentColor; opacity: .7; }
.eyebrow--light { color: var(--sand); }

.tag {
	display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .06em;
	text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
}
.tag--clay { background: var(--clay-soft); color: var(--clay); }

.link-arrow {
	display: inline-flex; align-items: center; gap: 8px;
	font-weight: 550; text-decoration: none; white-space: nowrap;
}
.link-arrow .bb-icon { width: 18px; height: 18px; transition: transform .2s; }
.link-arrow:hover .bb-icon { transform: translateX(3px); }

.muted { color: var(--ink-mute); font-size: .94rem; }
.lead { font-size: 1.18rem; line-height: 1.6; color: var(--ink); }
.empty { padding: 40px; text-align: center; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-mute); }

/* ------------------------------------------------------------------
   Sidhuvud
------------------------------------------------------------------ */
.site-header {
	position: sticky; top: 0; z-index: 50;
	height: var(--header-h);
	background: rgba(247, 244, 238, .82);
	backdrop-filter: saturate(1.4) blur(14px);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	border-bottom: 1px solid transparent;
	transition: border-color .25s, background-color .25s;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(247, 244, 238, .94); }

.site-header__inner { height: 100%; display: flex; align-items: center; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand__mark, .brand__logo { width: 40px; height: 40px; border-radius: 11px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--serif); font-size: 1.28rem; font-weight: 550; letter-spacing: -0.01em; }
.brand__sub { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); margin-top: 3px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.site-nav a {
	display: block; padding: 8px 12px; border-radius: 999px;
	text-decoration: none; color: var(--ink-soft); font-size: .93rem; font-weight: 500;
	transition: color .2s, background-color .2s;
}
.site-nav a:hover { color: var(--ink); background: rgba(46,74,59,.06); }
.site-nav a.is-active { color: var(--forest); background: rgba(46,74,59,.09); }
.site-nav__cta a { background: var(--forest); color: #fff; margin-left: 8px; padding: 9px 18px; }
.site-nav__cta a:hover, .site-nav__cta a.is-active { background: var(--forest-deep); color: #fff; }

.nav-toggle { display: none; }

@media (max-width: 1080px) {
	.nav-toggle {
		display: inline-flex; align-items: center; justify-content: center;
		width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 12px;
		background: var(--card); cursor: pointer; color: var(--ink);
	}
	.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
		display: block; width: 18px; height: 1.6px; background: currentColor; border-radius: 2px;
		position: relative; transition: transform .25s, background-color .25s;
	}
	.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
	.nav-toggle__bars::before { top: -6px; }
	.nav-toggle__bars::after { top: 6px; }
	.nav-open .nav-toggle__bars { background: transparent; }
	.nav-open .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
	.nav-open .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

	.site-nav {
		position: fixed; left: 0; right: 0; top: var(--header-h);
		background: var(--paper);
		border-bottom: 1px solid var(--line);
		padding: 12px var(--gutter) 24px;
		box-shadow: var(--shadow-lg);
		transform: translateY(-8px); opacity: 0; visibility: hidden;
		transition: transform .25s ease, opacity .25s ease, visibility .25s;
		max-height: calc(100vh - var(--header-h)); overflow-y: auto;
	}
	.admin-bar .site-nav { top: calc(var(--header-h) + 46px); }
	.nav-open .site-nav { transform: none; opacity: 1; visibility: visible; }
	.site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
	.site-nav a { padding: 13px 14px; font-size: 1.05rem; border-radius: 12px; }
	.site-nav__cta a { margin: 10px 0 0; text-align: center; }
}

/* ------------------------------------------------------------------
   Topp (hero)
------------------------------------------------------------------ */
.hero {
	position: relative;
	padding: clamp(48px, 8vw, 104px) 0 0;
	overflow: hidden;
	background:
		radial-gradient(1200px 500px at 85% -10%, #F1E6D0 0%, rgba(241,230,208,0) 60%),
		var(--paper);
}
.hero__inner { position: relative; z-index: 2; }
.hero__title {
	font-size: clamp(2.6rem, 6.4vw, 5.2rem);
	font-weight: 450;
	line-height: 1.02;
	letter-spacing: -0.025em;
	margin-bottom: 24px;
	font-variation-settings: "opsz" 144;
	max-width: 14ch;
}
.hero__title em { font-style: italic; color: var(--forest); font-weight: 400; }
.hero__lead { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--ink-soft); max-width: 36rem; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__facts {
	display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 44px 0 0; padding: 0;
}
.hero__facts div { display: flex; align-items: baseline; gap: 10px; }
.hero__facts dt { font-family: var(--serif); font-size: 2rem; color: var(--forest); font-weight: 500; line-height: 1; }
.hero__facts dd { margin: 0; color: var(--ink-soft); font-size: .95rem; }

.hero__art { margin-top: clamp(-40px, -3vw, 0px); position: relative; z-index: 1; }
.hero__art img { width: 100%; height: clamp(200px, 30vw, 400px); object-fit: cover; object-position: center bottom; }

.hero--photo .hero__art { margin-top: 48px; padding: 0 var(--gutter); max-width: 1200px; margin-left: auto; margin-right: auto; }
.hero--photo .hero__art img { border-radius: var(--radius); height: clamp(240px, 38vw, 480px); object-position: center; box-shadow: var(--shadow-lg); }

/* ------------------------------------------------------------------
   Meddelande från styrelsen
------------------------------------------------------------------ */
.notice-wrap { padding: 8px 0 0; }
.notice {
	display: flex; gap: 18px; align-items: flex-start;
	background: var(--clay-soft);
	border: 1px solid #E8CDBB;
	border-radius: var(--radius);
	padding: 22px 26px;
}
.notice__icon {
	flex: none; width: 42px; height: 42px; border-radius: 50%;
	display: grid; place-items: center; background: var(--clay); color: #fff;
}
.notice__icon .bb-icon { width: 20px; height: 20px; }
.notice__body { font-size: 1.02rem; }
.notice__body > * { margin-top: 0; }
.notice__body h2, .notice__body h3 { font-size: 1.3rem; margin-bottom: .3em; }

/* ------------------------------------------------------------------
   Sektioner
------------------------------------------------------------------ */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--flush { padding-top: 16px; }
.section--tint { background: var(--paper-2); }
.section__head { max-width: 44rem; margin-bottom: clamp(32px, 4vw, 52px); }
.section__head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section__title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: .35em; }
.section__intro { font-size: 1.1rem; color: var(--ink-soft); }

.split { display: grid; grid-template-columns: 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (min-width: 900px) {
	.split { grid-template-columns: 1.05fr 1fr; }
	.split--rules { grid-template-columns: .8fr 1.2fr; }
	.split--rules .split__text { position: sticky; top: calc(var(--header-h) + 40px); }
	.split--map { grid-template-columns: 1.1fr 1fr; align-items: center; }
}
.split__text p { color: var(--ink-soft); }
.split__text .lead { color: var(--ink); }

.card-title { font-size: 1.2rem; margin-bottom: 18px; }

/* ------------------------------------------------------------------
   Nyheter
------------------------------------------------------------------ */
.news-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 760px) {
	.news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
	.news-grid--3, .news-grid--4 { grid-template-columns: 1.25fr 1fr; grid-auto-rows: auto; }
	.news-grid--3 .news-card--featured { grid-row: span 2; }
	.news-grid--4 .news-card--featured { grid-row: span 3; }
}

.news-card {
	position: relative;
	display: flex; flex-direction: column;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #D6CDBA; }
.news-card__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.news-card__body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.news-card__meta { display: flex; align-items: center; gap: 10px; font-size: .84rem; color: var(--ink-mute); margin-bottom: 10px; }
.news-card__title { font-size: 1.28rem; margin-bottom: 8px; }
.news-card__title a { color: var(--ink); text-decoration: none; }
.news-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.news-card__title a:focus-visible { outline: none; }
.news-card:focus-within { outline: 2px solid var(--clay); outline-offset: 3px; }
.news-card__excerpt { color: var(--ink-soft); font-size: .97rem; margin-bottom: 16px; }
.news-card__more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 550; font-size: .92rem; color: var(--forest); }
.news-card__more .bb-icon { width: 16px; height: 16px; transition: transform .2s; }
.news-card:hover .news-card__more .bb-icon { transform: translateX(3px); }

.news-card--featured { background: var(--forest); border-color: var(--forest); color: #EAF0EA; }
.news-card--featured:hover { border-color: var(--forest); }
.news-card--featured .news-card__body { padding: clamp(26px, 3vw, 40px); justify-content: flex-end; }
.news-card--featured .news-card__meta { color: #B9C9BC; }
.news-card--featured .news-card__title { font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.12; }
.news-card--featured .news-card__title a { color: #fff; }
.news-card--featured .news-card__excerpt { color: #CFDBD1; font-size: 1.05rem; }
.news-card--featured .news-card__more { color: var(--sand); }
.news-card--featured .tag--clay { background: var(--clay); color: #fff; }
.news-card--featured:not(:has(.news-card__media)) .news-card__body {
	min-height: 320px;
	background:
		radial-gradient(420px 220px at 100% 0%, rgba(217,203,176,.18), transparent 70%),
		radial-gradient(300px 200px at 0% 100%, rgba(122,154,126,.25), transparent 70%);
}

.news-list { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .news-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .news-list { grid-template-columns: repeat(3, 1fr); } }

.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pagination .page-numbers {
	min-width: 44px; height: 44px; padding: 0 14px; display: inline-grid; place-items: center;
	border-radius: 999px; border: 1px solid var(--line); background: var(--card);
	text-decoration: none; color: var(--ink-soft); font-weight: 500;
}
.pagination .page-numbers.current { background: var(--forest); border-color: var(--forest); color: #fff; }

/* ------------------------------------------------------------------
   Förvaltning (lista med ikoner)
------------------------------------------------------------------ */
.split__aside {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: clamp(24px, 3vw, 36px); box-shadow: var(--shadow);
}
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.feature-list li { display: flex; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.feature-list li:first-child { border-top: 0; padding-top: 0; }
.feature-list .bb-icon {
	width: 42px; height: 42px; padding: 10px; border-radius: 12px;
	background: var(--sage); color: var(--forest);
}
.feature-list strong { display: block; font-weight: 600; }
.feature-list span { color: var(--ink-soft); font-size: .95rem; }

/* ------------------------------------------------------------------
   Tidslinje
------------------------------------------------------------------ */
.timeline {
	list-style: none; margin: 0; padding: 0;
	display: grid; gap: 16px;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	counter-reset: tl;
}
.timeline li {
	position: relative; counter-increment: tl;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 58px 22px 24px;
}
.timeline li::before {
	content: counter(tl, decimal-leading-zero);
	position: absolute; top: 20px; left: 22px;
	font-family: var(--serif); font-size: 1.05rem; color: var(--moss);
}
.timeline li::after {
	content: ""; position: absolute; top: 31px; left: 58px; right: 22px; height: 1px;
	background: linear-gradient(to right, var(--line), transparent);
}
.timeline__when { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--clay); margin-bottom: 8px; }
.timeline h3 { font-size: 1.22rem; margin-bottom: 8px; }
.timeline p { color: var(--ink-soft); font-size: .95rem; }

/* ------------------------------------------------------------------
   Paneler (Bo här)
------------------------------------------------------------------ */
.tri { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .tri { grid-template-columns: repeat(3, 1fr); } }
.panel {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 30px 28px;
}
.panel__title { font-size: 1.35rem; margin-bottom: 14px; }
.panel p { color: var(--ink-soft); }

.more { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.more summary {
	cursor: pointer; font-weight: 550; color: var(--forest); list-style: none;
	display: flex; align-items: center; justify-content: space-between;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "+"; font-size: 1.3rem; font-weight: 300; transition: transform .2s; }
.more[open] summary::after { transform: rotate(45deg); }
.more .check-list { margin-top: 14px; }

.check-list { list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: 8px; }
.check-list li { position: relative; padding-left: 28px; color: var(--ink-soft); font-size: .96rem; }
.check-list li::before {
	content: ""; position: absolute; left: 0; top: .42em; width: 16px; height: 16px; border-radius: 50%;
	background: var(--sage) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2 7 10.5l4.5-5' fill='none' stroke='%232E4A3B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* ------------------------------------------------------------------
   Dragspel (Regler)
------------------------------------------------------------------ */
.accordion { display: grid; gap: 12px; }
.accordion__item {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	transition: box-shadow .25s, border-color .25s;
}
.accordion__item[open] { box-shadow: var(--shadow); border-color: #D6CDBA; }
.accordion__item summary {
	display: flex; align-items: center; gap: 16px;
	padding: 20px 24px; cursor: pointer; list-style: none;
	font-family: var(--serif); font-size: 1.3rem; font-weight: 500;
}
.accordion__item summary::-webkit-details-marker { display: none; }
.accordion__item summary .bb-icon {
	width: 42px; height: 42px; padding: 10px; border-radius: 12px; background: var(--sage); color: var(--forest);
}
.accordion__item summary span { flex: 1; }
.accordion__item summary::after {
	content: ""; width: 12px; height: 12px; margin-right: 4px;
	border-right: 1.6px solid var(--ink-mute); border-bottom: 1.6px solid var(--ink-mute);
	transform: rotate(45deg) translateY(-3px); transition: transform .25s;
}
.accordion__item[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.accordion__body { padding: 0 24px 24px 82px; color: var(--ink-soft); }
.accordion__body strong { color: var(--ink); }
@media (max-width: 600px) { .accordion__body { padding-left: 24px; } }

.rule-cols { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 4px 0 18px; }
@media (min-width: 640px) { .rule-cols { grid-template-columns: 1fr 1fr; } }
.rule-cols > div { background: var(--paper); border-radius: var(--radius-sm); padding: 16px 18px; }
.rule-cols h4 { margin-bottom: 6px; color: var(--ink); }
.rule-cols p, .rule-cols li { font-size: .94rem; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: st; display: grid; gap: 8px; }
.steps li { counter-increment: st; position: relative; padding-left: 32px; }
.steps li::before {
	content: counter(st); position: absolute; left: 0; top: .15em;
	width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
	font-size: .75rem; font-weight: 600; background: var(--forest); color: #fff;
}
.steps--light li::before { background: var(--sand); color: var(--forest-deep); }

/* ------------------------------------------------------------------
   Färggrupper
------------------------------------------------------------------ */
.groups { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .groups { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .groups { grid-template-columns: repeat(4, 1fr); } }

.group {
	--g: var(--moss);
	position: relative; overflow: hidden;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 26px 22px 22px;
	display: flex; flex-direction: column;
}
.group::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--g); }
.group--gul { --g: var(--g-gul); }
.group--gron { --g: var(--g-gron); }
.group--bla { --g: var(--g-bla); }
.group--rod { --g: var(--g-rod); }
.group__head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.group__head h3 { margin: 0; font-size: 1.3rem; flex: 1; }
.group__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--g); box-shadow: 0 0 0 4px color-mix(in srgb, var(--g) 20%, transparent); }
.group__count { font-size: .8rem; color: var(--ink-mute); }
.group__nums { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.group__nums li {
	font-variant-numeric: tabular-nums; font-size: .88rem; font-weight: 500;
	padding: 4px 10px; border-radius: 8px;
	background: color-mix(in srgb, var(--g) 12%, var(--card));
	color: var(--ink);
}
.group__nums li.is-match { background: var(--g); color: #fff; }
.group__extra { margin-top: auto; font-size: .92rem; color: var(--ink-soft); padding-top: 14px; border-top: 1px solid var(--line); }

.roles { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 28px; }
@media (min-width: 900px) { .roles { grid-template-columns: repeat(3, 1fr); } }
.role { display: flex; gap: 14px; align-items: flex-start; padding: 18px 4px; border-top: 1px solid var(--line); }
.role .bb-icon { color: var(--moss); margin-top: 2px; }
.role strong { display: block; }
.role span { color: var(--ink-soft); font-size: .94rem; }

/* ------------------------------------------------------------------
   Karta
------------------------------------------------------------------ */
.map-figure { margin: 0; }
.map-figure a { display: block; border-radius: var(--radius); overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.map-figure img { width: 100%; transition: transform .5s ease; }
.map-figure a:hover img { transform: scale(1.02); }
.map-figure figcaption { font-size: .86rem; color: var(--ink-mute); margin-top: 10px; }

.doc-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .doc-list { grid-template-columns: 1fr 1fr; } }
.doc-list a {
	display: flex; align-items: center; gap: 10px; padding: 12px 14px;
	background: var(--card); border: 1px solid var(--line); border-radius: 12px;
	text-decoration: none; color: var(--ink); font-size: .94rem; font-weight: 500;
	transition: border-color .2s, transform .2s;
}
.doc-list a:hover { border-color: var(--moss); transform: translateY(-1px); color: var(--ink); }
.doc-list .bb-icon { color: var(--clay); width: 20px; height: 20px; }
.doc-list span { flex: 1; }
.doc-list small { font-size: .7rem; color: var(--ink-mute); letter-spacing: .06em; }

/* ------------------------------------------------------------------
   Fastum
------------------------------------------------------------------ */
.fastum {
	display: grid; grid-template-columns: 1fr; gap: 0;
	background: var(--forest); color: #D7E2D9;
	border-radius: calc(var(--radius) + 8px); overflow: hidden;
	box-shadow: var(--shadow-lg);
}
@media (min-width: 900px) { .fastum { grid-template-columns: 1.15fr 1fr; } }
.fastum__main { padding: clamp(32px, 5vw, 64px); position: relative; }
.fastum__main::after {
	content: ""; position: absolute; right: -80px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%;
	background: radial-gradient(circle, rgba(217,203,176,.14), transparent 70%); pointer-events: none;
}
.fastum .section__title { color: #fff; }
.fastum__main p { color: #C9D7CC; max-width: 34rem; }
.fastum .hero__actions { margin-top: 28px; }
.fastum__side { background: var(--forest-deep); padding: clamp(32px, 5vw, 56px); }
.fastum__side h3 { color: #fff; font-size: 1.4rem; margin-bottom: 18px; }
.fastum__side .steps li { color: #C9D7CC; }
.fastum__side strong { color: #fff; }
.fastum__phone { display: flex; gap: 12px; align-items: flex-start; margin-top: 26px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); color: #C9D7CC; font-size: .95rem; }
.fastum__phone .bb-icon { color: var(--sand); width: 20px; height: 20px; margin-top: 2px; }
.fastum a:not(.btn) { color: var(--sand); }

/* ------------------------------------------------------------------
   Kontakt
------------------------------------------------------------------ */
.section--contact { padding-top: 0; }
.contact { text-align: center; max-width: 820px; }
.contact .eyebrow { justify-content: center; }
.contact .eyebrow::after { content: ""; width: 22px; height: 1.5px; background: currentColor; opacity: .7; }
.contact__title { font-size: clamp(2rem, 4.4vw, 3.2rem); margin-bottom: 16px; }
.contact__lead { color: var(--ink-soft); font-size: 1.12rem; max-width: 36rem; margin: 0 auto 32px; }
.contact__mail {
	display: inline-flex; align-items: center; gap: 14px;
	font-family: var(--serif); font-size: clamp(1.25rem, 3.2vw, 2rem);
	color: var(--forest); text-decoration: none;
	padding: 16px 28px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
	box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
	max-width: 100%; overflow-wrap: anywhere;
}
.contact__mail:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--forest-deep); }
.contact__mail .bb-icon { width: 26px; height: 26px; color: var(--clay); flex: none; }
.contact__note { margin-top: 28px; color: var(--ink-mute); font-size: .95rem; max-width: 34rem; margin-left: auto; margin-right: auto; }

/* ------------------------------------------------------------------
   Sidfot
------------------------------------------------------------------ */
.site-footer { background: var(--ink); color: #B8C2BB; padding: 64px 0 28px; font-size: .95rem; }
.site-footer a { color: #E5EBE6; text-decoration: none; }
.site-footer a:hover { color: var(--sand); }
.site-footer__grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer__name { font-family: var(--serif); font-size: 1.35rem; color: #fff; margin-bottom: 10px; }
.site-footer__about p:last-child { max-width: 26rem; }
.site-footer__label { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: #7F8B83; margin-bottom: 12px; }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer__bottom {
	display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1);
	font-size: .85rem; color: #7F8B83;
}
.site-footer__bottom a { color: #B8C2BB; }

/* ------------------------------------------------------------------
   Undersidor och artiklar
------------------------------------------------------------------ */
.page-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(32px, 4vw, 48px); }
.page-hero__title { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 450; letter-spacing: -0.02em; font-variation-settings: "opsz" 144; }
.page-hero__intro { font-size: 1.15rem; color: var(--ink-soft); max-width: 40rem; }
.page-hero--center { text-align: center; padding-bottom: 120px; }
.page-hero--center .eyebrow { justify-content: center; }
.page-hero--center .page-hero__intro { margin: 0 auto 28px; }

.back-link { display: inline-block; margin-bottom: 28px; text-decoration: none; font-weight: 500; font-size: .93rem; color: var(--ink-soft); }
.article__meta { display: flex; gap: 10px; align-items: center; color: var(--ink-mute); font-size: .9rem; margin-bottom: 14px; }
.article__media { margin-bottom: 40px; }
.article__media img { border-radius: var(--radius); width: 100%; }

.entry-content { font-size: 1.08rem; line-height: 1.75; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content p { margin: 0; }
.entry-content h2 { font-size: 1.8rem; margin-top: 1.8em; }
.entry-content h3 { font-size: 1.4rem; margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li + li { margin-top: .35em; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content figcaption { font-size: .88rem; color: var(--ink-mute); margin-top: 8px; }
.entry-content blockquote {
	margin-left: 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--moss);
	font-family: var(--serif); font-size: 1.25rem; color: var(--ink);
}
.entry-content table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content .wp-block-button__link { background: var(--forest); color: #fff; border-radius: 999px; padding: 12px 22px; text-decoration: none; }
.entry-content .has-forest-color { color: var(--forest); } .entry-content .has-forest-background-color { background: var(--forest); }
.entry-content .has-moss-color { color: var(--moss); } .entry-content .has-moss-background-color { background: var(--moss); }
.entry-content .has-clay-color { color: var(--clay); } .entry-content .has-clay-background-color { background: var(--clay); }
.entry-content .has-sand-color { color: #8C7A57; } .entry-content .has-sand-background-color { background: #E9E0CF; }
.entry-content .has-ink-color { color: var(--ink); } .entry-content .has-ink-background-color { background: var(--ink); }

.article__footer { margin: 56px 0 96px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--ink-soft); }
.article__nav { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 28px; }
@media (min-width: 640px) { .article__nav { grid-template-columns: 1fr 1fr; } }
.article__nav-link {
	display: flex; flex-direction: column; gap: 4px; padding: 18px 20px;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
	text-decoration: none; color: var(--ink);
}
.article__nav-link--next { text-align: right; grid-column: -2; }
.article__nav-link small { color: var(--ink-mute); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.article__nav-link span { font-family: var(--serif); font-size: 1.1rem; }
.article__nav-link:hover { border-color: var(--moss); color: var(--ink); }

/* WordPress-standardklasser */
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: .88rem; color: var(--ink-mute); }

/* ------------------------------------------------------------------
   Mjuk inflygning när man scrollar
------------------------------------------------------------------ */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ------------------------------------------------------------------
   Utskrift
------------------------------------------------------------------ */
@media print {
	.site-header, .hero__art, .site-footer, .hero__actions, .nav-toggle { display: none !important; }
	body { background: #fff; font-size: 12pt; }
	.section { padding: 24px 0; }
	details > *:not(summary) { display: block !important; }
}

/* Hitta din grupp */
.house-search { margin-top: 24px; max-width: 26rem; }
.house-search label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 8px; }
.house-search input {
	width: 100%; font: inherit; font-size: 1.05rem; padding: 13px 18px;
	border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink);
	transition: border-color .2s, box-shadow .2s;
}
.house-search input:focus { outline: none; border-color: var(--moss); box-shadow: 0 0 0 4px rgba(122,154,126,.2); }
.house-search__result { min-height: 1.6em; margin-top: 10px; font-size: .95rem; color: var(--ink-soft); }
.house-search__result strong { color: var(--ink); }
.group.is-dim { opacity: .45; }
.group.is-match { box-shadow: var(--shadow-lg); border-color: var(--g); }
.group { transition: opacity .25s, box-shadow .25s, border-color .25s; }

/* Toppen: två kolumner på stora skärmar */
.hero__inner { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: end; }
@media (min-width: 1000px) { .hero__inner { grid-template-columns: 1fr 360px; gap: 64px; } }
.quick {
	background: rgba(255, 253, 249, .78);
	backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
	border: 1px solid var(--line); border-radius: var(--radius);
	padding: 22px 12px 12px; box-shadow: var(--shadow-lg);
}
.quick__title { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; margin: 0 12px 10px; }
.quick ul { list-style: none; margin: 0; padding: 0; }
.quick a {
	display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px;
	text-decoration: none; color: var(--ink); transition: background-color .2s;
}
.quick a:hover { background: var(--paper-2); color: var(--ink); }
.quick .bb-icon { width: 40px; height: 40px; padding: 9px; border-radius: 11px; background: var(--sage); color: var(--forest); }
.quick strong { display: block; font-weight: 600; font-size: .98rem; }
.quick small { display: block; color: var(--ink-mute); font-size: .85rem; }
@media (max-width: 999px) { .quick { display: none; } }

/* Utvald nyhet: text i nederkant, mönster av hus i bakgrunden */
.news-card--featured .news-card__more { margin-top: 10px; }
@media (min-width: 1000px) {
.news-card--featured:not(:has(.news-card__media)) .news-card__body {
	background:
		url("assets/img/featured-pattern.svg") right -20px top 28px / 360px auto no-repeat,
		radial-gradient(420px 220px at 100% 0%, rgba(217,203,176,.16), transparent 70%),
		radial-gradient(300px 200px at 0% 100%, rgba(122,154,126,.25), transparent 70%);
}
}
.fastum__main::after { right: auto; left: -120px; bottom: -160px; }

/* Grön ruta med senaste nyheten i toppen */
.latest {
	position: relative;
	max-width: 40rem;
	margin-top: 8px;
	background: var(--forest);
	color: #CFDBD1;
	border-radius: var(--radius);
	padding: clamp(24px, 3vw, 34px);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
}
.latest::after {
	content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
	background: radial-gradient(circle, rgba(217,203,176,.16), transparent 70%); pointer-events: none;
}
.latest__label {
	display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px;
	font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
	color: var(--sand); margin-bottom: 14px;
}
.latest__label .bb-icon { width: 18px; height: 18px; }
.latest__label time { color: #9FB3A4; font-weight: 500; letter-spacing: .04em; text-transform: none; font-size: .85rem; }
.latest__label time::before { content: "·"; margin-right: 10px; color: #7F978A; }
.latest__title { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.15; margin-bottom: 10px; }
.latest__title a { color: #fff; text-decoration: none; }
.latest__title a:hover { color: var(--sand); }
.latest__excerpt { font-size: 1.02rem; color: #CFDBD1; margin-bottom: 14px; }
.latest__more { display: inline-flex; align-items: center; gap: 8px; color: var(--sand); font-weight: 550; text-decoration: none; }
.latest__more:hover { color: #fff; }
.latest__more .bb-icon { width: 18px; height: 18px; transition: transform .2s; }
.latest__more:hover .bb-icon { transform: translateX(3px); }
.latest__footer { margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); position: relative; z-index: 1; }
.hero__title { margin-bottom: 28px; }

/* Tidigare nyheter: tre lika stora kort */
@media (min-width: 1000px) {
	.news-grid { grid-template-columns: repeat(3, 1fr); }
}
.news-archive-link { margin-top: 32px; text-align: center; }

/* Senaste nyheten: mer text */
.latest__content { font-size: 1.02rem; color: #CFDBD1; margin-bottom: 14px; }
.latest__content > * + * { margin-top: .7em; }
.latest__content p { margin-bottom: 0; }
.latest__content > :first-child { margin-top: 0; }
.latest__content h2, .latest__content h3, .latest__content h4 { color: #fff; font-size: 1.15rem; margin: 1em 0 .3em; }
.latest__content ul, .latest__content ol { padding-left: 1.2em; margin: 0; }
.latest__content li + li { margin-top: .2em; }
.latest__content a { color: var(--sand); }
.latest__content strong { color: #fff; }
.latest__content img { border-radius: 10px; margin-top: .6em; }
.empty .btn { margin-top: 8px; }

/* Fastum: viktig ruta om kontaktuppgifter */
.fastum__important {
	display: flex; gap: 14px; align-items: flex-start;
	margin: 22px 0 4px; padding: 20px 22px;
	background: rgba(255,255,255,.07); border: 1px solid rgba(217,203,176,.35); border-radius: 14px;
	position: relative; z-index: 1;
}
.fastum__important > .bb-icon { color: var(--sand); width: 24px; height: 24px; margin-top: 2px; }
.fastum__important h3 { color: #fff; font-size: 1.2rem; margin-bottom: 8px; }
.fastum__important p { color: #D7E2D9; font-size: .97rem; margin-bottom: .6em; }
.fastum__important strong { color: #fff; }
.fastum__side-intro { color: #B7C8BB; font-size: .95rem; margin-bottom: 18px; }

/* Facebookgruppen */
.fb-card {
	display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: center;
	max-width: 620px; margin: 28px auto 0; padding: 22px 24px;
	text-align: left; text-decoration: none; color: var(--ink);
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.fb-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #C9D3E6; color: var(--ink); }
.fb-card__icon {
	grid-row: span 2; width: 52px; height: 52px; border-radius: 14px;
	display: grid; place-items: center; background: #E7EDF7; color: #3B5998;
}
.fb-card__icon .bb-icon { width: 26px; height: 26px; }
.fb-card__body { display: flex; flex-direction: column; gap: 2px; }
.fb-card__label { font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.fb-card__name { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; }
.fb-card__text { color: var(--ink-soft); font-size: .95rem; }
.fb-card__cta { grid-column: 2; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: #3B5998; font-size: .95rem; margin-top: 6px; }
.fb-card__cta .bb-icon { width: 16px; height: 16px; }
@media (max-width: 520px) {
	.fb-card { grid-template-columns: 1fr; }
	.fb-card__icon { grid-row: auto; }
	.fb-card__cta { grid-column: 1; }
}

/* Engelsk hänvisning i sidfoten */
.site-footer__english { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: .88rem; color: #9DA8A0; max-width: 28rem; }
.site-footer__english .bb-icon { width: 18px; height: 18px; flex: none; margin-top: 3px; color: #7F8B83; }
.site-footer__english strong { color: #E5EBE6; font-weight: 600; }
@media (max-width: 600px) {
	.fastum__important { padding: 18px 16px; gap: 10px; }
	.fastum__important h3 { font-size: 1.1rem; }
}
