.wp-block-wm-designer-hero-header {margin-block-start: unset!important;}

.hero-header-wrap {
	--hero-header-inset: 26px;
	position: relative;
	/* clip (inte hidden): klipper den överskannade parallax-bilden visuellt utan att
	   göra wrappen till en scroll-container – annars bryts scroll-driven-animationens
	   tidslinje och bilden står still. */
	overflow: clip;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 400px;
	padding: 0;
}

.hero-header-wrap .hero-header__image,
.hero-header-wrap .hero-header__video {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--hero-object-position, 50% 50%);
}

/* Parallax-effekten (scroll-driven animation) ligger numera på EN enda plats:
   temats functions.php (cover_parallax_inline). Den träffar både hero och cover, och
   är därför den enda platsen där rörelse/överskanning ställs in. Reglerna ovan är bara
   den statiska grunden (cover) som visas när parallax inte stöds. */

.hero-header-wrap .hero-header__video {
	pointer-events: none;
}

.hero-header-wrap .hero-header__scrim {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.hero-header-wrap .hero-header__foreground,
.hero-header-wrap .hero-header__content {
	position: relative;
	z-index: 1;
	max-width: 100%;
}

.hero-header-wrap.hero-header--simple .hero-header__foreground,
.hero-header-wrap.hero-header--simple .hero-header__content {
	width: 100%;
	max-width: 100%;
}

.hero-header-wrap:not(.hero-header--simple) .hero-header__foreground,
.hero-header-wrap:not(.hero-header--simple) .hero-header__content {
	width: 100%;
}

.hero-header-wrap .hero-header__overlay {
	padding: var(--hero-header-inset, 26px);
	box-sizing: border-box;
}

.hero-header-wrap .hero-header__overlay .hero-header__shell {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--space-sm, 1rem);
	box-sizing: border-box;
}

.hero-header-wrap.hero-header--simple .hero-header__overlay .hero-header__shell {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	align-items: flex-start;
}

.hero-header-wrap[data-layout="advanced"] .hero-header__overlay {
	min-height: 100%;
	width: 100%;
}

.hero-header-wrap[data-layout="advanced"] .hero-header__overlay .hero-header__shell {
	width: 100%;
	max-width: 100%;
	flex: 1 1 auto;
	min-height: 0;
	align-self: stretch;
}

.hero-header__foreground.hero-header__shell {
	display: flex;
	flex-direction: column;
	padding: var(--hero-header-inset, 26px);
	box-sizing: border-box;
	gap: var(--wp--preset--spacing--space-sm, 1rem);
}

.hero-header-wrap.hero-header--simple .hero-header__foreground.hero-header__shell {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	align-items: flex-start;
}

/* Enkel layout: 9-prickar horisontellt = align-items (shell är kolumn-flex). Vertikalt = fortfarande wrap. */
.hero-header-wrap.hero-header--simple.is-position-top-left .hero-header__foreground.hero-header__shell,
.hero-header-wrap.hero-header--simple.is-position-center-left .hero-header__foreground.hero-header__shell,
.hero-header-wrap.hero-header--simple.is-position-bottom-left .hero-header__foreground.hero-header__shell,
.hero-header-wrap.hero-header--simple.is-position-top-left .hero-header__overlay .hero-header__shell,
.hero-header-wrap.hero-header--simple.is-position-center-left .hero-header__overlay .hero-header__shell,
.hero-header-wrap.hero-header--simple.is-position-bottom-left .hero-header__overlay .hero-header__shell {
	align-items: flex-start;
}

.hero-header-wrap.hero-header--simple.is-position-top-center .hero-header__foreground.hero-header__shell,
.hero-header-wrap.hero-header--simple.is-position-center-center .hero-header__foreground.hero-header__shell,
.hero-header-wrap.hero-header--simple.is-position-bottom-center .hero-header__foreground.hero-header__shell,
.hero-header-wrap.hero-header--simple.is-position-top-center .hero-header__overlay .hero-header__shell,
.hero-header-wrap.hero-header--simple.is-position-center-center .hero-header__overlay .hero-header__shell,
.hero-header-wrap.hero-header--simple.is-position-bottom-center .hero-header__overlay .hero-header__shell {
	align-items: center;
}

.hero-header-wrap.hero-header--simple.is-position-top-right .hero-header__foreground.hero-header__shell,
.hero-header-wrap.hero-header--simple.is-position-center-right .hero-header__foreground.hero-header__shell,
.hero-header-wrap.hero-header--simple.is-position-bottom-right .hero-header__foreground.hero-header__shell,
.hero-header-wrap.hero-header--simple.is-position-top-right .hero-header__overlay .hero-header__shell,
.hero-header-wrap.hero-header--simple.is-position-center-right .hero-header__overlay .hero-header__shell,
.hero-header-wrap.hero-header--simple.is-position-bottom-right .hero-header__overlay .hero-header__shell {
	align-items: flex-end;
}

/* Grid/flex-group: full bredd. Övriga block: auto + align-items (9 prickar). */
.hero-header-wrap.hero-header--simple .hero-header__shell > :not(.hero-header__page-hero) {
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.hero-header-wrap.hero-header--simple .hero-header__shell > .wp-block-group:not(.hero-header__page-hero),
.hero-header-wrap.hero-header--simple .hero-header__shell > .wp-block-columns {
	width: 100%;
	max-width: 100%;
}

.hero-header-wrap.hero-header--simple.is-position-top-left .hero-header__shell > .is-layout-grid,
.hero-header-wrap.hero-header--simple.is-position-center-left .hero-header__shell > .is-layout-grid,
.hero-header-wrap.hero-header--simple.is-position-bottom-left .hero-header__shell > .is-layout-grid {
	justify-items: start;
}

.hero-header-wrap.hero-header--simple.is-position-top-center .hero-header__shell > .is-layout-grid,
.hero-header-wrap.hero-header--simple.is-position-center-center .hero-header__shell > .is-layout-grid,
.hero-header-wrap.hero-header--simple.is-position-bottom-center .hero-header__shell > .is-layout-grid {
	justify-items: center;
}

.hero-header-wrap.hero-header--simple.is-position-top-right .hero-header__shell > .is-layout-grid,
.hero-header-wrap.hero-header--simple.is-position-center-right .hero-header__shell > .is-layout-grid,
.hero-header-wrap.hero-header--simple.is-position-bottom-right .hero-header__shell > .is-layout-grid {
	justify-items: end;
}

.hero-header-wrap.hero-header--simple .hero-header__shell > .hero-header__page-hero,
.hero-header-wrap.hero-header--simple .hero-header__shell > #header-text {
	width: fit-content;
	max-width: 100%;
}

.hero-header-wrap[data-layout="advanced"] > .hero-header__foreground.hero-header__shell {
	width: 100%;
	max-width: 100%;
	flex: 1 1 auto;
	align-self: stretch;
	min-height: 0;
}

.hero-header-wrap[data-layout="advanced"][data-shell-distribute="space-between"] .hero-header__foreground.hero-header__shell,
.hero-header-text[data-layout="advanced"][data-shell-distribute="space-between"] .hero-header__foreground.hero-header__shell,
.hero-header-wrap[data-layout="advanced"][data-shell-distribute="space-between"] .hero-header__overlay .hero-header__shell {
	justify-content: space-between;
}

.hero-header-wrap[data-layout="advanced"][data-shell-distribute="space-around"] .hero-header__foreground.hero-header__shell,
.hero-header-text[data-layout="advanced"][data-shell-distribute="space-around"] .hero-header__foreground.hero-header__shell,
.hero-header-wrap[data-layout="advanced"][data-shell-distribute="space-around"] .hero-header__overlay .hero-header__shell {
	justify-content: space-around;
}

.hero-header-wrap[data-layout="advanced"][data-shell-distribute="space-evenly"] .hero-header__foreground.hero-header__shell,
.hero-header-text[data-layout="advanced"][data-shell-distribute="space-evenly"] .hero-header__foreground.hero-header__shell,
.hero-header-wrap[data-layout="advanced"][data-shell-distribute="space-evenly"] .hero-header__overlay .hero-header__shell {
	justify-content: space-evenly;
}

.hero-header-wrap[data-layout="advanced"][data-shell-distribute="center"] .hero-header__foreground.hero-header__shell,
.hero-header-text[data-layout="advanced"][data-shell-distribute="center"] .hero-header__foreground.hero-header__shell,
.hero-header-wrap[data-layout="advanced"][data-shell-distribute="center"] .hero-header__overlay .hero-header__shell {
	justify-content: center;
}

.hero-header-wrap[data-layout="advanced"][data-shell-distribute="flex-end"] .hero-header__foreground.hero-header__shell,
.hero-header-text[data-layout="advanced"][data-shell-distribute="flex-end"] .hero-header__foreground.hero-header__shell,
.hero-header-wrap[data-layout="advanced"][data-shell-distribute="flex-end"] .hero-header__overlay .hero-header__shell {
	justify-content: flex-end;
}

.hero-header-wrap .hero-header__top,
.hero-header-wrap .hero-header__bottom {
	display: flex;
	gap: unset;
	flex-wrap: wrap;
	align-items: center;
	width: 100%;
	box-sizing: border-box;
}

.hero-header-wrap .hero-header__middle {
	display: grid;
	width: 100%;
	box-sizing: border-box;
	align-items: start;
	grid-template-columns: minmax(0, 1fr);
}

.hero-header-wrap .hero-header__middle > :only-child {
	grid-column: 1 / -1;
}

.hero-header-wrap .hero-header__page-hero,
.hero-header-wrap #header-text {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: fit-content;
	max-width: 100%;
	box-sizing: border-box;
	gap: var(--wp--preset--spacing--space-xs, 0.5rem);
	line-height: 1;
}

.hero-header-wrap #header-text :where(
	.wp-block-heading,
	.wp-block-site-title,
	.wp-block-post-title,
	p
) {
	line-height: inherit;
}

.hero-header-wrap .hero-header__page-hero > .wp-block-heading,
.hero-header-wrap .hero-header__page-hero > .wp-block-site-title,
.hero-header-wrap .hero-header__page-hero > .wp-block-post-title {
	width: 100%;
	box-sizing: border-box;
}

.hero-header-wrap[data-mcols="2"] .hero-header__middle {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-header-wrap[data-mcols="3"] .hero-header__middle {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-header-wrap[data-row-top="left"] .hero-header__top,
.hero-header-wrap[data-row-bottom="left"] .hero-header__bottom {
	justify-content: flex-start !important;
}

.hero-header-wrap[data-row-top="center"] .hero-header__top,
.hero-header-wrap[data-row-bottom="center"] .hero-header__bottom {
	justify-content: center !important;
}

.hero-header-wrap[data-row-top="right"] .hero-header__top,
.hero-header-wrap[data-row-bottom="right"] .hero-header__bottom {
	justify-content: flex-end !important;
}

.hero-header-wrap[data-row-middle="left"] .hero-header__middle {
	justify-items: start;
}

.hero-header-wrap[data-row-middle="center"] .hero-header__middle {
	justify-items: center;
}

.hero-header-wrap[data-row-middle="right"] .hero-header__middle {
	justify-items: end;
}

.hero-header-wrap .hero-header__bottom .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	width: 100%;
	gap: var(--wp--preset--spacing--space-xs, 0.5rem);
	box-sizing: border-box;
}

.hero-header-wrap[data-row-bottom="left"] .hero-header__bottom .wp-block-buttons {
	justify-content: flex-start !important;
}

.hero-header-wrap[data-row-bottom="center"] .hero-header__bottom .wp-block-buttons {
	justify-content: center !important;
}

.hero-header-wrap[data-row-bottom="right"] .hero-header__bottom .wp-block-buttons {
	justify-content: flex-end !important;
}

.hero-header-wrap.is-position-top-left,
.hero-header-wrap.is-position-top-center,
.hero-header-wrap.is-position-top-right {
	align-items: flex-start;
}

.hero-header-wrap.is-position-center-left,
.hero-header-wrap.is-position-center-center,
.hero-header-wrap.is-position-center-right {
	align-items: center;
}

.hero-header-wrap.is-position-bottom-left,
.hero-header-wrap.is-position-bottom-center,
.hero-header-wrap.is-position-bottom-right {
	align-items: flex-end;
}

.hero-header-wrap.is-position-top-left,
.hero-header-wrap.is-position-center-left,
.hero-header-wrap.is-position-bottom-left {
	justify-content: flex-start;
}

.hero-header-wrap.is-position-top-center,
.hero-header-wrap.is-position-center-center,
.hero-header-wrap.is-position-bottom-center {
	justify-content: center;
}

.hero-header-wrap.is-position-top-right,
.hero-header-wrap.is-position-center-right,
.hero-header-wrap.is-position-bottom-right {
	justify-content: flex-end;
}

.hero-header__shell > .wp-block-group.hero-header__top:empty,
.hero-header__shell > .wp-block-group.hero-header__middle:empty,
.hero-header__shell > .wp-block-group.hero-header__bottom:empty {
	display: none;
}