/* ==========================================================
   Testimonial Component
   ========================================================== */

.testimonials-container {
    position: relative;
    width: min(90%, 1100px);
    margin: 3rem auto 0;
}

.testimonial {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background-color: var(--color-background-dark);
    box-shadow: 0 18px 45px var(--color-shadow-strong);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.testimonial.animate {
    opacity: 1;
    transform: translateY(0);
}

.testimonial-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 4.5rem);
    background-image:
        linear-gradient(
            90deg,
            var(--color-image-overlay-strong) 0%,
            var(--color-image-overlay-medium) 52%,
            var(--color-image-overlay-light) 100%
        );
    color: var(--color-text-reversed);
}

/* Engagement information */

.testimonial-engagement {
    max-width: 54rem;
}

.testimonial-logo {
    display: block;
    width: clamp(110px, 15vw, 155px);
    height: auto;
    margin: 0 0 1.5rem;
}

.testimonial-engagement h3 {
    max-width: 46rem;
    margin: 0 0 1rem;
    color: var(--color-text-reversed);
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: var(--font-weight-semibold);
    line-height: 1.2;
    text-wrap: balance;
}

.testimonial-meta {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    color: var(--color-text-reversed-muted);
    font-size: 1rem;
    line-height: 1.45;
}

.testimonial-meta > div {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 0.8rem;
}

.testimonial-meta dt {
    color: var(--color-text-reversed);
    font-weight: var(--font-weight-semibold);
}

.testimonial-meta dd {
    margin: 0;
}

/* Quote */

.testimonial-quote {
    max-width: 52rem;
    margin: clamp(1.5rem, 2vw, 2.5rem) 0 2rem;
    padding-left: 1.5rem;
    border-left: 4px solid var(--color-accent);
}

.testimonial .testimonial-text {
    margin: 0;
    color: var(--color-text-reversed);
    font-size: clamp(1rem, 1.7vw, 1.4rem);
    font-style: italic;
    font-weight: var(--font-weight-regular);
    line-height: 1.5;
    text-shadow: 0 2px 12px var(--color-background-dark);
}

.testimonial-text + .testimonial-text {
    margin-top: 0.75rem;
}

/* Author */

.testimonial-author {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.author-info h4 {
    margin: 0 0 0.15rem;
    color: var(--color-text-reversed);
    font-size: 1.05rem;
    font-weight: var(--font-weight-bold);
}

.author-info span {
    color: var(--color-text-reversed-muted);
    font-size: 0.95rem;
}

/* Tablet */

@media (max-width: 940px) {
    .testimonials-container {
        margin-top: 2rem;
    }

    .testimonial-content {
        padding: clamp(1.75rem, 6vw, 3rem);
    }

    .testimonial-text {
        font-size: 1.2rem;
    }
}

/* Mobile */

@media (max-width: 600px) {
    .testimonial {
        border-radius: 18px;
    }

    .testimonial-content {
        padding: 1.5rem;
    }

    .testimonial-logo {
        margin-bottom: 1.25rem;
    }

    .testimonial-meta > div {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 0.4rem;
    }

    .testimonial-quote {
        margin: 2rem 0 1.5rem;
        padding-left: 1rem;
    }

    .testimonial-text {
        font-size: 1.15rem;
    }
}