/* Post Hero Slider */

.phs-slider {
	--phs-bg: #1f1b4f;
	--phs-accent: #df202a;
	--phs-text: #ffffff;
	--phs-pad-x: clamp(24px, 6vw, 84px);
	--phs-pad-y: clamp(36px, 6vw, 84px);
	--phs-speed: 650ms;

	position: relative;
	width: 100%;
	margin: 0 auto;
	background: #fff;
	box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.18);
	overflow: hidden;
	font-family: inherit;
	isolation: isolate;
}

.phs-slider *,
.phs-slider *::before,
.phs-slider *::after {
	box-sizing: border-box;
}

.phs-viewport {
	overflow: hidden;
}

.phs-track {
	display: flex;
	transition: transform var(--phs-speed) cubic-bezier(0.65, 0, 0.35, 1);
	will-change: transform;
}

.phs-slide {
	flex: 0 0 100%;
	display: grid;
	grid-template-columns: 65% 35%;
	min-height: clamp(380px, 34vw, 560px);
	margin: 0;
}

/* ---------- Content panel ---------- */

.phs-content {
	background: var(--phs-bg);
	color: var(--phs-text);
	padding: var(--phs-pad-y) var(--phs-pad-x) calc(var(--phs-pad-y) + 48px);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.phs-accent {
	display: block;
	width: 165px;
	max-width: 40%;
	height: 4px;
	margin: 0 0 18px;
	background: var(--phs-accent);
	border-radius: 4px 2px 3px 2px / 2px 4px 2px 3px;
	transform: skewX(-12deg);
}

.phs-title {
	margin: 0 0 clamp(16px, 2vw, 28px);
	color: var(--phs-text);
	font-size: clamp(1.6rem, 2.6vw, 2.75rem);
	font-weight: 600;
	line-height: 1.18;
	letter-spacing: -0.01em;
	max-width: 34ch;
	text-wrap: balance;
}

.phs-excerpt {
	margin: 0 0 clamp(22px, 2.4vw, 34px);
	color: var(--phs-text);
	opacity: 0.95;
	font-size: clamp(1rem, 1.25vw, 1.3rem);
	line-height: 1.55;
	max-width: 62ch;
}

.phs-button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 22px;
	border: 1.5px solid var(--phs-accent);
	border-radius: 6px;
	color: var(--phs-text);
	background: transparent;
	font-size: clamp(1rem, 1.2vw, 1.25rem);
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.25s ease, color 0.25s ease;
}

.phs-button:hover,
.phs-button:focus-visible {
	background: var(--phs-accent);
	color: #fff;
	text-decoration: none;
}

.phs-button:focus-visible {
	outline: 2px solid var(--phs-text);
	outline-offset: 3px;
}

.phs-button-icon {
	width: 1.3em;
	height: 1.3em;
	flex: none;
	transition: transform 0.25s ease;
}

.phs-button:hover .phs-button-icon {
	transform: translateX(4px);
}

/* ---------- Media panel ---------- */

.phs-media {
	position: relative;
	overflow: hidden;
	background: #fff;
}

.phs-media .phs-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center right;
}

/* White wash that fades the photo in from the left, as in the design */
.phs-fade {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to right,
		#fff 0%,
		rgba(255, 255, 255, 0.92) 22%,
		rgba(255, 255, 255, 0.55) 42%,
		rgba(255, 255, 255, 0) 68%
	);
	pointer-events: none;
}

/* Decorative motif strip, bottom-left, fading into the photo */
.phs-pattern {
	display: none;
	position: absolute;
	left: 0;
	bottom: 0;
	width: 70%;
	height: 72px;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(to right, #000 35%, transparent 100%);
	mask-image: linear-gradient(to right, #000 35%, transparent 100%);
}

.phs-has-pattern .phs-pattern {
	display: block;
}

.phs-pattern::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--phs-accent);
	opacity: 0.85;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='36' viewBox='0 0 48 36'%3E%3Cg fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='7' stroke-dasharray='3.2 2.6'/%3E%3Ccircle cx='12' cy='12' r='2.2'/%3E%3Cpath d='M26 34a10 10 0 0 1 18 -6'/%3E%3Cpath d='M30 34a6 6 0 0 1 10 -3.5' stroke-dasharray='2.4 2'/%3E%3Cpath d='M34 6a6 6 0 1 0 6 6'/%3E%3Cpath d='M2 34a8 8 0 0 1 14 -4' stroke-dasharray='2.6 2.2'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 48px 36px repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='36' viewBox='0 0 48 36'%3E%3Cg fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='7' stroke-dasharray='3.2 2.6'/%3E%3Ccircle cx='12' cy='12' r='2.2'/%3E%3Cpath d='M26 34a10 10 0 0 1 18 -6'/%3E%3Cpath d='M30 34a6 6 0 0 1 10 -3.5' stroke-dasharray='2.4 2'/%3E%3Cpath d='M34 6a6 6 0 1 0 6 6'/%3E%3Cpath d='M2 34a8 8 0 0 1 14 -4' stroke-dasharray='2.6 2.2'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 48px 36px repeat;
}

/* ---------- Controls ---------- */

.phs-controls {
	position: absolute;
	left: var(--phs-pad-x);
	bottom: clamp(20px, 3vw, 36px);
	display: flex;
	align-items: center;
	gap: 14px;
	z-index: 2;
}

.phs-dots {
	display: flex;
	gap: 8px;
}

.phs-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 1.5px solid var(--phs-text);
	border-radius: 999px;
	background: transparent;
	opacity: 0.6;
	cursor: pointer;
	transition: width 0.3s ease, background-color 0.3s ease, opacity 0.3s ease, border-color 0.3s ease;
}

.phs-dot:hover {
	opacity: 1;
}

.phs-dot.is-active {
	width: 28px;
	background: var(--phs-accent);
	border-color: var(--phs-accent);
	opacity: 1;
}

.phs-arrow {
	display: inline-grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1.5px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	background: transparent;
	color: var(--phs-text);
	cursor: pointer;
	transition: border-color 0.25s ease, background-color 0.25s ease;
}

.phs-arrow svg {
	width: 18px;
	height: 18px;
}

.phs-arrow:hover {
	border-color: var(--phs-accent);
	background: var(--phs-accent);
}

.phs-dot:focus-visible,
.phs-arrow:focus-visible {
	outline: 2px solid var(--phs-accent);
	outline-offset: 3px;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
	.phs-slide {
		grid-template-columns: 58% 42%;
	}
}

@media (max-width: 680px) {
	.phs-slide {
		grid-template-columns: 1fr;
		grid-template-rows: 220px auto;
		min-height: 0;
	}

	.phs-media {
		order: -1;
	}

	.phs-fade {
		background: linear-gradient(to top, var(--phs-bg) 0%, rgba(255, 255, 255, 0) 45%);
	}

	.phs-pattern {
		display: none !important;
	}

	.phs-title {
		max-width: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.phs-track,
	.phs-button,
	.phs-button-icon,
	.phs-dot {
		transition: none;
	}
}
