.berlight-hero-slider {
	position: relative;
	overflow: hidden;
	border-radius: 12px;
}

/* --- Conflict guards -------------------------------------------------
   Themes and other plugins routinely set global rules on `button`,
   `ul`/`li` and `svg`. These resets are scoped to this widget only and
   keep the controls intact without leaking styles anywhere else. */
.berlight-hero-slider button.berlight-hero-slider__arrow,
.berlight-hero-slider button.berlight-hero-slider__dot {
	font: inherit;
	color: inherit;
	text-transform: none;
	letter-spacing: normal;
	min-height: 0;
	min-width: 0;
	outline-offset: 2px;
}

.berlight-hero-slider button.berlight-hero-slider__arrow::before,
.berlight-hero-slider button.berlight-hero-slider__arrow::after,
.berlight-hero-slider button.berlight-hero-slider__dot::before {
	content: none;
}

.berlight-hero-slider ul.berlight-hero__icons {
	list-style: none;
}

.berlight-hero-slider ul.berlight-hero__icons > li {
	list-style: none;
	margin: 0;
	padding: 0;
}

.berlight-hero-slider ul.berlight-hero__icons > li::before,
.berlight-hero-slider ul.berlight-hero__icons > li::marker {
	content: none;
}

/* Color rules read from CSS variables so each slide can override them
   individually while the Style tab controls set the wrapper-level defaults. */
.berlight-hero-slider .berlight-hero__eyebrow { color: var( --berlight-heading-color, #1a1a1a ); }
.berlight-hero-slider .berlight-hero__highlight { color: var( --berlight-highlight-color, #e8646f ); }
.berlight-hero-slider .berlight-hero__description { color: var( --berlight-desc-color, #5b5b5b ); }
.berlight-hero-slider .berlight-hero__icon-circle svg { stroke: var( --berlight-icon-color, #e8646f ); }
.berlight-hero-slider .berlight-hero__icon-title { color: var( --berlight-icon-title-color, #1a1a1a ); }
.berlight-hero-slider .berlight-hero__btn--primary {
	background: var( --berlight-btn-bg, #e8646f );
	color: var( --berlight-btn-color, #ffffff );
}

.berlight-hero-slider__track {
	display: flex;
	width: 100%;
	transition: transform 0.5s ease;
}

.berlight-hero-slider[data-transition="fade"] .berlight-hero-slider__track {
	transition: none;
	display: block;
	position: relative;
}

.berlight-hero-slider__slide {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
	min-height: 480px;
	display: flex;
	align-items: center;
	background-image: var( --bg-desktop, none );
	background-size: cover;
	background-position: center;
	background-color: #fdf4f4;
}

@media (max-width: 767px) {
	.berlight-hero-slider__slide {
		background-image: var( --bg-mobile, var( --bg-desktop, none ) );
	}
}

.berlight-hero-slider[data-transition="fade"] .berlight-hero-slider__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.6s ease;
	pointer-events: none;
}

.berlight-hero-slider[data-transition="fade"] .berlight-hero-slider__slide.is-active {
	position: relative;
	opacity: 1;
	pointer-events: auto;
}

/* Overlay is always present so a gradient can be used without an image.
   Default is transparent; the Style tab sets the wrapper-level tint and a
   slide's own Overlay group control (gradient capable) overrides it. */
/* Overlay is always present so a gradient can be used without an image.
   --overlay-bg / --overlay-opacity are set per slide by the widget; the
   mobile pair is only emitted when that slide opts in, so the desktop
   values are the fallback and nothing changes for existing slides.
   --berlight-overlay is the Style-tab default for slides using no overlay. */
.berlight-hero-slider__overlay {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background: var( --overlay-bg, var( --berlight-overlay, transparent ) );
	opacity: var( --overlay-opacity, 1 );
}

@media (max-width: 767px) {
	.berlight-hero-slider__overlay {
		background: var( --overlay-bg-mobile, var( --overlay-bg, var( --berlight-overlay, transparent ) ) );
		opacity: var( --overlay-opacity-mobile, var( --overlay-opacity, 1 ) );
	}
}

.berlight-hero-slider__content {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 640px;
	padding: 48px 56px;
}

.berlight-hero-slider__icons {
	margin-top: 32px;
}

/* The Style-tab alignment control sets justify-content; on a grid the
   items themselves need aligning, so mirror it onto the tracks. */
.berlight-hero-slider .berlight-hero__icons {
	justify-items: center;
}

/* ---------------------------------------------------------
 * Arrows
 * ------------------------------------------------------- */
.berlight-hero-slider .berlight-hero-slider__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	box-sizing: border-box;
	padding: 0;
	margin: 0;
	width: var( --berlight-arrow-size, 38px );
	height: var( --berlight-arrow-size, 38px );
	min-width: var( --berlight-arrow-size, 38px );
	min-height: var( --berlight-arrow-size, 38px );
	border: 0;
	border-radius: 50%;
	background: var( --berlight-arrow-bg, #ffffff );
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	opacity: 1;
	visibility: visible;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
	transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.berlight-hero-slider .berlight-hero-slider__arrow--prev { left: var( --berlight-arrow-offset, 20px ); }
.berlight-hero-slider .berlight-hero-slider__arrow--next { right: var( --berlight-arrow-offset, 20px ); }

.berlight-hero-slider .berlight-hero-slider__arrow svg {
	display: block;
	flex: 0 0 auto;
	margin: 0;
	width: var( --berlight-arrow-icon-size, 17px );
	height: var( --berlight-arrow-icon-size, 17px );
	fill: none;
	stroke: var( --berlight-arrow-color, #1a1a1a );
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: stroke 0.2s ease;
	pointer-events: none;
}

.berlight-hero-slider .berlight-hero-slider__arrow:hover,
.berlight-hero-slider .berlight-hero-slider__arrow:focus-visible {
	background: var( --berlight-arrow-bg-hover, #e8646f );
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	transform: translateY(-50%) scale(1.06);
}

.berlight-hero-slider .berlight-hero-slider__arrow:focus-visible {
	outline: 2px solid #1a1a1a;
	outline-offset: 2px;
}

.berlight-hero-slider .berlight-hero-slider__arrow:hover svg,
.berlight-hero-slider .berlight-hero-slider__arrow:focus-visible svg {
	stroke: var( --berlight-arrow-color-hover, #ffffff );
}

.berlight-hero-slider .berlight-hero-slider__arrow:active {
	transform: translateY(-50%) scale(0.96);
}

/* ---------------------------------------------------------
 * Dots
 * ------------------------------------------------------- */
.berlight-hero-slider .berlight-hero-slider__dots {
	position: absolute;
	left: 50%;
	bottom: var( --berlight-dots-offset, 20px );
	transform: translateX(-50%);
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	max-width: calc( 100% - 32px );
	gap: var( --berlight-dot-gap, 8px );
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
	line-height: 0;
}

/* Strict circle: equal width/height, never stretched by flex. */
.berlight-hero-slider .berlight-hero-slider__dot {
	position: relative;
	box-sizing: content-box;
	flex: 0 0 auto;
	width: var( --berlight-dot-size, 8px );
	height: var( --berlight-dot-size, 8px );
	min-width: 0;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	background: var( --berlight-dot-color, rgba( 255, 255, 255, 0.9 ) );
	border: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
	transition: background-color 0.25s ease, transform 0.15s ease;
}

/* Enlarge the tap target without changing the visual dot size. */
.berlight-hero-slider .berlight-hero-slider__dot::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 24px;
	height: 24px;
	border-radius: 50%;
}

.berlight-hero-slider .berlight-hero-slider__dot:hover {
	transform: scale(1.2);
}

.berlight-hero-slider .berlight-hero-slider__dot:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

.berlight-hero-slider .berlight-hero-slider__dot.is-active {
	background: var( --berlight-dot-active-color, #e8646f );
	transform: scale(1.25);
}

/* ---------------------------------------------------------
 * Tablet
 * ------------------------------------------------------- */
@media (max-width: 1024px) {
	.berlight-hero-slider__slide {
		min-height: 420px;
	}
	.berlight-hero-slider__content {
		padding: 40px 40px;
	}
}

/* ---------------------------------------------------------
 * Mobile
 * ------------------------------------------------------- */
@media (max-width: 767px) {
	.berlight-hero-slider {
		border-radius: 8px;
	}

	.berlight-hero-slider__slide {
		min-height: 0;
		align-items: stretch;
	}

	.berlight-hero-slider__content {
		max-width: 100%;
		/* Leave room for the dots bar at the bottom. */
		padding: 32px 20px 76px;
	}

	.berlight-hero-slider__icons {
		margin-top: 24px;
	}

	/* Arrows sit vertically centred but clear of the text edges.
	   Sizes stay derived from the Style-tab variables so editor
	   settings are still respected; only the minimums are enforced. */
	.berlight-hero-slider .berlight-hero-slider__arrow {
		width: max( 34px, var( --berlight-arrow-size, 38px ) );
		height: max( 34px, var( --berlight-arrow-size, 38px ) );
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	}
	.berlight-hero-slider .berlight-hero-slider__arrow--prev { left: min( var( --berlight-arrow-offset, 20px ), 10px ); }
	.berlight-hero-slider .berlight-hero-slider__arrow--next { right: min( var( --berlight-arrow-offset, 20px ), 10px ); }

	.berlight-hero-slider .berlight-hero-slider__dots {
		bottom: 14px;
	}
}

/* Very small phones — keep the arrows, just tighten them so they sit
   clear of the text. */
@media (max-width: 420px) {
	.berlight-hero-slider .berlight-hero-slider__arrow {
		width: max( 32px, calc( var( --berlight-arrow-size, 38px ) * 0.85 ) );
		height: max( 32px, calc( var( --berlight-arrow-size, 38px ) * 0.85 ) );
	}
	.berlight-hero-slider .berlight-hero-slider__arrow svg {
		width: 15px;
		height: 15px;
	}
	.berlight-hero-slider .berlight-hero-slider__arrow--prev { left: 6px; }
	.berlight-hero-slider .berlight-hero-slider__arrow--next { right: 6px; }
	.berlight-hero-slider__content {
		padding: 28px 46px 72px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.berlight-hero-slider__track,
	.berlight-hero-slider__slide,
	.berlight-hero-slider__arrow,
	.berlight-hero-slider .berlight-hero-slider__dot {
		transition: none !important;
	}
}

/* Per-icon device visibility. Own classes rather than Elementor's helpers so
   the widget behaves identically outside an Elementor context, and so the
   breakpoints match this stylesheet exactly. `display:none` removes the item
   from the grid entirely, letting the rest re-flow with no empty column. */
@media (min-width: 1025px) {
	.berlight-hero-slider .berlight-hero__icon-item.berlight-hide-desktop { display: none; }
}

@media (min-width: 768px) and (max-width: 1024px) {
	.berlight-hero-slider .berlight-hero__icon-item.berlight-hide-tablet { display: none; }
}

@media (max-width: 767px) {
	.berlight-hero-slider .berlight-hero__icon-item.berlight-hide-mobile { display: none; }
}
