/**
 * Стили для секции "Отзывы клиентов"
 * 
 * @package RoofBangers
 * @since 1.0.0
 */

/* ===== ОСНОВНЫЕ СТИЛИ СЕКЦИИ ===== */
.testimonials-section {
    padding: 80px 0;
    background-color: #fff;
    position: relative;
}

/* ===== ЗАГОЛОВОК СЕКЦИИ ===== */
.testimonials-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 60px;
    gap: 40px;
}

.testimonials-title-block {
    max-width: 600px;
    flex: 1;
}

.testimonials-subtitle {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-button-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.testimonials-title {
    font-size: clamp(28px, 2.5vw, 48px);
    font-weight: 400;
    color: var(--color-heading);
    line-height: 1.2;
    margin: 0;
}

/* ===== КАРУСЕЛЬ ===== */
.testimonials-carousel-wrapper {
    position: relative;
    overflow: hidden;
}

.testimonials-swiper {
    overflow: visible;
}

.testimonials-swiper .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.testimonials-swiper .swiper-slide {
    height: auto;
    width: 50%;
    /* По 2 слайда на экране */
    padding-right: 30px;
    box-sizing: border-box;
}

/* ===== КАРТОЧКА ОТЗЫВА ===== */
.testimonial-card {
    background: #fff;
    border-radius: 0;
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ===== ИНФОРМАЦИЯ О КЛИЕНТЕ ===== */
.testimonial-client-info {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.testimonial-avatar {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #f5f5f5;
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.testimonial-client-details {
    flex: 1;
    min-width: 0;
}

.testimonial-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-heading);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.testimonial-address {
    font-size: 15px;
    color: var(--color-text);
    margin-bottom: 12px;
    line-height: 1.4;
}

/* ===== КНОПКА ВИДЕО ===== */
.testimonial-video-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 0;
    color: var(--color-button-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
}

.testimonial-video-btn:hover {
    color: var(--color-button-primary-hover);
}

.testimonial-video-btn .video-icon {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* ===== ТЕКСТ ОТЗЫВА ===== */
.testimonial-text {
    flex: 1;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.testimonial-text p {
    margin: 0 0 16px 0;
}

.testimonial-text p:last-child {
    margin-bottom: 0;
}

/* ===== КНОПКИ НАВИГАЦИИ КАРУСЕЛИ (используем существующие стили) ===== */
.testimonials-section .carousel-controls {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.testimonials-section .carousel-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.testimonials-section .carousel-btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.testimonials-section .carousel-btn:active {
    transform: translateY(0);
}

.testimonials-section .carousel-btn svg {
    width: 40px;
    height: 40px;
}

.testimonials-section .carousel-btn.swiper-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.testimonials-section .carousel-btn.swiper-button-disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ===== ПОПАП ДЛЯ ВИДЕО ===== */
.video-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.video-popup.active {
    display: flex;
}

.video-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.video-popup-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 90%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.video-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.video-popup-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.video-popup-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
}

.video-popup-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== АДАПТИВНЫЕ СТИЛИ ===== */

/* Большие планшеты и маленькие десктопы */
@media (max-width: 1024px) {
    .testimonials-section {
        padding: 60px 0;
    }

    .testimonials-header {
        margin-bottom: 40px;
        gap: 30px;
    }

    .testimonials-title {
        font-size: 40px;
    }

    .testimonials-swiper .swiper-slide {
        width: 60%;
        padding-right: 20px;
    }
}

/* Планшеты */
@media (max-width: 768px) {
    .testimonials-header {
        gap: 20px;
    }

    .testimonials-title {
        font-size: 32px;
    }

    .testimonials-swiper .swiper-slide {
        width: 85%;
        padding-right: 15px;
    }

    .testimonial-client-info {
        gap: 12px;
    }

    .testimonial-avatar {
        width: 50px;
        height: 50px;
    }

    .testimonial-name {
        font-size: 16px;
    }

    .video-popup-content {
        width: 95%;
        margin: 20px;
    }
}

/* Мобильные устройства */
@media (max-width: 480px) {
    .testimonials-section {
        padding: 40px 0;
    }

    .testimonials-section .container {
        padding: 0 15px;
    }

    .testimonials-header {
        margin-bottom: 30px;
    }

    .testimonials-title {
        font-size: 28px;
    }

    .testimonials-swiper .swiper-slide {
        width: 100%;
        padding-right: 10px;
    }

    .testimonial-card {
        gap: 20px;
    }

    .testimonial-text {
        font-size: 15px;
    }

    .video-popup-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        margin: 0;
    }

    .video-popup-close {
        top: 10px;
        right: 10px;
    }
}

@media screen and (max-width: 430px) {
    .testimonials-subtitle {
        font-size: 3.8vw;
    }

    .testimonials-title {
        font-size: 7.2vw;
    }
}