/**
 * Hero Module — scoped frontend styles (prefix ctxhsdivi-).
 */

.ctxhsdivi-hero-shell {
	position: relative;
	overflow: hidden;
	width: 100%;
	display: flex;
	flex-direction: column;
	/* Default visual baseline; module-level min_height (inline style) can override this. */
	min-height: min(50vh, 820px);
}

.ctxhsdivi-hero__media-wrap {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.ctxhsdivi-hero-media,
.ctxhsdivi-hero-media img {
	display: block;
	width: 100%;
	height: 100%;
}

.ctxhsdivi-hero-media img {
	object-fit: cover;
	max-width: none;
}

.ctxhsdivi-hero__overlays {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

.ctxhsdivi-hero__grad {
	position: absolute;
	inset: 0;
	background-repeat: no-repeat;
	background-size: cover;
}

.ctxhsdivi-hero__svg {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	overflow: visible;
}

.ctxhsdivi-hero__svg img {
	height: auto;
	max-width: min(100%, 80vw);
	object-fit: contain;
	position: absolute;
	transform: translate(-50%, -50%);
	width: var(--ctxhsdivi-hero-svg-w-d, 500px);
	left: var(--ctxhsdivi-hero-svg-x-d, 90%);
	top: var(--ctxhsdivi-hero-svg-y-d, 85%);
}

@media (min-width: 768px) and (max-width: 980px) {
	.ctxhsdivi-hero__svg img {
		width: var(--ctxhsdivi-hero-svg-w-t, var(--ctxhsdivi-hero-svg-w-d, 500px));
		left: var(--ctxhsdivi-hero-svg-x-t, var(--ctxhsdivi-hero-svg-x-d, 90%));
		top: var(--ctxhsdivi-hero-svg-y-t, var(--ctxhsdivi-hero-svg-y-d, 85%));
	}
}

@media (max-width: 767px) {
	.ctxhsdivi-hero__svg img {
		width: var(--ctxhsdivi-hero-svg-w-p, var(--ctxhsdivi-hero-svg-w-d, 500px));
		left: var(--ctxhsdivi-hero-svg-x-p, var(--ctxhsdivi-hero-svg-x-d, 90%));
		top: var(--ctxhsdivi-hero-svg-y-p, var(--ctxhsdivi-hero-svg-y-d, 85%));
	}
}

/* Heading + subline layer (above media & overlays) */
.ctxhsdivi-hero-shell .ctxhsdivi-hero__content,
.et_pb_ctxhsdivi_hero .ctxhsdivi-hero__content {
	position: relative;
	z-index: 10;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	width: 100%;
	padding: clamp(1rem, 4vw, 2.5rem);
	box-sizing: border-box;
	pointer-events: none;
}

/* Horizontal text align is on .content-inner; rail stays centered */
.ctxhsdivi-hero-shell .ctxhsdivi-hero__content--v-top,
.et_pb_ctxhsdivi_hero .ctxhsdivi-hero__content--v-top {
	justify-content: flex-start;
}

.ctxhsdivi-hero-shell .ctxhsdivi-hero__content--v-center,
.et_pb_ctxhsdivi_hero .ctxhsdivi-hero__content--v-center {
	justify-content: center;
}

.ctxhsdivi-hero-shell .ctxhsdivi-hero__content--v-bottom,
.et_pb_ctxhsdivi_hero .ctxhsdivi-hero__content--v-bottom {
	justify-content: flex-end;
}

.ctxhsdivi-hero-shell .ctxhsdivi-hero__content-rail,
.et_pb_ctxhsdivi_hero .ctxhsdivi-hero__content-rail {
	width: var(--ctxhsdivi-hero-cw, 80%);
	max-width: var(--ctxhsdivi-hero-cmw, 1400px);
	margin-inline: auto;
	box-sizing: border-box;
}

.ctxhsdivi-hero-shell .ctxhsdivi-hero__content-inner,
.et_pb_ctxhsdivi_hero .ctxhsdivi-hero__content-inner {
	width: 100%;
	max-width: var(--ctxhsdivi-hero-mw-d, 100%);
	pointer-events: auto;
	display: flex;
	flex-direction: column;
	gap: 0.5em;
}

@media (min-width: 981px) {
	.ctxhsdivi-hero-shell .ctxhsdivi-hero__content,
	.et_pb_ctxhsdivi_hero .ctxhsdivi-hero__content {
		padding-top: calc(clamp(1rem, 4vw, 2.5rem) + var(--ctxhsdivi-hero-offset-d, 0px));
		padding-bottom: calc(clamp(1rem, 4vw, 2.5rem) + var(--ctxhsdivi-hero-offset-d-b, 0px));
	}
}

@media (min-width: 768px) and (max-width: 980px) {
	.ctxhsdivi-hero-shell .ctxhsdivi-hero__content,
	.et_pb_ctxhsdivi_hero .ctxhsdivi-hero__content {
		padding-top: calc(clamp(1rem, 4vw, 2.5rem) + var(--ctxhsdivi-hero-offset-t, var(--ctxhsdivi-hero-offset-d, 0px)));
		padding-bottom: calc(clamp(1rem, 4vw, 2.5rem) + var(--ctxhsdivi-hero-offset-t-b, var(--ctxhsdivi-hero-offset-d-b, 0px)));
	}

	.ctxhsdivi-hero-shell .ctxhsdivi-hero__content-inner,
	.et_pb_ctxhsdivi_hero .ctxhsdivi-hero__content-inner {
		max-width: var(--ctxhsdivi-hero-mw-t, 100%);
	}
}

@media (max-width: 767px) {
	.ctxhsdivi-hero-shell .ctxhsdivi-hero__content,
	.et_pb_ctxhsdivi_hero .ctxhsdivi-hero__content {
		padding-top: calc(clamp(1rem, 4vw, 2.5rem) + var(--ctxhsdivi-hero-offset-p, 72px));
		padding-bottom: calc(clamp(1rem, 4vw, 2.5rem) + var(--ctxhsdivi-hero-offset-p-b, 0px));
	}

	.ctxhsdivi-hero-shell .ctxhsdivi-hero__content-inner,
	.et_pb_ctxhsdivi_hero .ctxhsdivi-hero__content-inner {
		max-width: var(--ctxhsdivi-hero-mw-p, 100%);
	}
}

.ctxhsdivi-hero__title,
.ctxhsdivi-hero__subline {
	margin: 0;
	white-space: pre-line;
	overflow-wrap: anywhere;
}

.ctxhsdivi-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
	margin-top: 0.75em;
	pointer-events: auto;
}

.ctxhsdivi-hero__content--h-center .ctxhsdivi-hero__actions {
	justify-content: center;
}

.ctxhsdivi-hero__content--h-right .ctxhsdivi-hero__actions {
	justify-content: flex-end;
}

.ctxhsdivi-hero__actions .et_pb_button,
.ctxhsdivi-hero__btn--1,
.ctxhsdivi-hero__btn--2 {
	text-decoration: none;
	box-sizing: border-box;
}

/* Visual Builder: placeholder when no desktop image is set yet */
.ctxhsdivi-hero-shell--vb-placeholder .ctxhsdivi-hero__vb-placeholder {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	box-sizing: border-box;
	background: #2c3338;
	color: #fff;
	text-align: center;
}

.ctxhsdivi-hero__vb-placeholder-label {
	font-size: 0.95rem;
	line-height: 1.45;
	max-width: 28rem;
}
