/*
 * FIFE Testimonials — Elementor widget styles.
 * Scoped entirely under .fife-elementor-testimonials so it never touches
 * the legacy .testimonials-section-magenta rules in style.css and is safe
 * to run alongside them, including multiple widget instances on one page.
 */

.fife-elementor-testimonials,
.fife-elementor-testimonials *,
.fife-elementor-testimonials *::before,
.fife-elementor-testimonials *::after {
    box-sizing: border-box;
}

.fife-elementor-testimonials {
    --fife-testimonials-content-gap: 1.25rem;
    --fife-testimonials-avatar-size: 56px;
    position: relative;
}

.fife-elementor-testimonials__header {
    max-width: 760px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.fife-elementor-testimonials__heading {
    margin: 0 0 0.75rem;
    font-size: clamp(1.875rem, 3.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    color: hsl(0, 0%, 3.9%);
}

.fife-elementor-testimonials__description {
    margin: 0;
    color: hsl(0, 0%, 45.1%);
    font-size: 1rem;
}

.fife-elementor-testimonials__viewport {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 3.5rem;
}

.fife-elementor-testimonials__track {
    position: relative;
    overflow: hidden;
    transition: height 0.4s ease;
}

.fife-elementor-testimonials__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fife-elementor-testimonials__slide.is-active {
    position: relative;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Static Grid display mode: every testimonial shown at once, no slider. */
.fife-elementor-testimonials__viewport--grid {
    max-width: none;
    padding: 0;
}

.fife-elementor-testimonials__track--grid {
    display: grid;
    grid-template-columns: repeat(var(--fife-testimonials-grid-columns, 2), minmax(0, 1fr));
    gap: 2rem;
    overflow: visible;
    transition: none;
}

.fife-elementor-testimonials__track--grid .fife-elementor-testimonials__slide {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: none;
}

.fife-elementor-testimonials__track--grid .fife-elementor-testimonials__card {
    height: 100%;
}

.fife-elementor-testimonials__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--fife-testimonials-content-gap);
    text-align: center;
    background-color: hsl(0, 0%, 100%);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
}

.fife-elementor-testimonials__track--grid .fife-elementor-testimonials__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 30px -6px rgba(0, 0, 0, 0.15);
}

.fife-elementor-testimonials__quote-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    color: hsl(310, 58%, 35%);
    opacity: 0.35;
}

.fife-elementor-testimonials__quote-icon svg {
    width: 100%;
    height: 100%;
}

.fife-elementor-testimonials__quote-text {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.7;
    font-style: italic;
    color: hsl(0, 0%, 20%);
}

.fife-elementor-testimonials__rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.fife-elementor-testimonials__star {
    display: inline-flex;
    width: 20px;
    height: 20px;
    color: hsl(0, 0%, 85%);
}

.fife-elementor-testimonials__star.is-filled {
    color: #f5b301;
}

.fife-elementor-testimonials__star svg {
    width: 100%;
    height: 100%;
}

.fife-elementor-testimonials__author {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.fife-elementor-testimonials__avatar {
    width: var(--fife-testimonials-avatar-size);
    height: var(--fife-testimonials-avatar-size);
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background-color: hsla(310, 58%, 35%, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fife-elementor-testimonials__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fife-elementor-testimonials__avatar--initials {
    color: hsl(310, 58%, 35%);
    font-weight: 700;
    font-size: 1.125rem;
    text-transform: uppercase;
}

.fife-elementor-testimonials__author-info {
    text-align: left;
}

.fife-elementor-testimonials__author-name {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.35;
    color: hsl(0, 0%, 3.9%);
}

.fife-elementor-testimonials__author-position {
    margin: 0;
    font-size: 0.875rem;
    color: hsl(0, 0%, 45.1%);
}

.fife-elementor-testimonials__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background-color: hsl(0, 0%, 100%);
    border: 1px solid hsl(0, 0%, 89.8%);
    border-radius: 9999px;
    color: hsl(310, 58%, 35%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    z-index: 5;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.fife-elementor-testimonials__nav:hover {
    background-color: hsl(310, 58%, 35%);
    color: #fff;
    transform: translateY(-50%) scale(1.06);
}

.fife-elementor-testimonials__nav:focus-visible {
    outline: 2px solid hsl(310, 58%, 35%);
    outline-offset: 2px;
}

.fife-elementor-testimonials__nav svg {
    width: 18px;
    height: 18px;
}

.fife-elementor-testimonials__nav--prev {
    left: 0;
}

.fife-elementor-testimonials__nav--next {
    right: 0;
}

.fife-elementor-testimonials__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    margin-top: 1.75rem;
}

.fife-elementor-testimonials__dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background-color: hsl(0, 0%, 85%);
    cursor: pointer;
    transition: width 0.3s ease, background-color 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.fife-elementor-testimonials__dot.is-active {
    width: 28px;
    background-color: hsl(310, 58%, 35%);
}

.fife-elementor-testimonials__dot:focus-visible {
    outline: 2px solid hsl(310, 58%, 35%);
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .fife-elementor-testimonials__viewport {
        padding: 0 2.75rem;
    }

    .fife-elementor-testimonials__card {
        padding: 1.75rem 1.25rem;
    }

    .fife-elementor-testimonials__quote-text {
        font-size: 1.0625rem;
    }

    .fife-elementor-testimonials__nav {
        width: 34px;
        height: 34px;
    }

    .fife-elementor-testimonials__nav svg {
        width: 15px;
        height: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fife-elementor-testimonials__slide,
    .fife-elementor-testimonials__track,
    .fife-elementor-testimonials__dot,
    .fife-elementor-testimonials__nav {
        transition-duration: 0.01ms !important;
    }

    .fife-elementor-testimonials__slide {
        transform: none !important;
    }
}
