.nyhet-single__content.theme-section {
	padding-block: clamp(3rem, 7vw, 5.5rem);
	background: var(--wp--preset--color--white, #fff);
	color: var(--wp--preset--color--contrast, #000);
}

.nyhet-single__inner {
	width: min(100% - var(--theme-page-gutter) - var(--theme-page-gutter), 52rem);
	margin-inline: auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(1.5rem, 3vw, 2rem);
}

.nyhet-single__inner--with-media {
	width: min(100% - var(--theme-page-gutter) - var(--theme-page-gutter), 72rem);
	grid-template-areas:
		"intro"
		"media"
		"body"
		"back";
}

.nyhet-single__intro {
	grid-area: intro;
}

.nyhet-single__body {
	grid-area: body;
}

.nyhet-single__back {
	grid-area: back;
	margin: 0;
}

.nyhet-single__media {
	grid-area: media;
}

.nyhet-single__eyebrow {
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 0.02em;
	color: color-mix(in srgb, var(--wp--preset--color--contrast, #000) 55%, transparent);
}

.nyhet-single__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--heading-2);
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.2;
	text-transform: none;
}

.nyhet-single__rule {
	width: 5rem;
	max-width: 100%;
	height: 0;
	margin: 1.25rem 0 0;
	border: 0;
	border-top: 1px solid currentColor;
}

.nyhet-single__meta {
	margin: 1rem 0 0;
	font-size: 0.9375rem;
	font-style: italic;
	line-height: 1.4;
	color: color-mix(in srgb, var(--wp--preset--color--contrast, #000) 55%, transparent);
}

.nyhet-single__body {
	font-size: var(--wp--preset--font-size--body, 1.125rem);
	font-weight: 400;
	line-height: 1.5;
}

.nyhet-single__body > * {
	margin-block: 0;
}

.nyhet-single__body > * + * {
	margin-top: 0.85em;
}

.nyhet-single__body p:empty,
.nyhet-single__body p:has(> br:only-child) {
	display: none;
}

.nyhet-single__body h2,
.nyhet-single__body h3,
.nyhet-single__body h4 {
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.25;
	text-transform: none;
}

.nyhet-single__body h2 {
	font-size: var(--wp--preset--font-size--heading-3, 1.5rem);
	margin-top: 1.5em;
}

.nyhet-single__body h3,
.nyhet-single__body h4 {
	font-size: var(--wp--preset--font-size--heading-4, 1.25rem);
	margin-top: 1.35em;
}

.nyhet-single__body > * + h2,
.nyhet-single__body > * + h3,
.nyhet-single__body > * + h4 {
	margin-top: 1.5em;
}

.nyhet-single__body a {
	color: var(--wp--preset--color--blue-900, #0c2130);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.nyhet-single__body a:hover,
.nyhet-single__body a:focus-visible {
	color: var(--wp--preset--color--blue-700, #0e6a9a);
}

.nyhet-single__body blockquote {
	margin-inline: 0;
	padding-inline-start: 1.25rem;
	border-inline-start: 2px solid var(--wp--preset--color--blue-900, #0c2130);
	font-style: italic;
}

.nyhet-single__back-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--wp--preset--color--blue-900, #0c2130);
	font-size: 1rem;
	text-decoration: none;
}

.nyhet-single__back-link:hover,
.nyhet-single__back-link:focus-visible {
	color: var(--wp--preset--color--blue-700, #0e6a9a);
}

@media (min-width: 960px) {
	.nyhet-single__inner--with-media {
		grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem);
		column-gap: clamp(2rem, 4vw, 3.5rem);
		row-gap: clamp(1.5rem, 3vw, 2rem);
		grid-template-areas:
			"intro media"
			"body media"
			"back media";
		align-items: start;
	}

	.nyhet-single__media {
		position: sticky;
		/* Match content padding under the fixed header so the gap stays constant while stuck. */
		top: calc(var(--theme-header-height, 4.5rem) + clamp(3rem, 7vw, 5.5rem));
	}
}

/* Media slider */
.nyhet-media__viewport {
	position: relative;
	overflow: hidden;
	background: var(--wp--preset--color--blue-100, #f3f3f3);
}

.nyhet-media__slide {
	margin: 0;
}

.nyhet-media__slide[hidden] {
	display: none;
}

.nyhet-media__open {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: zoom-in;
}

.nyhet-media__image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	vertical-align: middle;
}

.nyhet-media__controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 0.85rem;
}

.nyhet-media__counter {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.3;
	letter-spacing: 0.02em;
	color: color-mix(in srgb, var(--wp--preset--color--contrast, #000) 60%, transparent);
	font-variant-numeric: tabular-nums;
}

.nyhet-media__nav {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-left: auto;
}

.nyhet-media__nav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--blue-900, #0c2130);
	color: var(--wp--preset--color--white, #fff);
	font-size: 1.125rem;
	line-height: 1;
	cursor: pointer;
}

.nyhet-media__nav-btn:hover,
.nyhet-media__nav-btn:focus-visible {
	background: color-mix(in srgb, var(--wp--preset--color--blue-900, #0c2130) 82%, white);
	color: var(--wp--preset--color--white, #fff);
}

/* Lightbox */
.nyhet-lightbox {
	padding: 0;
	border: 0;
	background: transparent;
	max-width: none;
	max-height: none;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.nyhet-lightbox::backdrop {
	background: color-mix(in srgb, #000 78%, transparent);
}

.nyhet-lightbox__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	padding: clamp(3.5rem, 7vw, 5rem) clamp(1.25rem, 4vw, 3rem);
	box-sizing: border-box;
	overflow: hidden;
}

.nyhet-lightbox__stage {
	max-width: min(100%, 72rem);
	max-height: 100%;
	overflow: hidden;
}

.nyhet-lightbox__slide {
	margin: 0;
	text-align: center;
}

.nyhet-lightbox__slide[hidden] {
	display: none;
}

.nyhet-lightbox__image {
	display: block;
	max-width: 100%;
	max-height: calc(100dvh - 7rem);
	width: auto;
	height: auto;
	margin-inline: auto;
	object-fit: contain;
}

.nyhet-lightbox__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--blue-900, #0c2130);
	color: var(--wp--preset--color--white, #fff);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.nyhet-lightbox__nav {
	position: absolute;
	top: 50%;
	right: 1rem;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	transform: translateY(-50%);
}

.nyhet-lightbox__nav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--blue-900, #0c2130);
	color: var(--wp--preset--color--white, #fff);
	font-size: 1.125rem;
	line-height: 1;
	cursor: pointer;
}

.nyhet-lightbox__close:hover,
.nyhet-lightbox__close:focus-visible,
.nyhet-lightbox__nav-btn:hover,
.nyhet-lightbox__nav-btn:focus-visible {
	background: color-mix(in srgb, var(--wp--preset--color--blue-900, #0c2130) 82%, white);
	color: var(--wp--preset--color--white, #fff);
}

html:has(.nyhet-lightbox[open]),
html.nyhet-lightbox-open,
html:has(.nyhet-lightbox[open]) body,
html.nyhet-lightbox-open body {
	overflow: hidden;
}

.nyhet-single__related.theme-section {
	padding-block: clamp(3rem, 7vw, 5.5rem);
	background: var(--wp--preset--color--white, #fff);
	color: var(--wp--preset--color--contrast, #000);
}

.nyhet-single__related-inner {
	width: min(100% - var(--theme-page-gutter) - var(--theme-page-gutter), 72rem);
	margin-inline: auto;
}

.nyhet-single__content + .nyhet-single__related.theme-section {
	padding-top: clamp(1.25rem, 3vw, 2rem);
}

/* Without media: single column keeps intro/body/back flow */
.nyhet-single__inner:not(.nyhet-single__inner--with-media) .nyhet-single__intro,
.nyhet-single__inner:not(.nyhet-single__inner--with-media) .nyhet-single__body,
.nyhet-single__inner:not(.nyhet-single__inner--with-media) .nyhet-single__back {
	grid-area: auto;
}
