/* =========================================================
   Smarttec Hero Image – Frontend styles
   Base layout + preset positioning. Per-layer color / font /
   free position / padding are injected as a scoped <style>
   block by the PHP render (see render_layer_styles).
   ========================================================= */

.smarttec-hero {
	position: relative;
	display: flex;
	width: 100%;
}

/* ---- Width modes ---- */
.smarttec-hero--width-container {
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
}

/* Full-bleed: break out of a constrained parent to viewport width */
.smarttec-hero--width-full {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* Custom width: width value comes from the Bricks control (root selector).
   justify-content on root aligns the media block. */
.smarttec-hero--width-custom {
	margin-left: auto;
	margin-right: auto;
}

/* ---- Media wrapper ---- */
.smarttec-hero__media {
	position: relative;
	width: 100%;
	overflow: hidden;
	line-height: 0;
}

/* ---- The image ---- */
.smarttec-hero__picture,
.smarttec-hero__img {
	display: block;
	max-width: 100%;
}

.smarttec-hero__picture {
	width: 100%;
	height: auto;
}

/* Default (no fixed height): image shows at natural aspect, full width.
   When a fixed height + fit mode is set, the generated per-device CSS
   (higher specificity via [data-shi-scope]) takes over. */
.smarttec-hero__img {
	width: 100%;
	height: auto;
	object-position: center center;
}

/* ---- The video ---- */
.smarttec-hero__video {
	display: block;
	width: 100%;
	height: auto;
	object-position: center center;
}

/* Play button (click-to-play mode) */
.smarttec-hero__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 84px;
	height: 84px;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
	z-index: 4;
	transition: background 0.2s ease, transform 0.15s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}
.smarttec-hero__play:hover {
	background: rgba(0, 0, 0, 0.75);
	transform: translate(-50%, -50%) scale(1.06);
}
.smarttec-hero__play-icon {
	display: block;
	width: 0;
	height: 0;
	margin-left: 6px;
	border-style: solid;
	border-width: 15px 0 15px 26px;
	border-color: transparent transparent transparent #ffffff;
}
/* Hide the play button once the video is playing */
.shi-video-playing .smarttec-hero__play {
	display: none;
}

/* When a per-device fixed height is set, the generated CSS switches
   .smarttec-hero__media to that height and these fill it. */

/* ---- Placeholder (empty state / builder) ---- */
.smarttec-hero__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 240px;
	width: 100%;
	background: repeating-linear-gradient(
		45deg,
		#f3f3f6,
		#f3f3f6 12px,
		#e9e9ef 12px,
		#e9e9ef 24px
	);
	color: #6b6b7b;
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
	padding: 24px;
}

/* =========================================================
   Overlay (preset + free layers)
   ========================================================= */
.smarttec-hero__overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	line-height: normal;
	z-index: 2;
}

.smarttec-hero__layer {
	pointer-events: auto;
	box-sizing: border-box;
	position: absolute;
	max-width: min(90%, 640px);
}

/* ---- Preset positioning: 9-point grid ---- */
/* Horizontal anchors */
.smarttec-hero__layer.pos-top-left,
.smarttec-hero__layer.pos-center-left,
.smarttec-hero__layer.pos-bottom-left { left: 4%; }

.smarttec-hero__layer.pos-top-right,
.smarttec-hero__layer.pos-center-right,
.smarttec-hero__layer.pos-bottom-right { right: 4%; }

.smarttec-hero__layer.pos-top-center,
.smarttec-hero__layer.pos-center-center,
.smarttec-hero__layer.pos-bottom-center {
	left: 50%;
	transform: translateX(-50%);
}

/* Vertical anchors */
.smarttec-hero__layer.pos-top-left,
.smarttec-hero__layer.pos-top-center,
.smarttec-hero__layer.pos-top-right { top: 5%; }

.smarttec-hero__layer.pos-bottom-left,
.smarttec-hero__layer.pos-bottom-center,
.smarttec-hero__layer.pos-bottom-right { bottom: 5%; }

.smarttec-hero__layer.pos-center-left,
.smarttec-hero__layer.pos-center-right {
	top: 50%;
	transform: translateY(-50%);
}

.smarttec-hero__layer.pos-center-center {
	top: 50%;
	transform: translate(-50%, -50%);
}

/* ---- Free positioning: top/left injected inline by PHP.
   Reset any preset transform so X/Y are absolute. ---- */
.smarttec-hero__layer.is-free {
	top: 0;
	left: 0;
	right: auto;
	bottom: auto;
	transform: none;
	max-width: 90%;
}

/* ---- Layer content elements ---- */
.smarttec-hero__text {
	margin: 0;
	color: #ffffff;
	font-weight: 700;
	line-height: 1.15;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
}

.smarttec-hero__layer-img {
	display: block;
	height: auto;
	max-width: 100%;
}

/* ---- Buttons ---- */
.smarttec-hero__btn {
	display: inline-block;
	padding: 14px 32px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 16px;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.smarttec-hero__btn--solid {
	background: #ffffff;
	color: #1a1a2e;
	border: 2px solid #ffffff;
}
.smarttec-hero__btn--solid:hover {
	background: transparent;
	color: #ffffff;
}

.smarttec-hero__btn--outline {
	background: transparent;
	color: #ffffff;
	border: 2px solid #ffffff;
}
.smarttec-hero__btn--outline:hover {
	background: #ffffff;
	color: #1a1a2e;
}

/* =========================================================
   Nested Bricks children zone
   ========================================================= */
.smarttec-hero__nest {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 16px;
	padding: 4%;
	pointer-events: none;
	z-index: 3;
}

.smarttec-hero__nest > * {
	pointer-events: auto;
}
