/**
 * Hero Slider Block Styles
 *
 * @package YaloFSE
 */

.wp-block-acf-hero-slider.yalo-hero-slider {
	position: relative;
	width: 100vw;
	max-width: none !important;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	overflow: visible;
}

.yalo-hero-slider__track,
.yalo-hero-slider .yalo-hero-slider__track.slick-slider,
.yalo-hero-slider .slick-list,
.yalo-hero-slider .slick-track,
.yalo-hero-slider__slide {
	min-height: 700px;
	height: 700px;
}

.yalo-hero-slider__slide {
	position: relative;
}

.yalo-hero-slider__image-wrap {
	position: absolute;
	inset: 0;
}

.yalo-hero-slider__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.yalo-hero-slider__overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
}

.yalo-hero-slider__overlay::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	z-index: -1;
}

.yalo-hero-slider__content {
	max-width: 640px;
	color: #ffffff;
	padding: 0;
}

/* Headings and body copy from title + WYSIWYG: always white over the image */
.yalo-hero-slider__overlay h1,
.yalo-hero-slider__overlay h2,
.yalo-hero-slider__overlay h3,
.yalo-hero-slider__overlay h4,
.yalo-hero-slider__overlay h5,
.yalo-hero-slider__overlay h6,
.yalo-hero-slider__overlay p {
	color: #ffffff !important;
}

.yalo-hero-slider__title {
	margin: 0 0 12px;
	font-family: var(--font-primary);
	font-size: 48px;
	line-height: 56px;
	font-weight: 400;
	color: #ffffff;
}

.yalo-hero-slider__description {
	margin: 0;
	font-family: var(--font-primary);
	font-size: 18px;
	line-height: 1.45;
	color: #ffffff;
}

/* Italic body copy only — do not inherit onto buttons/blocks */
.yalo-hero-slider__description p,
.yalo-hero-slider__description li {
	font-style: italic;
}

.yalo-hero-slider__description .wp-block-buttons,
.yalo-hero-slider__description .wp-block-button,
.yalo-hero-slider__description a.button,
.yalo-hero-slider__description .wp-block-button__link {
	font-style: normal;
}

.yalo-hero-slider__description > *:first-child {
	margin-top: 0;
}

.yalo-hero-slider__description > *:last-child {
	margin-bottom: 0;
}

/* Text links only; theme button / Gutenberg button links keep global styles */
.yalo-hero-slider__description a:not(.button):not(.wp-block-button__link) {
	color: #ffffff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.yalo-hero-slider__description a:not(.button):not(.wp-block-button__link):hover,
.yalo-hero-slider__description a:not(.button):not(.wp-block-button__link):focus {
	opacity: 0.9;
}

.yalo-hero-slider__description ul,
.yalo-hero-slider__description ol {
	margin: 0.5em 0;
	padding-left: 1.25em;
}

/* Adjacent buttons: gap from first (mobile 8px, desktop 16px) */
.yalo-hero-slider__description a.button:has(+ a.button) {
	margin-right: 8px;
}

.yalo-hero-slider__description .wp-block-buttons > .wp-block-button:not(:last-child) {
	margin-right: 8px;
}

@media (min-width: 992px) {
	.yalo-hero-slider__description a.button:has(+ a.button) {
		margin-right: 16px;
	}

	.yalo-hero-slider__description .wp-block-buttons > .wp-block-button:not(:last-child) {
		margin-right: 16px;
	}
}

/* Mobile: vertical breathing room on each button */
@media (max-width: 991px) {
	.yalo-hero-slider__description a.button {
		margin-top: 8px;
		margin-bottom: 8px;
	}

	.yalo-hero-slider__description .wp-block-buttons > .wp-block-button {
		margin-top: 8px;
		margin-bottom: 8px;
	}
}

/* Beat Slick core `.slick-slider .slick-dots { bottom: -45px }` and sit above fade slides */
.yalo-hero-slider .yalo-hero-slider__track.slick-slider .slick-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 28px;
	z-index: 15;
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: center;
	line-height: 0;
}

.yalo-hero-slider .yalo-hero-slider__track.slick-slider .slick-dots li {
	width: 12px;
	height: 12px;
	margin: 0 7px;
	padding: 0;
	display: inline-block;
	vertical-align: middle;
}

/* Reset global theme `button` rules (height 60px, yellow CTA) so dots render */
.yalo-hero-slider .yalo-hero-slider__track.slick-slider .slick-dots li button {
	box-sizing: border-box;
	width: 12px !important;
	height: 12px !important;
	min-height: 0 !important;
	min-width: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.45) !important;
	background-color: rgba(255, 255, 255, 0.45) !important;
	color: transparent !important;
	font-size: 0 !important;
	line-height: 0 !important;
	letter-spacing: 0 !important;
	font-weight: 400 !important;
	text-align: center !important;
	display: block !important;
	align-items: unset !important;
	justify-content: unset !important;
	cursor: pointer;
	overflow: visible !important;
}

.yalo-hero-slider .yalo-hero-slider__track.slick-slider .slick-dots li button::before {
	display: none !important;
}

.yalo-hero-slider .yalo-hero-slider__track.slick-slider .slick-dots li button:hover,
.yalo-hero-slider .yalo-hero-slider__track.slick-slider .slick-dots li button:focus,
.yalo-hero-slider .yalo-hero-slider__track.slick-slider .slick-dots li button:active {
	background: rgba(255, 255, 255, 0.75) !important;
	background-color: rgba(255, 255, 255, 0.75) !important;
	color: transparent !important;
	border: 0 !important;
	outline: none;
}

.yalo-hero-slider .yalo-hero-slider__track.slick-slider .slick-dots li.slick-active button,
.yalo-hero-slider .yalo-hero-slider__track.slick-slider .slick-dots li.slick-active button:hover,
.yalo-hero-slider .yalo-hero-slider__track.slick-slider .slick-dots li.slick-active button:focus {
	background: #ffffff !important;
	background-color: #ffffff !important;
	transform: scale(1.25);
}

.yalo-hero-slider__empty {
	padding: 24px;
	font-family: var(--font-secondary);
	border: 1px dashed #cccccc;
	background: #f5f5f5;
}

@media (max-width: 991px) {
	/* Full-bleed text column: override global .container fixed widths + 15px padding */
	.yalo-hero-slider .yalo-hero-slider__overlay .container {
		width: 100%;
		max-width: 100%;
		margin-left: auto;
		margin-right: auto;
		padding-left: 16px;
		padding-right: 16px;
		box-sizing: border-box;
	}

	.yalo-hero-slider__content {
		max-width: none;
		width: 100%;
		box-sizing: border-box;
	}

	.yalo-hero-slider__title {
		font-size: 44px;
		line-height: 52px;
	}
}
