/* ================================================================
   CE Testimonial Carousel — testimonial.css
   Matches: dark-bg section, centre card warm-brown + larger,
   side cards white/dimmed, circular avatars, double-chevron nav
   ================================================================ */

/* ── Wrapper ───────────────────────────────────────────────────── */
.ct-wrapper {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Allow Swiper slides to peek outside widget boundary */
.ct-wrapper.ct-overflow,
.ct-wrapper.ct-overflow .ct-swiper,
.ct-wrapper.ct-overflow .swiper-wrapper {
    overflow: visible !important;
}

/* Ensure the widget container doesn't clip if overflow is on */
.ct-wrapper.ct-overflow {
    z-index: 10;
}

/* ── Swiper base ────────────────────────────────────────────────── */
.ct-swiper {
    width: 100%;
    overflow: hidden;
    /* default */
    padding: 40px 0;
    /* Add top/bottom padding so scaled cards don't cut */
}

.ct-swiper .swiper-wrapper {
    align-items: center;
}

/* ── Slide ─────────────────────────────────────────────────────── */
.ct-slide {
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s ease;
}

/* ── Card ──────────────────────────────────────────────────────── */
.ct-card {
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    border-radius: 24px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.08);
    transition:
        background-color 0.45s ease,
        opacity 0.45s ease,
        transform 0.45s ease,
        box-shadow 0.45s ease,
        min-height 0.45s ease,
        height 0.45s ease;
    will-change: transform, opacity, min-height;
}

/* Active state is handled by Elementor selectors in PHP targeting .swiper-slide-active .ct-card */
/* But we provide baseline styles here for safety */
.swiper-slide-active .ct-card {
    z-index: 2;
    opacity: 1;
}

.ct-slide:not(.swiper-slide-active) .ct-card {
    opacity: 0.8;
}

/* ── Card inner ────────────────────────────────────────────────── */
.ct-card-inner {
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    box-sizing: border-box;
}

/* ── Avatar ────────────────────────────────────────────────────── */
.ct-avatar-wrap {
    margin-bottom: 14px;
}

.ct-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #e8e0d5;
    background: #f0ece6;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.4s ease;
}

.swiper-slide-active .ct-avatar {
    border-color: rgba(255, 255, 255, 0.5);
}

.ct-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Name ───────────────────────────────────────────────────────── */
.ct-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px;
    line-height: 1.3;
    transition: color 0.4s ease;
}

/* ── Position ──────────────────────────────────────────────────── */
.ct-pos {
    font-size: 0.78rem;
    color: #888888;
    margin: 0;
    letter-spacing: 0.02em;
    transition: color 0.4s ease;
}

/* ── Stars ─────────────────────────────────────────────────────── */
.ct-stars {
    display: flex;
    justify-content: center;
    gap: 2px;
    font-size: 16px;
    margin: 10px 0 14px;
    line-height: 1;
}

.ct-star {
    display: inline-block;
    transition: color 0.4s ease;
}

.ct-star.filled {
    color: #d4a843;
}

.ct-star.empty {
    color: rgba(0, 0, 0, 0.1);
}

/* ── Quote ─────────────────────────────────────────────────────── */
.ct-quote {
    font-size: 0.86rem;
    line-height: 1.75;
    color: #555555;
    margin: 0;
    transition: color 0.4s ease;
}

/* ── Controls row ──────────────────────────────────────────────── */
.ct-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 28px;
}

/* ── Nav buttons ───────────────────────────────────────────────── */
.ct-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #555555;
    transition: color 0.25s ease;
    line-height: 0;
    flex-shrink: 0;
}

.ct-nav-btn:hover {
    color: #9b7a50;
}

.ct-nav-btn svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* ── Dots ──────────────────────────────────────────────────────── */
.ct-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ct-dot {
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease;
    flex-shrink: 0;
}

.ct-dot.is-active {
    background: #9b7a50;
    transform: scale(1.4);
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .ct-card-inner {
        padding: 32px 28px;
    }

    .ct-avatar {
        width: 68px;
        height: 68px;
    }
}

@media (max-width: 767px) {
    .ct-card-inner {
        padding: 28px 22px;
    }

    .ct-avatar {
        width: 60px;
        height: 60px;
    }

    .ct-name {
        font-size: 0.95rem;
    }

    .ct-quote {
        font-size: 0.82rem;
    }

    .ct-controls {
        gap: 14px;
    }
}