/*
Theme Name: Fortrinn
Theme URI: https://fortrinn.click
Author: Fortrinn
Description: Blokktema for Fortrinn – renhold og vaktmestertjenester for borettslag og sameier. Beige grunnfarge, én mint, dyp grønn til knapper, handlingsbånd og bunntekst.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 0.13.15
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fortrinn
*/

/* ---------- Toppmeny ---------- */
/* The sticky element must be the header template part itself: it is exactly as tall as the menu,
   so a sticky bar inside it would have no room to stay put while the page scrolls. */
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 50; }
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: var(--wp-admin--admin-bar--height, 32px); }
.fortrinn-topp {
	background: color-mix(in srgb, var(--wp--preset--color--base) 94%, transparent);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
/* Headings reached by a link (FAQ groups) stop below the sticky menu, not under it. */
[id] { scroll-margin-top: 7rem; }
.fortrinn-logo { margin: 0; }
.fortrinn-logo img { border-radius: 0 !important; display: block; }
/* The logo file is green; on the green footer it is shown in the light background colour. */
.fortrinn-logo-lys img { filter: brightness(0) invert(0.97); }

/* Full menu from 1024px, as on gm19.no:
   ≥1260px full menu + phone + button · 1024–1259px full menu at 14px, round phone + button ·
   768–1023px phone + button + «Meny» · <768px round phone + «Meny».
   gm19.no keeps everything at full size from 1024px and pushes its button off the screen; here the
   phone number becomes the round phone and the menu tightens instead, so nothing collides. */
.ft-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 84px; }
.ft-logo img { display: block; width: 125px; height: auto; border-radius: 0; }
.ft-nav { display: none; gap: 0.5rem; }
.ft-nav a { font-size: 0.9375rem; font-weight: 500; padding: 0.5rem; border-radius: var(--wp--custom--radius--small); white-space: nowrap; text-decoration: none; color: var(--wp--preset--color--green); }
.ft-nav a:hover { background: var(--wp--preset--color--beige); }
.ft-handling { display: flex; align-items: center; gap: 0.75rem; }
.ft-tel { display: none; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--wp--preset--color--green); line-height: 1.15; }
.ft-tel b { display: block; font-size: var(--wp--preset--font-size--x-small); font-weight: 600; }
.ft-tel small { display: block; font-size: 0.6875rem; color: var(--wp--preset--color--grey); }
.fortrinn-topp svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ft-book { display: none; align-items: center; height: 44px; padding: 0 1.25rem; border-radius: var(--wp--custom--radius--pill); background: var(--wp--preset--color--green); color: var(--wp--preset--color--base); font-size: var(--wp--preset--font-size--x-small); font-weight: 600; text-decoration: none; white-space: nowrap; }
.ft-book:hover { background: var(--wp--custom--hover--green); }
.ft-tel-rund, .ft-meny { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; height: 44px; border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--pill); background: var(--wp--preset--color--base); color: var(--wp--preset--color--green); font: 400 1rem var(--wp--preset--font-family--body); cursor: pointer; }
.ft-tel-rund { width: 44px; }
.ft-meny { padding: 0 1rem; }
.ft-meny .ft-ikon-lukk, .ft-meny[aria-expanded="true"] .ft-ikon-meny { display: none; }
.ft-meny[aria-expanded="true"] .ft-ikon-lukk { display: block; }
@media (min-width: 768px) {
	.ft-tel, .ft-book { display: inline-flex; }
	.ft-tel-rund { display: none; }
}
@media (min-width: 1024px) {
	.ft-nav { display: flex; }
	.ft-meny { display: none; }
	.ft-panel { display: none !important; }
}
@media (min-width: 1024px) and (max-width: 1259px) {
	.ft-tel { display: none; }
	.ft-tel-rund { display: inline-flex; }
	.ft-nav { gap: 0.25rem; }
	.ft-nav a { font-size: 0.875rem; padding: 0.5rem 0.3125rem; }
}

/* Drop-down panel (deep green instead of gm19.no's near-black, per the colour choice) */
.ft-panel { position: absolute; left: clamp(1.25rem, 5vw, 4rem); right: clamp(1.25rem, 5vw, 4rem); top: calc(100% + 0.5rem); max-width: 420px; margin-left: auto; background: var(--wp--preset--color--green); border-radius: var(--wp--custom--radius--image); padding: 1rem; box-shadow: 0 28px 60px -28px rgba(16, 40, 30, 0.45); }
.ft-panel nav { display: flex; flex-direction: column; border-bottom: 1px solid var(--wp--custom--lys--strek); padding-bottom: 0.75rem; margin-bottom: 0.75rem; }
.ft-panel nav a { color: var(--wp--preset--color--base); text-decoration: none; font-size: 1rem; font-weight: 500; padding: 0.7rem 0.75rem; border-radius: var(--wp--custom--radius--small); }
.ft-panel nav a:hover { background: var(--wp--custom--lys--strek); }
.ft-panel-tel, .ft-panel-book { display: flex; align-items: center; justify-content: center; gap: 0.5rem; height: 48px; border-radius: var(--wp--custom--radius--pill); font-weight: 600; text-decoration: none; }
.ft-panel-tel { color: var(--wp--preset--color--base); border: 1px solid var(--wp--custom--lys--svak); margin-bottom: 0.6rem; }
.ft-panel-book { background: var(--wp--preset--color--base); color: var(--wp--preset--color--green); }
.fortrinn-topp > .ft-panel { margin-left: auto !important; margin-right: 0 !important; }

/* Fast «Ta kontakt»-knapp nederst på mobil (under 768px), som på gm19.no */
.ft-kontaktlinje { display: none; }
@media (max-width: 767px) {
	.ft-kontaktlinje { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--wp--preset--color--base) 95%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--wp--preset--color--line); }
	.ft-kontaktlinje a { display: flex; align-items: center; justify-content: center; height: 48px; border-radius: var(--wp--custom--radius--pill); background: var(--wp--preset--color--green); color: var(--wp--preset--color--base); font-weight: 600; font-size: 1rem; text-decoration: none; }
	/* Room at the bottom so the fixed button never covers the footer. */
	body { padding-bottom: calc(73px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Bunntekst ---------- */
/* Links as on gm19.no: slightly dimmed, full brightness on hover, never underlined. */
.fortrinn-bunn.has-green-background-color a:not(.wp-element-button) { color: var(--wp--custom--lys--dempet); text-decoration: none; transition: color 0.15s; }
.fortrinn-bunn.has-green-background-color a:not(.wp-element-button):hover { color: var(--wp--preset--color--base); text-decoration: none; }
.fortrinn-bunn .is-style-overtittel::before { display: none; }
/* Bottom line: thin rule across the whole width, small dimmed text (gm19.no) */
.fortrinn-bunn { overflow: hidden; }
.fortrinn-bunnlinje { position: relative; margin-top: var(--wp--preset--spacing--50) !important; padding-top: 1.25rem; gap: 0.5rem 1rem; font-size: var(--wp--preset--font-size--x-small); color: var(--wp--custom--lys--svak); }
.fortrinn-bunnlinje::before { content: ""; position: absolute; top: 0; left: 50%; width: 100vw; transform: translateX(-50%); border-top: 1px solid var(--wp--custom--lys--strek); }
.fortrinn-bunnlinje p { margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.fortrinn-bunn.has-green-background-color .fortrinn-bunnlinje a:not(.wp-element-button) { color: var(--wp--custom--lys--svak); }
.fortrinn-bunn.has-green-background-color .fortrinn-bunnlinje a:not(.wp-element-button):hover { color: var(--wp--preset--color--base); }
.fortrinn-bunn .wp-block-heading { color: inherit; }
.fortrinn-bunn .is-style-overtittel { color: var(--wp--preset--color--mint); }
.fortrinn-bunn ul { list-style: none; padding-left: 0; }
.fortrinn-bunn li { margin: 0.35rem 0; }
/* Facebook and Instagram icons under the contact details, dimmed like the other links */
.fortrinn-bunn-sosial { display: flex; gap: 1rem; margin-top: var(--wp--preset--spacing--40); }
.fortrinn-bunn-sosial a { display: inline-flex; }
.fortrinn-bunn-sosial svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* DN Gaselle badge, white on transparent */
.fortrinn-gaselle { display: inline-block; margin-top: var(--wp--preset--spacing--40); }
.fortrinn-gaselle img { display: block; width: 120px; height: auto; }

/* ---------- Blokkstiler ---------- */
/* Overtittel: liten linje i versaler over en overskrift */
.is-style-overtittel {
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--grey);
	margin-bottom: 0.75rem;
}
.has-green-background-color .is-style-overtittel { color: var(--wp--preset--color--mint); }

/* Liten oransje prikk foran overtitler, som på gm19.no */
.is-style-overtittel::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--wp--preset--color--signatur); margin-right: 0.6em; vertical-align: 0.2em; }

/* Håndtegnet oransje understrek under de siste ordene i forsidetittelen */
.fortrinn-understrek mark {
	display: inline-block;
	color: inherit;
	padding-bottom: 0.12em;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8C60 3 140 2 298 6' fill='none' stroke='%23eda02c' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: 100% 0.14em;
	background-position: 0 100%;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

/* Rundt ikon øverst i kort */
.fortrinn-ikon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--wp--preset--color--mint); color: var(--wp--preset--color--green); margin-bottom: 0.5rem; }
.fortrinn-ikon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Front-page hero on phones: title, then the photo, then the text and buttons. The text column
   dissolves (display: contents) so its parts and the photo column can be ordered together. */
@media (max-width: 781px) {
	.fortrinn-hero .wp-block-columns { display: flex; flex-direction: column; gap: 0; }
	.fortrinn-hero .wp-block-column:first-child { display: contents; }
	.fortrinn-hero .wp-block-column:first-child > * { order: 3; margin-top: 1.25rem; }
	.fortrinn-hero .wp-block-column:first-child > .wp-block-heading { order: 1; margin-top: 0; }
	.fortrinn-hero .wp-block-column:last-child { order: 2; margin-top: 1.5rem; }
}

/* Ingress (lead paragraph): same fluid size as gm19.no's text-lead, 17px on phones up to 21px. */
p.has-large-font-size { font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem) !important; line-height: 1.6; }

/* Full-width sections sit edge to edge, so no light stripe shows between two coloured sections. */
.wp-block-post-content > .alignfull,
.wp-site-blocks > footer.wp-block-template-part { margin-block-start: 0; }

/* Kort med ikonet til høyre for tittelen (kortene under «Problemet» på forsiden) */
/* Also used for the service cards: the text row takes any spare height, so «Les mer» sits at the
   bottom, right under the text in the card with the most lines. */
.wp-block-group.fortrinn-ikon-hoyre > .is-style-kort { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr; column-gap: 1rem; align-items: center; }
.wp-block-group.fortrinn-ikon-hoyre > .is-style-kort.er-lenke { grid-template-rows: auto 1fr auto; }
.fortrinn-ikon-hoyre > .is-style-kort > * { grid-column: 1 / -1; margin: 0; }
.fortrinn-ikon-hoyre > .is-style-kort > .fortrinn-ikon { grid-column: 2; grid-row: 1; margin: 0; }
.fortrinn-ikon-hoyre > .is-style-kort > .wp-block-heading { grid-column: 1; grid-row: 1; }
.fortrinn-ikon-hoyre > .is-style-kort > p { margin-top: 0.75rem; align-self: start; }
.wp-block-group.fortrinn-ikon-hoyre > .is-style-kort.er-lenke > p:last-child { margin-top: 0.5rem; padding-top: 0; align-self: end; }

/* A card row laid out for three whose last row holds two cards (5, 8, … cards): those two keep the
   width of the cards above and sit in the middle, rather than leaving a gap at the right (the
   user's choice, 22 Oct 2026). Rows built for two cards (exactly 2, e.g. «Relaterte tjenester»)
   are left alone. Widths follow WordPress's grid steps (16rem minimum, 1.25rem gap); the grid is
   already a size container. */
.wp-block-group.is-layout-grid:has(> .is-style-kort:nth-child(3n+5):last-child) { display: flex; flex-wrap: wrap; justify-content: center; }
.wp-block-group.is-layout-grid:has(> .is-style-kort:nth-child(3n+5):last-child) > .is-style-kort { flex: 0 0 calc((100% - 2.5rem) / 3); margin: 0; }
@container (max-width: 50.49rem) {
	.wp-block-group.is-layout-grid:has(> .is-style-kort:nth-child(3n+5):last-child) > .is-style-kort { flex-basis: calc((100% - 1.25rem) / 2); }
}
@container (max-width: 33.24rem) {
	.wp-block-group.is-layout-grid:has(> .is-style-kort:nth-child(3n+5):last-child) > .is-style-kort { flex-basis: 100%; }
}

/* Kort i trapp: hvert kort litt lavere enn det forrige (fra nettbrettbredde).
   Each card keeps its own height, so the offset does not stretch the first ones taller. */
.fortrinn-trapp > * { align-self: start; }
@media (min-width: 782px) {
	.fortrinn-trapp > :nth-child(3n+2) { margin-top: 1rem !important; }
	.fortrinn-trapp > :nth-child(3n+3) { margin-top: 2rem !important; }
	.fortrinn-portretter > :nth-child(3n+2) { margin-top: 1.5rem !important; }
	.fortrinn-portretter > :nth-child(3n+3) { margin-top: 3rem !important; }
}
.fortrinn-portretter img { border-radius: var(--wp--custom--radius--card) !important; box-shadow: 0 1px 2px rgba(18, 33, 28, 0.05); object-position: 50% 25%; }

/* Om oss: three portraits with the middle one lower, larger shadow and top-anchored crop (gm19.no) */
@media (min-width: 782px) {
	.fortrinn-portretter-midt > :nth-child(3n+2) { margin-top: 2rem !important; }
	.fortrinn-portretter-midt > :nth-child(3n+3) { margin-top: 0 !important; }
}
.fortrinn-portretter-midt img { box-shadow: var(--wp--custom--skygge--kort); object-position: 50% 0%; }
.fortrinn-portretter-midt { margin-block: var(--wp--preset--spacing--50) !important; }

/* Image block whose crop should show the lower part of the photo (class set on the block) */
.fortrinn-utsnitt-bunn img { object-position: 50% 70%; }

/* The sizes «mellomtittel» (36px) and «undertittel» (44px) were merged into the section title
   (x-large, 48px). Pages uploaded before that still carry the old classes (Våre tjenester, Om oss);
   this keeps them at 48px until those pages are next rebuilt. */
.wp-block-heading.has-mellomtittel-font-size,
.wp-block-heading.has-undertittel-font-size { font-size: var(--wp--preset--font-size--x-large) !important; line-height: 1.02; font-weight: 700; }

/* Centred section heading (eyebrow, title, intro) in a 48rem column */
.fortrinn-sentrert { max-width: 48rem; margin-inline: auto !important; text-align: center; }

/* Bildekollasj: one wide photo on top, two upright below (Om oss, as on gm19.no) */
.fortrinn-kollasj { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.fortrinn-kollasj > * { margin: 0 !important; }
.fortrinn-kollasj-bred { grid-column: 1 / -1; }
.fortrinn-kollasj img { border-radius: var(--wp--custom--radius--card) !important; }

/* Punktkort: points in one card separated by thin lines, round icon at left (gm19.no «Slik jobber vi») */
.fortrinn-punktkort { background: var(--wp--preset--color--line); border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--card); overflow: hidden; display: grid; gap: 1px; }
.fortrinn-punktkort > * { margin: 0 !important; }
.fortrinn-punkt { background: var(--wp--preset--color--white); display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 1.25rem; padding: clamp(1.5rem, 2.5vw, 2rem); }
.fortrinn-punkt > * { grid-column: 2; margin: 0 !important; }
.fortrinn-punkt > .fortrinn-ikon { grid-column: 1; grid-row: 1 / span 2; }
.fortrinn-punkt > p { margin-top: 0.4rem !important; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--grey); }

/* Bilde ved siden av seksjonstittelen */
.fortrinn-seksjonshode.med-bilde > .wp-block-columns { max-width: none; align-items: flex-end; }
.fortrinn-hodebilde { display: flex; justify-content: flex-end; }
.fortrinn-hodebilde .wp-block-image { width: 100%; max-width: 256px; margin: 0; }
.fortrinn-hodebilde img { border-radius: var(--wp--custom--radius--card) !important; box-shadow: var(--wp--custom--skygge--kort); }
@media (max-width: 781px) { .fortrinn-hodebilde { display: none; } }
.fortrinn-arshjul__maaned .is-style-overtittel::before, .is-style-kort .is-style-overtittel::before { display: none; }

/* Seksjonshode: tittel og ingress i en spalte på maks 42rem (672px), som på gm19.no */
.fortrinn-seksjonshode { padding-bottom: var(--wp--preset--spacing--40); }
.fortrinn-seksjonshode > * { max-width: 42rem; }
.fortrinn-seksjonshode.er-delt > .wp-block-columns { max-width: none; align-items: flex-start; column-gap: 2.25rem; }
.fortrinn-seksjonshode.er-delt .fortrinn-ingress { margin-top: 0.4rem; }
.fortrinn-ingress { color: var(--wp--preset--color--grey); }
.has-green-background-color .fortrinn-ingress { color: var(--wp--custom--lys--dempet); }

/* Kort: hvitt, tynn kant, runde hjørner */
.is-style-kort {
	background-color: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--card);
	padding: clamp(1.25rem, 2.5vw, 1.75rem);
}
.is-style-kort > :first-child { margin-top: 0; }
.is-style-kort > .wp-block-image:first-child {
	margin: calc(-1 * clamp(1.25rem, 2.5vw, 1.75rem)) calc(-1 * clamp(1.25rem, 2.5vw, 1.75rem)) 1.25rem;
}
.is-style-kort > .wp-block-image:first-child img { border-radius: var(--wp--custom--radius--card) var(--wp--custom--radius--card) 0 0; }
.is-style-kort p { font-size: var(--wp--preset--font-size--small); }
.is-style-kort .wp-block-heading { margin-top: 0; }
a.fortrinn-kortlenke { text-decoration: none; font-weight: 600; font-size: var(--wp--preset--font-size--x-small); }
a.fortrinn-kortlenke::after { content: "→"; display: inline-block; margin-left: 0.4em; transition: transform 0.2s; }

/* Kort med lenke: hele kortet er klikkbart, løfter seg og blir svakt mint ved hover (som gm19.no) */
.is-style-kort.er-lenke {
	position: relative;
	display: flex;
	flex-direction: column;
	transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s, background-color 0.22s;
}
.is-style-kort.er-lenke > p:last-child { margin-top: auto; padding-top: 1.25rem; }
.is-style-kort.er-lenke a.fortrinn-kortlenke::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.is-style-kort.er-lenke:hover {
	transform: translateY(-3px);
	box-shadow: var(--wp--custom--skygge--kort);
	border-color: rgba(20, 67, 50, 0.28);
	background-color: var(--wp--custom--hover--mint);
}
.is-style-kort.er-lenke:hover a.fortrinn-kortlenke::after { transform: translateX(4px); }
.is-style-kort.er-lenke:has(a:focus-visible) { outline: 2px solid var(--wp--preset--color--green); outline-offset: 2px; }
.is-style-kort.er-lenke a.fortrinn-kortlenke:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) { .is-style-kort.er-lenke, a.fortrinn-kortlenke::after { transition: none; } .is-style-kort.er-lenke:hover { transform: none; } }

/* Bånd: stor flate med runde hjørner (mint eller grønn) */
.is-style-baand {
	border-radius: var(--wp--custom--radius--card);
	padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 5vw, 4rem) !important;
}
.has-green-background-color,
.has-green-background-color .wp-block-heading,
.has-green-background-color a:not(.wp-element-button) { color: var(--wp--preset--color--base); }
.has-green-background-color .wp-element-button {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--green);
	border-color: var(--wp--preset--color--base);
}
.has-green-background-color .wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--base);
}

/* Konturknapp */
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--green);
	border: 1.5px solid var(--wp--preset--color--green);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--mint); }
.has-green-background-color .wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--custom--lys--strek); }

/* Stegnummer: tall i rund grønn prikk */
.is-style-stegnummer {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: var(--wp--preset--color--green);
	color: var(--wp--preset--color--base);
	font-weight: 600;
	font-size: 0.95rem !important;
	margin-bottom: 0.25rem;
}

/* Liste med haker */
.is-style-hake { list-style: none; padding-left: 0; }
.is-style-hake li { position: relative; padding-left: 1.9rem; margin: 0.55rem 0; }
.is-style-hake li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 50%;
	background: var(--wp--preset--color--green)
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23faf8f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/80% no-repeat;
}

/* Nummerert liste: tall i rund grønn prikk, samme form som hakene */
.is-style-nummer { list-style: none; padding-left: 0; counter-reset: nr; }
.is-style-nummer li { position: relative; padding-left: 1.9rem; margin: 0.55rem 0; counter-increment: nr; }
.is-style-nummer li::before {
	content: counter(nr);
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 50%;
	background: var(--wp--preset--color--green);
	color: var(--wp--preset--color--base);
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1.1rem;
	text-align: center;
}

/* Sitat: stort anførselstegn */
.is-style-sitat::before {
	content: "«";
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 3rem;
	line-height: 0.8;
	color: var(--wp--preset--color--green);
	opacity: 0.35;
	margin-bottom: 0.5rem;
}
.fortrinn-avsender { color: var(--wp--preset--color--grey); font-size: var(--wp--preset--font-size--small); }

/* Nøkkeltall */
.fortrinn-tall { font-family: var(--wp--preset--font-family--heading); font-weight: 700; line-height: 1; letter-spacing: -0.02em; }

/* Spørsmål (trekkspill) */
.wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--wp--preset--color--grey); }
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details > :not(summary) { margin-top: 0.75rem; }
/* Hover: the same faint mint as the clickable cards, colour only. Drawn on a pseudo-element
   reaching 1rem past the text, so the question text stays aligned with the heading above. */
.wp-block-details { position: relative; isolation: isolate; }
.wp-block-details::before { content: ""; position: absolute; inset: 0 -1rem; z-index: -1; border-radius: var(--wp--custom--radius--small); background-color: transparent; transition: background-color 0.22s; }
.wp-block-details:hover::before { background-color: var(--wp--custom--hover--mint); }
/* No lines between questions, and only a small gap. */
.wp-block-details + .wp-block-details { margin-block-start: 0.25rem; }

/* FAQ: search field and a button per group, as on gm19.no */
.fortrinn-faqsok { position: relative; }
.fortrinn-faqsok input {
	width: 100%;
	height: 48px;
	box-sizing: border-box;
	padding: 0 1rem 0 3rem;
	border: 1px solid var(--wp--preset--color--felt);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--base) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2353655e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") 1.1rem 50% / 18px 18px no-repeat;
	font: inherit;
	font-size: 1rem;
	color: var(--wp--preset--color--green);
}
.fortrinn-faqsok input:focus { outline: 2px solid var(--wp--preset--color--green); outline-offset: 2px; }
.fortrinn-faqknapper { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.fortrinn-faqknapper a { display: inline-flex; align-items: center; padding: 0.5rem 1rem; border-radius: var(--wp--custom--radius--pill); background: var(--wp--preset--color--mint); color: var(--wp--preset--color--green); font-size: var(--wp--preset--font-size--x-small); font-weight: 600; text-decoration: none; transition: background-color 0.15s, color 0.15s; }
.fortrinn-faqknapper a:hover { background: var(--wp--preset--color--green); color: var(--wp--preset--color--base); }
/* «No match» line: hidden until the search finds nothing (faq.js adds .vis). */
.fortrinn-faqtom { display: none; color: var(--wp--preset--color--grey); }
.fortrinn-faqtom.vis { display: block; }
.wp-block-details[hidden], .fortrinn-faqgruppe[hidden] { display: none !important; }
.wp-block-heading.fortrinn-faqgruppe { font-size: var(--wp--preset--font-size--gruppetittel); line-height: 1.2; font-weight: 700; margin-top: var(--wp--preset--spacing--50); margin-bottom: 0.75rem; }
.wp-block-heading.fortrinn-faqgruppe:first-child { margin-top: 0; }

/* Årshjul */
.fortrinn-arshjul { display: grid; gap: 1.5rem; }
.fortrinn-arshjul__hjul { display: none; }
/* Wheel at its full 420px, the month box taking the rest of the width right next to it. */
/* Wheel at its full 420px; the month box takes the rest of the width and the wheel's full height. */
.fortrinn-arshjul.er-aktiv { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: stretch; }
.fortrinn-arshjul.er-aktiv .fortrinn-arshjul__hjul { display: block; max-width: 420px; width: 100%; justify-self: center; }
.fortrinn-arshjul.er-aktiv .fortrinn-arshjul__maaned:not([hidden]) { height: 100%; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; padding: clamp(1.75rem, 3.5vw, 2.75rem); }
.fortrinn-arshjul__hjul svg { width: 100%; height: auto; display: block; }
.arshjul-seg { cursor: pointer; outline: none; }
/* Colours and sizes as on gm19.no: light segments with a thin line, mint on hover, green when selected. */
.arshjul-seg path { fill: var(--wp--preset--color--base); stroke: var(--wp--preset--color--line); stroke-width: 1; transition: fill 0.15s; }
.arshjul-seg text { fill: var(--wp--preset--color--green); font: 700 15px var(--wp--preset--font-family--heading); pointer-events: none; }
.arshjul-seg:hover path, .arshjul-seg:focus-visible path { fill: var(--wp--preset--color--mint); }
.arshjul-seg:focus-visible path { stroke: var(--wp--preset--color--green); stroke-width: 2; }
.arshjul-seg.er-valgt path { fill: var(--wp--preset--color--green); }
.arshjul-seg.er-valgt text { fill: var(--wp--preset--color--base); }
.arshjul-prikk { fill: var(--wp--preset--color--green); pointer-events: none; }
.arshjul-seg.er-valgt .arshjul-prikk { fill: var(--wp--preset--color--base); }
.arshjul-senter { fill: var(--wp--preset--color--base); }
.arshjul-sesong { fill: var(--wp--preset--color--grey); font: 400 13px var(--wp--preset--font-family--body); letter-spacing: 0.08em; }
.arshjul-maaned { fill: var(--wp--preset--color--green); font: 800 30px var(--wp--preset--font-family--heading); }
.arshjul-forklaring { margin: 0.75rem 0 0; text-align: center; font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--grey); }
.arshjul-forklaring::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--wp--preset--color--green); margin-right: 0.5rem; vertical-align: 0.05em; }
.fortrinn-arshjul__maaned { background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--image); padding: clamp(1.5rem, 3vw, 2rem); box-shadow: var(--wp--custom--skygge--kort); }
.fortrinn-arshjul__maaned .is-style-overtittel { display: inline-block; align-self: flex-start; background: var(--wp--preset--color--mint); color: var(--wp--preset--color--green); border-radius: var(--wp--custom--radius--pill); padding: 0.25rem 0.75rem; font-size: 0.75rem !important; letter-spacing: 0; text-transform: none; margin: 0; }
.fortrinn-arshjul__maaned .wp-block-heading { margin: 1rem 0 1rem; font-size: var(--wp--preset--font-size--gruppetittel); line-height: 1.2; font-weight: 700; }
.fortrinn-arshjul__maaned .is-style-hake li { font-size: 1rem; color: var(--wp--preset--color--grey); }
/* Tip with gm19.no's light-bulb icon (Lucide «lightbulb») instead of a «Tips:» label. */
.fortrinn-arshjul__tips {
	margin: 1.5rem 0 0;
	padding: 1rem 1rem 1rem 3rem;
	border-radius: var(--wp--custom--radius--small);
	font-size: var(--wp--preset--font-size--x-small);
	background: var(--wp--preset--color--beige) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23144332' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5'/%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3C/svg%3E") 1rem 1.05rem / 20px 20px no-repeat;
}
@media (max-width: 781px) {
	.fortrinn-arshjul.er-aktiv { grid-template-columns: 1fr; }
	.fortrinn-arshjul.er-aktiv .fortrinn-arshjul__hjul { max-width: 320px; }
}

/* Skjema (Contact Form 7) */
.wpcf7 form { display: grid; gap: 0.25rem; }
.wpcf7 .fortrinn-skjema-rad { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 600px) { .wpcf7 .fortrinn-skjema-rad { grid-template-columns: 1fr; } }
.wpcf7 .fortrinn-felt { margin: 0 0 0.9rem; }
.wpcf7 label { display: block; font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.wpcf7 label br { display: none; }
.wpcf7 .wpcf7-form-control-wrap { display: block; margin-top: 0.4rem; }
.wpcf7 input[type="text"], .wpcf7 input[type="tel"], .wpcf7 input[type="email"], .wpcf7 input[type="number"], .wpcf7 select, .wpcf7 textarea {
	width: 100%;
	box-sizing: border-box;
	font: 400 1rem/1.4 var(--wp--preset--font-family--body);
	color: var(--wp--preset--color--green);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--felt);
	border-radius: var(--wp--custom--radius--small);
	padding: 0.75rem 0.9rem;
}
.wpcf7 textarea { min-height: 7.5rem; resize: vertical; }
.wpcf7 input:focus, .wpcf7 select:focus, .wpcf7 textarea:focus { outline: 2px solid var(--wp--preset--color--green); outline-offset: 1px; border-color: var(--wp--preset--color--green); }
.wpcf7 input[type="file"] { font-size: 0.9375rem; }
.wpcf7 .fortrinn-send { margin: 0.5rem 0 0; }
.wpcf7 input[type="submit"] {
	font: 600 1rem/1.2 var(--wp--preset--font-family--body);
	background: var(--wp--preset--color--green);
	color: var(--wp--preset--color--base);
	border: 0;
	border-radius: var(--wp--custom--radius--pill);
	padding: 1em 1.75em;
	cursor: pointer;
}
.wpcf7 input[type="submit"]:hover { background: var(--wp--custom--hover--green); }
.wpcf7 .wpcf7-spinner { vertical-align: middle; }
.wpcf7-not-valid-tip { font-size: var(--wp--preset--font-size--x-small); margin-top: 0.3rem; }
.wpcf7 form .wpcf7-response-output { margin: 1rem 0 0; padding: 0.8rem 1rem; border-radius: var(--wp--custom--radius--small); font-size: 0.9375rem; }

/* Skjema-plassholder i mønsteret (byttes med Contact Form 7-blokken) */
.fortrinn-skjema-plass { border: 1.5px dashed var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--small); padding: 1rem; color: var(--wp--preset--color--grey); }

/* Photo header (Våre tjenester and the service pages): long one-word titles such as
   «Vaktmestertjenester» overflow a phone at the fluid minimum, and the browser does not
   hyphenate Norwegian – so a smaller title on narrow screens. */
@media (max-width: 480px) {
	.wp-block-cover h1 { font-size: 2rem; }
}

/* ---------- Nyheter (as on gm19.no/nyheter) ---------- */
/* Category buttons: «Alle» plus WordPress's category list, the current one filled green. */
.fortrinn-nyhetsfilter { gap: 0.5rem; margin-top: var(--wp--preset--spacing--40) !important; }
.fortrinn-kategorier { display: contents; list-style: none; margin: 0; padding: 0; }
.fortrinn-kategorier li { display: contents; }
.fortrinn-nyhetsfilter a {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 1.25rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--green);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.fortrinn-nyhetsfilter a:hover { border-color: var(--wp--preset--color--green); }
.blog .fortrinn-nyhetsfilter .fortrinn-alle,
.fortrinn-kategorier .current-cat > a { background: var(--wp--preset--color--green); border-color: var(--wp--preset--color--green); color: var(--wp--preset--color--base); }

/* Article card: photo edge to edge on top, pill + date, title, excerpt, «Les mer»; whole card clickable. */
.fortrinn-artikler .wp-block-post { height: 100%; }
.fortrinn-artikkelkort { position: relative; height: 100%; display: flex; flex-direction: column; padding: 0 !important; overflow: hidden; transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1); }
.fortrinn-artikkelkort > * { margin: 0 1.5rem !important; }
.fortrinn-artikkelkort > .wp-block-post-featured-image { margin: 0 0 1.25rem !important; overflow: hidden; }
.fortrinn-artikkelkort > .wp-block-post-featured-image img { border-radius: 0 !important; transition: transform 0.5s; }
.fortrinn-artikkelkort:hover { transform: translateY(-4px); box-shadow: var(--wp--custom--skygge--kort); }
.fortrinn-artikkelkort:hover .wp-block-post-featured-image img { transform: scale(1.05); }
.fortrinn-artikkelkort > .wp-block-post-title { margin-top: 0.75rem !important; font-size: clamp(1.25rem, 1rem + 0.6vw, 1.5rem); line-height: 1.3; font-weight: 700; }
.fortrinn-artikkelkort .wp-block-post-title a { text-decoration: none; }
.fortrinn-artikkelkort .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.fortrinn-artikkelkort > .wp-block-post-excerpt { margin-top: 0.75rem !important; font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--grey); }
.fortrinn-artikkelkort .wp-block-post-excerpt__excerpt { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fortrinn-artikkelkort > .wp-block-read-more { margin-top: auto !important; padding: 1rem 0 1.5rem; font-size: var(--wp--preset--font-size--x-small); font-weight: 600; text-decoration: none; }
.fortrinn-artikkelkort > .wp-block-read-more::after { content: " →"; }
/* Category pill and date (cards and article page) */
.fortrinn-artikkelmeta { gap: 0.75rem; align-items: center; font-size: 0.75rem; color: var(--wp--preset--color--grey); }
.fortrinn-artikkelmeta > * { margin: 0 !important; font-size: inherit !important; }
.fortrinn-artikkelmeta .wp-block-post-terms a { display: inline-block; padding: 0.25rem 0.625rem; border-radius: var(--wp--custom--radius--pill); background: var(--wp--preset--color--mint); color: var(--wp--preset--color--green); font-weight: 600; text-decoration: none; text-transform: none; letter-spacing: 0; position: relative; z-index: 1; }
.fortrinn-artikkelmeta .wp-block-post-terms { text-transform: none; letter-spacing: 0; }

/* Article page */
.fortrinn-smuler { gap: 0.5rem; font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--grey); margin-bottom: var(--wp--preset--spacing--50) !important; }
.fortrinn-smuler > * { margin: 0 !important; }
.fortrinn-smuler a { color: inherit; text-decoration: none; }
.fortrinn-smuler a:hover { color: var(--wp--preset--color--green); }
.fortrinn-smuler .wp-block-post-title { font: inherit; letter-spacing: 0; color: var(--wp--preset--color--green); }
.fortrinn-artikkel .fortrinn-artikkelmeta { font-size: var(--wp--preset--font-size--x-small); }
.fortrinn-artikkel .fortrinn-artikkelmeta .wp-block-post-terms a { font-size: 0.75rem; }
.fortrinn-artikkel .fortrinn-artikkelmeta > * + *::before { content: "·"; margin-right: 0.75rem; color: var(--wp--preset--color--line); }
.fortrinn-artikkel > .wp-block-post-title { margin-top: 1rem; line-height: 1.1; }
.fortrinn-artikkel > .fortrinn-artikkelbilde { max-width: min(924px, 100%) !important; margin-left: max(0px, calc((100% - 1152px) / 2)) !important; margin-right: auto !important; margin-block: var(--wp--preset--spacing--50) !important; }
.fortrinn-artikkel > .fortrinn-artikkelbilde img { border-radius: var(--wp--custom--radius--card) !important; }
.fortrinn-artikkel .wp-block-post-content p,
.fortrinn-artikkel .wp-block-post-content li { font-size: 1.125rem; line-height: 1.55; color: var(--wp--preset--color--green); }
.fortrinn-artikkel .wp-block-post-content h2 { font-size: var(--wp--preset--font-size--gruppetittel); line-height: 1.2; padding-top: 1rem; }
.fortrinn-relaterte-tittel { font-size: var(--wp--preset--font-size--gruppetittel) !important; margin-bottom: var(--wp--preset--spacing--50) !important; }

/* Article call to action: mint box, centred title and text, the contact form in a light card */
.fortrinn-artikkel-cta { text-align: center; border-radius: var(--wp--custom--radius--card); padding: clamp(1.5rem, 4vw, 2.5rem) !important; margin-block: var(--wp--preset--spacing--50) !important; }
.fortrinn-artikkel-cta .wp-block-heading { font-size: var(--wp--preset--font-size--gruppetittel); margin-bottom: 0.75rem; }
.fortrinn-artikkel-cta > p { max-width: 42rem; margin-inline: auto; }
.fortrinn-artikkel-cta .is-style-kort { max-width: 36rem; margin: 1.5rem auto 0 !important; text-align: left; background: var(--wp--preset--color--base); }

:where(.wp-site-blocks) :focus-visible { outline: 2px solid var(--wp--preset--color--green); outline-offset: 3px; }
