/**
 * TODOS hero slider – presentation layer for an Elementor container with the CSS class `td-hero-slider`
 * whose direct child containers carry the class `td-hero-slide`. Content stays in Elementor.
 * Front end only: inside the Elementor editor (body.elementor-editor-active) slides stay stacked so
 * every slide can be edited.
 */

body:not(.elementor-editor-active) .td-hero-slider.e-con {
	display: grid !important;
	grid-template-columns: 100%;
	position: relative;
	overflow: hidden;
	touch-action: pan-y;
}

/* All slides share one grid cell, so the slider is as tall as the tallest slide (no layout shift). */
body:not(.elementor-editor-active) .td-hero-slider > .td-hero-slide {
	grid-area: 1 / 1;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.7s ease, visibility 0s linear 0.7s;
}

body:not(.elementor-editor-active) .td-hero-slider > .td-hero-slide.is-active,
body:not(.elementor-editor-active) .td-hero-slider:not(.td-ready) > .td-hero-slide:first-child {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.7s ease, visibility 0s;
	z-index: 1;
}

/* Controls (added by td-hero-slider.js), aligned with the 1280px content grid. */
.td-hero-slider .td-hero-controls {
	position: absolute;
	z-index: 3;
	left: 50%;
	bottom: 28px;
	transform: translateX(-50%);
	width: 100%;
	max-width: calc(1280px + 48px); /* 1280px content + the slide's 24px side padding */
	padding: 0 24px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 8px;
	pointer-events: none;
}

.td-hero-slider .td-hero-controls > * {
	pointer-events: auto;
}

.td-hero-slider .td-hero-controls button {
	appearance: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	cursor: pointer;
	font: inherit;
	min-height: 0;
	box-shadow: none;
}

/* Neutralise the Elementor kit's global button hover/focus colours for these controls. */
.td-hero-slider .td-hero-controls button:hover,
.td-hero-slider .td-hero-controls button:focus {
	background: none;
	color: #fff;
}

.td-hero-slider .td-hero-controls .td-hero-arrow,
.td-hero-slider .td-hero-controls .td-hero-toggle {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.55);
	background: rgba(255, 255, 255, 0.08);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.td-hero-slider .td-hero-controls .td-hero-arrow:hover,
.td-hero-slider .td-hero-controls .td-hero-toggle:hover {
	background: rgba(255, 255, 255, 0.2);
	border-color: #fff;
}

.td-hero-slider .td-hero-controls svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.td-hero-slider .td-hero-controls .td-hero-toggle svg {
	fill: currentColor;
	stroke: none;
	width: 14px;
	height: 14px;
}

.td-hero-slider .td-hero-dots {
	display: flex;
	align-items: center;
}

/* 44px touch target around a small visual dot. */
.td-hero-slider .td-hero-dots button {
	width: 32px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.td-hero-slider .td-hero-dots button::before {
	content: "";
	display: block;
	width: 10px;
	height: 10px;
	border-radius: 5px;
	background: rgba(255, 255, 255, 0.45);
	transition: width 0.3s ease, background-color 0.3s ease;
}

.td-hero-slider .td-hero-dots button[aria-current="true"]::before {
	width: 26px;
	background: #fff;
}

.td-hero-slider .td-hero-dots button:hover::before {
	background: rgba(255, 255, 255, 0.8);
}

.td-hero-slider .td-hero-controls button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
	border-radius: 22px;
}

.td-hero-slider .td-hero-toggle {
	margin-left: auto;
}

@media (max-width: 767px) {
	.td-hero-slider .td-hero-controls {
		bottom: 18px;
		padding: 0 16px;
		gap: 4px;
	}
	.td-hero-slider .td-hero-dots button {
		width: 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body:not(.elementor-editor-active) .td-hero-slider > .td-hero-slide,
	body:not(.elementor-editor-active) .td-hero-slider > .td-hero-slide.is-active,
	.td-hero-slider .td-hero-dots button::before {
		transition: none;
	}
}

/* Dots-only variant (slider container class `td-hero-dots-only`): small circular dots, bottom centre. */
.td-hero-slider .td-hero-controls--dots {
	justify-content: center;
	max-width: none;
	bottom: 4px; /* 44px touch row: the visible 9px dots sit ~22px above the banner's bottom edge */
}
.td-hero-slider .td-hero-controls--dots .td-hero-dots button {
	width: 28px;
	height: 44px;
	border-radius: 50%;
}
.td-hero-slider .td-hero-controls--dots .td-hero-dots button::before,
.td-hero-slider .td-hero-controls--dots .td-hero-dots button[aria-current="true"]::before {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.5);
	box-shadow: 0 0 0 1px rgba(6, 43, 82, 0.35);
	transition: background-color 0.3s ease, transform 0.3s ease;
}
.td-hero-slider .td-hero-controls--dots .td-hero-dots button[aria-current="true"]::before {
	background: #FFFFFF;
	transform: scale(1.15);
}
.td-hero-slider .td-hero-controls--dots .td-hero-dots button:hover::before {
	background: rgba(255, 255, 255, 0.85);
}
.td-hero-slider .td-hero-controls--dots button:focus-visible {
	outline: 2px solid #FFFFFF;
	outline-offset: -6px;
	border-radius: 50%;
}
@media (prefers-reduced-motion: reduce) {
	.td-hero-slider .td-hero-controls--dots .td-hero-dots button::before { transition: none; }
}
