/**
 * Blog & insights infinite slider — matches V5 blog.css (+ infinite loop)
 */

.se-blog.stage--blog {
	--accent: var(--color-primary);
	--ink: var(--color-ink);
	--ink-soft: var(--color-ink-soft);
	--line: var(--color-line);
	--line-strong: var(--color-line-strong);
	--bg: var(--color-surface);
	--bg-elevated: var(--color-surface-soft);
	--ease: var(--ease-out);

	border-top: 1px solid var(--line);
	padding-top: 5rem;
	padding-bottom: 4rem;
	overflow: hidden;
	position: relative;
	color: var(--ink);
	background: var(--bg);
}

.se-blog .blog-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 2rem;
	flex-wrap: wrap;
	width: 100%;
	margin-bottom: 2.5rem;
}

.se-blog .blog-head__copy {
	max-width: 50rem;
}

.se-blog .blog-head__copy .eyebrow {
	color: var(--accent);
	margin-bottom: 0.75rem;
}

.se-blog .blog-head__title {
	font-family: var(--font-display);
	font-size: clamp(2.25rem, 5vw, 3.25rem);
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin: 0 0 1rem;
	color: var(--ink);
}

.se-blog .blog-head__lead {
	font-size: 1.1rem;
	line-height: 1.6;
	color: var(--ink-soft);
	margin: 0;
	font-weight: 500;
}

.se-blog .blog-controls {
	display: flex;
	gap: 10px;
	margin-bottom: 0.5rem;
	flex-shrink: 0;
}

.se-blog .blog-btn {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--line-strong);
	background: var(--bg-elevated);
	color: var(--ink);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition:
		border-color 0.2s var(--ease),
		color 0.2s var(--ease);
}

.se-blog .blog-btn:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.se-blog .blog-btn__icon {
	display: block;
	width: 20px;
	height: 20px;
	color: currentColor;
	flex-shrink: 0;
}

.se-blog .blog-btn:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.se-blog .blog-slider__dots {
	display: none;
	justify-content: center;
	gap: 8px;
	margin-top: 0.5rem;
	min-height: 10px;
}

.se-blog .blog-slider__dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(107, 98, 172, 0.25);
	cursor: pointer;
	transition: background 0.25s, transform 0.25s;
}

.se-blog .blog-slider__dot.is-active {
	background: var(--color-primary);
	transform: scale(1.3);
}

.se-blog .blog-slider-wrapper {
	position: relative;
	overflow: hidden;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.se-blog .blog-slider-inner {
	overflow: visible;
	padding-bottom: 2rem;
	/* Align first card with .container; allow right edge to cut at viewport */
	padding-left: max(
		var(--gutter),
		calc((100vw - min(100vw, var(--container-max))) / 2 + var(--gutter))
	);
	padding-right: 0;
}

.se-blog .blog-slider-track {
	display: flex;
	gap: 2rem;
	transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
	width: max-content;
	will-change: transform;
}

.se-blog .blog-card {
	width: 380px;
	flex-shrink: 0;
	background: var(--bg);
	border-radius: 16px;
	border: 1px solid rgba(17, 28, 46, 0.06);
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
	display: flex;
	flex-direction: column;
}

.se-blog .blog-card__media {
    width: 100%;
    aspect-ratio: 16 / 8;
    overflow: hidden;
    position: relative;
    background: var(--bg-elevated);
}

.se-blog .blog-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-position: center;
}

.se-blog .blog-card__body {
	padding: 1.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	flex: 1;
}

.se-blog .blog-card__tag {
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--accent);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.se-blog .blog-card__title {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.4;
	color: var(--ink);
	margin: 0;
	font-family: var(--font-display);
}

.se-blog .blog-card__link {
	color: inherit;
	text-decoration: none;
}

.se-blog .blog-card__link:hover {
	color: var(--accent);
}

.se-blog .blog-card__link:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.se-blog .blog-card__excerpt {
	font-size: 0.9rem;
	line-height: 1.6;
	color: var(--ink-soft);
	margin: 0;
}

/* Fade masks — ~3.5 card peek on desktop */
.se-blog .blog-slider-wrapper::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: clamp(80px, 15vw, 220px);
	height: 100%;
	background: linear-gradient(90deg, var(--bg) 0%, transparent 100%);
	pointer-events: none;
	z-index: 10;
}

.se-blog .blog-slider-wrapper::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: clamp(80px, 15vw, 220px);
	height: 100%;
	background: linear-gradient(90deg, transparent 0%, var(--bg) 100%);
	pointer-events: none;
	z-index: 10;
}

.se-blog [data-reveal] {
	transition:
		opacity 0.7s var(--ease-out),
		transform 0.7s var(--ease-out);
}

html.js-ready .se-blog [data-reveal]:not(.is-visible) {
	opacity: 0;
	transform: translateY(24px);
}

.se-blog [data-reveal].is-visible {
	opacity: 1;
	transform: none;
}

@media (max-width: 1200px) {
	.se-blog .blog-head__title {
		font-size: clamp(2rem, 4vw, 2.75rem);
	}

	.se-blog .blog-card {
		width: 340px;
	}
}

@media (max-width: 767px) {
	.se-blog .blog-controls {
		display: none;
	}

	.se-blog .blog-slider-wrapper {
		touch-action: pan-y;
	}

	.se-blog .blog-slider-wrapper::before,
	.se-blog .blog-slider-wrapper::after {
		display: none;
	}

	.se-blog .blog-slider__dots {
		display: flex;
		margin-top: 1rem;
		padding-bottom: 0.25rem;
	}
}

@media (max-width: 768px) {
	.se-blog.stage--blog {
		padding-top: 3.5rem;
		padding-bottom: 3rem;
	}

	.se-blog .blog-head {
		align-items: flex-start;
		margin-bottom: 2rem;
	}

	.se-blog .blog-card {
		width: min(380px, calc(100vw - var(--gutter) * 2));
	}

	.se-blog .blog-slider-track {
		gap: 1.25rem;
	}
}

@media (max-width: 480px) {
	.se-blog .blog-btn {
		width: 40px;
		height: 40px;
	}

	.se-blog .blog-card__body {
		padding: 1.35rem;
	}

	.se-blog .blog-head__lead {
		font-size: 1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.se-blog .blog-slider-track {
		transition: none;
	}

	.se-blog [data-reveal] {
		transition: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}



/* Blog cards without slider: 1–3 posts */
.se-blog.no-slider .blog-slider-wrapper {
	overflow: visible;
	width: 100%;
	max-width: min(100%, var(--container-max));
	margin-left: auto;
	margin-right: auto;
}

.se-blog.no-slider .blog-slider-inner {
	overflow: visible;
	padding-left: var(--gutter);
	padding-right: var(--gutter);
}

.se-blog.no-slider .blog-slider-track {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	width: 100%;
	transform: none;
	transition: none;
	will-change: auto;
}

.se-blog.no-slider .blog-card {
	flex: 1 1 300px;
	width: auto;
	max-width: 100%;
}

.se-blog.no-slider .blog-controls,
.se-blog.no-slider .blog-slider__dots {
	display: none !important;
}

.se-blog.no-slider .blog-slider-wrapper::before,
.se-blog.no-slider .blog-slider-wrapper::after {
	display: none;
}

@media (max-width: 767px) {
	.se-blog.no-slider .blog-slider-track {
		gap: 1.25rem;
	}

	.se-blog.no-slider .blog-card {
		flex: 1 1 100%;
		width: 100%;
	}
}