/**
 * Posts Slider — styles for the [posts_slider] hero carousel.
 * Full-bleed slides with the featured image as background, dark overlay,
 * centered title/excerpt, pill button, side arrows and dots. Fully responsive.
 * Copy to your child theme as /assets/css/post-slider.css
 */

.posts-slider {
	--posts-slider-height: clamp(360px, 42vw, 460px);
	--posts-slider-overlay: rgba(12, 20, 46, 0.75);
	--posts-slider-button-bg: #151d35;
	--posts-slider-icon-border: #6c7be8;
	--posts-slider-icon-fill: #8b9cff;
	position: relative;
	width: 100%;
	overflow: hidden;
	background-color: #0c142e;
}

.posts-slider-viewport {
	overflow: hidden;
	width: 100%;
}

.posts-slider-track {
	display: flex;
	width: 100%;
	transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
}

.posts-slider-slide {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
	min-height: var(--posts-slider-height);
	display: flex;
	align-items: center;
	justify-content: center;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.posts-slider-slide-noimage {
	background-image: linear-gradient(135deg, #1b2a63 0%, #0c142e 100%);
}

.posts-slider-overlay {
	position: absolute;
	inset: 0;
	background: var(--posts-slider-overlay);
}

.posts-slider-content {
	position: relative;
	z-index: 2;
	max-width: 900px;
	padding: 48px 64px;
	text-align: center;
	color: #fff;
}

.posts-slider-title {
	margin: 0 0 16px;
	font-size: clamp(1.6rem, 3.6vw, 3rem);
	line-height: 1.15;
	font-weight: 600;
	color: #fff;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.posts-slider-excerpt {
	margin: 0 auto 28px;
	max-width: 720px;
	font-size: clamp(0.95rem, 1.3vw, 1.125rem);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.92);
}

.posts-slider-button {
	display: inline-flex;
	align-items: center;
	gap: 18px;
	padding: 10px 10px 10px 34px;
	border: 0;
	border-radius: 999px;
	background-color: var(--posts-slider-button-bg);
	color: #fff;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	transition: box-shadow 260ms ease, transform 260ms ease;
}

.posts-slider-button:hover,
.posts-slider-button:focus-visible {
	color: #fff;	
}

.posts-slider-button-label {
	display: block;
	padding-block: 6px;
}

.posts-slider-button-icon {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 2px solid var(--posts-slider-icon-border);
	border-radius: 999px;
	background-color: transparent;
	color: #fff;
	transition: width 280ms cubic-bezier(0.4, 0, 0.2, 1), background-color 260ms ease, border-color 260ms ease;
}

.posts-slider-button:hover .posts-slider-button-icon,
.posts-slider-button:focus-visible .posts-slider-button-icon {
	width: 72px;
	border-color: var(--posts-slider-icon-fill);
	background-color: var(--posts-slider-icon-fill);
}

.posts-slider-button-icon svg {
	width: 20px;
	height: 20px;
}

.posts-slider-arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	transform: translateY(-50%);
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	cursor: pointer;
	transition: background-color 200ms ease;
}

.posts-slider-arrow:hover,
.posts-slider-arrow:focus-visible {
	background-color: rgba(255, 255, 255, 0.18);
}

.posts-slider-arrow svg {
	width: 30px;
	height: 30px;
}

.posts-slider-arrow-prev {
	left: 12px;
}

.posts-slider-arrow-next {
	right: 12px;
}

.posts-slider-dots {
	position: absolute;
	bottom: 18px;
	left: 50%;
	z-index: 3;
	display: flex;
	gap: 10px;
	transform: translateX(-50%);
}

.posts-slider-dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.45);
	cursor: pointer;
	transition: background-color 200ms ease, transform 200ms ease;
}

.posts-slider-dot.is-active {
	background-color: #fff;
	transform: scale(1.25);
}

.posts-slider-arrow:focus-visible,
.posts-slider-dot:focus-visible,
.posts-slider-button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

@media (max-width: 782px) {
	.posts-slider {
		--posts-slider-height: clamp(320px, 62vw, 420px);
	}

	.posts-slider-content {
		padding: 40px 56px;
	}

	.posts-slider-arrow {
		width: 38px;
		height: 38px;
	}

	.posts-slider-arrow svg {
		width: 22px;
		height: 22px;
	}

	.posts-slider-arrow-prev {
		left: 4px;
	}

	.posts-slider-arrow-next {
		right: 4px;
	}
}

@media (max-width: 480px) {
	.posts-slider-content {
		padding: 36px 44px;
	}

	.posts-slider-excerpt {
		display: -webkit-box;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.posts-slider-button {
		gap: 14px;
		padding: 8px 8px 8px 26px;
		font-size: 0.95rem;
	}

	.posts-slider-button-icon {
		width: 38px;
		height: 38px;
	}

	.posts-slider-button:hover .posts-slider-button-icon,
	.posts-slider-button:focus-visible .posts-slider-button-icon {
		width: 60px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.posts-slider-track {
		transition: none;
	}

	.posts-slider-button:hover {
		transform: none;
	}

	.posts-slider-button-icon {
		transition: background-color 160ms ease, border-color 160ms ease;
	}

	.posts-slider-button:hover .posts-slider-button-icon,
	.posts-slider-button:focus-visible .posts-slider-button-icon {
		width: 44px;
	}
}