/* ============================================================
   TESTIMONIALS SECTION — [unicep_testimonials]
   Colours and type come from the Elementor kit globals so the
   section follows Site Settings; fallbacks are the kit values.
   ============================================================ */
.uc-test-section {
    --uc-test-primary: var(--e-global-color-ff80a41, #E04734);
    --uc-test-secondary: var(--e-global-color-3f5f20b, #6CCDF4);
    --uc-test-tertiary: var(--e-global-color-dd4e0c3, #3E4095);
    --uc-test-black: var(--e-global-color-53536bd, #101214);
    --uc-test-text: var(--e-global-color-64e1830, #525252);
    --uc-test-divider: var(--e-global-color-faa67d9, #B3BCD1);
    --uc-test-gray: var(--e-global-color-d71cd26, #ECF0F9);
    --uc-test-white: var(--e-global-color-1f96596, #FFFFFF);
    --uc-test-star: #FFC107;

    --uc-test-font: var(--e-global-typography-ba29e66-font-family, "Plus Jakarta Sans"), sans-serif;
    --uc-test-h6-size: var(--e-global-typography-450f9c1-font-size, 20px);
    --uc-test-h6-lh: var(--e-global-typography-450f9c1-line-height, 1.5em);
    --uc-test-body-size: var(--e-global-typography-ba29e66-font-size, 16px);
    --uc-test-body-lh: var(--e-global-typography-ba29e66-line-height, 1.75em);

    --uc-test-gap: 32px;

    font-family: var(--uc-test-font);
    color: var(--uc-test-text);
}

.uc-test-section *,
.uc-test-section *::before,
.uc-test-section *::after {
    box-sizing: border-box;
}

.uc-test-wrap {
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Slider ──────────────────────────────────────────────────── */
/* Scrolls natively until the script takes over. */
.uc-test-viewport {
    overflow-x: auto;
    touch-action: pan-y;
}

.uc-test-section.is-ready .uc-test-viewport {
    overflow: hidden;
}

.uc-test-track {
    position: relative;
    display: flex;
    gap: var(--uc-test-gap);
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ── Card ────────────────────────────────────────────────────── */
.uc-test-card {
    flex: 0 0 calc((100% - var(--uc-test-gap)) / 2);
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px;
    background: var(--uc-test-gray);
    text-align: center;
}

.uc-test-avatar {
    flex-shrink: 0;
    width: 88px;
    height: 88px;
    margin-bottom: 24px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--uc-test-tertiary);
    color: var(--uc-test-white);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
}

.uc-test-avatar.has-photo {
    background: var(--uc-test-white);
}

.uc-test-section .uc-test-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    border-radius: 0;
}

.uc-test-avatar svg {
    width: 44px;
    height: 44px;
    fill: currentColor;
}

.uc-test-stars {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-bottom: 20px;
    color: var(--uc-test-star);
}

.uc-test-stars svg {
    display: block;
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.uc-test-section .uc-test-name {
    margin: 0;
    font-size: var(--uc-test-h6-size);
    font-weight: 700;
    line-height: var(--uc-test-h6-lh);
    color: var(--uc-test-black);
}

.uc-test-section .uc-test-role {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.75;
    color: var(--uc-test-black);
}

.uc-test-section .uc-test-quote {
    margin: 22px 0 0;
    font-size: var(--uc-test-h6-size);
    font-weight: 700;
    line-height: var(--uc-test-h6-lh);
    color: var(--uc-test-black);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Buttons ─────────────────────────────────────────────────────
   Selectors carry .uc-test-section so they outrank the kit's global
   "button" styles (red fill, 16px 24px padding) in every state. */
.uc-test-section .uc-test-more,
.uc-test-section .uc-test-more:hover,
.uc-test-section .uc-test-more:focus {
    margin: 16px 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-family: var(--uc-test-font);
    font-size: var(--uc-test-body-size);
    font-weight: 700;
    line-height: 1.5;
    text-decoration: underline;
    text-underline-offset: 4px;
    color: var(--uc-test-primary);
    cursor: pointer;
    transition: color 0.2s ease;
}

.uc-test-section .uc-test-more:hover {
    color: var(--uc-test-black);
}

.uc-test-section .uc-test-more[hidden] {
    display: none;
}

.uc-test-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
}

.uc-test-dots[hidden] {
    display: none;
}

.uc-test-section .uc-test-dot,
.uc-test-section .uc-test-dot:hover,
.uc-test-section .uc-test-dot:focus {
    position: relative;
    display: block;
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--uc-test-divider);
    font-size: 0;
    cursor: pointer;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Larger hit area than the 8px square. */
.uc-test-section .uc-test-dot::before {
    content: "";
    position: absolute;
    inset: -8px -4px;
}

.uc-test-section .uc-test-dot:hover {
    background: var(--uc-test-secondary);
}

.uc-test-section .uc-test-dot.is-active {
    width: 32px;
    background: var(--uc-test-secondary);
}

.uc-test-section .uc-test-more:focus-visible,
.uc-test-section .uc-test-dot:focus-visible,
.uc-test-section .uc-test-close:focus-visible {
    outline: 2px solid var(--uc-test-tertiary);
    outline-offset: 3px;
}

/* ── Full testimonial dialog ─────────────────────────────────── */
.uc-test-modal {
    width: min(720px, calc(100% - 32px));
    max-width: none;
    max-height: calc(100% - 64px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--uc-test-white);
    color: var(--uc-test-text);
    font-family: var(--uc-test-font);
    box-shadow: 0 24px 64px rgba(16, 18, 20, 0.25);
    overflow: hidden;
}

.uc-test-modal[open] {
    display: flex;
    flex-direction: column;
}

.uc-test-modal::backdrop {
    background: rgba(16, 18, 20, 0.6);
}

.uc-test-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 56px 40px 40px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.uc-test-section .uc-test-close,
.uc-test-section .uc-test-close:hover,
.uc-test-section .uc-test-close:focus {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--uc-test-primary);
    color: var(--uc-test-white);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.uc-test-section .uc-test-close:hover {
    background: var(--uc-test-secondary);
}

.uc-test-close svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
}

/* The dialog shows a copy of the card, laid out for reading. */
.uc-test-modal .uc-test-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    grid-template-areas:
        "avatar stars"
        "avatar name"
        "avatar role"
        "quote  quote";
    column-gap: 20px;
    align-items: center;
    padding: 0;
    background: transparent;
    text-align: left;
}

.uc-test-modal .uc-test-avatar {
    grid-area: avatar;
    width: 72px;
    height: 72px;
    margin: 0;
    font-size: 24px;
}

.uc-test-modal .uc-test-stars {
    grid-area: stars;
    justify-content: flex-start;
    margin: 0 0 4px;
}

.uc-test-modal .uc-test-stars svg {
    width: 18px;
    height: 18px;
}

.uc-test-modal .uc-test-name {
    grid-area: name;
}

.uc-test-modal .uc-test-role {
    grid-area: role;
}

.uc-test-section .uc-test-modal .uc-test-quote {
    grid-area: quote;
    display: block;
    margin: 24px 0 0;
    padding-top: 24px;
    border-top: 1px solid var(--uc-test-divider);
    font-size: var(--uc-test-body-size);
    font-weight: 400;
    line-height: var(--uc-test-body-lh);
    color: var(--uc-test-text);
    overflow: visible;
}

/* ── Responsive (Elementor breakpoints: 1024 / 767) ──────────── */
@media (max-width: 1024px) {
    .uc-test-section {
        padding: 0 16px;
    }
}

@media (max-width: 767px) {
    .uc-test-card {
        flex-basis: 100%;
        padding: 24px;
    }

    .uc-test-section .uc-test-quote {
        margin-top: 16px;
    }

    .uc-test-modal-body {
        padding: 56px 24px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .uc-test-track,
    .uc-test-section .uc-test-dot {
        transition: none;
    }
}
