/**
 * EBA Testimonial widget — reference: emotionalacademy.vercel.app "Stories of Transformation"
 * No !important. Compound selectors win over Hello theme so Elementor Style tab fully controls.
 */

/* ===== SECTION ===== */
.eba-wrapper.eba-testi {
    padding: 80px 0;
}

/* ===== HEADER ===== */
.eba-wrapper .eba-testi__header,
.eba-testi .eba-testi__header {
    text-align: center;
    max-width: 672px;
    margin: 0 auto 48px;
}

.eba-wrapper.eba-testi .eba-testi__heading,
.eba-wrapper .eba-testi__heading,
.eba-testi .eba-testi__heading {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    color: #0f1729;
    margin: 0 0 16px;
}

.eba-wrapper.eba-testi .eba-testi__subheading,
.eba-wrapper .eba-testi__subheading,
.eba-testi .eba-testi__subheading {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: #525e7a;
    margin: 0;
}

/* ===== GRID ===== */
.eba-testi__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) { .eba-testi--grid .eba-testi__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px)  { .eba-testi--grid .eba-testi__grid { grid-template-columns: 1fr; } }

/* ===== SLIDER ===== */
.eba-testi__slider-wrap {
    position: relative;
    --testi-cols: 3;
    --testi-gap: 24px;
}

.eba-testi__slider {
    display: flex;
    gap: var(--testi-gap, 24px);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px 4px 16px;
    touch-action: pan-x;
}

.eba-testi__slider::-webkit-scrollbar { display: none; }

.eba-testi__slider .eba-testi__item {
    flex: 0 0 calc((100% - (var(--testi-cols, 3) - 1) * var(--testi-gap, 24px)) / var(--testi-cols, 3));
    max-width: calc((100% - (var(--testi-cols, 3) - 1) * var(--testi-gap, 24px)) / var(--testi-cols, 3));
    scroll-snap-align: start;
}

@media (min-width: 768px) and (max-width: 1024px) {
    .eba-testi__slider-wrap { --testi-cols: 2; }
}

@media (max-width: 767px) {
    .eba-testi__slider-wrap {
        --testi-cols: 1;
        --testi-gap: 16px;
    }
    .eba-testi__slider .eba-testi__item {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ===== ARROWS ===== */
.eba-testi__arrow {
    position: absolute;
    top: calc(50% - 24px);
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e7e2d3;
    color: #0f1729;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: all 0.2s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    padding: 0;
}

.eba-testi__arrow:hover:not(:disabled) {
    background: #c89821;
    color: #ffffff;
    border-color: #c89821;
    transform: translateY(-50%) scale(1.05);
}

.eba-testi__arrow:disabled { opacity: 0.4; cursor: not-allowed; }
.eba-testi__arrow--prev { left: -22px; }
.eba-testi__arrow--next { right: -22px; }

@media (max-width: 767px) {
    .eba-testi__arrow { width: 36px; height: 36px; }
    .eba-testi__arrow--prev { left: 4px; }
    .eba-testi__arrow--next { right: 4px; }
}

/* ===== DOTS ===== */
.eba-testi__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.eba-testi__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e7e2d3;
    border: 0;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.eba-testi__dot:hover { background: #525e7a; }

.eba-testi__dot.is-active {
    background: #c89821;
    width: 28px;
    border-radius: 999px;
}

/* ===== CARD ===== */
.eba-wrapper .eba-testi__item,
.eba-testi .eba-testi__item {
    background: #f8f5ee;
    border: 1px solid #e7e2d3;
    border-radius: 12px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    margin: 0;
}

.eba-wrapper .eba-testi__item:hover,
.eba-testi .eba-testi__item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* ===== RATING ===== */
.eba-wrapper .eba-testi__rating,
.eba-testi .eba-testi__rating {
    color: #ddab2c;
    display: flex;
    gap: 2px;
    align-items: center;
}

.eba-wrapper .eba-testi__rating svg,
.eba-testi .eba-testi__rating svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ===== QUOTE ===== */
.eba-wrapper .eba-testi__quote,
.eba-testi .eba-testi__quote {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    font-style: italic;
    line-height: 1.625;
    color: #0f1729;
    margin: 0 0 24px;
    quotes: '"' '"';
}

.eba-testi__quote::before { content: none; }

/* ===== AUTHOR ===== */
.eba-wrapper .eba-testi__author,
.eba-testi .eba-testi__author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #e7e2d3;
}

.eba-testi__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.eba-testi__author-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.eba-wrapper .eba-testi__name,
.eba-testi .eba-testi__name {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: #0f1729;
}

.eba-wrapper .eba-testi__role,
.eba-testi .eba-testi__role {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: #525e7a;
}
