/* ==========================================================================
   Event Carousel Shortcode — styles
   3 cards per row on desktop, 1 per row on mobile (breakpoint matches the
   768px breakpoint used in event-carousel.js — keep both in sync).
   ========================================================================== */

.ecs-carousel {
	position: relative;
	margin: 0 auto;
	max-width: 100%;
	padding: 0 48px; /* room for the prev/next buttons */
	box-sizing: border-box;
}

.ecs-carousel-viewport {
	overflow: hidden;
	width: 100%;
}

.ecs-carousel-track {
	display: flex;
	align-items: stretch;
	will-change: transform;
	/* Transition is applied/removed by JS so the "snap back" used for the
	   infinite loop can happen instantly, with no animation. */
}

/* Fallback sizing for when JS hasn't run yet (progressive enhancement).
   JS overrides these with inline flex-basis values that match the current
   slidesToShow count, so the two stay perfectly in sync during animation. */
.ecs-card {
	flex: 0 0 33.3333%;
	max-width: 33.3333%;
	box-sizing: border-box;
	padding: 0 12px;
}

@media (max-width: 767px) {
	.ecs-card {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.ecs-carousel {
		padding: 0 40px;
	}
}

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

.ecs-card-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	text-decoration: none;
	color: inherit;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ecs-card-link:hover,
.ecs-card-link:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.ecs-card-link:focus-visible {
	outline: 2px solid #1a73e8;
	outline-offset: 2px;
}

.ecs-card-image {
	position: relative;
	width: 100%;
	padding-top: 56.25%; /* 16:9 */
	background: #e9e9e9;
	overflow: hidden;
}

.ecs-card-img,
.ecs-card-img--placeholder {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
}

.ecs-card-img--placeholder {
	background: linear-gradient(135deg, #dfe3e8, #eef1f4);
}

.ecs-card-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	padding: 16px;
}

.ecs-card-title {
	margin: 0 0 8px;
	font-size: 1.05rem;
	line-height: 1.3;
	font-weight: 600;
	color: #1a1a1a;
}

.ecs-card-excerpt {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.5;
	color: #555;
	flex: 1 1 auto;
}

/* ---- Prev / next buttons ---- */

.ecs-carousel-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	font-size: 1.4rem;
	line-height: 1;
	color: #333;
	transition: background 0.2s ease, transform 0.15s ease;
}

.ecs-carousel-btn:hover {
	background: #fff;
	transform: translateY(-50%) scale(1.08);
}

.ecs-carousel-btn:focus-visible {
	outline: 2px solid #1a73e8;
	outline-offset: 2px;
}

.ecs-carousel-btn:active {
	transform: translateY(-50%) scale(0.96);
}

.ecs-carousel-prev {
	left: 0;
}

.ecs-carousel-next {
	right: 0;
}

.ecs-carousel-btn[disabled] {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

/* Clones are duplicated markup used only to create the illusion of an
   infinite loop; keep them out of the accessibility tree and tab order. */
.ecs-clone {
	pointer-events: none;
}

.ecs-clone a {
	pointer-events: none;
}
