.testimonials-page {
    width: 100%;
    padding: 60px 15px 50px;
}

.testimonials-page * {
    box-sizing: border-box;
}

.testimonials-head {
    text-align: center;
    padding: 20px 0 0;
    margin-bottom: 40px;
}

.testimonials-head h1 {
    margin: 0 !important;
    padding: 0;
    text-align: center !important;
    font-size: 40px;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.02em;
}

.testimonials-head h1::after {
    content: "";
    display: block;
    width: 70px;
    height: 4px;
    margin: 16px auto 0;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--main-first), #60a5fa);
}

.testimonials-grid {
    columns: 3 300px;
    column-gap: 20px;
}

.testimonial-item {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: 20px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    padding: 26px 24px 22px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: all 0.2s ease;
}

.testimonial-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--main-first), #60a5fa 60%, #e8b15a);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.testimonial-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
    transform: translateY(-3px);
}

.testimonial-item:hover::before {
    opacity: 1;
}

.testimonial-quote {
    display: block;
    height: 22px;
    margin-bottom: 4px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 40px;
    line-height: 1;
    color: #dbe4f3;
}

.testimonial-item blockquote {
    margin: 0;
}

.testimonial-item blockquote p {
    margin: 0;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.75;
    text-align: left;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.testimonial-avatar {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    background:
        radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.4), transparent 45%),
        var(--avatar, var(--main-first));
    box-shadow: 0 2px 6px rgba(30, 64, 175, 0.25);
}

.testimonial-author strong {
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
}

.testimonials-empty {
    margin: 0;
    padding: 40px 20px;
    border: 1px dashed #e5e7eb;
    border-radius: 10px;
    color: #6b7280;
    text-align: center;
}

@media screen and (max-width: 720px) {
    .testimonials-page {
        padding: 30px 10px 40px;
    }

    .testimonials-head {
        padding-top: 0;
        margin-bottom: 28px;
    }

    .testimonials-head h1 {
        font-size: 28px;
    }

    .testimonials-grid {
        columns: 1;
    }

    .testimonial-item {
        margin-bottom: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .testimonial-item {
        transition: none;
    }

    .testimonial-item:hover {
        transform: none;
    }
}
