/**
 * Qlb Hero Slider — slider.css
 * Scoped exclusively to .qlb-hero-slider
 * RUN_ID: QLB-HERO-SLIDER-PLUGIN-01
 * ⛔ NO inline styles — all CSS in this file only
 */

/* ── Anchor .qlb-hero so absolute slider positions inside it ── */
body.qlb-home .qlb-hero {
	position: relative !important;
	overflow: hidden !important;
}

/* ── Hero inner content must sit above the slider layer ─────── */
body.qlb-home .qlb-hero .container {
	position: relative !important;
	z-index: 2 !important;
}

/* ── Slider container ─────────────────────────────── */
.qlb-hero-slider {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	z-index: 0;
}

/* ── Track holds all slides ───────────────────────── */
.qlb-slider-track {
	position: relative;
	width: 100%;
	height: 100%;
}

/* ── Individual slide ─────────────────────────────── */
.qlb-slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	opacity: 0;
	transition: opacity 0.5s ease-in-out;
	z-index: 1;
}

.qlb-slide--active {
	opacity: 1;
	z-index: 2;
}

/* ── Slide caption overlay ────────────────────────── */
.qlb-slide-caption {
	position: absolute;
	bottom: 2rem;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.52);
	color: #fff;
	font-size: 1rem;
	padding: 0.5rem 1.25rem;
	border-radius: 4px;
	white-space: nowrap;
	max-width: 90%;
	overflow: hidden;
	text-overflow: ellipsis;
	z-index: 10;
	pointer-events: none;
}

/* ── Slide overlay — heading + subtext ───────────── */
.qlb-slide-overlay {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 3rem 4rem;
	background: linear-gradient(135deg, rgba(11,11,11,.78) 0%, rgba(11,138,74,.32) 100%);
	pointer-events: none;
}

/* Position variants via data attribute */
.qlb-slide[data-text-position="left"]   .qlb-slide-overlay { align-items: flex-start; text-align: left; }
.qlb-slide[data-text-position="center"] .qlb-slide-overlay { align-items: center;     text-align: center; padding: 3rem 8rem; }
.qlb-slide[data-text-position="right"]  .qlb-slide-overlay { align-items: flex-end;   text-align: right; }

.qlb-slide-heading {
	font-size: var(--qlb-h-size, 48px);
	color: var(--qlb-h-color, #ffffff);
	font-weight: 800;
	line-height: 1.15;
	margin: 0 0 0.75rem;
	text-shadow: 0 2px 12px rgba(0,0,0,.45);
	max-width: 680px;
}

.qlb-slide-subtext {
	font-size: clamp(0.95rem, 1.4vw, 1.2rem);
	color: var(--qlb-s-color, #ffffff);
	opacity: 0.9;
	margin: 0;
	max-width: 560px;
	line-height: 1.6;
	text-shadow: 0 1px 6px rgba(0,0,0,.4);
}

/* ── Tablet (up to 1023px) — reduce side padding ─────────────── */
@media (max-width: 1023px) {
	.qlb-slide-overlay {
		padding: 2rem 2.5rem;
	}
	.qlb-slide[data-text-position="center"] .qlb-slide-overlay {
		padding: 2rem 2.5rem;
	}
}

/* ── Mobile (up to 767px) — QLB-SLIDER-MOBILE-FIX-01 ─────────── */
@media (max-width: 767px) {
	.qlb-slide-overlay {
		padding: 1.25rem 1rem;
		justify-content: flex-end;
		padding-bottom: 3.5rem;
	}
	.qlb-slide[data-text-position="center"] .qlb-slide-overlay,
	.qlb-slide[data-text-position="right"]  .qlb-slide-overlay {
		padding: 1.25rem 1rem;
		padding-bottom: 3.5rem;
		align-items: flex-start;
		text-align: left;
	}
	.qlb-slide-heading {
		font-size: clamp(1.4rem, 5.5vw, 2rem) !important;
		max-width: 100%;
	}
	.qlb-slide-subtext {
		font-size: 0.9rem;
		max-width: 100%;
	}
	/* Shrink arrow buttons on mobile so they don't overlap text */
	.qlb-slider-btn {
		width: 2rem;
		height: 2rem;
		font-size: 1.25rem;
	}
	.qlb-slider-btn--prev { left: 0.5rem; }
	.qlb-slider-btn--next { right: 0.5rem; }
}

/* ── Small phones (up to 480px) ───────────────────────────────── */
@media (max-width: 480px) {
	.qlb-slide-heading {
		font-size: clamp(1.2rem, 5vw, 1.6rem) !important;
	}
	.qlb-slide-subtext {
		font-size: 0.85rem;
	}
}

/* ── Arrow buttons ────────────────────────────────── */
.qlb-slider-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 20;
	background: rgba(0, 0, 0, 0.42);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 2.75rem;
	height: 2.75rem;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
	padding: 0;
}

.qlb-slider-btn:hover,
.qlb-slider-btn:focus-visible {
	background: rgba(0, 0, 0, 0.72);
	outline: 2px solid #fff;
}

.qlb-slider-btn--prev {
	left: 1rem;
}

.qlb-slider-btn--next {
	right: 1rem;
}

/* ── Dot indicators ───────────────────────────────── */
.qlb-slider-dots {
	position: absolute;
	bottom: 1rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 20;
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.qlb-dot {
	width: 0.625rem;
	height: 0.625rem;
	border-radius: 50%;
	border: 2px solid #fff;
	background: transparent;
	cursor: pointer;
	padding: 0;
	transition: background 0.2s, transform 0.2s;
}

.qlb-dot--active {
	background: #fff;
	transform: scale(1.3);
}

.qlb-dot:hover,
.qlb-dot:focus-visible {
	background: rgba(255, 255, 255, 0.6);
	outline: none;
}

/* ── Hidden when only 1 slide ─────────────────────── */
.qlb-hero-slider[data-single="1"] .qlb-slider-btn,
.qlb-hero-slider[data-single="1"] .qlb-slider-dots {
	display: none;
}
