/**
 * IO Widget - Posts Carousel v1.1.5
 * Center glassmorph + curved side cards
 */

.io-pc {
	--io-pc-card-w: 420px;
	--io-pc-img-h: 280px;
	--io-pc-overlap: 25px;
	--io-pc-transition: 550ms;
	--io-pc-side-scale: 0.78;
	--io-pc-side-rotate: 8deg;
	--io-pc-side-offset: 58%;
	position: relative;
	width: 100%;
	direction: rtl;
	box-sizing: border-box;
	padding: 12px 48px 36px;
	overflow: hidden;
}

.io-pc *,
.io-pc *::before,
.io-pc *::after {
	box-sizing: border-box;
}

.io-pc-stage {
	position: relative;
	width: 100%;
	perspective: 1200px;
	perspective-origin: 50% 45%;
}

.io-pc-track {
	position: relative;
	width: 100%;
	min-height: calc(var(--io-pc-img-h) + var(--io-pc-overlap) + 120px);
	display: flex;
	align-items: flex-start;
	justify-content: center;
}

.io-pc-card {
	position: absolute;
	top: 0;
	left: 50%;
	width: var(--io-pc-card-w);
	max-width: 92vw;
	transform: translateX(-50%) scale(0.7);
	opacity: 0;
	pointer-events: none;
	z-index: 1;
	transition:
		transform var(--io-pc-transition) cubic-bezier(0.22, 1, 0.36, 1),
		opacity var(--io-pc-transition) ease,
		filter var(--io-pc-transition) ease;
	will-change: transform, opacity;
}

.io-pc-card.is-center {
	transform: translateX(-50%) scale(1) rotateY(0deg);
	opacity: 1;
	z-index: 5;
	pointer-events: auto;
	filter: none;
}

.io-pc-card.is-prev {
	transform: translateX(calc(-50% - var(--io-pc-side-offset))) scale(var(--io-pc-side-scale)) rotateY(calc(var(--io-pc-side-rotate) * 1));
	opacity: 0.72;
	z-index: 3;
	pointer-events: auto;
	filter: saturate(0.85) brightness(0.95);
}

.io-pc-card.is-next {
	transform: translateX(calc(-50% + var(--io-pc-side-offset))) scale(var(--io-pc-side-scale)) rotateY(calc(var(--io-pc-side-rotate) * -1));
	opacity: 0.72;
	z-index: 3;
	pointer-events: auto;
	filter: saturate(0.85) brightness(0.95);
}

.io-pc-card.is-far-prev {
	transform: translateX(calc(-50% - 110%)) scale(0.6) rotateY(12deg);
	opacity: 0;
	z-index: 1;
}

.io-pc-card.is-far-next {
	transform: translateX(calc(-50% + 110%)) scale(0.6) rotateY(-12deg);
	opacity: 0;
	z-index: 1;
}

.io-pc-link {
	display: block;
	text-decoration: none;
	color: inherit;
	outline: none;
}

.io-pc-image-wrap {
	position: relative;
	width: 100%;
	overflow: hidden;
	line-height: 0;
}

.io-pc-image {
	display: block;
	width: 100%;
	height: var(--io-pc-img-h);
	min-height: var(--io-pc-img-h);
	max-height: var(--io-pc-img-h);
	object-fit: cover;
	border-radius: 16px;
	background: #E5E7EB;
}

.io-pc-image-placeholder {
	background: linear-gradient(135deg, #E5E7EB 0%, #D1D5DB 100%);
}

/* Body / glass */
.io-pc-body {
	position: relative;
	margin: calc(var(--io-pc-overlap) * -1) 14px 0;
	padding: 16px 18px;
	border-radius: 14px;
	border: 1px solid transparent;
	background: transparent;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	box-shadow: none;
	transition:
		background var(--io-pc-transition) ease,
		backdrop-filter var(--io-pc-transition) ease,
		border-color var(--io-pc-transition) ease,
		box-shadow var(--io-pc-transition) ease,
		transform var(--io-pc-transition) ease,
		opacity var(--io-pc-transition) ease;
}

.io-pc-card.is-center .io-pc-body {
	background: rgba(255, 255, 255, 0.55);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-color: rgba(255, 255, 255, 0.45);
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.io-pc-card:not(.is-center) .io-pc-body {
	background: transparent;
	border-color: transparent;
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

.io-pc-card:not(.is-center) .io-pc-excerpt,
.io-pc-card:not(.is-center) .io-pc-footer,
.io-pc-card:not(.is-center) .io-pc-date {
	opacity: 0;
	max-height: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, max-height 0.35s ease;
}

.io-pc-card.is-center .io-pc-excerpt,
.io-pc-card.is-center .io-pc-footer,
.io-pc-card.is-center .io-pc-date {
	opacity: 1;
	max-height: 200px;
	transition: opacity 0.4s ease 0.1s, max-height 0.4s ease;
}

.io-pc-date {
	font-size: 12px;
	color: #6B7280;
	margin-bottom: 6px;
	direction: ltr;
	text-align: right;
}

.io-pc-title {
	margin: 0 0 8px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.45;
	color: #1A1A2E;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.io-pc-card:not(.is-center) .io-pc-title {
	font-size: 14px;
	-webkit-line-clamp: 2;
	text-align: center;
}

.io-pc-excerpt {
	margin: 0 0 12px;
	font-size: 13px;
	line-height: 1.65;
	color: #4B5563;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.io-pc-footer {
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

.io-pc-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #3B82F6;
	transition: color 0.2s ease, gap 0.2s ease;
}

.io-pc-link:hover .io-pc-btn {
	gap: 12px;
}

.io-pc-btn-icon {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.io-pc-btn-icon svg,
.io-pc-btn-icon img {
	display: block;
	width: 14px;
	height: 14px;
	object-fit: contain;
}

/* Arrows */
.io-pc-arrow {
	position: absolute;
	top: calc(var(--io-pc-img-h) / 2);
	transform: translateY(-50%);
	z-index: 10;
	width: 42px;
	height: 42px;
	border: none;
	border-radius: 50%;
	background: #fff;
	color: #1A1A2E;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	padding: 0;
}

.io-pc-arrow:hover {
	transform: translateY(-50%) scale(1.06);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
}

.io-pc-prev {
	right: 4px;
}

.io-pc-next {
	left: 4px;
}

/* Dots */
.io-pc-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 18px;
}

.io-pc-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: none;
	padding: 0;
	background: #D1D5DB;
	cursor: pointer;
	transition: width 0.25s ease, background-color 0.25s ease;
}

.io-pc-dot.is-active {
	width: 22px;
	border-radius: 6px;
	background: #3B82F6;
}

.io-pc-empty {
	padding: 24px;
	text-align: center;
	color: #6B7280;
}

@media (max-width: 767px) {
	.io-pc {
		padding: 8px 36px 28px;
		--io-pc-card-w: min(320px, 78vw);
		--io-pc-img-h: 200px;
		--io-pc-side-offset: 48%;
		--io-pc-side-scale: 0.7;
	}

	.io-pc-arrow {
		width: 36px;
		height: 36px;
	}

	.io-pc-title {
		font-size: 15px;
	}

	.io-pc-card.is-prev,
	.io-pc-card.is-next {
		opacity: 0.55;
	}
}


.io-pc.is-fullwidth {
	padding-left: 0;
	padding-right: 0;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.io-pc.is-fullwidth .io-pc-arrow.io-pc-prev { right: 16px; }
.io-pc.is-fullwidth .io-pc-arrow.io-pc-next { left: 16px; }

.io-pc.is-fullbleed {
	--io-pc-card-w: min(720px, 70vw);
}

@media (max-width: 767px) {
	.io-pc.is-fullwidth {
		width: 100%;
		max-width: 100%;
		margin-left: 0;
		margin-right: 0;
	}
}
