/**
 * Hørselsforbundet – stiler som ikke kan uttrykkes i theme.json.
 */

/* Seksjonene ligger kant i kant, som i designet. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* ---------------------------------------------------------------------------
 * Header
 * ------------------------------------------------------------------------ */

header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
}

.admin-bar header.wp-block-template-part {
	top: var(--wp-admin--admin-bar--height, 0px);
}

.hlf-header a {
	text-decoration: none;
}

.hlf-header p {
	margin: 0;
	white-space: nowrap;
}

.hlf-header__logo img {
	display: block;
	width: clamp(170px, 18vw, 261px);
	height: auto;
}

/* «Min side» med personikon etter teksten. */
.hlf-header__account a {
	display: inline-flex;
	align-items: center;
	gap: 12px;
}

.hlf-header__account a::after {
	content: "";
	width: 23px;
	height: 24px;
	background: url("../images/ikon-medlem.svg") center / contain no-repeat;
}

/* Menyknapp: «Meny» + oransje ikon, i stedet for standard hamburger. */
.hlf-header__nav .wp-block-navigation__responsive-container-open {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: var(--wp--preset--color--tekst);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.5;
}

.hlf-header__nav .wp-block-navigation__responsive-container-open::before {
	content: "Meny";
}

.hlf-header__nav .wp-block-navigation__responsive-container-open svg {
	display: none;
}

.hlf-header__nav .wp-block-navigation__responsive-container-open::after {
	content: "";
	width: 37px;
	height: 18px;
	background: url("../images/ikon-meny.svg") center / contain no-repeat;
}

/* Små skjermer: bare ikonene. */
@media (max-width: 781px) {
	.hlf-header__join {
		display: none;
	}

	.hlf-header__account a,
	.hlf-header__nav .wp-block-navigation__responsive-container-open::before {
		font-size: 0;
	}

	.hlf-header__actions {
		gap: 24px !important;
	}
}

/*
 * Menyoverlegg (template part «meny»): panel rett under headeren med mørk
 * topplinje og hovedmenyen som kolonner. --hlf-meny-topp settes av meny.js.
 */
.hlf-header__nav .wp-block-navigation__responsive-container.disable-default-overlay.is-menu-open {
	top: var(--hlf-meny-topp, 101px);
	bottom: auto;
	max-height: calc(100vh - var(--hlf-meny-topp, 101px));
	padding: 0 0 24px;
	background: transparent;
}

/*
 * Kjernens innfading bruker transform, som ville gjort lukkeknappen under
 * relativ til panelet i stedet for vinduet. Vi fader bare inn.
 */
.hlf-header__nav .wp-block-navigation__responsive-container.disable-default-overlay.is-menu-open {
	animation: hlf-meny-inn 0.15s ease-out;
}

@keyframes hlf-meny-inn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hlf-header__nav .wp-block-navigation__responsive-container.disable-default-overlay.is-menu-open {
		animation: none;
	}
}

/*
 * Lukkeknappen ligger oppå menyknappen i headeren, så menyknappen ser ut til å
 * bli en X. Den er fortsatt inne i menydialogen, så fokus og Esc virker som før.
 * Posisjonen måles av meny.js.
 */
.hlf-header__nav .disable-default-overlay .wp-block-navigation__responsive-container-close {
	position: fixed;
	top: var(--hlf-meny-knapp-y, 30px);
	right: auto;
	left: var(--hlf-meny-knapp-x, calc(100% - 100px));
	display: flex;
	align-items: center;
	justify-content: flex-end;
	width: var(--hlf-meny-knapp-b, 90px);
	height: var(--hlf-meny-knapp-h, 40px);
	padding: 0;
	background: transparent;
	color: var(--wp--preset--color--oransje);
}

.hlf-header__nav .disable-default-overlay .wp-block-navigation__responsive-container-close svg {
	display: none;
}

.hlf-header__nav .disable-default-overlay .wp-block-navigation__responsive-container-close::before {
	content: "";
	width: 34px;
	height: 34px;
	background: url("../images/ikon-lukk.svg") center / contain no-repeat;
}

.hlf-header__nav .disable-default-overlay .wp-block-navigation__responsive-container-close:focus-visible {
	outline: 2px solid var(--wp--preset--color--tekst);
	outline-offset: 4px;
}

header.wp-block-template-part:has(.hlf-header__nav .is-menu-open) .hlf-header__nav .wp-block-navigation__responsive-container-open {
	visibility: hidden;
}

/* Headeren får samme farge som menypanelet mens menyen er åpen. */
header.wp-block-template-part:has(.hlf-header__nav .is-menu-open) .hlf-header {
	background-color: var(--wp--preset--color--bakgrunn-bla) !important;
	border-radius: 0 !important;
}

/* Panelet fyller hele bredden. */
.hlf-header__nav .disable-default-overlay .wp-block-navigation__responsive-close,
.hlf-header__nav .disable-default-overlay .wp-block-navigation__overlay-container {
	width: 100%;
	max-width: none;
	margin: 0;
}

.hlf-meny {
	/* Samme sideluft som headeren, så teksten står på linje med logo og menyknapp. */
	--hlf-meny-innrykk: clamp(16px, 4.4vw, 66px);
}

.hlf-meny {
	overflow: hidden;
	border-radius: 0 40px 20px 20px;
	background: var(--wp--preset--color--bakgrunn-bla);
	color: var(--wp--preset--color--tekst);
	box-shadow: 0 12px 28px rgb(19 67 87 / 0.18);
}

.hlf-meny__topp {
	padding: 22px var(--hlf-meny-innrykk);
}

.hlf-meny__sekundar .wp-block-navigation__container {
	gap: 12px clamp(24px, 5.5vw, 110px);
}

.hlf-meny__sekundar .wp-block-navigation-item__content {
	color: var(--wp--preset--color--creme);
	font-size: var(--wp--preset--font-size--medium);
}

.hlf-meny__topp :focus-visible {
	outline: 2px solid var(--wp--preset--color--creme);
	outline-offset: 3px;
}

/* Hovedmenyen: undermenyene vises som åpne kolonner i stedet for nedtrekk. */
.hlf-meny nav.hlf-meny__hoved {
	margin: 0;
	padding: clamp(28px, 3.5vw, 52px) var(--hlf-meny-innrykk) clamp(40px, 5vw, 72px);
}

.hlf-meny > * + * {
	margin-block-start: 0;
}

.hlf-meny__hoved .wp-block-navigation__container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
	gap: 40px clamp(24px, 3vw, 48px);
	align-items: start;
	width: 100%;
}

.hlf-meny__hoved .wp-block-navigation-submenu {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.hlf-meny__hoved .wp-block-navigation-submenu > .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--gt-super-text);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 500;
	line-height: 1.4;
}

.hlf-meny__hoved .wp-block-navigation__submenu-icon {
	display: none;
}

.hlf-meny__hoved .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container {
	position: static;
	visibility: visible;
	opacity: 1;
	width: auto;
	min-width: 0;
	height: auto;
	overflow: visible;
	margin-top: 22px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--tekst);
	gap: 16px;
	transform: none;
}

.hlf-meny .hlf-meny__hoved .has-child .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	padding: 0;
	color: var(--wp--preset--color--tekst);
	font-size: 18px;
	line-height: 1.5;
}

.hlf-meny .hlf-meny__hoved .has-child .wp-block-navigation__submenu-container > .wp-block-navigation-item {
	margin: 0;
	padding: 0;
	background: transparent;
}

.hlf-meny__hoved :focus-visible {
	outline: 2px solid var(--wp--preset--color--tekst);
	outline-offset: 3px;
}

/* ---------------------------------------------------------------------------
 * Header – idébank (alternativ header med enkel meny)
 * ------------------------------------------------------------------------ */

.hlf-header-idebank p {
	margin: 0;
}

.hlf-header-idebank__nav .wp-block-navigation-item__content {
	color: var(--wp--preset--color--tekst);
	font-weight: 500;
	text-decoration: none;
}

.hlf-header-idebank__nav :focus-visible {
	outline: 2px solid var(--wp--preset--color--tekst);
	outline-offset: 4px;
}

.hlf-header-idebank__nav .wp-block-navigation__responsive-container-open,
.hlf-header-idebank__nav .wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--tekst);
}

.hlf-header-idebank__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--large);
}

/* ---------------------------------------------------------------------------
 * Knapper og lenker
 * ------------------------------------------------------------------------ */

/*
 * Knapper – etter designguiden «Knapper».
 * Hver stil er farge + form: oransje eller blå, og firkantet uten pil, pil ned
 * (lenger ned på siden), pil (intern lenke), skrå pil (ekstern lenke),
 * avrundet (funksjon) eller e-post.
 */
.wp-block-button.is-style-pil-ned .wp-block-button__link,
.wp-block-button.is-style-oransje-pil-ned .wp-block-button__link,
.wp-block-button.is-style-bla-pil-ned .wp-block-button__link,
.wp-block-button.is-style-pil .wp-block-button__link,
.wp-block-button.is-style-oransje-pil .wp-block-button__link,
.wp-block-button.is-style-bla-pil .wp-block-button__link,
.wp-block-button.is-style-pil-ekstern .wp-block-button__link,
.wp-block-button.is-style-oransje-ekstern .wp-block-button__link,
.wp-block-button.is-style-bla-ekstern .wp-block-button__link,
.wp-block-button.is-style-epost .wp-block-button__link,
.wp-block-button.is-style-oransje-epost .wp-block-button__link,
.wp-block-button.is-style-bla-epost .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 35px;
}

.wp-block-button.is-style-pil-ned .wp-block-button__link::after,
.wp-block-button.is-style-oransje-pil-ned .wp-block-button__link::after,
.wp-block-button.is-style-bla-pil-ned .wp-block-button__link::after,
.wp-block-button.is-style-pil .wp-block-button__link::after,
.wp-block-button.is-style-oransje-pil .wp-block-button__link::after,
.wp-block-button.is-style-bla-pil .wp-block-button__link::after,
.wp-block-button.is-style-pil-ekstern .wp-block-button__link::after,
.wp-block-button.is-style-oransje-ekstern .wp-block-button__link::after,
.wp-block-button.is-style-bla-ekstern .wp-block-button__link::after {
	content: "";
	flex: none;
	width: 16.5px;
	height: 14.7px;
	background: currentColor;
	-webkit-mask: url("../images/pil-hoyre.svg") center / contain no-repeat;
	mask: url("../images/pil-hoyre.svg") center / contain no-repeat;
}

.wp-block-button.is-style-pil-ned .wp-block-button__link::after,
.wp-block-button.is-style-oransje-pil-ned .wp-block-button__link::after,
.wp-block-button.is-style-bla-pil-ned .wp-block-button__link::after {
	transform: rotate(90deg);
}

.wp-block-button.is-style-pil-ekstern .wp-block-button__link::after,
.wp-block-button.is-style-oransje-ekstern .wp-block-button__link::after,
.wp-block-button.is-style-bla-ekstern .wp-block-button__link::after {
	transform: rotate(-45deg);
}

.wp-block-button.is-style-pille .wp-block-button__link,
.wp-block-button.is-style-oransje-pille .wp-block-button__link,
.wp-block-button.is-style-bla-pille .wp-block-button__link,
.wp-block-button.is-style-epost .wp-block-button__link,
.wp-block-button.is-style-oransje-epost .wp-block-button__link,
.wp-block-button.is-style-bla-epost .wp-block-button__link {
	border-radius: 40px;
	padding-inline: 44px;
}

.wp-block-button.is-style-epost .wp-block-button__link,
.wp-block-button.is-style-oransje-epost .wp-block-button__link,
.wp-block-button.is-style-bla-epost .wp-block-button__link {
	gap: 18px;
}

.wp-block-button.is-style-epost .wp-block-button__link::after,
.wp-block-button.is-style-oransje-epost .wp-block-button__link::after,
.wp-block-button.is-style-bla-epost .wp-block-button__link::after {
	content: "";
	flex: none;
	width: 22px;
	height: 17px;
	background: url("../images/ikon-epost.svg") center / contain no-repeat;
}

/* Farger. Hover: lys variant med tynn kant. */
.wp-block-button.is-style-oransje-firkant .wp-block-button__link,
.wp-block-button.is-style-oransje-pil-ned .wp-block-button__link,
.wp-block-button.is-style-oransje-pil .wp-block-button__link,
.wp-block-button.is-style-oransje-ekstern .wp-block-button__link,
.wp-block-button.is-style-oransje-pille .wp-block-button__link,
.wp-block-button.is-style-oransje-epost .wp-block-button__link {
	background-color: var(--wp--preset--color--knapp-oransje);
	color: var(--wp--preset--color--tekst);
}

.wp-block-button.is-style-oransje-firkant .wp-block-button__link:hover,
.wp-block-button.is-style-oransje-pil-ned .wp-block-button__link:hover,
.wp-block-button.is-style-oransje-pil .wp-block-button__link:hover,
.wp-block-button.is-style-oransje-ekstern .wp-block-button__link:hover,
.wp-block-button.is-style-oransje-pille .wp-block-button__link:hover,
.wp-block-button.is-style-oransje-epost .wp-block-button__link:hover,
.wp-block-button.is-style-oransje-firkant .wp-block-button__link:focus-visible,
.wp-block-button.is-style-oransje-pil-ned .wp-block-button__link:focus-visible,
.wp-block-button.is-style-oransje-pil .wp-block-button__link:focus-visible,
.wp-block-button.is-style-oransje-ekstern .wp-block-button__link:focus-visible,
.wp-block-button.is-style-oransje-pille .wp-block-button__link:focus-visible,
.wp-block-button.is-style-oransje-epost .wp-block-button__link:focus-visible {
	background-color: var(--wp--preset--color--bakgrunn-oransje);
	border-color: var(--wp--preset--color--oransje);
	color: var(--wp--preset--color--tekst);
}

.wp-block-button.is-style-bla-firkant .wp-block-button__link,
.wp-block-button.is-style-bla-pil-ned .wp-block-button__link,
.wp-block-button.is-style-bla-pil .wp-block-button__link,
.wp-block-button.is-style-bla-ekstern .wp-block-button__link,
.wp-block-button.is-style-bla-pille .wp-block-button__link,
.wp-block-button.is-style-bla-epost .wp-block-button__link {
	background-color: var(--wp--preset--color--knapp-bla);
	color: var(--wp--preset--color--tekst);
}

.wp-block-button.is-style-bla-firkant .wp-block-button__link:hover,
.wp-block-button.is-style-bla-pil-ned .wp-block-button__link:hover,
.wp-block-button.is-style-bla-pil .wp-block-button__link:hover,
.wp-block-button.is-style-bla-ekstern .wp-block-button__link:hover,
.wp-block-button.is-style-bla-pille .wp-block-button__link:hover,
.wp-block-button.is-style-bla-epost .wp-block-button__link:hover,
.wp-block-button.is-style-bla-firkant .wp-block-button__link:focus-visible,
.wp-block-button.is-style-bla-pil-ned .wp-block-button__link:focus-visible,
.wp-block-button.is-style-bla-pil .wp-block-button__link:focus-visible,
.wp-block-button.is-style-bla-ekstern .wp-block-button__link:focus-visible,
.wp-block-button.is-style-bla-pille .wp-block-button__link:focus-visible,
.wp-block-button.is-style-bla-epost .wp-block-button__link:focus-visible {
	background-color: var(--wp--preset--color--bakgrunn-bla);
	border-color: var(--wp--preset--color--knapp-bla);
	color: var(--wp--preset--color--tekst);
}

/*
 * Knapper med farge valgt under Farge → Bakgrunn. Fargeklassene fra paletten
 * bruker !important, så hover trenger egne regler.
 */
.wp-block-button__link.has-knapp-oransje-background-color:hover,
.wp-block-button__link.has-knapp-oransje-background-color:focus-visible {
	background-color: var(--wp--preset--color--bakgrunn-oransje) !important;
	border-color: var(--wp--preset--color--oransje) !important;
	color: var(--wp--preset--color--tekst) !important;
}

.wp-block-button__link.has-knapp-bla-background-color:hover,
.wp-block-button__link.has-knapp-bla-background-color:focus-visible {
	background-color: var(--wp--preset--color--bakgrunn-bla) !important;
	border-color: var(--wp--preset--color--knapp-bla) !important;
	color: var(--wp--preset--color--tekst) !important;
}

.wp-block-button__link.has-tekst-background-color:hover,
.wp-block-button__link.has-tekst-background-color:focus-visible {
	background-color: var(--wp--preset--color--knapp-oransje) !important;
	border-color: var(--wp--preset--color--knapp-oransje) !important;
	color: var(--wp--preset--color--tekst) !important;
}

.wp-block-button__link:is(.has-creme-background-color, .has-hvit-background-color, .has-bakgrunn-bla-background-color, .has-bakgrunn-oransje-background-color):hover,
.wp-block-button__link:is(.has-creme-background-color, .has-hvit-background-color, .has-bakgrunn-bla-background-color, .has-bakgrunn-oransje-background-color):focus-visible {
	border-color: var(--wp--preset--color--tekst) !important;
}

.wp-block-button__link:focus-visible {
	outline: 3px solid var(--wp--preset--color--oransje);
	outline-offset: 3px;
}

.is-style-lenke-pil a {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	text-decoration: none;
}

.is-style-lenke-pil a::after {
	content: "";
	width: 17px;
	height: 14px;
	background: url("../images/pil-lenke.svg") center / contain no-repeat;
}

/* ---------------------------------------------------------------------------
 * Seksjoner
 * ------------------------------------------------------------------------ */

.hlf-hero__title {
	max-width: 672px;
}

.hlf-hero .wp-block-column:last-child {
	display: flex;
}

/*
 * Det fargede feltet skal være like høyt som bildet. «Juster nederst» på en
 * kolonne gir den ellers bare innholdets høyde (align-self: flex-end). Her
 * strekkes kolonnen, og innholdet skyves ned inne i den i stedet.
 */
.hlf-hero > .wp-block-column {
	align-self: stretch;
}

.hlf-hero > .wp-block-column.is-vertically-aligned-bottom,
.hlf-hero > .wp-block-column.is-vertically-aligned-center {
	display: flex;
	flex-direction: column;
}

.hlf-hero > .wp-block-column.is-vertically-aligned-bottom {
	justify-content: flex-end;
}

.hlf-hero > .wp-block-column.is-vertically-aligned-center {
	justify-content: center;
}

.hlf-hero__image {
	flex: 1;
}

@media (max-width: 781px) {
	.hlf-hero__image {
		min-height: 360px !important;
		border-bottom-right-radius: 160px !important;
	}
}

.hlf-ingress {
	max-width: 864px;
	margin-inline-start: max(0px, calc((100% - var(--wp--style--global--wide-size)) / 2 + 90px)) !important;
}

@media (max-width: 1100px) {
	.hlf-ingress {
		margin-inline-start: 0 !important;
	}
}

.hlf-smal-tittel {
	max-width: 651px;
	margin-inline-start: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
}

.hlf-smal-tekst {
	max-width: 504px;
}

.hlf-hero__ingress {
	max-width: 706px;
}

/* Brødsmulesti: første ledd vises som hus-ikon, teksten er for skjermlesere. */
.hlf-brodsmulesti {
	color: color-mix(in srgb, currentColor 80%, transparent);
	line-height: 2;
}

.hlf-brodsmulesti a {
	color: inherit;
	text-decoration: none;
}

.hlf-brodsmulesti li:first-child a {
	display: inline-flex;
	font-size: 0;
	vertical-align: middle;
}

.hlf-brodsmulesti li:first-child a::before {
	content: "";
	width: 15px;
	height: 15px;
	background: currentColor;
	-webkit-mask: url("../images/ikon-hjem.svg") center / contain no-repeat;
	mask: url("../images/ikon-hjem.svg") center / contain no-repeat;
}

.hlf-brodsmulesti li:first-child a:focus-visible {
	outline: 2px solid var(--wp--preset--color--tekst);
	outline-offset: 2px;
}

/* Sjekkliste med oransje hake. */
.wp-block-list.is-style-sjekkliste {
	list-style: none;
	padding-inline-start: 0;
}

.wp-block-list.is-style-sjekkliste li {
	position: relative;
	margin: 0;
	padding: 10px 0 10px 33px;
}

.wp-block-list.is-style-sjekkliste li::before {
	content: "";
	position: absolute;
	top: 14px;
	left: 0;
	width: 18px;
	height: 19px;
	background: url("../images/ikon-sjekk.svg") center / contain no-repeat;
}

/*
 * Kort: hele kortet er klikkbart via «Les mer»-lenken.
 * Hover/fokus: rett hjørne, sterkere variant av fargen og pil ved «Les mer».
 */
.hlf-kort {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 372px;
	transition: background-color 0.2s ease, border-radius 0.2s ease;
}

.hlf-kort__tittel {
	margin: 0;
}

.hlf-kort .wp-block-separator {
	width: 100%;
	margin-block: 4px 12px;
	opacity: 1;
}

.hlf-kort__lenke {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: auto !important;
}

.hlf-kort__lenke::after {
	content: "";
	flex: none;
	width: 22px;
	height: 20px;
	background: currentColor;
	-webkit-mask: url("../images/pil-hoyre.svg") center / contain no-repeat;
	mask: url("../images/pil-hoyre.svg") center / contain no-repeat;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.hlf-kort__lenke a {
	text-decoration: none;
}

.hlf-kort__lenke a::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* I redigereren skal tittel og tekst kunne klikkes og redigeres. */
.editor-styles-wrapper .hlf-kort__lenke a::after,
.editor-styles-wrapper .hlf-nyhet .wp-block-post-title a::after {
	display: none;
}

.hlf-kort:is(:hover, :has(.hlf-kort__lenke a:focus-visible)) {
	border-bottom-right-radius: 0 !important;
}

.hlf-kort:is(:hover, :has(.hlf-kort__lenke a:focus-visible)) .hlf-kort__lenke::after {
	opacity: 1;
}

/* Sterkere variant av kortets farge. Fargeklassene bruker !important. */
.hlf-kort.has-bakgrunn-oransje-background-color:is(:hover, :has(.hlf-kort__lenke a:focus-visible)),
.hlf-kort.is-style-seksjon-fersken:is(:hover, :has(.hlf-kort__lenke a:focus-visible)) {
	background-color: var(--wp--preset--color--knapp-oransje) !important;
}

.hlf-kort.has-bakgrunn-bla-background-color:is(:hover, :has(.hlf-kort__lenke a:focus-visible)),
.hlf-kort.is-style-seksjon-isbla:is(:hover, :has(.hlf-kort__lenke a:focus-visible)),
.hlf-kort.has-creme-background-color:is(:hover, :has(.hlf-kort__lenke a:focus-visible)),
.hlf-kort.is-style-seksjon-creme:is(:hover, :has(.hlf-kort__lenke a:focus-visible)),
.hlf-kort.has-hvit-background-color:is(:hover, :has(.hlf-kort__lenke a:focus-visible)),
.hlf-kort.is-style-seksjon-hvit:is(:hover, :has(.hlf-kort__lenke a:focus-visible)) {
	background-color: var(--wp--preset--color--knapp-bla) !important;
}

.hlf-kort:has(.hlf-kort__lenke a:focus-visible) {
	outline: 3px solid var(--wp--preset--color--oransje);
	outline-offset: 3px;
}

.hlf-kort__lenke a:focus-visible {
	outline: none;
}

@media (prefers-reduced-motion: reduce) {
	.hlf-kort,
	.hlf-kort__lenke::after {
		transition: none;
	}
}

/* ---------------------------------------------------------------------------
 * Nyhetskort og karusell
 * ------------------------------------------------------------------------ */

.hlf-nyhet {
	position: relative;
	height: 100%;
	min-height: 450px;
	overflow: hidden;
}

.hlf-nyhet > .wp-block-group {
	flex: 1;
	width: 100%;
	box-sizing: border-box;
}

.hlf-nyhet .wp-block-post-featured-image {
	width: 100%;
	margin: 0;
}

.hlf-nyhet .wp-block-post-title {
	margin: 0;
}

.hlf-nyhet .wp-block-post-title a {
	text-decoration: none;
}

.hlf-nyhet .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.hlf-nyhet:focus-within {
	outline: 3px solid var(--wp--preset--color--oransje);
	outline-offset: 3px;
}

.hlf-nyhet .wp-block-post-title a:focus-visible {
	outline: none;
}

.hlf-nyhet .wp-block-post-terms {
	position: relative;
	z-index: 1;
}

.hlf-karusell .wp-block-post-template {
	display: flex;
	gap: clamp(20px, 3vw, 40px);
	margin: 0;
	padding: 4px clamp(16px, 4.4vw, 66px) 12px 4px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline-start: 4px;
	scrollbar-width: none;
	list-style: none;
}

.hlf-karusell .wp-block-post-template::-webkit-scrollbar {
	display: none;
}

.hlf-karusell .wp-block-post {
	flex: 0 0 290px;
	max-width: 80vw;
	margin: 0;
	scroll-snap-align: start;
}

.hlf-karusell__knapper {
	gap: 16px;
}

.hlf-karusell__knapp {
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--creme);
	color: var(--wp--preset--color--tekst);
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.hlf-karusell__knapp--neste {
	background: var(--wp--preset--color--knapp-oransje);
}

.hlf-karusell__knapp:hover {
	background: var(--wp--preset--color--bakgrunn-oransje);
}

.hlf-karusell__knapp:focus-visible {
	outline: 3px solid var(--wp--preset--color--tekst);
	outline-offset: 3px;
}

.hlf-karusell__knapp:disabled {
	opacity: 0.4;
	cursor: default;
}

.hlf-karusell__knapp::before {
	content: "";
	width: 25px;
	height: 15px;
	background: currentColor;
	-webkit-mask: url("../images/pil-hoyre.svg") center / contain no-repeat;
	mask: url("../images/pil-hoyre.svg") center / contain no-repeat;
}

.hlf-karusell__knapp--forrige::before {
	transform: scaleX(-1);
}

.hlf-nyhetsliste .wp-block-post {
	margin: 0;
}

/* ---------------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------------ */

.hlf-footer h3 {
	margin-bottom: 0;
}

.hlf-footer p {
	margin: 0;
}

.hlf-footer .wp-block-list {
	margin: 0;
	padding-inline-start: 1.2em;
}

.hlf-footer a[href^="tel:"] {
	text-decoration: none;
}

.hlf-footer__nav .wp-block-navigation-item__content {
	line-height: 1.75;
}

/* ---------------------------------------------------------------------------
 * Tilgjengelighet
 * ------------------------------------------------------------------------ */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.hlf-karusell .wp-block-post-template {
		scroll-behavior: auto;
	}
}

/* ---------------------------------------------------------------------------
 * Lenker
 * ------------------------------------------------------------------------ */

/*
 * Lenker har ingen understrek. I løpende tekst har de samme farge som teksten,
 * så der får de halvfet skrift for å kunne skilles fra teksten rundt
 * (krav i WCAG 1.4.1). Knapper, menyer, kort og brødsmuler har egne klasser
 * og påvirkes ikke.
 */
main :is(p, li) > a:not([class]) {
	font-weight: 600;
}

main .wp-block-breadcrumbs li > a:not([class]) {
	font-weight: inherit;
}
