/**
 * Featured slider — custom progress-bar navigation (front page only).
 * Enqueued via library/enqueue-scripts.php behind is_front_page().
 */

/* Hero fills one screenful (viewport minus the 153px site nav). Fixed-height
   flex column so slider + nav always sum to this height and never pass the fold. */
.featured-slider-section {
	display: flex;
	flex-direction: column;
	height: calc(100vh - 153px);
	max-height: 950px;
}

/* Slider fills the space above the nav. */
.featured-slider {
	flex: 1 1 auto;
	min-height: 0;
}

/* Nav takes its natural content height. */
.featured-slider-nav {
	flex: 0 0 auto;
}

/* Slick wrappers + slide fill the flexed slider area. */
.featured-slider .slick-list,
.featured-slider .slick-track,
.featured-slider .slick-slide,
.featured-slider .slick-slide > div,
.featured-slide {
	height: 100%;
}

/* Content overlay box on each slide. */
.featured-slide__content {
	max-width: 50%;
	padding: 1.5rem;
}

/* Active-slide headline: scales from 22px on phones to 36px on desktop. */
.featured-slider .slick-active .featured-slide__content h2 {
	font-size: clamp(1.375rem, 4.5vw, 2.25rem);
}

@media (max-width: 768px) {
	.featured-slide__content {
		max-width: 100%;
		/* Leave room at the bottom for the overlaid progress bars. */
		padding: 1.25rem 1.25rem 3rem;
	}

	/* Mobile: progress bars move onto the slide, so the published date and
	   Read More CTA are hidden to make room. */
	.featured-slide__date,
	.featured-slide__cta {
		display: none;
	}

	/* Become the positioning context for the overlaid nav and let the slider
	   fill the hero on its own (nav no longer stacks below it). */
	.featured-slider-section {
		position: relative;
		display: block;
		height: auto;
		max-height: none;
		padding-bottom: 0;
	}

	.featured-slider .slick-list,
	.featured-slider .slick-track,
	.featured-slider .slick-slide,
	.featured-slider .slick-slide > div,
	.featured-slide {
		height: 60vh;
	}
}

/* Read More CTA inside each slide. */
.featured-slide__cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 600px;
	margin-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.6);
	text-decoration: none;
}

.featured-slide__readmore {
	font-size: 1.125rem;
	color: var(--wp--preset--color--white, #fff);
}

.featured-slide__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 2.25rem;
	height: 2.25rem;
	background: var(--wp--preset--color--yellow, #fcb635);
	transition: background-color 0.2s ease;
}

.featured-slide__arrow img {
	width: 1.5rem;
	height: 1.5rem;
	/* SVG already points right — no rotation needed. */
	transition: filter 0.2s ease;
}

/* Hover scoped to the arrow button — square stays yellow, arrow turns white. */
.featured-slide__arrow:hover img {
	filter: brightness(0) invert(1); /* recolor the arrow white */
}

/* Nav below the slider — flex row of equal columns (stacks to a column on mobile). */
.featured-slider-nav .slick-dots {
	position: static; /* override Slick's absolute positioning */
	display: flex;
	flex-direction: row;
	gap: 1.5rem 2rem;
	width: 100%;
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
	text-align: left;
}

/* Equal-width columns so each slide's nav cell shares the row evenly. */
.featured-slider-nav .slick-dots li {
	flex: 1 1 0;
}

.featured-slider-nav .slick-dots li {
	position: static;
	display: block;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
}

/* Remove Slick's default bullet glyph. */
.featured-slider-nav .slick-dots li button:before {
	display: none;
	content: '';
}

/* The clickable title + bar (higher specificity to beat slick-theme.css). */
.featured-slider-nav .slick-dots li .featured-dot {
	display: block;
	width: 100%;
	height: auto;
	padding: 0;
	background: none;
	border: 0;
	text-align: left;
	cursor: pointer;
	/* Reset Slick's number-hiding styles so the text below shows. */
	font-size: 1rem;
	line-height: 1.4;
	color: inherit;
}

.featured-dot__bar {
	display: block;
	width: 100%;
	height: 4px;
	margin-bottom: 0.75rem;
	background: var(--wp--preset--color--light-purple, #faeaff); /* track */
	border-radius: 9999px;
	overflow: hidden;
}

.featured-dot__fill {
	display: block;
	width: 0;
	height: 100%;
	background: var(--wp--preset--color--purple, #8300ae);
	border-radius: 9999px;
}

.featured-dot__category {
	display: block;
	margin-bottom: 0.375rem;
	font-weight: 700;
	font-size: 0.75rem;
	line-height: 1.2;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--wp--preset--color--purple, #8300ae);
}

.featured-dot__title {
	display: block;
	font-weight: 700;
	font-size: 1.125rem;
	line-height: 1.3;
	color: var(--wp--preset--color--dark-blue, #011936);
	transition: color 0.2s ease;
}

.featured-slider-nav .slick-dots li.slick-active .featured-dot__title,
.featured-dot:hover .featured-dot__title,
.featured-dot:focus-visible .featured-dot__title {
	color: var(--wp--preset--color--purple, #8300ae);
}

/* Mobile nav: overlay the progress bars on top of the slide, toward the bottom,
   as a horizontal row (Instagram-stories style). The under-hero title/category
   text is removed — only the bars remain. */
@media (max-width: 768px) {
	.featured-slider-nav {
		position: absolute;
		bottom: 1.25rem;
		left: 0;
		right: 0;
		z-index: 30;
		pointer-events: none; /* bars are non-interactive; the slide link stays clickable */
	}

	.featured-slider-nav .slick-dots {
		flex-direction: row;
		gap: 0.5rem;
		margin: 0;
		padding: 0 1.25rem;
	}

	.featured-slider-nav .slick-dots li {
		flex: 1 1 0;
	}

	/* Hide the per-slide title and category under the hero — bars only. */
	.featured-slider-nav .featured-dot__category,
	.featured-slider-nav .featured-dot__title {
		display: none;
	}

	.featured-dot__bar {
		margin-bottom: 0;
	}
}
