/**
 * SE Hero (mod_sehero)
 * Copyright (C) 2026 SE24 Media. All rights reserved.
 * GNU General Public License version 2 or later.
 *
 * Every colour, size and font comes from CSS custom properties that the module
 * writes per instance (#seh-{id}), so several heroes can live on one site.
 */

.seh {
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
	background: var(--seh-bg, #0E1B2C);
	color: var(--seh-text, #C3CCD8);
	font-family: var(--seh-font-body, inherit);
	font-size: var(--seh-body-size, 17px);
	line-height: 1.6;
	border-radius: var(--seh-section-radius, 0);
}

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

/* Break out of the template container to the full viewport width */
.seh--bleed {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.seh__inner {
	position: relative;
	z-index: 2;
	max-width: var(--seh-maxw, 1200px);
	margin: 0 auto;
	padding: var(--seh-pad-y, 80px) 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--seh-gap, 48px);
}

.seh__content {
	flex: 1 1 440px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 22px;
}

.seh__media {
	flex: 1 1 400px;
	min-width: 0;
	position: relative;
}

.seh--img-left .seh__media {
	order: -1;
}

/* Centred text */
.seh--center .seh__content {
	align-items: center;
	text-align: center;
}

.seh--center.seh--img-none .seh__content,
.seh--center.seh--img-background .seh__content {
	max-width: 54rem;
	margin: 0 auto;
}

.seh--center .seh__actions,
.seh--center .seh__trust {
	justify-content: center;
}

.seh--center .seh__sub {
	margin-left: auto;
	margin-right: auto;
}

/* Eyebrow */
.seh__eyebrow {
	margin: 0;
	display: inline-flex;
	align-items: center;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--seh-eyebrow-bg, #FFFFFF);
	color: var(--seh-eyebrow-text, #C8102E);
	font-size: 0.82em;
	font-weight: 600;
	line-height: 1.4;
	text-transform: var(--seh-eyebrow-tt, none);
	letter-spacing: var(--seh-eyebrow-ls, 0);
}

.seh--eyebrow-dot .seh__eyebrow::before {
	content: "";
	flex: none;
	width: 8px;
	height: 8px;
	margin-right: 10px;
	border-radius: 50%;
	background: var(--seh-dot, #C8102E);
}

.seh--eyebrow-plain .seh__eyebrow {
	padding: 0;
	background: transparent;
	border-radius: 0;
}

/* Heading and sub-heading */
.seh .seh__heading {
	margin: 0;
	font-family: var(--seh-font-head, inherit);
	font-weight: var(--seh-h-weight, 700);
	font-size: var(--seh-h-size, 68px);
	line-height: var(--seh-h-lh, 1.04);
	letter-spacing: var(--seh-h-ls, -0.025em);
	color: var(--seh-heading, #0E1B2C);
	text-wrap: balance;
}

.seh__sub {
	margin: 0;
	max-width: 36rem;
	font-size: var(--seh-sub-size, 19px);
	color: var(--seh-text, #C3CCD8);
}

/* Buttons */
.seh__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.seh .seh__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 0 26px;
	border-radius: var(--seh-btn-radius, 999px);
	font-family: inherit;
	font-size: 1em;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: filter 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.seh .seh__btn--primary {
	background: var(--seh-accent, #C8102E);
	border: 1.5px solid var(--seh-accent, #C8102E);
	color: var(--seh-btn-text, #FFFFFF);
}

.seh .seh__btn--primary:hover,
.seh .seh__btn--primary:focus-visible {
	filter: brightness(0.88);
	color: var(--seh-btn-text, #FFFFFF);
}

.seh .seh__btn--secondary {
	background: transparent;
	border: 1.5px solid var(--seh-btn2, #0E1B2C);
	color: var(--seh-btn2, #0E1B2C);
}

.seh .seh__btn--secondary:hover,
.seh .seh__btn--secondary:focus-visible {
	background: var(--seh-btn2, #0E1B2C);
	color: var(--seh-bg, #FFFFFF);
}

.seh .seh__btn:focus-visible {
	outline: 3px solid var(--seh-accent, #C8102E);
	outline-offset: 3px;
}

/* Trust row */
.seh__trust {
	list-style: none;
	margin: 0;
	padding: 6px 0 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 26px;
	font-size: 0.88em;
}

.seh__trust-item {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
}

.seh__stars {
	color: var(--seh-star, #B7790F);
	letter-spacing: 2px;
	font-size: 1.15em;
	line-height: 1;
}

.seh__rating strong {
	color: var(--seh-heading, #0E1B2C);
}

.seh .seh__rating-link {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.seh__check {
	flex: none;
	color: var(--seh-check, #FF9A9A);
}

/* Side image */
.seh__img {
	display: block;
	width: 100%;
	height: var(--seh-img-h, 520px);
	object-fit: cover;
	object-position: var(--seh-img-pos, center center);
	border-radius: var(--seh-radius, 28px);
}

/* Browser preview: a framed screenshot, or an outline page when there is no image */
.seh--img-preview .seh__content {
	flex: 1.25 1 440px;
}

/* Once the picture drops under the text, start the line at the picture */
@media (max-width: 991.98px) {
	.seh .seh__media .seh__line {
		top: 0;
	}
}

.seh--img-preview .seh__media {
	padding: 24px 0 28px;
}

.seh__frame {
	position: relative;
	z-index: 1;
	overflow: hidden;
	border-radius: 12px;
	background: #FFFFFF;
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.seh__frame-bar {
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 46px;
	padding: 10px 14px;
	background: #EEF0F3;
	border-bottom: 1px solid #DDE1E6;
}

.seh__frame-dot {
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #C9CED6;
}

.seh__frame-url {
	flex: 1 1 auto;
	min-width: 0;
	margin-left: 12px;
	padding: 4px 10px;
	border-radius: 6px;
	background: #FFFFFF;
	color: #5A6472;
	font-size: 12px;
	line-height: 1.4;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.seh__frame-img {
	display: block;
	width: 100%;
	height: var(--seh-preview-h, 300px);
	object-fit: cover;
	object-position: var(--seh-img-pos, center top);
}

.seh__sketch {
	padding: 22px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.seh__sketch span {
	display: block;
}

.seh__sketch-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 6px;
}

.seh__sketch-logo {
	width: 90px;
	height: 12px;
	border-radius: 3px;
	background: var(--seh-bg, #0E1B2C);
}

.seh__sketch-nav {
	display: flex !important;
	gap: 10px;
}

.seh__sketch-nav span {
	width: 34px;
	height: 8px;
	border-radius: 3px;
	background: #D5DAE1;
}

.seh__sketch-hero {
	height: calc(var(--seh-preview-h, 300px) * 0.5);
	min-height: 110px;
	padding: 18px;
	border-radius: 8px;
	background: #E9EDF2;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 8px;
}

.seh__sketch-line {
	width: 70%;
	height: 14px;
	border-radius: 3px;
	background: var(--seh-bg, #0E1B2C);
}

.seh__sketch-line--short {
	width: 45%;
}

.seh__sketch-btn {
	width: 84px;
	height: 24px;
	margin-top: 6px;
	border-radius: 5px;
	background: var(--seh-accent, #C8102E);
}

.seh__sketch-tiles {
	display: flex !important;
	gap: 12px;
}

.seh__sketch-tiles span {
	flex: 1 1 0;
	height: calc(var(--seh-preview-h, 300px) * 0.23);
	min-height: 50px;
	border-radius: 6px;
	background: #F2F4F7;
}

/* The meridian: a thin line running through the picture side, past the section edges */
.seh__line {
	position: absolute;
	z-index: 0;
	top: -2000px;
	bottom: -2000px;
	left: 58%;
	width: 2px;
	background: var(--seh-line, #C8102E);
	pointer-events: none;
}

.seh__line-label {
	position: absolute;
	z-index: 0;
	top: -4px;
	left: calc(58% + 12px);
	font-family: var(--seh-font-head, inherit);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: 1.4;
	white-space: nowrap;
	color: var(--seh-line-label, #8D9AAD);
	pointer-events: none;
}

.seh__media > .seh__img {
	position: relative;
	z-index: 1;
}

/* Floating card */
.seh__card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 20px 14px 14px;
	border-radius: 18px;
	background: var(--seh-card-bg, #FFFFFF);
	color: var(--seh-card-text, #0E1B2C);
	box-shadow: 0 12px 32px rgba(14, 27, 44, 0.14);
}

.seh__media .seh__card {
	position: absolute;
	z-index: 2;
	top: 28px;
	left: -20px;
}

.seh--card-bottom .seh__media .seh__card {
	top: auto;
	bottom: 0;
	left: -16px;
}

.seh--card-bottom.seh--img-left .seh__media .seh__card {
	left: auto;
	right: -16px;
}

.seh--img-left .seh__media .seh__card {
	left: auto;
	right: -20px;
}

.seh__card-icon {
	width: 44px;
	height: 44px;
	flex: none;
	border-radius: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--seh-bg, #0E1B2C);
	color: var(--seh-accent, #C8102E);
}

.seh__card-icon--check {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--seh-accent, #C8102E);
	color: var(--seh-btn-text, #FFFFFF);
}

.seh__card-text {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.seh__card-label {
	font-size: 0.78em;
	opacity: 0.75;
}

.seh__card-value {
	font-size: 0.85em;
	font-weight: 600;
}

/* Background image */
.seh__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.seh__bg img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--seh-img-pos, center center);
}

.seh__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: var(--seh-overlay, rgba(14, 27, 44, 0.55));
}

.seh--img-background .seh__inner {
	min-height: var(--seh-img-h, 520px);
}

.seh--img-background .seh__content {
	flex-basis: 100%;
	max-width: 44rem;
}

/* Phones */
@media (max-width: 767.98px) {
	.seh {
		font-size: var(--seh-body-size-m, 16px);
	}

	.seh__inner {
		padding: var(--seh-pad-y-m, 40px) 16px;
		gap: 28px;
	}

	.seh__content {
		gap: 16px;
	}

	.seh .seh__heading {
		font-size: var(--seh-h-size-m, 36px);
	}

	.seh__sub {
		font-size: var(--seh-sub-size-m, 17px);
	}

	.seh__img {
		height: var(--seh-img-h-m, 260px);
	}

	.seh--img-left .seh__media {
		order: 0;
	}

	.seh--mobile-img-first .seh__media {
		order: -1;
	}

	.seh__media .seh__card,
	.seh--img-left .seh__media .seh__card {
		top: 14px;
		left: 14px;
		right: auto;
		padding: 10px 14px 10px 10px;
	}

	.seh--card-bottom .seh__media .seh__card,
	.seh--card-bottom.seh--img-left .seh__media .seh__card {
		top: auto;
		bottom: 0;
		left: 10px;
		right: 10px;
	}

	.seh--img-preview .seh__media {
		padding-bottom: 36px;
	}

	/* Stop the line where the stacked text ends */
	.seh__line {
		top: 0;
		bottom: -2000px;
	}

	.seh__frame-img {
		height: calc(var(--seh-preview-h, 300px) * 0.7);
	}

	.seh__card-icon:not(.seh__card-icon--check) {
		width: 36px;
		height: 36px;
	}

	.seh--img-background .seh__inner {
		min-height: var(--seh-img-h-m, 260px);
	}

	.seh--stack-buttons .seh__actions {
		width: 100%;
	}

	.seh--stack-buttons .seh__btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.seh .seh__btn {
		transition: none;
	}
}
