/* ==========================================================================
   Related Posts section
   Figma: node 52341:14119
   ========================================================================== */

/* ── Section ── */

.related-posts {
	position: relative;
	background-color: var(--hdr-bg); /* #faf4e7 */
	padding: 100px 0;
	overflow: hidden;
}

/* Decorative blur glow — top-center */
.related-posts::before {
	content: '';
	position: absolute;
	top: 24px;
	left: 50%;
	transform: translateX(-50%);
	width: 293px;
	height: 293px;
	background: radial-gradient(circle, rgba(255, 212, 96, 0.45) 0%, transparent 70%);
	filter: blur(28px);
	pointer-events: none;
	border-radius: 50%;
}

/* ── Header ── */

.related-posts__header {
	text-align: center;
	max-width: 639px;
	margin: 0 auto 72px;
	display: flex;
	flex-direction: column;
	gap: 24px;
	position: relative;
	z-index: 1;
}

.related-posts__title {
	font-family: var(--font-heading);
	font-size: 48px;
	font-weight: 700;
	color: var(--nav-dark);
	line-height: 53px;
	letter-spacing: 0;
	margin: 0;
}

.related-posts__subtitle {
	font-family: var(--font-figtree);
	font-size: 24px;
	font-weight: 400;
	color: #505869;
	line-height: 32px;
	margin: 0;
}

.related-posts__cat-name {
	color: #505869;
}

/* ── Cards slider ── */

/* overflow: visible so hover shadows aren't clipped.
   Must use !important to override .swiper { overflow: hidden } from swiper.min.css.
   Horizontal slide clipping is handled by .related-posts { overflow: hidden }.
   Vertical padding/margin give room for the bottom box-shadow. */
.related-posts .related-posts__swiper {
	overflow: visible !important;
	padding-bottom: 20px;
	margin-bottom: -20px;
}

/* Equal-height slides */
.related-posts__swiper .swiper-wrapper {
	align-items: stretch;
}

.related-posts__swiper .swiper-slide {
	height: auto;
}

.related-posts__swiper .blog-card {
	height: 100%;
}

/* ── Pagination dots — mobile only ── */

.related-posts__pagination {
	display: none;
	justify-content: center;
	gap: 8px;
	margin-top: 32px;
}

.related-posts__pagination .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	background: #d0d3db;
	opacity: 1;
	border-radius: 50%;
	display: inline-block;
	cursor: pointer;
	transition: background 0.2s ease;
}

.related-posts__pagination .swiper-pagination-bullet-active {
	background: var(--nav-dark);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
	.related-posts__title {
		font-size: 40px;
		line-height: 46px;
	}
}

@media (max-width: 900px) {
	.related-posts {
		padding: 64px 0;
	}

	.related-posts__header {
		margin-bottom: 48px;
	}

	.related-posts__title {
		font-size: 32px;
		line-height: 38px;
	}

	.related-posts__subtitle {
		font-size: 18px;
		line-height: 26px;
	}
}

/* Show pagination when fewer than 3 slides visible (≤ 900px) */
@media (max-width: 900px) {
	.related-posts__pagination {
		display: flex;
	}
}
