/* Category Post Slider for Elementor – v1.0.0 */
.ecs, .ecs *, .ecs *::before, .ecs *::after { box-sizing: border-box; }

.ecs {
	--ecs-left-n: 60;
	--ecs-gap: 20px;
	--ecs-radius: 10px;
	--ecs-height: 480px;
	--ecs-thumb: 140px;
	--ecs-accent: #e63946;
	--ecs-overlay: rgba(0, 0, 0, .82);
	--ecs-title-color: #fff;
	--ecs-meta-color: rgba(255, 255, 255, .88);
	--ecs-item-bg: #f5f6f8;
	--ecs-item-title: #111827;
	--ecs-item-meta: #6b7280;
	--ecs-arrow-bg: rgba(0, 0, 0, .45);
	--ecs-arrow-color: #fff;
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, calc((100% - var(--ecs-gap)) * var(--ecs-left-n) / 100)) minmax(0, 1fr);
	gap: var(--ecs-gap);
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	line-height: 1.4;
	text-align: left;
}
.ecs--single { grid-template-columns: minmax(0, 1fr); }

.ecs ul, .ecs li, .ecs p, .ecs h3 { margin: 0; padding: 0; list-style: none; }
.ecs a { text-decoration: none; box-shadow: none; border: 0; }
.ecs img { display: block; max-width: none; height: 100%; width: 100%; object-fit: cover; margin: 0; border-radius: 0; box-shadow: none; }
.ecs [hidden] { display: none !important; }

/* ---------- Stage (big slide) ---------- */
.ecs__main { min-width: 0; }
.ecs__stage {
	position: relative;
	height: var(--ecs-height);
	border-radius: var(--ecs-radius);
	overflow: hidden;
	isolation: isolate;
	background: #1f2937;
	touch-action: pan-y;
	-webkit-mask-image: -webkit-radial-gradient(white, black);
}
.ecs__slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	visibility: hidden;
	overflow: hidden;
}
.ecs__slide.is-active, .ecs__slide.is-leaving { visibility: visible; }
.ecs__slide.is-active { z-index: 2; }
.ecs__slide.is-leaving { z-index: 1; }

.ecs__media { position: absolute; inset: 0; overflow: hidden; border-radius: var(--ecs-radius); }
.ecs__slide.is-active .ecs__img { animation: ecs-zoom 9s ease-out both; }
.ecs__ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #374151, #111827); }
.ecs__shade { position: absolute; inset: 0; background: linear-gradient(to top, var(--ecs-overlay) 0%, rgba(0, 0, 0, .35) 42%, rgba(0, 0, 0, 0) 72%); }

.ecs__caption { width: 100%; padding: 28px 30px 32px; }
.ecs__slide.is-active .ecs__caption { animation: ecs-rise .8s cubic-bezier(.2, .7, .2, 1) .25s both; }
.ecs__title {
	margin: 0; padding: 0;
	font-size: clamp(20px, 2.5vw, 32px);
	line-height: 1.25; font-weight: 700; letter-spacing: -.01em;
	color: var(--ecs-title-color);
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ecs .ecs__link { color: inherit; }
.ecs .ecs__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.ecs .ecs__link:focus-visible { outline: 3px solid #fff; outline-offset: -6px; border-radius: var(--ecs-radius); }

.ecs__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--ecs-meta-color); }
.ecs__cat {
	display: inline-block; padding: 3px 10px; border-radius: 999px;
	background: var(--ecs-accent); color: #fff;
	font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; line-height: 1.5;
}

/* Controls */
.ecs__controls { position: absolute; top: 14px; right: 14px; z-index: 5; display: flex; gap: 8px; }
.ecs .ecs__btn {
	-webkit-appearance: none; appearance: none;
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; min-width: 0; margin: 0; padding: 0;
	border: 0; border-radius: 50%;
	background: var(--ecs-arrow-bg); color: var(--ecs-arrow-color);
	line-height: 1; cursor: pointer; box-shadow: none;
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
	transition: background-color .2s, transform .2s;
}
.ecs .ecs__btn:hover { background: var(--ecs-accent); color: #fff; transform: scale(1.06); }
.ecs .ecs__btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ecs .ecs__btn svg { display: block; width: 18px; height: 18px; }
.ecs__i-play { display: none !important; }
.ecs.is-user-paused .ecs__i-play { display: block !important; }
.ecs.is-user-paused .ecs__i-pause { display: none !important; }

/* Progress */
.ecs__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 5; background: rgba(255, 255, 255, .2); pointer-events: none; }
.ecs__bar { display: block; width: 100%; height: 100%; background: var(--ecs-accent); transform-origin: left center; transform: scaleX(0); }
.ecs__bar.is-running { animation: ecs-progress var(--ecs-delay) linear forwards; }
.ecs.is-paused .ecs__bar { animation-play-state: paused; }
.ecs--noprogress .ecs__progress { opacity: 0; }

/* ---------- Side list ---------- */
.ecs__side { min-width: 0; }
.ecs__list { display: flex; flex-direction: column; gap: 12px; height: var(--ecs-height); }
.ecs__item { flex: 1 1 0; min-height: 0; display: flex; will-change: transform; }
.ecs .ecs__itemlink {
	display: flex; align-items: stretch; gap: 14px; width: 100%; min-width: 0;
	padding: 8px; overflow: hidden;
	background: var(--ecs-item-bg); border-radius: var(--ecs-radius);
	color: var(--ecs-item-title);
	transition: box-shadow .25s, background-color .25s;
}
.ecs .ecs__itemlink:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .1); }
.ecs .ecs__itemlink:focus-visible { outline: 3px solid var(--ecs-accent); outline-offset: 2px; }
.ecs__item.is-next .ecs__itemlink { box-shadow: inset 3px 0 0 var(--ecs-accent); }
.ecs__thumb { flex: 0 0 var(--ecs-thumb); min-height: 64px; position: relative; overflow: hidden; border-radius: var(--ecs-radius); }
.ecs__thumb .ecs__img, .ecs__thumb .ecs__ph { position: absolute; inset: 0; transition: transform .5s ease; }
.ecs__itemlink:hover .ecs__thumb .ecs__img { transform: scale(1.06); }
.ecs__info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding-right: 6px; }
.ecs__itemtitle {
	font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--ecs-item-title);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ecs__itemlink:hover .ecs__itemtitle { color: var(--ecs-accent); }
.ecs__itemmeta { font-size: 12px; color: var(--ecs-item-meta); }

.ecs-empty { padding: 16px; border: 1px dashed #c3c4c7; border-radius: 10px; font-size: 14px; }

/* ---------- Animations ---------- */
.ecs__slide.is-entering, .ecs__slide.is-leaving {
	animation-duration: var(--ecs-speed);
	animation-timing-function: cubic-bezier(.65, 0, .35, 1);
	animation-fill-mode: both;
}
.ecs--slide .ecs__slide.is-entering { animation-name: ecs-in-next; }
.ecs--slide[data-dir="prev"] .ecs__slide.is-entering { animation-name: ecs-in-prev; }
.ecs--slide .ecs__slide.is-leaving { animation-name: ecs-out-next; }
.ecs--slide[data-dir="prev"] .ecs__slide.is-leaving { animation-name: ecs-out-prev; }
.ecs--fade .ecs__slide.is-entering { animation-name: ecs-fade-in; }
.ecs--fade .ecs__slide.is-leaving { animation-name: ecs-fade-out; }

@keyframes ecs-in-next { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes ecs-in-prev { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes ecs-out-next { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-28%); opacity: .2; } }
@keyframes ecs-out-prev { from { transform: translateX(0); opacity: 1; } to { transform: translateX(28%); opacity: .2; } }
@keyframes ecs-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ecs-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes ecs-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes ecs-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ecs-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.ecs { --ecs-height: 400px; --ecs-thumb: 118px; --ecs-gap: 16px; }
	.ecs__caption { padding: 22px 22px 26px; }
	.ecs__itemtitle { font-size: 14px; }
}
@media (max-width: 767px) {
	.ecs { --ecs-height: 260px; --ecs-thumb: 104px; grid-template-columns: minmax(0, 1fr); }
	.ecs__caption { padding: 16px 16px 20px; }
	.ecs__title { font-size: 19px; -webkit-line-clamp: 3; }
	.ecs__meta { margin-top: 8px; font-size: 12px; gap: 8px; }
	.ecs__controls { top: 10px; right: 10px; }
	.ecs .ecs__btn { width: 36px; height: 36px; }
	.ecs__list { height: auto; gap: 10px; }
	.ecs__item { flex: none; }
	.ecs__thumb { min-height: 76px; }
	.ecs__itemtitle { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	.ecs *, .ecs *::before, .ecs *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
