/**
 * Copyright © WebbyTroops Technologies. All rights reserved.
 *
 * Carousel chrome only. Swiper's own layout CSS comes from Elementor's registered
 * "swiper" handle; nothing here duplicates it.
 *
 * Card rules here override wt-cs-grid.css for slides only: bordered, rounded card
 * that lifts on hover, zooms its image and turns its title to the brand colour.
 * Arrows sit together under the track on the left; the --has-arrows modifier
 * reserves the room for them so they never overlap the next section.
 */

.wt-cs-carousel {
	--wt-cs-carousel-brand: #10059f;
	--wt-cs-carousel-radius: 25px;
	--wt-cs-carousel-arrow: 44px;
	--wt-cs-carousel-arrow-gap: 40px;

	position: relative;
}

.wt-cs-carousel--has-arrows {
	padding-bottom: calc(var(--wt-cs-carousel-arrow) + var(--wt-cs-carousel-arrow-gap));
}

.wt-cs-carousel__viewport {
	overflow: hidden;
}

/* Equal-height slides so a short excerpt does not leave a stub card. The vertical
   padding gives the card shadow room inside the clipped viewport. */
.wt-cs-carousel .swiper-wrapper {
	align-items: stretch;
	padding: 25px 0;
}

.wt-cs-carousel__slide {
	height: auto;
}

/* ---------------------------------------------------------------------- card */

/* Self-contained: this widget does not load wt-cs-grid.css, so the card's base
   box model is restated here rather than assumed. */
.wt-cs-carousel__slide .wt-cs-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	background-color: #fff;
	border: 1px solid gray;
	border-radius: var(--wt-cs-carousel-radius);
	box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wt-cs-carousel__slide .wt-cs-card:hover,
.wt-cs-carousel__slide .wt-cs-card:focus-within {
	transform: translateY(-2px);
	box-shadow: 0 10px 40px #10059f1a, 0 4px 16px #00000014;
}

.wt-cs-carousel__slide .wt-cs-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	width: 100%;
	border-radius: var(--wt-cs-carousel-radius) var(--wt-cs-carousel-radius) 0 0;
}

.wt-cs-carousel__slide .wt-cs-card__image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--wt-cs-carousel-radius) var(--wt-cs-carousel-radius) 0 0;
	transform: scale(1);
	transition: transform 0.5s ease;
}

.wt-cs-carousel__slide .wt-cs-card:hover .wt-cs-card__image {
	transform: scale(1.03);
}

.wt-cs-carousel__slide .wt-cs-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0.75rem;
	padding: 1.25rem 1.5rem 1.5rem;
	background-color: #fff;
}

.wt-cs-carousel__slide .wt-cs-card__title {
	margin: 0;
	font-size: 1.25rem;
	line-height: 1.3;
}

.wt-cs-carousel__slide .wt-cs-card__title a {
	color: #000;
	text-decoration: none;
	transition: color 0.3s ease;
}

.wt-cs-carousel__slide .wt-cs-card:hover .wt-cs-card__title a {
	color: var(--wt-cs-carousel-brand);
}

.wt-cs-carousel__slide .wt-cs-card__desc,
.wt-cs-carousel__slide .wt-cs-card__cta {
	transition: color 0.3s ease;
}

/* -------------------------------------------------------------------- arrows */

.wt-cs-carousel__prev,
.wt-cs-carousel__next {
	position: absolute;
	bottom: 10;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--wt-cs-carousel-arrow);
	height: var(--wt-cs-carousel-arrow);
	padding: 0;
	font-size: 20px;
	line-height: 1;
	color: var(--wt-cs-carousel-brand);
	cursor: pointer;
	background: #fff;
	border: 1px solid var(--wt-cs-carousel-brand);
	border-radius: 50%;
	transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.wt-cs-carousel__prev:hover,
.wt-cs-carousel__next:hover {
	color: #fff;
	background: var(--wt-cs-carousel-brand);
	box-shadow: 0 5px 15px rgba(16, 5, 159, 0.25);
}

.wt-cs-carousel__prev {
	left: 30px;
}

.wt-cs-carousel__next {
	left: 85px;
}

.wt-cs-carousel__prev.swiper-button-disabled,
.wt-cs-carousel__next.swiper-button-disabled {
	opacity: 0.35;
	pointer-events: none;
}

/* ---------------------------------------------------------------------- dots */

.wt-cs-carousel__dots {
	position: static;
	margin-top: var(--wt-cs-space-md);
	text-align: center;
}

.wt-cs-carousel__dots .swiper-pagination-bullet {
	background-color: var(--wt-cs-color-border);
	opacity: 1;
}

.wt-cs-carousel__dots .swiper-pagination-bullet-active {
	background-color: var(--wt-cs-color-heading);
}

/* -------------------------------------------------------------------- mobile */

@media (max-width: 767px) {

	.wt-cs-carousel {
		--wt-cs-carousel-radius: 20px;
		--wt-cs-carousel-arrow: 38px;
		--wt-cs-carousel-arrow-gap: 30px;
	}

	.wt-cs-carousel .swiper-wrapper {
		padding: 20px 0;
	}

	.wt-cs-carousel__slide .wt-cs-card__body {
		padding: 1rem 1.25rem 1.25rem;
	}

	.wt-cs-carousel__prev,
	.wt-cs-carousel__next {
		font-size: 18px;
	}

	.wt-cs-carousel__next {
		left: 78px;
	}
}
