/*
 * Easy Services Carousel — v1.1.0
 * Card design inspired by dtsaimahima.com:
 *  - Background = featured image
 *  - Corner icon (top-left)
 *  - Title bar at the bottom (always visible)
 *  - Hover: green overlay slides up revealing the description
 */

.esc-carousel-wrap {
	--esc-text:       #ffffff;
	--esc-radius:     14px;
	--esc-shadow:     0 8px 24px rgba(0, 0, 0, .12);
	--esc-shadow-hv:  0 16px 36px rgba(31, 111, 77, .25);

	max-width: 1200px;
	margin: 40px auto;
	padding: 0 16px;
	position: relative;
	box-sizing: border-box;
}

.esc-carousel-wrap *,
.esc-carousel-wrap *::before,
.esc-carousel-wrap *::after { box-sizing: border-box; }

.esc-carousel-wrap .esc-swiper {
	padding: 20px 6px 60px;
	overflow: hidden;
}

/* ============================================================
   The clickable card
   ============================================================ */
.esc-carousel-wrap .esc-card {
	display: block;
	position: relative;
	width: 100%;
	height: var(--esc-card-h, 340px);
	border-radius: var(--esc-radius);
	overflow: hidden;
	background-color: #2c3e2e;
	background-size: cover;
	background-position: center;
	text-decoration: none !important;
	color: var(--esc-text);
	box-shadow: var(--esc-shadow);
	transition: box-shadow .35s ease, transform .35s ease;
	cursor: pointer;
}
.esc-carousel-wrap .esc-card:hover,
.esc-carousel-wrap .esc-card:focus-visible {
	box-shadow: var(--esc-shadow-hv);
	transform: translateY(-4px);
	outline: none;
}

/* Placeholder when no featured image is set */
.esc-carousel-wrap .esc-no-bg {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255,255,255,.4);
	background: linear-gradient(135deg, var(--esc-green-dark) 0%, var(--esc-green) 100%);
}

/* ============================================================
   Corner icon — top-left brand mark (like dtsaimahima pineapple)
   ============================================================ */
.esc-carousel-wrap .esc-corner-icon {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 3;
	width: 64px;
	height: 100%;
	max-height: 90px;
	background: var(--esc-green);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px 10px;
	transition: background .3s ease;
}
.esc-carousel-wrap .esc-corner-icon img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	filter: brightness(0) invert(1); /* makes icon white over green */
}
.esc-carousel-wrap .esc-card:hover .esc-corner-icon {
	background: var(--esc-green-dark);
}

/* ============================================================
   The overlay — green band at bottom by default, expands on hover
   ============================================================ */
.esc-carousel-wrap .esc-overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(31, 111, 77, .92);          /* falls back if var fails */
	background: color-mix(in srgb, var(--esc-green) 92%, transparent);
	padding: 18px 22px;
	transition: padding .4s cubic-bezier(.4, 0, .2, 1), background .3s ease;
	z-index: 2;
	min-height: 64px;
}
.esc-carousel-wrap .esc-card:hover .esc-overlay {
	background: rgba(21, 85, 56, .96);
	background: color-mix(in srgb, var(--esc-green-dark) 96%, transparent);
	padding-bottom: 26px;
}

/* ============================================================
   Title — always visible
   ============================================================ */
.esc-carousel-wrap .esc-title {
	font-size: 22px;
	font-weight: 600;
	color: #fff;
	margin: 0;
	line-height: 1.25;
	letter-spacing: .2px;
	transition: margin .4s ease;
}
.esc-carousel-wrap .esc-card:hover .esc-title {
	margin-bottom: 10px;
}

/* ============================================================
   Description — hidden by default, fades + slides in on hover
   ============================================================ */
.esc-carousel-wrap .esc-description {
	font-size: 14px;
	line-height: 1.55;
	color: rgba(255, 255, 255, .94);
	margin: 0;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition: max-height .4s cubic-bezier(.4, 0, .2, 1), opacity .35s ease;
}
.esc-carousel-wrap .esc-card:hover .esc-description,
.esc-carousel-wrap .esc-card:focus-visible .esc-description {
	max-height: 180px;
	opacity: 1;
}

/* ============================================================
   Pagination dots
   ============================================================ */
.esc-carousel-wrap .swiper-pagination { bottom: 12px; }
.esc-carousel-wrap .swiper-pagination-bullet {
	background: var(--esc-green);
	opacity: .35;
	width: 10px;
	height: 10px;
	transition: width .3s ease, opacity .3s ease;
}
.esc-carousel-wrap .swiper-pagination-bullet-active {
	opacity: 1;
	width: 30px;
	border-radius: 5px;
}

/* ============================================================
   Arrow nav buttons
   ============================================================ */
.esc-carousel-wrap .swiper-button-prev,
.esc-carousel-wrap .swiper-button-next {
	color: var(--esc-green);
	background: #fff;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
	margin-top: -23px;
	border: 0;
	cursor: pointer;
}
.esc-carousel-wrap .swiper-button-prev:hover,
.esc-carousel-wrap .swiper-button-next:hover {
	color: #fff;
	background: var(--esc-green);
}
.esc-carousel-wrap .swiper-button-prev::after,
.esc-carousel-wrap .swiper-button-next::after {
	font-size: 18px;
	font-weight: bold;
}

/* ============================================================
   Mobile / responsive
   ============================================================ */
@media (max-width: 768px) {
	.esc-carousel-wrap .swiper-button-prev,
	.esc-carousel-wrap .swiper-button-next { display: none; }

	.esc-carousel-wrap .esc-card {
		height: calc(var(--esc-card-h, 340px) - 40px);
	}
	.esc-carousel-wrap .esc-title { font-size: 20px; }
	.esc-carousel-wrap .esc-corner-icon { width: 54px; max-height: 78px; }

	/* On touch devices :hover is sticky — show description by default */
	.esc-carousel-wrap .esc-description {
		max-height: 180px;
		opacity: 1;
	}
	.esc-carousel-wrap .esc-overlay { padding-bottom: 22px; }
}
