/**
 * Секция "Отзывы"
 * Liquid glass карточки с адаптивной сеткой
 */

.testimonials-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #E8F4F8 0%, #F0F8FF 100%);
    position: relative;
    overflow: hidden;
}

.testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="rgba(42,119,255,0.05)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.testimonials-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.testimonials-header {
    text-align: center;
    margin-bottom: 4rem;
}

.testimonials-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1F2933;
    margin-bottom: 1rem;
}

.testimonials-subtitle {
    font-size: 1.2rem;
    color: #6B7280;
}

/* Сетка карточек */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: start; /* Карточки выравниваются по верхнему краю, не растягиваются */
}

/* Карточка отзыва */
.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
    display: flex;
    flex-direction: column;
    min-height: fit-content;
}

.testimonial-card:nth-child(1) {
    animation-delay: 0.1s;
}

.testimonial-card:nth-child(2) {
    animation-delay: 0.2s;
}

.testimonial-card:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* После завершения анимации */
.testimonial-card.animated {
    animation: none;
    opacity: 1;
    transform: translateY(0);
}

.testimonial-card:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

/* После завершения анимации добавляем hover эффект */
.testimonial-card.animated:hover {
    transform: translateY(-5px) scale(1.02);
}

/* Обертка для текста отзыва */
.testimonial-text-wrapper {
    flex-grow: 1;
    margin-bottom: 1rem;
    position: relative;
}

/* Текст отзыва */
.testimonial-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4B5563;
    margin: 0;
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Полный текст (когда развернут) */
.testimonial-text.expanded {
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
}

/* Кнопка "Читать далее" */
.testimonial-read-more {
    display: none;
    margin-top: 0.75rem;
    padding: 0;
    background: none;
    border: none;
    color: #2A77FF;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
    font-style: normal;
}

.testimonial-read-more:hover {
    color: #1e5fcc;
}

.testimonial-read-more.visible {
    display: inline-block;
}

/* Автор отзыва */
.testimonial-author {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.testimonial-author-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1F2933;
    margin-bottom: 0.5rem;
}

.testimonial-author-program {
    font-size: 0.9rem;
    color: #6B7280;
    margin: 0;
}

/* Переопределяем белый текст из style.css — на главной карточки светлые, текст тёмный */
.testimonials-section .testimonial-author-name {
    color: #1F2933;
}

.testimonials-section .testimonial-author-program,
.testimonials-section .testimonial-author p {
    color: #6B7280;
}

/* Кнопка "Посмотреть все отзывы" */
.testimonials-footer {
    text-align: center;
    margin-top: 3rem;
}

.testimonials-footer-text {
    font-size: 1rem;
    color: #6B7280;
    margin-bottom: 1.5rem;
}

.testimonials-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #2A77FF;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(42, 119, 255, 0.3);
}

.testimonials-button:hover {
    background: #1e5fcc;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(42, 119, 255, 0.4);
    color: white;
}

.testimonials-button-arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.testimonials-button:hover .testimonials-button-arrow {
    transform: translateX(5px);
}

/* Адаптивность */
@media (max-width: 992px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .testimonials-section {
        padding: 3rem 0;
    }
    
    .testimonials-header {
        margin-bottom: 2.5rem;
    }
    
    .testimonials-title {
        font-size: 2rem;
    }
    
    .testimonials-subtitle {
        font-size: 1rem;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-card {
        padding: 1.25rem;
    }
    
    .testimonial-text {
        -webkit-line-clamp: 5;
        font-size: 0.9rem;
    }
}

