/**
 * Карусель записей блога на главной.
 */

.front-posts-carousel {
	--fpc-teal: #007979;
	--fpc-teal-glow: rgba(0, 121, 121, 0.35);
	--fpc-yellow: #f2d06b;
	--fpc-ash: #1a2226;
	--fpc-muted: #5c6468;
	--fpc-card: #ffffff;
	--fpc-radius: 22px;
	--fpc-ease: cubic-bezier(0.23, 1, 0.32, 1);

	position: relative;
	padding: clamp(3.25rem, 6vw, 5rem) 0 clamp(3.5rem, 7vw, 5.5rem);
	overflow: hidden;
	font-family: "Manrope", system-ui, sans-serif;
	background: linear-gradient(165deg, #0a1214 0%, #0f1f22 42%, #061012 100%);
	color: #fff;
}

.front-posts-carousel__bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(ellipse 90% 55% at 12% 20%, var(--fpc-teal-glow), transparent 52%),
		radial-gradient(ellipse 70% 45% at 88% 75%, rgba(242, 208, 107, 0.12), transparent 50%);
	opacity: 0.95;
}

.front-posts-carousel__inner {
	position: relative;
	z-index: 1;
	max-width: 1200px;
	margin: 0 auto;
	padding-inline: clamp(1rem, 3vw, 1.5rem);
}

.front-posts-carousel__head {
	text-align: center;
	margin-bottom: clamp(2rem, 4.5vw, 2.75rem);
}

.front-posts-carousel__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0 0 0.65rem;
	padding: 0.35rem 0.9rem;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fpc-teal);
	background: linear-gradient(135deg, var(--fpc-yellow) 0%, #e8c655 100%);
	border-radius: 999px;
	box-shadow: 0 6px 22px rgba(242, 208, 107, 0.25);
}

.front-posts-carousel__title {
	margin: 0 0 0.6rem;
	font-size: clamp(1.75rem, 3.5vw, 2.35rem);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.02em;
	color: rgba(255, 255, 255, 0.96);
}

.front-posts-carousel__title span {
	color: var(--fpc-yellow);
}

.front-posts-carousel__lead {
	margin: 0 auto 1.1rem;
	max-width: 36rem;
	font-size: 1rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.68);
}

.front-posts-carousel__all {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-weight: 700;
	font-size: 0.92rem;
	color: var(--fpc-yellow);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease, gap 0.25s var(--fpc-ease);
}

.front-posts-carousel__all:hover,
.front-posts-carousel__all:focus-visible {
	color: #fff;
	border-bottom-color: var(--fpc-yellow);
}

.front-posts-carousel__all:focus-visible {
	outline: 2px solid var(--fpc-yellow);
	outline-offset: 4px;
	border-radius: 4px;
}

.front-posts-carousel__all i {
	font-size: 0.82em;
	transition: transform 0.25s var(--fpc-ease);
}

.front-posts-carousel__all:hover i,
.front-posts-carousel__all:focus-visible i {
	transform: translateX(4px);
}

.front-posts-carousel__swiper-wrap {
	position: relative;
	padding: 0 0 2.75rem;
}

.front-posts-carousel__swiper {
	overflow: visible;
}

.front-posts-carousel__swiper .swiper-slide {
	height: auto;
}

.front-post-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--fpc-card);
	border-radius: var(--fpc-radius);
	overflow: hidden;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
	border: 1px solid rgba(255, 255, 255, 0.12);
	transition: transform 0.35s var(--fpc-ease), box-shadow 0.35s ease;
}

.front-post-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45);
}

.front-post-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: linear-gradient(145deg, #0d2828 0%, var(--fpc-teal) 100%);
}

.front-post-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.55s var(--fpc-ease);
}

.front-post-card:hover .front-post-card__img {
	transform: scale(1.06);
}

.front-post-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 2.5rem;
	color: rgba(255, 255, 255, 0.35);
}

.front-post-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1.15rem 1.25rem 1.35rem;
	color: var(--fpc-ash);
}

.front-post-card__time {
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--fpc-teal);
	margin-bottom: 0.45rem;
}

.front-post-card__title {
	margin: 0 0 0.55rem;
	font-size: 1.08rem;
	font-weight: 800;
	line-height: 1.28;
	letter-spacing: -0.02em;
}

.front-post-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.front-post-card__title a:hover,
.front-post-card__title a:focus-visible {
	color: var(--fpc-teal);
}

.front-post-card__excerpt {
	margin: 0 0 1rem;
	flex: 1;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--fpc-muted);
}

.front-post-card__more {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: auto;
	font-weight: 700;
	font-size: 0.88rem;
	color: var(--fpc-teal);
	text-decoration: none;
	transition: gap 0.25s var(--fpc-ease), color 0.2s ease;
}

.front-post-card__more:hover,
.front-post-card__more:focus-visible {
	color: #005a5a;
	gap: 0.55rem;
}

.front-post-card__more:focus-visible {
	outline: 2px solid var(--fpc-yellow);
	outline-offset: 2px;
	border-radius: 4px;
}

.front-posts-carousel__nav {
	position: absolute;
	top: 42%;
	z-index: 4;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 50%;
	background: rgba(10, 18, 20, 0.75);
	color: #fff;
	cursor: pointer;
	backdrop-filter: blur(8px);
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.front-posts-carousel__nav:hover,
.front-posts-carousel__nav:focus-visible {
	background: var(--fpc-teal);
	border-color: rgba(255, 255, 255, 0.35);
	color: #fff;
}

.front-posts-carousel__nav:focus-visible {
	outline: 2px solid var(--fpc-yellow);
	outline-offset: 3px;
}

.front-posts-carousel__nav--prev {
	left: 0;
	transform: translate(-30%, -50%);
}

.front-posts-carousel__nav--next {
	right: 0;
	transform: translate(30%, -50%);
}

.front-posts-carousel__pagination {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	justify-content: center;
	gap: 0.45rem;
}

.front-posts-carousel__pagination .swiper-pagination-bullet {
	width: 9px;
	height: 9px;
	opacity: 0.35;
	background: #fff;
	transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.front-posts-carousel__pagination .swiper-pagination-bullet-active {
	opacity: 1;
	background: var(--fpc-yellow);
	transform: scale(1.15);
}

@media (max-width: 900px) {
	.front-posts-carousel__nav--prev {
		transform: translate(0, -50%);
		left: 4px;
	}

	.front-posts-carousel__nav--next {
		transform: translate(0, -50%);
		right: 4px;
	}
}

@media (max-width: 520px) {
	.front-posts-carousel__nav {
		width: 42px;
		height: 42px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.front-post-card,
	.front-post-card__img,
	.front-posts-carousel__all i {
		transition: none;
	}

	.front-post-card:hover {
		transform: none;
	}

	.front-post-card:hover .front-post-card__img {
		transform: none;
	}
}
