/**
 * Elementor Testimonial Slider — base styles.
 *
 * Visual properties (colors, typography, spacing, radius) are overridable via
 * Elementor Style controls. These rules provide structure + sensible defaults
 * that reproduce the dark "Clients Stories" design out of the box.
 *
 * @package ETS_Slider
 */

.ets-slider {
	position: relative;
	background: #000;
	color: #fff;
	overflow: hidden;
}

/* Inner wrapper: provides the positioning context for the arrows and the
 * max-width / centering used by the Boxed content-width option. */
.ets-slider__inner {
	position: relative;
	width: 100%;
}

/* Boxed: center the content within a full-width background. */
.ets-slider--boxed .ets-slider__inner {
	margin-left: auto;
	margin-right: auto;
}

.ets-slider__swiper {
	width: 100%;
}

/* Each slide must fill the track so flex layout works in Swiper. */
.ets-slider .swiper-slide {
	height: auto;
	box-sizing: border-box;
}

/* ---------------------------------------------------------------------------
 * Pre-init fallback
 * Before Swiper initialises (or if its script fails / is slow to load), force
 * a sane single-slide layout so the widget never collapses to a blank box or
 * flashes. Once Swiper adds `.swiper-initialized`, these rules stop applying.
 * ------------------------------------------------------------------------- */
.ets-slider__swiper:not(.swiper-initialized) .swiper-wrapper {
	display: block;
}

.ets-slider__swiper:not(.swiper-initialized) .swiper-slide {
	width: 100%;
	margin-right: 0;
}

/* Show only the first slide until Swiper takes over. */
.ets-slider__swiper:not(.swiper-initialized) .swiper-slide ~ .swiper-slide {
	display: none;
}

/* ---------------------------------------------------------------------------
 * Featured (big image) skin
 * ------------------------------------------------------------------------- */
.ets-slide--featured {
	display: flex;
	align-items: center;
	gap: 5%;
}

.ets-slide--featured.ets-slide--reverse {
	flex-direction: row-reverse;
}

.ets-slide--featured .ets-slide__media {
	/* Size by width (horizontal axis), NOT flex-basis. In the column layout used
	 * on tablet/mobile, flex-basis would be read as HEIGHT and the image would
	 * eat the whole slide. flex:0 0 auto keeps its height natural. */
	flex: 0 0 auto;
	width: 45%;
	max-width: 45%;
}

.ets-slide__media img {
	display: block;
	width: 100%;
	border-radius: 16px;
}

.ets-slide__content {
	flex: 1;
	min-width: 0;
}

/* ---------------------------------------------------------------------------
 * Classic (avatar) skin
 * ------------------------------------------------------------------------- */
.ets-slide--classic {
	display: flex;
}

.ets-slide--classic .ets-slide__content {
	width: 100%;
}

/* ---------------------------------------------------------------------------
 * Shared content elements
 * ------------------------------------------------------------------------- */
.ets-slide__heading {
	margin: 0 0 10px;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.1;
}

.ets-slide__heading-accent {
	font-style: italic;
	font-weight: 400;
}

.ets-slide__number {
	font-size: 5.5rem;
	font-weight: 700;
	line-height: 1;
	color: #555;
	margin-bottom: 20px;
}

.ets-slide__rating {
	display: inline-flex;
	gap: 4px;
	font-size: 18px;
	color: #ffb400;
	margin-bottom: 16px;
}

.ets-slide__text {
	font-size: 1.1rem;
	line-height: 1.6;
	color: #ccc;
	margin: 0 0 30px;
}

.ets-slide__divider {
	height: 1px;
	width: 100%;
	background: #333;
	margin-bottom: 20px;
}

.ets-slide__author {
	display: flex;
	align-items: center;
	gap: 15px;
}

/* When centered, keep the author block centered too. */
.ets-slide__content[style*="center"] .ets-slide__author {
	justify-content: center;
}

.ets-slide__avatar {
	width: 45px;
	height: 45px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.ets-slide__author-meta {
	display: flex;
	flex-direction: column;
}

.ets-slide__name {
	font-size: 1rem;
	font-weight: 700;
	color: #fff;
}

.ets-slide__role {
	font-size: 0.85rem;
	color: #666;
}

/* ---------------------------------------------------------------------------
 * Navigation arrows
 * ------------------------------------------------------------------------- */
.ets-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}

.ets-arrow:hover {
	background: rgba(255, 255, 255, 0.2);
}

.ets-arrow--prev {
	left: 16px;
}

.ets-arrow--next {
	right: 16px;
}

.ets-arrow.swiper-button-disabled {
	opacity: 0.35;
	cursor: default;
}

/* ---------------------------------------------------------------------------
 * Pagination dots
 * ------------------------------------------------------------------------- */
.ets-slider .ets-pagination {
	position: static;
	margin-top: 24px;
	text-align: center;
}

.ets-slider .swiper-pagination-bullet {
	background: rgba(255, 255, 255, 0.3);
	opacity: 1;
}

.ets-slider .swiper-pagination-bullet-active {
	background: #fff;
}

/* ---------------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------------- */

/* Tablet and below: stack the featured layout (image on top, content below).
 * We only flip the flex direction here — the image's per-device width is owned
 * by the responsive "Image Column Width" control (which defaults to 100% on
 * tablet/mobile), so no width override (and no !important) is needed. */
@media (max-width: 1024px) {
	.ets-slide--featured,
	.ets-slide--featured.ets-slide--reverse {
		flex-direction: column;
		align-items: stretch;
		gap: 24px;
	}

	.ets-slide__content {
		text-align: left;
	}
}

@media (max-width: 767px) {
	.ets-slide__heading {
		font-size: 1.6rem;
	}

	.ets-slide__number {
		font-size: 3.5rem;
	}

	.ets-slide__text {
		font-size: 1rem;
	}

	/* Arrows would overlap content on small screens; rely on dots/swipe. */
	.ets-arrow {
		display: none;
	}
}
