/**
 * Kampanjsidor – moduler, arkiv och nyhetsbrevs-CTA (inc/kampanjsidor.php).
 * Mått från Figma-registret i CLAUDE.md. Media queries ligger SIST i filen:
 * selektorerna har låg specificitet, så källordningen avgör vilken regel som vinner.
 */

/* ---------- Modulram ---------- */

.hs-km {
	box-sizing: border-box;
	width: min(1248px, calc(100% - 64px));
	margin: 0 auto 48px;
	color: #000;
}

.hs-km *,
.hs-km *::before,
.hs-km *::after {
	box-sizing: border-box;
}

.hs-km-placeholder {
	padding: 24px;
	border: 1px dashed #999;
	border-radius: 6px;
	color: #646464;
	font-size: 14px;
	text-align: center;
}

/* ---------- Brödsmula ---------- */

.hs-km-crumbs {
	display: flex;
	align-items: center;
	gap: 4px;
	width: min(1248px, calc(100% - 64px));
	min-height: 24px;
	margin: 30px auto 0;
	font-family: 'Satoshi Medium', sans-serif;
	font-weight: 500;
	font-size: 14px;
	line-height: 20px;
	color: #464646;
}

.hs-km-crumbs__link {
	flex: none;
	font-family: 'Satoshi Bold', sans-serif;
	font-weight: 700;
	line-height: 22px;
	color: #464646;
	text-decoration: none;
}

.hs-km-crumbs__sep {
	flex: none;
	width: 24px;
	height: 24px;
}

.hs-km-crumbs__current {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* ---------- Brödtext (rich text) ---------- */

.hs-km-rich p,
.hs-km-rich ul,
.hs-km-rich ol {
	margin: 0 0 22px;
}

.hs-km-rich ul,
.hs-km-rich ol {
	padding-left: 20px;
}

.hs-km-rich > :last-child {
	margin-bottom: 0;
}

.hs-km-rich strong,
.hs-km-rich b,
.hs-km-rich a {
	font-family: 'Satoshi Bold', sans-serif;
	font-weight: 700;
}

/* Figma-kommentar: länkar i fetstil, ingen understrykning. */
.hs-km-rich a {
	color: inherit;
	text-decoration: none;
}

.hs-km-rich a:hover {
	color: #464646;
}

/* ---------- Banner (Toppbanner 1/2/3) ---------- */

.hs-km-banner {
	display: grid;
	gap: 16px;
	padding: 8px 0;
}

.hs-km-banner--two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hs-km-banner--three {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hs-km-banner__item {
	position: relative;
}

.hs-km-banner__frame {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 12 / 5;
	border-radius: 6px;
	background-color: #e7e7e7;
}

.hs-km-banner--two .hs-km-banner__frame {
	aspect-ratio: 1 / 1;
}

.hs-km-banner--three .hs-km-banner__frame {
	aspect-ratio: 4 / 5;
}

.hs-km-banner__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hs-km-banner__item.is-empty .hs-km-banner__frame {
	display: flex;
	align-items: center;
	justify-content: center;
}

.hs-km-banner__hint {
	font-size: 14px;
	color: #646464;
}

/* Video: ligger över bilden och tonas in först när den faktiskt spelar. */
.hs-km-video {
	--hs-km-cover: 1.35; /* 12:5-ruta täckt av 16:9-iframe */
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.4s ease;
}

.hs-km-banner--two .hs-km-video {
	--hs-km-cover: 1.7778;
}

.hs-km-banner--three .hs-km-video {
	--hs-km-cover: 2.2223;
}

.hs-km-video.is-playing {
	opacity: 1;
}

.hs-km-video video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hs-km-video iframe {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	height: 100%;
	border: 0;
	transform: translate(-50%, -50%) scale(var(--hs-km-cover));
}

.hs-km-play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	width: 64px;
	height: 64px;
	margin: -32px 0 0 -32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	cursor: pointer;
	transition: opacity 0.3s ease, visibility 0s;
}

.hs-km-play:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 4px;
}

/* visibility (inte bara opacity) så att dolda knappar inte går att tabba till. */
.hs-km-banner__item.is-playing .hs-km-play {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease, visibility 0s 0.3s;
}

/* "Startas av besökaren": vanlig spelare – hela videon syns (ingen beskärning), kontrollerna är klickbara. */
.hs-km-banner__item.is-click .hs-km-video {
	--hs-km-cover: 1;
	background-color: #000;
}

.hs-km-banner__item.is-click.is-playing .hs-km-video {
	pointer-events: auto;
}

.hs-km-banner__item.is-click .hs-km-video video {
	object-fit: contain;
}

.hs-km-banner__item.is-click .hs-km-pause {
	display: none;
}

/* Klick på en videoruta utan länk pausar (se kampanjsidor.js). */
.hs-km-banner__item.has-video div.hs-km-banner__frame {
	cursor: pointer;
}

/* Paus (WCAG 2.2.2): syns vid hover/fokus när videon spelar, alltid på pekskärm (media query sist). */
.hs-km-pause {
	position: absolute;
	right: 16px;
	bottom: 16px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: rgba(22, 22, 22, 0.6);
	cursor: pointer;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, background-color 0.2s ease;
}

.hs-km-banner__item.is-playing .hs-km-pause {
	visibility: visible;
}

.hs-km-pause span {
	display: block;
	width: 12px;
	height: 14px;
	border-right: 4px solid #fff;
	border-left: 4px solid #fff;
}

.hs-km-banner__item.is-playing:hover .hs-km-pause,
.hs-km-banner__item.is-playing .hs-km-pause:focus-visible {
	opacity: 1;
	pointer-events: auto;
}

.hs-km-pause:hover {
	background-color: rgba(22, 22, 22, 0.85);
}

.hs-km-pause:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.hs-km-play__ring {
	display: block;
	width: 64px;
	height: 64px;
}

/* Figma 5004:14162: 37,209 px-ruta roterad 90°, triangeln inset 5,38 % / 10,63 % / 25 %. */
.hs-km-play__tri {
	position: absolute;
	top: 13.395px;
	left: 13.395px;
	width: 37.209px;
	height: 37.209px;
	transform: rotate(90deg);
}

.hs-km-play__tri img {
	position: absolute;
	top: 5.38%;
	right: 10.63%;
	bottom: 25%;
	left: 10.63%;
	display: block;
	width: 78.74%;
	height: 69.62%;
}

/* ---------- Text centrerad ---------- */

.hs-km-text-center {
	padding: 24px 0;
}

.hs-km-text-center__inner {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: min(820px, 100%);
	margin: 0 auto;
	text-align: center;
}

/* Figma-textrutan är 37 px hög med 48 px radhöjd → negativ marginal håller måtten. */
.hs-km-text-center__title {
	margin: -5.5px 0;
	font-family: 'Satoshi Bold', sans-serif;
	font-weight: 700;
	font-size: 40px;
	line-height: 48px;
	letter-spacing: 0;
	text-transform: none;
	color: #000;
}

.hs-km-text-center__text,
.hs-km-text-columns__text {
	font-family: 'Satoshi Medium', sans-serif;
	font-weight: 500;
	font-size: 16px;
	line-height: 22px;
	color: #000;
}

/* ---------- Text 2 spalter ---------- */

.hs-km-text-columns {
	display: flex;
	justify-content: space-between;
	gap: 64px;
	padding: 32px 0;
}

.hs-km-text-columns__col {
	display: flex;
	flex: 0 1 592px;
	flex-direction: column;
	gap: 24px;
}

.hs-km-text-columns__title {
	margin: 0;
	font-family: 'Satoshi Bold', sans-serif;
	font-weight: 700;
	font-size: 24px;
	line-height: 28px;
	letter-spacing: 0;
	text-transform: none;
	color: #000;
}

/* ---------- Produktserie (grid/slider i kampanjläge) ---------- */

.hs-km-products {
	padding: 24px 0;
}

.hs-km-series-head {
	display: flex;
	align-items: center;
	gap: 24px;
	margin-bottom: 16px;
}

.hs-km-series-head__line {
	flex: 1 1 0;
	min-width: 16px;
	height: 1px;
	background-color: #999;
}

.hs-km-series-head__title {
	margin: 0;
	font-family: 'Countach Bold-Italic', sans-serif;
	font-weight: 700;
	font-size: 32px;
	line-height: 32px;
	letter-spacing: 0.3px;
	text-align: center;
	text-transform: uppercase;
	white-space: nowrap;
	color: #161616;
}

/* ---------- Nyhetsbrevs-CTA ---------- */

.hs-km-nl {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 447px;
	padding: 48px 24px;
	overflow: hidden;
	border-radius: 16px;
	background-color: #161616;
	color: #fff;
}

.hs-km-nl__bg {
	position: absolute;
	max-width: none;
	pointer-events: none;
}

/* Figma 4926:11564: 774×637, centrum förskjutet +354/+16 px. */
.hs-km-nl__bg--d {
	top: calc(50% - 302.5px);
	left: calc(50% - 33px);
	width: 774px;
	height: 637px;
}

.hs-km-nl__bg--m {
	display: none;
}

.hs-km-nl__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 32px;
	width: 100%;
	text-align: center;
}

.hs-km-nl__heads {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 32px;
}

.hs-km-nl__kicker,
.hs-km-nl__title {
	margin: 0;
	font-family: 'Countach Bold-Italic', sans-serif;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: none;
	text-shadow: 11px 11px 13px rgba(0, 0, 0, 0.08);
	text-box: trim-both cap alphabetic;
}

.hs-km-nl__kicker {
	font-size: 48px;
	line-height: 96px;
	color: #ffffb7;
}

.hs-km-nl__title {
	font-size: 64px;
	line-height: 77px;
	color: #fff;
}

.hs-km-nl__br {
	display: none;
}

.hs-km-nl__formwrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	width: 100%;
}

.hs-km-nl__form {
	display: flex;
	gap: 16px;
	width: 597px;
	max-width: 100%;
	margin: 0;
}

/* Dubbel klass: slår temats input[type=email]/button-regler (0,1,1). */
.hs-km-nl .hs-km-nl__input {
	flex: 0 0 424px;
	min-width: 0;
	height: 46px;
	margin: 0;
	padding: 11px 16px;
	border: 1px solid #999;
	border-radius: 8px;
	background-color: #fff;
	font-family: 'Satoshi Medium', sans-serif;
	font-weight: 500;
	font-size: 16px;
	line-height: 22px;
	color: #161616;
	text-align: left;
}

.hs-km-nl .hs-km-nl__input::placeholder {
	color: #999;
	opacity: 1;
}

.hs-km-nl .hs-km-nl__btn {
	flex: 1 1 auto;
	height: 46px;
	margin: 0;
	padding: 12px 24px;
	border: 1px solid #fff;
	border-radius: 8px;
	background-color: transparent;
	font-family: 'Satoshi Medium', sans-serif;
	font-weight: 500;
	font-size: 16px;
	line-height: 22px;
	color: #fff;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.hs-km-nl .hs-km-nl__btn:hover,
.hs-km-nl .hs-km-nl__btn:focus-visible {
	background-color: #fff;
	color: #161616;
}

.hs-km-nl .hs-km-nl__btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.hs-km-nl__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.hs-km-nl__legal {
	width: 424px;
	max-width: 100%;
	margin: 0;
	font-family: 'Satoshi Medium', sans-serif;
	font-weight: 500;
	font-size: 12px;
	line-height: 20px;
	color: #fff;
}

.hs-km-nl__legal a {
	color: #fff;
	text-decoration: underline;
}

.hs-km-nl__msg {
	margin: 0;
	font-family: 'Satoshi Bold', sans-serif;
	font-weight: 700;
	font-size: 16px;
	line-height: 22px;
	color: #ffffb7;
}

/* ---------- Arkiv ---------- */

.hs-km-archive .hs-km-crumbs {
	min-height: 22px;
	line-height: 22px;
}

.hs-km-archive__intro {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: min(820px, calc(100% - 64px));
	margin: 32px auto 24px;
	padding-top: 8px;
	text-align: center;
}

.hs-km-archive__title {
	margin: -5.5px 0 18.5px;
	font-family: 'Satoshi Bold', sans-serif;
	font-weight: 700;
	font-size: 40px;
	line-height: 48px;
	letter-spacing: 0;
	text-transform: none;
	color: #000;
}

.hs-km-archive__text {
	max-height: 44px; /* 2 rader à 22 px */
	overflow: hidden;
	font-family: 'Satoshi Medium', sans-serif;
	font-weight: 500;
	font-size: 16px;
	line-height: 22px;
	color: #000;
}

.hs-km-archive__text.is-open {
	max-height: none;
}

.hs-km-readmore {
	display: inline-flex;
	align-items: center;
	height: 22px;
	margin-top: 22px;
	padding: 0;
	border: 0;
	background: none;
	font-family: 'Satoshi Medium', sans-serif;
	font-weight: 500;
	font-size: 16px;
	line-height: 22px;
	color: #000;
	cursor: pointer;
}

.hs-km-readmore[hidden] {
	display: none;
}

.hs-km-readmore img {
	width: 24px;
	height: 24px;
	transition: transform 0.2s ease;
}

.hs-km-readmore[aria-expanded="true"] img {
	transform: rotate(180deg);
}

.hs-km-archive__grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: 16px;
	row-gap: 48px;
	width: min(1248px, calc(100% - 64px));
	margin: 0 auto;
}

.hs-km-card {
	grid-column: span 3;
}

.hs-km-card--featured {
	grid-column: span 4;
}

.hs-km-card__link {
	display: flex;
	flex-direction: column;
	gap: 16px;
	color: inherit;
	text-decoration: none;
}

.hs-km-card__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	border-radius: 6px;
	background-color: #e7e7e7;
}

.hs-km-card__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.hs-km-card__link:hover .hs-km-card__img {
	transform: scale(1.03);
}

.hs-km-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.hs-km-card__title {
	margin: 0;
	font-family: 'Satoshi Bold', sans-serif;
	font-weight: 700;
	font-size: 28px;
	line-height: 36px;
	letter-spacing: 0;
	text-transform: none;
	color: #000;
}

.hs-km-card__text {
	margin: 0;
	font-family: 'Satoshi Medium', sans-serif;
	font-weight: 500;
	font-size: 20px;
	line-height: 27px;
	color: #464646;
}

.hs-km-archive__empty {
	width: min(820px, calc(100% - 64px));
	margin: 0 auto;
	text-align: center;
}

.hs-km-pager {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	width: max-content;
	min-width: 300px;
	margin: 32px auto 0;
}

.hs-km-pager__btn {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 8px;
	border-radius: 4px;
	background-color: #000;
	transition: opacity 0.2s ease;
}

.hs-km-pager__btn:hover {
	opacity: 0.8;
}

.hs-km-pager__btn.is-disabled {
	opacity: 0.25;
}

.hs-km-pager__btn img {
	display: block;
	width: 24px;
	height: 24px;
}

.hs-km-pager__btn--prev img {
	transform: rotate(180deg);
}

.hs-km-pager__nums {
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: 'Satoshi Medium', sans-serif;
	font-weight: 500;
	font-size: 16px;
	line-height: 22px;
}

.hs-km-pager__nums .page-numbers {
	color: #646464;
	text-decoration: none;
}

.hs-km-pager__nums .current {
	font-family: 'Satoshi Bold', sans-serif;
	font-weight: 700;
	color: #000;
}

.hs-km-archive .hs-km-nl {
	margin-top: 63px;
	margin-bottom: 32px;
}

/* ---------- Lösenordsspärr ---------- */

.hs-km-gate {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	width: min(520px, calc(100% - 32px));
	margin: 96px auto;
	text-align: center;
	color: #000;
}

.hs-km-gate__title {
	margin: 0;
	font-family: 'Satoshi Bold', sans-serif;
	font-weight: 700;
	font-size: 40px;
	line-height: 48px;
	text-transform: none;
	color: #000;
}

.hs-km-gate__text,
.hs-km-gate__error {
	margin: 0;
	font-family: 'Satoshi Medium', sans-serif;
	font-weight: 500;
	font-size: 16px;
	line-height: 22px;
}

.hs-km-gate__error {
	color: #ea0000;
}

.hs-km-gate__form {
	display: flex;
	gap: 16px;
	width: 100%;
	margin: 0;
}

.hs-km-gate .hs-km-gate__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 46px;
	margin: 0;
	padding: 11px 16px;
	border: 1px solid #999;
	border-radius: 8px;
	background-color: #fff;
	font-family: 'Satoshi Medium', sans-serif;
	font-size: 16px;
	line-height: 22px;
	color: #161616;
	text-align: left;
}

.hs-km-gate .hs-km-gate__btn {
	flex: none;
	height: 46px;
	margin: 0;
	padding: 12px 24px;
	border: 1px solid #161616;
	border-radius: 8px;
	background-color: #161616;
	font-family: 'Satoshi Medium', sans-serif;
	font-size: 16px;
	line-height: 22px;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.hs-km-gate .hs-km-gate__btn:hover,
.hs-km-gate .hs-km-gate__btn:focus-visible {
	background-color: #fff;
	color: #161616;
}

/* ================= Media queries – ska ligga sist ================= */

/* Pekskärm saknar hover → pausknappen syns hela tiden medan videon spelar. */
@media (hover: none) {
	.hs-km-banner__item.is-playing .hs-km-pause {
		opacity: 1;
		pointer-events: auto;
	}
}

/* Under 992 px: 2 kolumner i arkivet (som sajtens produktgrid) med mobiltypografi. */
@media (max-width: 991px) {
	.hs-km-archive__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: 32px;
	}

	.hs-km-card,
	.hs-km-card--featured {
		grid-column: auto;
	}

	.hs-km-card__title {
		font-size: 24px;
		line-height: 28px;
	}

	.hs-km-card__text {
		font-size: 16px;
		line-height: 22px;
	}
}

/* Mobil – Figma-frames M / Landningssida Exempel (5004:14205) och M / Nyheter Samlingssida (4926:12225). */
@media (max-width: 767px) {
	.hs-km {
		width: calc(100% - 32px);
		margin-bottom: 0;
	}

	.hs-km-crumbs {
		width: calc(100% - 32px);
		margin-top: 32px;
	}

	body.single-hs_kampanj #brx-content {
		padding-bottom: 48px;
	}

	.hs-km-banner {
		padding: 4px 0;
	}

	.hs-km-banner--two {
		gap: 8px;
	}

	.hs-km-banner--three {
		grid-template-columns: 1fr;
		padding: 8px 0;
	}

	.hs-km-banner--hero .hs-km-banner__frame {
		aspect-ratio: 1 / 1;
		border-radius: 4px;
	}

	.hs-km-banner--two .hs-km-banner__frame {
		border-radius: 4px;
	}

	.hs-km-banner--hero .hs-km-video {
		--hs-km-cover: 1.7778;
	}

	.hs-km-text-center {
		padding: 16px 0;
	}

	.hs-km-text-center__inner {
		gap: 16px;
	}

	.hs-km-text-center__title {
		margin: 0;
		font-size: 24px;
		line-height: 28px;
	}

	.hs-km-text-columns {
		flex-direction: column;
		gap: 64px;
	}

	.hs-km-text-columns__col {
		flex-basis: auto;
	}

	.hs-km-series-head {
		gap: 8px;
		margin-bottom: 8px;
	}

	.hs-km-series-head__title {
		font-size: 24px;
		white-space: normal;
		text-wrap: balance;
	}

	.hs-km-nl {
		min-height: 549px;
		padding: 48px 16px;
	}

	.hs-km-nl__bg--d {
		display: none;
	}

	/* Figma 4926:12624: 505×417, centrerad (+0,5 px). */
	.hs-km-nl__bg--m {
		top: calc(50% - 208.5px);
		left: calc(50% - 252px);
		display: block;
		width: 505px;
		height: 417px;
	}

	.hs-km-nl__inner {
		top: 12px;
		width: min(296px, 100%);
	}

	.hs-km-nl__heads {
		gap: 24px;
	}

	.hs-km-nl__kicker {
		font-size: 24px;
		line-height: 29px;
	}

	.hs-km-nl__title {
		font-size: 46px;
		line-height: 46px;
	}

	.hs-km-nl__br {
		display: inline;
	}

	.hs-km-nl__formwrap {
		gap: 16px;
	}

	.hs-km-nl__form {
		flex-direction: column;
		width: 100%;
	}

	.hs-km-nl .hs-km-nl__input {
		flex: none;
		width: 100%;
	}

	.hs-km-nl .hs-km-nl__btn {
		flex: none;
		width: 100%;
	}

	.hs-km-nl__legal {
		width: 100%;
	}

	.hs-km-archive__intro {
		width: calc(100% - 32px);
		margin: 18px auto 32px;
		padding-top: 0;
	}

	.hs-km-archive__title {
		margin: 0 0 16px;
		font-size: 32px;
		line-height: 38px;
	}

	.hs-km-archive__text {
		max-height: 110px; /* 5 rader à 22 px */
	}

	.hs-km-archive__grid {
		width: calc(100% - 32px);
	}

	.hs-km-pager {
		margin-top: 40px;
	}

	.hs-km-archive .hs-km-nl {
		margin-top: 88px;
		margin-bottom: 79px;
	}

	.hs-km-gate {
		margin: 48px auto;
	}

	.hs-km-gate__title {
		font-size: 32px;
		line-height: 38px;
	}

	.hs-km-gate__form {
		flex-direction: column;
	}
}
