/*
Theme Name: FERLE TT25
Theme URI: https://ferle.no/
Description: Lett child-tema for FERLE-sitene (ferle.no, ferle.dk, ferle.se), basert på Twenty Twenty-Five. Designtokens ligger i theme.json.
Author: FERLE
Template: twentytwentyfive
Version: 0.1.62
Requires at least: 6.7
Requires PHP: 7.4
Text Domain: ferle-tt25
*/

/* Fokus: ingen ring ved museklikk, tydelig ring ved tastatur */
:where(a, button, input, select, textarea, summary, [tabindex]):focus:not(:focus-visible) { outline: none; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* Header */
.site-header .wp-block-site-logo img { height: auto; }
.site-header .wp-block-navigation a { text-decoration: none; }
.site-header .wp-block-navigation a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Lister uten punkter (footer, lenkelister) */
.is-style-ferle-plain { list-style: none; padding-left: 0; }
.is-style-ferle-plain li + li { margin-top: .5em; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Kort */
.is-style-ferle-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
}

/* Ikonfelt (inline SVG) */
.ferle-icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 52px; height: 52px; border-radius: 10px;
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--navy);
}
.ferle-icon svg { width: 24px; height: 24px; }

/* Pill / badge */
.is-style-ferle-pill {
	display: inline-block; padding: 7px 14px; border-radius: 999px;
	background: var(--wp--preset--color--accent-soft);
	font-size: 14px; font-weight: 500; color: var(--wp--preset--color--contrast);
}

/* Overlinje (eyebrow) */
.is-style-ferle-eyebrow {
	font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

/* Sekundærknapp */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1px solid var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
	background: transparent;
	padding: 14px 27px;
}

/* Header: hamburger under 1100px (kjernen bytter først ved 600px) */
@media (min-width: 600px) and (max-width: 1099px) {
	.site-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.site-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { font-size: 20px; gap: 18px; }
@media (max-width: 599px) {
	.site-header .wp-block-site-logo img { width: 181px !important; height: auto; }
	.site-header .header-cta { display: none; }
	.site-header .header-cta .wp-block-button__link { font-size: 14px; padding: 10px 14px !important; }
	.site-header .wp-block-group { gap: 14px; }
}

/* ---------- Forside / landingssider ---------- */
.ferle-hero-figure {
	position: relative; min-height: 520px; display: flex !important; align-items: center; justify-content: center;
	background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--line); border-radius: 16px;
}
.ferle-hero-figure::before {
	content: ""; position: absolute; width: 400px; max-width: 80%; aspect-ratio: 1; border-radius: 50%;
	background: var(--wp--preset--color--accent-soft); left: 50%; top: 50%; transform: translate(-50%, -50%);
}
.ferle-hero-figure > .wp-block-image { position: relative; margin: 0 !important; }
.ferle-float-badge {
	position: absolute; left: -28px; bottom: 36px; margin: 0 !important;
	padding: 14px 18px 14px 70px; border-radius: 10px; background: var(--wp--preset--color--base);
	box-shadow: 0 10px 30px rgba(27, 34, 50, .12); font-size: 13px; line-height: 1.4; color: var(--wp--preset--color--muted);
}
.ferle-float-badge strong { font-size: 18px; color: var(--wp--preset--color--contrast); }
.ferle-float-badge::before {
	content: ""; position: absolute; left: 18px; top: 50%; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%;
	background: var(--wp--preset--color--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A2B49' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7h11v9H3zM14 10h4l3 3v3h-7'/%3E%3Ccircle cx='7' cy='17.5' r='1.8'/%3E%3Ccircle cx='17' cy='17.5' r='1.8'/%3E%3C/svg%3E") center / 20px no-repeat;
}
@media (max-width: 781px) {
	.ferle-hero-figure { min-height: 380px; }
	.ferle-hero-figure img { width: 190px !important; }
	.ferle-float-badge { left: 12px; bottom: 16px; }
}

.ferle-icon--neutral { background: var(--wp--preset--color--surface); }
.ferle-pill-neutral { background: var(--wp--preset--color--surface); align-self: flex-start; }
.is-style-ferle-pill { align-self: flex-start; width: fit-content; }

/* Kort med bilde og hel klikkflate */
.ferle-linkcard, .ferle-product { position: relative; overflow: hidden; }
.ferle-linkcard > .wp-block-image { margin: 0; flex-shrink: 0; width: 100%; }
.ferle-linkcard > .wp-block-image img { width: 100%; height: auto; aspect-ratio: 367 / 252; object-fit: cover; display: block; }
.ferle-linkcard a::after, .ferle-product h3 a::after { content: ""; position: absolute; inset: 0; }
.ferle-linkcard a, .ferle-product h3 a { text-decoration: none; color: inherit; }
.ferle-linkcard p a { color: var(--wp--preset--color--navy); }
.ferle-linkcard:hover, .ferle-product:hover { border-color: #D9D2C6; box-shadow: 0 6px 20px rgba(27, 34, 50, .07); }
.ferle-linkcard:hover p a, .ferle-product:hover h3 a { text-decoration: underline; text-underline-offset: 3px; }
.ferle-product .wp-block-image { flex-shrink: 0; margin: 0; }
.ferle-product .wp-block-image img { border-radius: 8px; }

/* Tagger (alkometer) */
.ferle-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.ferle-tags li { margin: 0 !important; padding: 6px 12px; border-radius: 999px; background: var(--wp--preset--color--surface); font-size: 14px; color: var(--wp--preset--color--contrast); }
.ferle-bigcard { border-radius: 16px; }
.ferle-bigcard > .wp-block-group { align-self: stretch; }

.ferle-cta > .wp-block-group { max-width: 100%; }

/* Fullbredde-seksjoner ligger kant i kant */
.wp-block-post-content > .alignfull { margin-block: 0; }
.wp-site-blocks > .wp-block-template-part:last-child { margin-block-start: 0; }

/* Hero med foto (som ferle.dk) */
.ferle-hero-photo { position: relative; }
.ferle-hero-photo > .wp-block-image { margin: 0; }
.ferle-hero-photo > .wp-block-image img { width: 100%; height: 520px; object-fit: cover; border-radius: 16px; display: block; }
@media (max-width: 781px) { .ferle-hero-photo > .wp-block-image img { height: 300px; } }

/* Hero med testkort uten ramme */
.ferle-hero-card { position: relative; }
.ferle-hero-card > .wp-block-image { margin: 0 auto; }
.ferle-hero-card .ferle-float-badge { left: 0; bottom: 24px; }
@media (max-width: 781px) { .ferle-hero-card .ferle-float-badge { left: 0; bottom: 0; } }
@media (max-width: 781px) { .ferle-hero-card img { width: 240px !important; } }
.site-header .wp-block-site-logo { flex-shrink: 0; }


/* Header: mobil luft */
@media (max-width: 781px) { .site-header { padding-top: 20px !important; padding-bottom: 20px !important; } }

/* Ingen streg under header når første sektion har farvet baggrunn */
body:has(.wp-block-post-content > .alignfull.has-background:not(.has-base-background-color):first-child) .site-header,
body:has(.wp-block-post-content > .mailmunch-forms-before-post:first-child + .alignfull.has-background:not(.has-base-background-color)) .site-header { border-bottom-color: transparent !important; }

/* Burgerikon (3 streker) og lukkeknapp */
.site-header .wp-block-navigation__responsive-container-open svg,
.site-header .wp-block-navigation__responsive-container-close svg { width: 32px; height: 32px; }
.site-header .wp-block-navigation__responsive-container-open,
.site-header .wp-block-navigation__responsive-container-close { padding: 6px; color: #0F1B2D; }

/* Mobilmeny */
.site-header .menu-cta-mobile { display: none !important; }
.site-header .is-menu-open .menu-cta-mobile { display: block !important; }
.site-header .wp-block-navigation__responsive-container.is-menu-open { padding: 20px 16px 32px !important; }
.site-header .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 56px !important; align-items: stretch !important; }
.site-header .is-menu-open .wp-block-navigation__container { align-items: stretch !important; gap: 0 !important; width: 100%; font-size: 20px; font-weight: 500; }
.site-header .is-menu-open .wp-block-navigation-item { width: 100%; align-items: stretch !important; border-bottom: 1px solid var(--wp--preset--color--line); }
.site-header .is-menu-open .wp-block-navigation-item__content { display: block; width: 100%; box-sizing: border-box; padding: 16px 4px !important; text-align: left; }
.site-header .is-menu-open .wp-block-navigation-item__content:hover { text-decoration: none; color: var(--wp--preset--color--primary); }
.site-header .is-menu-open .menu-cta-mobile { border-bottom: 0; margin-top: 24px !important; }
.site-header .is-menu-open .menu-cta-mobile a.wp-block-navigation-item__content { display: block !important; text-align: center !important; padding: 15px 20px !important; border: 0 !important; border-radius: 5px; background: var(--wp--preset--color--primary); color: var(--wp--preset--color--base) !important; font-size: 17px !important; }
.site-header .wp-block-navigation__responsive-container-open svg { transform: scaleX(1.4); }
.site-header .wp-block-navigation__responsive-container-open { padding: 6px 12px; }

/* Hero mobil: kun tekst og knapper */
@media (max-width: 781px) { .ferle-hero .wp-block-columns > .wp-block-column:nth-child(2) { display: none; } }

/* Hvorfor FERLE: ikoner i gule cirkler, skillelinjer */
.wp-block-group:has(> .ferle-feature) { gap: 0 !important; }
.ferle-feature { padding: 4px 24px !important; }
.ferle-feature .ferle-icon { width: 60px; height: 60px; border-radius: 50%; background: var(--wp--preset--color--accent-soft); }
.ferle-feature .ferle-icon svg { width: 28px; height: 28px; stroke-width: 1.6; }
.ferle-feature h3 { font-size: 21px !important; font-weight: 700 !important; margin-top: 8px !important; }
.ferle-feature p { font-size: 16px !important; line-height: 1.6; color: #4A5468 !important; }
@media (min-width: 782px) { .ferle-feature + .ferle-feature { border-left: 1px solid var(--wp--preset--color--line); } }
@media (max-width: 781px) {
	.ferle-feature { padding: 24px 12px !important; }
	.ferle-feature:nth-child(even) { border-left: 1px solid var(--wp--preset--color--line); }
	.ferle-feature:nth-child(n+3) { border-top: 1px solid var(--wp--preset--color--line); }
	.ferle-feature h3 { font-size: 18px !important; }
	.ferle-feature p { font-size: 15px !important; }
}

/* ---------- Oversiktsside (hub): /narkotikatest/ ---------- */
.ferle-crumbs { font-size: 14px; color: var(--wp--preset--color--muted); }
.ferle-crumbs a { color: inherit; }
.ferle-crumbs [aria-current] { color: var(--wp--preset--color--contrast); font-weight: 500; }
.ferle-meta { font-size: 14px; font-weight: 600; color: var(--wp--preset--color--muted); }
.ferle-label { font-size: 14px; font-weight: 600; color: var(--wp--preset--color--contrast); }
.ferle-lead { font-size: 17px; line-height: 1.6; color: #4A5468; }
:where(.ferle-product, .ferle-family) h3 a, .ferle-family__title a { color: inherit; text-decoration: none; }

/* Finn riktig test */
.ferle-picker { background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--line); border-radius: 16px; padding: 24px 28px 12px; }
.ferle-picker__title { margin: 0 0 8px; font-size: 18px; font-weight: 600; color: var(--wp--preset--color--contrast); }
.ferle-picker ul { list-style: none; margin: 0; padding: 0; }
.ferle-picker li + li { border-top: 1px solid var(--wp--preset--color--line); }
.ferle-picker a { display: flex; gap: 16px; align-items: center; padding: 14px 0; text-decoration: none; color: var(--wp--preset--color--contrast); }
.ferle-picker a::after { content: "→"; margin-left: auto; color: var(--wp--preset--color--navy); }
.ferle-picker a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.ferle-picker strong { display: block; font-size: 16px; font-weight: 600; }
.ferle-picker small { display: block; font-size: 14px; line-height: 1.4; color: var(--wp--preset--color--muted); }
.ferle-picker__icon { flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--wp--preset--color--surface); color: var(--wp--preset--color--navy); }
.ferle-picker__icon.is-accent { background: var(--wp--preset--color--accent-soft); }
.ferle-picker__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Produktfamilie-kort */
.ferle-family { border-radius: 16px; overflow: hidden; }
.ferle-family__media { position: relative; min-height: 300px; background: var(--wp--preset--color--surface); border-bottom: 1px solid var(--wp--preset--color--line); overflow: hidden; gap: 40px !important; }
.ferle-family__media::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: var(--wp--preset--color--accent-soft); left: 50%; top: 50%; transform: translate(-50%, -50%); }
.ferle-family__media > * { position: relative; }
.ferle-family__media .wp-block-image { margin: 0; }
.ferle-family__badge { position: absolute !important; left: 20px; top: 20px; margin: 0 !important; padding: 6px 12px; border-radius: 999px; background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--line); font-size: 13px; font-weight: 600; color: var(--wp--preset--color--contrast); z-index: 1; }
.ferle-plates { display: flex; gap: 40px; align-items: center; line-height: 0; }
.ferle-family__body { flex-grow: 1; }
.ferle-family__title { font-size: 28px !important; font-weight: 700 !important; }
.ferle-family__block { padding-top: 20px; border-top: 1px solid var(--wp--preset--color--line); }
.ferle-family__cta { margin-top: auto !important; padding-top: 8px; }

/* Haker */
.ferle-checks li { position: relative; padding-left: 28px; font-size: 16px; color: var(--wp--preset--color--contrast); }
.ferle-checks li + li { margin-top: 8px; }
.ferle-checks li::before { content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A2B49' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Lenkeliste med pil */
.ferle-linklist { margin-bottom: 0; }
.ferle-linklist li { margin: 0 !important; border-top: 1px solid var(--wp--preset--color--line); }
.ferle-linklist li:last-child { border-bottom: 1px solid var(--wp--preset--color--line); }
.ferle-linklist a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; color: var(--wp--preset--color--contrast); text-decoration: none; font-size: 16px; }
.ferle-linklist a::after { content: "→"; color: var(--wp--preset--color--navy); }
.ferle-linklist a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Varianter */
.ferle-variants { margin: 0; border: 1px solid var(--wp--preset--color--line); border-radius: 8px; }
.ferle-variants li { margin: 0 !important; padding: 14px 16px; font-size: 14px; line-height: 1.5; color: var(--wp--preset--color--muted); }
.ferle-variants li + li { border-top: 1px solid var(--wp--preset--color--line); }
.ferle-variants strong { font-size: 16px; font-weight: 600; color: var(--wp--preset--color--contrast); }

/* Sammenligningstabell */
.ferle-compare { margin-bottom: 0; border: 1px solid var(--wp--preset--color--line); border-radius: 12px; overflow-x: auto; }
.ferle-compare table { width: 100%; border-collapse: collapse; font-size: 16px; }
.ferle-compare th, .ferle-compare td { border: 0; padding: 16px 20px; text-align: left; vertical-align: top; }
.ferle-compare thead { border: 0; }
.ferle-compare thead th { background: var(--wp--preset--color--surface); font-size: 14px; font-weight: 600; color: var(--wp--preset--color--muted); }
.ferle-compare tbody tr { border-top: 1px solid var(--wp--preset--color--line); }
.ferle-compare td:first-child { font-weight: 600; }
.ferle-compare td:first-child a { color: var(--wp--preset--color--contrast); }
.ferle-compare td:last-child { color: var(--wp--preset--color--muted); white-space: nowrap; }
.ferle-scroll-hint { display: none; font-size: 13px; color: var(--wp--preset--color--muted); }
@media (max-width: 781px) {
	.ferle-scroll-hint { display: block; }
	.ferle-compare table { min-width: 640px; font-size: 14px; }
	.ferle-compare th, .ferle-compare td { padding: 12px 14px; }
	.ferle-compare :is(th, td):first-child { position: sticky; left: 0; background: var(--wp--preset--color--base); border-right: 1px solid var(--wp--preset--color--line); max-width: 140px; }
	.ferle-compare thead th:first-child { background: var(--wp--preset--color--surface); }
}

/* Infoboks */
.ferle-note { position: relative; box-sizing: border-box; max-width: 880px; margin-left: max(0px, calc((100% - 1280px) / 2)) !important; padding: 16px 18px 16px 48px; border-radius: 8px; background: var(--wp--preset--color--surface); font-size: 15px; line-height: 1.55; color: #4A5468; }
.ferle-note::before { content: ""; position: absolute; left: 18px; top: 18px; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A2B49' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat; }

@media (max-width: 781px) {
	.ferle-picker { padding: 18px 16px 6px; border-radius: 12px; }
	.ferle-family__media { min-height: 0; padding: 60px 16px 24px; gap: 28px !important; }
	.ferle-family__media::before { width: 190px; height: 190px; top: calc(50% + 18px); }
	.ferle-family__media .wp-block-image img { width: 110px !important; }
	.ferle-family__badge { left: 12px; top: 12px; font-size: 12px; padding: 5px 10px; }
	.ferle-plates { gap: 28px; }
	.ferle-plates svg:first-child { width: 96px; height: 159px; }
	.ferle-plates svg:last-child { width: 70px; height: 134px; }
	.ferle-family__title { font-size: 24px !important; }
	.ferle-family__body { padding: 20px 16px 24px !important; }
	.ferle-family__cta .wp-block-button { width: 100%; }
	.ferle-family__cta .wp-block-button__link { display: block; text-align: center; }
	.ferle-hub-intro .wp-block-buttons .wp-block-button { width: 100%; }
	.ferle-hub-intro .wp-block-button__link { display: block; text-align: center; }
}

/* ---------- Produktside (variant B): /narkotikatest/accusign-narkotikatest/ ---------- */
.ferle-pdp-section { border-top: 1px solid var(--wp--preset--color--line); }
.ferle-pdp__media { position: relative; display: flex; align-items: center; justify-content: center; min-height: 460px; border-radius: 12px; background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); overflow: hidden; }
.ferle-pdp__media::before { content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%; background: var(--wp--preset--color--accent-soft); left: 50%; top: 50%; transform: translate(-50%, -50%); }
.ferle-pdp__media > * { position: relative; }
.ferle-pdp__media .ferle-plates { gap: 48px; }
.ferle-pdp__title { font-size: 40px !important; line-height: 1.15; }
.ferle-pdp .ferle-lead { font-size: 18px; }
.ferle-pdp :is(h2.ferle-label) { font-size: 15px; font-weight: 600; line-height: 1.4; }
.ferle-pdp__h2 { font-size: 26px !important; font-weight: 600 !important; }
.ferle-pdp__h3 { font-size: 18px !important; font-weight: 600 !important; }
.ferle-pdp-section .wp-block-column:first-child > .wp-block-group > p { font-size: 17px; line-height: 1.7; color: #4A5468; }
.ferle-pdp__photo { margin-bottom: 0; }
.ferle-pdp__photo img { border-radius: 10px; max-width: 100%; height: auto !important; }
.ferle-pdp__contact { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 15px !important; font-weight: 600; }
.ferle-pdp__contact a { color: var(--wp--preset--color--navy); }

/* Nummererte trinn */
.ferle-steps { list-style: none; margin-bottom: 0; padding: 0; counter-reset: ferle-step; border-top: 1px solid var(--wp--preset--color--line); }
.ferle-steps li { counter-increment: ferle-step; position: relative; margin: 0; padding: 16px 0 16px 44px; border-bottom: 1px solid var(--wp--preset--color--line); font-size: 16px; line-height: 1.6; color: #4A5468; }
.ferle-steps li::before { content: counter(ferle-step); position: absolute; left: 0; top: 14px; width: 28px; height: 28px; box-sizing: border-box; border-radius: 50%; background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--wp--preset--color--navy); }

/* PDF i lenkeliste */
.ferle-linklist .is-pdf a::after { content: "PDF"; font-size: 13px; color: var(--wp--preset--color--muted); }

@media (max-width: 781px) {
	.ferle-pdp__media { min-height: 280px; }
	.ferle-pdp__media::before { width: 210px; height: 210px; }
	.ferle-pdp__media .ferle-plates { gap: 28px; }
	.ferle-pdp__media .ferle-plates svg:first-child { width: 124px; height: 205px; }
	.ferle-pdp__media .ferle-plates svg:last-child { width: 92px; height: 176px; }
	.ferle-pdp__title { font-size: 32px !important; }
	.ferle-pdp .ferle-lead { font-size: 17px; }
	.ferle-pdp__h2 { font-size: 22px !important; }
	.ferle-pdp-section .wp-block-column:first-child > .wp-block-group > p { font-size: 16px; line-height: 1.65; }
	.ferle-pdp__cta, .ferle-pdp__cta .wp-block-button { width: 100%; }
	.ferle-pdp__cta .wp-block-button__link { display: block; text-align: center; }
	.ferle-steps li { font-size: 15px; padding-left: 40px; }
}

/* ---------- Undermenyer (Narkotikatester, Informasjon) ---------- */
@media (min-width: 1100px) {
	.site-header .wp-block-navigation .wp-block-navigation__submenu-container { min-width: 260px !important; width: max-content; left: -14px !important; right: auto !important; margin-top: 14px; padding: 8px !important; gap: 2px; border: 1px solid var(--wp--preset--color--line) !important; border-radius: 12px; background: var(--wp--preset--color--base) !important; box-shadow: 0 14px 36px rgba(27, 34, 50, .10); }
	.site-header .wp-block-navigation .wp-block-navigation__submenu-container::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
	.site-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 11px 14px !important; border-radius: 8px; font-size: 16px; font-weight: 500; line-height: 1.35; white-space: nowrap; color: var(--wp--preset--color--contrast); }
	.site-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--surface); text-decoration: none; }
	.site-header .wp-block-navigation .wp-block-navigation__submenu-container [aria-current="page"] { background: var(--wp--preset--color--surface); }
	.site-header .wp-block-navigation__submenu-icon { margin-left: 5px; }
}
/* Mobilmeny: undermenypunkter innrykket og mindre */
.site-header .is-menu-open .wp-block-navigation__submenu-container { padding: 0 0 12px 14px !important; gap: 0 !important; }
.site-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item { border-bottom: 0; }
.site-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 9px 4px !important; font-size: 17px; font-weight: 400; color: #4A5468; }
.site-header .is-menu-open .wp-block-navigation-submenu > .wp-block-navigation-item__content { padding-bottom: 8px !important; }

@media (min-width: 1100px) and (max-width: 1279px) {
	.site-header .wp-block-navigation .wp-block-navigation__container { gap: 20px !important; }
}
.site-header .header-cta .wp-block-button__link { white-space: nowrap; }

/* ---------- Produktside: sortiment (NanoSticka) ---------- */
.ferle-panels > .ferle-panel { height: 100%; box-sizing: border-box; }
.ferle-panel .ferle-meta { margin: 0; }
.ferle-panel__title { font-size: 19px !important; font-weight: 600 !important; line-height: 1.3; margin-bottom: 6px; }
.ferle-specs { margin-bottom: 0; padding: 0; list-style: none; border-top: 1px solid var(--wp--preset--color--line); }
.ferle-specs li { display: flex; justify-content: space-between; gap: 16px; margin: 0 !important; padding: 7px 0; border-bottom: 1px solid var(--wp--preset--color--line); font-size: 15px; line-height: 1.45; color: var(--wp--preset--color--contrast); }
.ferle-specs li:last-child { border-bottom: 0; }
.ferle-specs li span { color: var(--wp--preset--color--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ferle-panel__extra { font-size: 14px !important; line-height: 1.5; color: var(--wp--preset--color--muted); }
.ferle-panel__extra a { font-weight: 600; color: var(--wp--preset--color--navy); }
.ferle-specs-table th, .ferle-specs-table td { padding: 11px 20px; }
.ferle-specs-table td { font-size: 15px; }
.ferle-specs-table td:first-child { white-space: nowrap; color: var(--wp--preset--color--muted); font-variant-numeric: tabular-nums; }
.ferle-specs-table th:last-child, .ferle-specs-table td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ferle-pdp__media > .wp-block-image { margin: 0; }
.ferle-pdp__card img { display: block; height: auto; filter: drop-shadow(0 10px 18px rgba(26, 43, 73, .12)); }
:where(#multitester, #singeltester) { scroll-margin-top: 110px; }

@media (max-width: 781px) {
	.ferle-pdp__card, .ferle-pdp__card img { width: 140px !important; }
	.ferle-panel__title { font-size: 18px !important; }
	.ferle-specs-table th, .ferle-specs-table td { padding: 10px 12px; }
	.ferle-specs-table td { font-size: 14px; }
	.ferle-specs-table table { min-width: 0; }
	.ferle-specs-table :is(th, td):first-child { position: static; border-right: 0; }
}

/* ---------- Produktside: infokort på linje med boksen ved siden af (desktop) ---------- */
@media (min-width: 782px) {
	.wp-block-column:has(> .ferle-pdp__h2:first-child) + .wp-block-column > .ferle-sticky:first-child { margin-top: calc(26px * 1.2 + 24px) !important; }
}

/* ---------- Produktside: NanoSticka singeltest (pakning + strip i samme skala) ---------- */
@media (max-width: 781px) {
	.ferle-pdp__media .ferle-plates--ns svg { width: auto !important; height: 205px !important; }
}

/* ---------- Produktside: AccuSign (2 testplader centreret + pipette liggende foran) ---------- */
.ferle-pdp__media .ferle-plates--as { gap: 22px; margin-bottom: 40px; }
.ferle-plates--as .ferle-pipette { position: absolute; left: 50%; top: calc(100% + 2px); transform: translate(-50%, -50%) rotate(78deg); pointer-events: none; }
@media (max-width: 781px) {
	.ferle-pdp__media .ferle-plates--as { gap: 12px; margin-bottom: 24px; }
	.ferle-pdp__media .ferle-plates--as svg { width: auto !important; height: calc(var(--h) * .62px) !important; }
}

/* ---------- Informasjon (hub): infokort ---------- */
.ferle-infocard { height: 100%; box-sizing: border-box; }
.ferle-infocard .ferle-icon { flex-shrink: 0; }
.ferle-infocard .ferle-lead { margin: 0; }
.ferle-infocard__more { margin-top: auto !important; padding-top: 6px; font-size: 15px; font-weight: 600; color: var(--wp--preset--color--navy); }
.ferle-infocard:hover .ferle-infocard__more { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 781px) {
	.ferle-infocard { padding: 22px 20px !important; }
}

/* Tomme elementer efter indholdet (tomt <p> fra Mailmunch/wpautop) må ikke give luft over footeren */
.wp-block-post-content > p:empty,
.wp-block-post-content > [class^="mailmunch-forms-"] { display: none !important; margin: 0 !important; }

/* ---------- Informasjonsside (8/12 + sidebar 4/12) ---------- */
.ferle-info-intro__text > * { max-width: 860px; }
.ferle-article { min-width: 0; }
.ferle-article > :is(p, ul, ol) { line-height: 1.7; }
.ferle-article > h2 { font-size: 28px !important; margin-top: 48px !important; }
.ferle-article > h2:first-child { margin-top: 0 !important; }
.ferle-article > ul:not(.is-style-ferle-plain) { padding-left: 1.2em; }
.ferle-article > ul:not(.is-style-ferle-plain) li + li { margin-top: .35em; }
.ferle-article .ferle-checks li { font-size: 17px; line-height: 1.6; }
.ferle-article .ferle-checks li + li { margin-top: 12px; }
.ferle-article .ferle-checks strong { color: var(--wp--preset--color--contrast); }
.ferle-article .ferle-note { margin-left: 0 !important; }
.ferle-article :is(h2, h3)[id], .ferle-article .wp-block-table[id] { scroll-margin-top: 24px; }
.ferle-small { font-size: 14px; color: var(--wp--preset--color--muted); }
@media (min-width: 782px) {
	.ferle-aside { position: sticky; top: 24px; align-self: flex-start; }
}
.ferle-aside .ferle-linklist a { min-height: 44px; font-size: 15px; }
.ferle-aside__title a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.ferle-aside__title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ferle-linklist .is-current a { font-weight: 600; color: var(--wp--preset--color--navy); }
.ferle-linklist .is-current a::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--wp--preset--color--accent); }
.ferle-linklist--ext a::after { content: none; }

/* Søk i tabell */
.ferle-search__label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 600; color: var(--wp--preset--color--contrast); }
.ferle-search__input { box-sizing: border-box; width: 100%; padding: 14px 16px 14px 46px; border: 1px solid var(--wp--preset--color--field); border-radius: 8px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23626D84' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 16px center / 20px no-repeat; font: inherit; font-size: 17px; color: var(--wp--preset--color--contrast); }
.ferle-search__input:focus-visible { border-color: var(--wp--preset--color--primary); }
.ferle-search__count { margin: 10px 0 0; font-size: 14px; color: var(--wp--preset--color--muted); }
.ferle-search__none { margin: 12px 0 0; padding: 14px 16px; border-radius: 8px; background: var(--wp--preset--color--surface); font-size: 15px; }
.ferle-search__none[hidden] { display: none; }

/* Datatabeller (Deteksjonstider, Kryssreaksjon) */
.ferle-datatable td:last-child { white-space: normal; color: var(--wp--preset--color--text); }
.ferle-datatable tr[hidden] { display: none !important; }
.ferle-datatable--num td:nth-child(2) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ferle-datatable th, .ferle-datatable td { padding: 12px 18px; font-size: 15px; }
.ferle-xr td:nth-child(2) { color: #4A5468; }
.ferle-xr td:last-child { color: var(--wp--preset--color--muted); }
@media (max-width: 781px) {
	.ferle-article > h2 { font-size: 24px !important; margin-top: 40px !important; }
	.ferle-article > p { font-size: 16px; line-height: 1.65; }
	.ferle-article .ferle-checks li { font-size: 16px; }
	.ferle-datatable table { min-width: 0; }
	.ferle-datatable :is(th, td):first-child { position: static; border-right: 0; max-width: none; }
	.ferle-datatable th, .ferle-datatable td { padding: 10px 12px; font-size: 14px; }
	.ferle-xr thead { display: none; }
	.ferle-xr :is(table, tbody, tr, td) { display: block; }
	.ferle-xr tr { padding: 12px 14px; }
	.ferle-xr td { padding: 0 !important; }
	.ferle-xr td:first-child { font-size: 16px; }
	.ferle-xr td:last-child::before { content: "Virkestoff: "; }
}

@media (max-width: 781px) {
	.ferle-datatable--num thead { display: none; }
	.ferle-datatable--num :is(table, tbody, tr, td) { display: block; }
	.ferle-datatable--num tr { padding: 12px 14px; }
	.ferle-datatable--num td { padding: 0 !important; }
	.ferle-datatable--num td:first-child { font-size: 16px; }
	.ferle-datatable--num td:nth-child(2) { color: var(--wp--preset--color--muted); }
	.ferle-datatable--num td:nth-child(2)::before { content: "Cut-off: "; }
	.ferle-datatable--num td:nth-child(2)::after { content: " ng/ml"; }
}

/* ---------- Kontakt, Om FERLE, Infonytt, Bestilling ---------- */
.ferle-aside.ferle-aside--static { position: static; }
.ferle-contact__value { font-size: 18px; font-weight: 600; line-height: 1.5; color: var(--wp--preset--color--contrast); }
.ferle-contact__value a { color: var(--wp--preset--color--navy); }
.ferle-contact .ferle-meta { margin-top: 4px; }
.ferle-photo { margin: 0; }
.ferle-photo img { display: block; width: 100%; height: auto; border-radius: 12px; }
.ferle-photo figcaption { margin-top: 10px; font-size: 14px; color: var(--wp--preset--color--muted); }
.ferle-signup { background: var(--wp--preset--color--surface); }

/* Hub: AccuSign-plader med pipette i familiekortet (/narkotikatest/) */
.ferle-family__media .ferle-plates--as { gap: 16px; margin-bottom: 30px; }
.ferle-family__media .ferle-plates--as svg { width: auto !important; height: calc(var(--h) * .62px) !important; }
@media (max-width: 781px) {
	.ferle-family__media .ferle-plates--as { gap: 10px; margin-bottom: 22px; }
	.ferle-family__media .ferle-plates--as svg { height: calc(var(--h) * .5px) !important; }
}

/* Hub: NanoSticka singeltest (pakning + strip) ved siden af multitest-kortet */
.ferle-family__media { column-gap: 32px !important; padding: 68px 24px 28px; min-height: 360px; }
@media (max-width: 781px) { .ferle-family__media { min-height: 290px; padding: 60px 16px 24px; } }
.ferle-family__media::before { top: calc(50% + 20px); }
.ferle-plates--hub { gap: 8px; align-items: flex-end; }
.ferle-plates--hub svg { width: auto !important; height: 248px !important; }
@media (max-width: 781px) {
	.ferle-family__media { column-gap: 18px !important; }
	.ferle-plates--hub { gap: 4px; }
	.ferle-plates--hub svg { height: 194px !important; }
}

/* Produktside NanoSticka: singeltest (pakning + strip) ved siden af multitest-kortet */
.ferle-pdp__media:has(.ferle-plates--pdpns) { gap: 56px; }
.ferle-pdp__media .ferle-plates--pdpns { gap: 10px; align-items: flex-end; }
.ferle-pdp__media .ferle-plates--pdpns svg { width: auto !important; height: 354px !important; }
@media (max-width: 781px) {
	.ferle-pdp__media:has(.ferle-plates--pdpns) { gap: 32px; }
	.ferle-pdp__media .ferle-plates--pdpns { gap: 4px; }
	.ferle-pdp__media .ferle-plates--pdpns svg { height: 248px !important; }
}

/* ---------- Til toppen (scroll-to-top), alle sider ---------- */
.ferle-totop { position: fixed; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 50; display: grid; place-items: center; width: 48px; height: 48px; box-sizing: border-box; border-radius: 50%; background: #fff; color: var(--wp--preset--color--navy); border: 1px solid var(--wp--preset--color--line); box-shadow: 0 4px 16px rgba(26, 43, 73, .12); text-decoration: none; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility .2s; }
.ferle-totop.is-visible { opacity: 1; visibility: visible; transform: none; }
.ferle-totop:hover { background: var(--wp--preset--color--surface); }
.wp-site-blocks:focus { outline: none; }
@media (max-width: 781px) { .ferle-totop { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 44px; height: 44px; } }
/* Bestillingssiden (mobil/nettbrett): skjules, så den ikke dækker −/+ i produktlisten; siden har egen bundbjælke og "Endre bestilling" */
@media (max-width: 999px) { body:has(.fo) .ferle-totop { display: none; } }
@media (prefers-reduced-motion: reduce) { .ferle-totop { transition: none; } }

/* ==========================================================
   Nyhetsbrev-skjema (ActiveCampaign, ren HTML – ingen skript)
   ========================================================== */
.ferle-nl { display: grid; gap: 14px; margin: 0; }
.ferle-signup > .ferle-nl { align-self: stretch; width: 100%; }
.ferle-nl__field { display: grid; gap: 6px; margin: 0; }
.ferle-nl label { font-size: 15px; font-weight: 600; color: var(--wp--preset--color--navy, #1A2B49); }
.ferle-nl input[type="text"],
.ferle-nl input[type="email"] { width: 100%; box-sizing: border-box; min-height: 48px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--wp--preset--color--navy, #1A2B49); background: #fff; border: 1px solid #DCD6CC; border-radius: 5px; }
.ferle-nl input:focus { outline: none; }
.ferle-nl input:focus-visible { outline: 2px solid #273E54; outline-offset: 1px; border-color: #273E54; }
.ferle-nl__btn { justify-self: start; min-height: 48px; padding: 0 28px; font: inherit; font-size: 17px; font-weight: 600; color: #fff; background: #273E54; border: 0; border-radius: 5px; cursor: pointer; }
.ferle-nl__btn:hover { background: #1A2B49; }
.ferle-nl__btn:focus { outline: none; }
.ferle-nl__btn:focus-visible { outline: 2px solid #273E54; outline-offset: 2px; }
@media (max-width: 600px) { .ferle-nl__btn { justify-self: stretch; } }

/* Informasjonskapsler-tabell (cookie-siden) */
.ferle-cookies :is(th, td):first-child { width: 26%; max-width: none; font-weight: 600; }
.ferle-cookies :is(th, td):nth-child(2) { white-space: nowrap; }
.ferle-cookies :is(th, td):last-child { width: 22%; }
.ferle-cookies td:nth-child(2), .ferle-cookies td:last-child { color: var(--wp--preset--color--muted); }
@media (max-width: 781px) {
	.ferle-cookies thead { display: none; }
	.ferle-cookies :is(table, tbody, tr, td) { display: block; }
	.ferle-cookies tr { padding: 12px 14px; }
	.ferle-cookies td { padding: 0 !important; }
	.ferle-cookies td { width: auto !important; white-space: normal !important; }
	.ferle-cookies td + td { margin-top: 4px; }
	.ferle-cookies td:first-child { font-size: 16px; }
	.ferle-cookies td:nth-child(2)::before { content: "Fra: "; }
	.ferle-cookies td:last-child::before { content: "Varighet: "; }
}

/* Alkometer: CA20FL + Alco-Sensor FST i samme målestok, bunden på linje */
.ferle-plates--alk { align-items: flex-end; }
@media (max-width: 781px) {
	.ferle-pdp__media .ferle-plates--ns svg.ferle-fst { height: 226px !important; }
}
