/* ==========================================================================
   WILA Testimonials — scoped under .wila-testimonials-wrap
   Grid layout with per-breakpoint column counts controlled from Elementor
   (see widget's responsive "Columns" control). Base rules below are
   fallback defaults only — Elementor's inline selectors override them.
   ========================================================================== */

.wila-testimonials-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
}

.wila-testimonial-card {
    display: flex;
    flex-direction: column;
    background-color: #FFFFFF;
    border-radius: 16px;
    padding: 28px;
    box-sizing: border-box;
    min-width: 0;
}

/* ---- Stars ---- */
.wila-testimonial-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 16px;
    line-height: 1;
    margin-bottom: 16px;
}

.wila-testimonial-star {
    color: #E0E0E0;
}

.wila-testimonial-star.is-filled {
    color: #F5A623;
}

/* ---- Quote ---- */
.wila-testimonial-quote {
    color: #2B2B2B;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 24px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ---- Footer / author row ---- */
.wila-testimonial-footer {
    display: flex;
    align-items: center;
    margin-top: auto;
    min-width: 0;
}

.wila-testimonial-avatar {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    margin-inline-end: 14px;
}

.wila-testimonial-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wila-testimonial-avatar-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #3E8E41;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 16px;
    line-height: 1;
    text-transform: uppercase;
    user-select: none;
}

.wila-testimonial-author {
    min-width: 0;
    flex: 1 1 auto;
}

.wila-testimonial-name {
    color: #1A1A1A;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wila-testimonial-role {
    color: #8A8A8A;
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Responsive fallback (in case Elementor breakpoint selectors are
   not present, e.g. widget preview edge cases) ---- */
@media (max-width: 1024px) {
    .wila-testimonials-wrap {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .wila-testimonials-wrap {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* ==========================================================================
   SLIDER MODE — .wila-testimonials-slider
   The wrap switches from CSS grid to a horizontally-moving flex track.
   Elementor's responsive "Slides to Show" control sets the flex-basis of
   .wila-testimonial-slide via inline selectors; the widths below are
   fallback defaults matching the control's own defaults (3 / 2 / 1).
   Movement (translateX, autoplay, arrows, dots) is handled by testimonials.js.
   ========================================================================== */

.wila-testimonials-wrap.wila-testimonials-slider {
    display: block;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.wila-testimonial-slider-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.wila-testimonials-slider .wila-testimonial-track {
    display: flex;
    gap: 24px;
    padding: 24px 0;
    transition: transform 500ms ease;
    will-change: transform;
}

.wila-testimonial-slide {
    flex: 0 0 calc(100% / 3);
    max-width: calc(100% / 3);
    box-sizing: border-box;
    min-width: 0;
}

.wila-testimonial-slide .wila-testimonial-card {
    height: 100%;
}

@media (max-width: 1024px) {
    .wila-testimonial-slide {
        flex-basis: calc(100% / 2);
        max-width: calc(100% / 2);
    }
}

@media (max-width: 767px) {
    .wila-testimonial-slide {
        flex-basis: 100%;
        max-width: 100%;
    }
}

/* ---- Arrows ----
   Positioned inside the clipped viewport (not overhanging its edge), so
   they sit on top of the first/last card instead of being cut off by
   overflow: hidden. */
.wila-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #E0E0E0;
    background-color: #FFFFFF;
    color: #1A1A1A;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.wila-slider-arrow:hover:not(:disabled) {
    background-color: #3E8E41;
    color: #FFFFFF;
    border-color: #3E8E41;
}

.wila-slider-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.wila-slider-prev {
    left: 8px;
}

.wila-slider-next {
    right: 8px;
}

@media (max-width: 767px) {
    .wila-slider-arrow {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

/* ---- Dots ---- */
.wila-testimonial-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.wila-testimonial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #E0E0E0;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.wila-testimonial-dot.is-active {
    background-color: #3E8E41;
    transform: scale(1.3);
}

/* ---- Drag/swipe affordance ---- */
.wila-testimonials-slider .wila-testimonial-track.is-dragging {
    transition: none;
    cursor: grabbing;
}