/**
 * Stay True — Posts Carousel widgets shared styles.
 */

.st-posts-carousel {
	position: relative;
	width: 100%;
}

.st-posts-carousel .swiper {
	overflow: hidden;
}

.st-posts-carousel .swiper-slide {
	height: auto;
	display: flex;
}

/* ---------- Card ---------- */

.st-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	background: transparent;
	color: inherit;
	transition: transform 0.35s ease;
}

.st-card:hover {
	transform: translateY(-4px);
}

.st-card--video.is-playing,
.st-card--video.is-playing:hover {
	transform: none;
}

.st-card--video.is-playing .st-card__media {
	overflow: visible;
}

.st-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background: #111;
}

.st-card--video .st-card__media {
	aspect-ratio: 16 / 9;
}

.st-card__media img,
.st-card__media > a > img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s ease;
}

.st-card:hover .st-card__media img {
	transform: scale(1.04);
}

.st-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	padding: 4px 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #fff;
	background: var( --e-global-color-accent, #d9a441 );
	border-radius: 2px;
}

.st-card__duration {
	position: absolute;
	right: 10px;
	bottom: 10px;
	z-index: 2;
	padding: 3px 8px;
	font-size: 12px;
	font-weight: 600;
	color: #fff;
	background: rgba( 0, 0, 0, 0.75 );
	border-radius: 3px;
}

.st-card__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.9);
	color: #fff;
	opacity: 0.85;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	filter: drop-shadow( 0 2px 8px rgba(0,0,0,0.45) );
	transition: transform 0.3s ease, opacity 0.3s ease;
	z-index: 2;
}

.st-card:hover .st-card__play {
	transform: translate(-50%, -50%) scale(1);
	opacity: 1;
}

.st-card__player {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	background: #000;
}

.st-card__body {
	padding: 16px 0 4px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.st-card__title {
	margin: 0;
	font-size: 16px;
	line-height: 1.3;
	font-weight: 600;
}

.st-card__title a {
	color: inherit;
	text-decoration: none;
}

.st-card__title a:hover {
	opacity: 0.75;
}

.st-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	font-size: 12px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #777;
}

.st-card__catalog {
	font-weight: 700;
}

.st-card__excerpt {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: inherit;
	opacity: 0.8;
}

.st-card__cta {
	margin-top: 4px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: inherit;
	text-decoration: none;
	align-self: flex-start;
}

.st-card__cta::after {
	content: "→";
	transition: transform 0.25s ease;
}

.st-card__cta:hover::after {
	transform: translateX(4px);
}

/* ---------- Navigation ---------- */

.st-nav__btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 999px;
	background: rgba( 0, 0, 0, 0.75 );
	color: #fff;
	cursor: pointer;
	transition: background 0.2s ease, opacity 0.2s ease;
}

.st-nav__btn:hover {
	background: #000;
}

.st-nav__btn--prev {
	left: -22px;
}

.st-nav__btn--next {
	right: -22px;
}

.st-nav__btn.swiper-button-disabled {
	opacity: 0.35;
	pointer-events: none;
}

@media ( max-width: 767px ) {
	.st-nav__btn {
		width: 36px;
		height: 36px;
	}
	.st-nav__btn--prev { left: 4px; }
	.st-nav__btn--next { right: 4px; }
}

/* ---------- Pagination ---------- */

.st-posts-carousel .st-pagination {
	position: static;
	margin-top: 20px;
	display: flex;
	justify-content: center;
	gap: 8px;
}

.st-posts-carousel .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	background: currentColor;
	opacity: 0.3;
	transition: opacity 0.2s ease, background 0.2s ease;
}

.st-posts-carousel .swiper-pagination-bullet-active {
	opacity: 1;
	background: var( --e-global-color-accent, #d9a441 );
}

.st-carousel-empty {
	padding: 24px;
	text-align: center;
	font-style: italic;
	opacity: 0.7;
}
