/* Основные стили для секции отзывов */
.reviews-section {
    background: #F5F5F5;
    padding: 60px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
}

/* Заголовок секции */
.reviews-header {
    text-align: center;
    margin-bottom: 50px;
}

.reviews-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.rating-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.rating-stars {
    display: flex;
    align-items: center;
    gap: 5px;
}

.star {
    color: #FF8412;
    font-size: 20px;
    line-height: 1;
}

.rating-number {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.rating-text {
    color: #666;
    font-size: 14px;
    max-width: 400px;
    text-align: center;
}

.reviews-subtitle {
    color: #666;
    font-size: 16px;
    margin: 0;
    font-weight: 400;
}

/* Слайдер */
.reviews-slider {
    position: relative;
    /* overflow: hidden;  <-- Убрано отсюда */
}

.slider-viewport {
    overflow: hidden; /* <-- Добавлено сюда */
}

.reviews-container {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, auto);
    /* Удаляем явную ширину колонок, JS будет управлять общей шириной */
    gap: 20px;
    overflow: visible; /* Убираем overflow отсюда */
    padding: 10px;
    margin: 0 -10px;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Карточка отзыва */
.review-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* Добавлено для дочерних элементов */
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Стили для разных типов карточек */
.review-card--text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 25px;
}

.review-card--video {
    position: relative;
    padding: 0;
    align-items: stretch; /* Растягиваем дочерние элементы */
}

/* Видео-превью */
.review-video {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.review-card:hover .video-preview {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    right: 15px;
    bottom: 15px;
    width: 50px;
    height: 50px;
    background: rgba(255, 132, 18, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(5px);
}

.play-button:hover {
    background: rgba(255, 132, 18, 1);
    transform: scale(1.1);
}

.video-author {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

/* Контент отзыва */
.review-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.review-text {
    color: #333;
    font-size: 16px;
    line-height: 1.6;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 20px;
}

.review-card--reversed .review-text {
    -webkit-line-clamp: 3;
    min-height: 72px;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.author-stars {
    color: #FF8412;
    font-size: 14px;
    margin-top: 2px;
}

/* Навигация слайдера */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #E0E0E0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    z-index: 10;
    color: #333;
    backdrop-filter: blur(10px);
}

.slider-nav:hover {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-color: #FF8412;
    transform: translateY(-50%) scale(1.1);
}

.slider-nav.prev {
    left: -25px;
}

.slider-nav.next {
    right: -25px;
}

.slider-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%) scale(0.95);
}

/* Кнопка "Все отзывы" */
.reviews-footer {
    text-align: center;
    margin-top: 40px;
}

.all-reviews-btn {
    background-color: #FF8412;
    color: #fff;
    border: none;
    padding: 15px 35px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-transform: none;
}

.all-reviews-btn:hover {
    background-color: #E67300;
    transform: translateY(-2px);
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-card {
    animation: fadeIn 0.6s ease-out;
}

.review-card:nth-child(1) { animation-delay: 0.1s; }
.review-card:nth-child(2) { animation-delay: 0.2s; }
.review-card:nth-child(3) { animation-delay: 0.3s; } 

/* Стили для видео-попапа */
.video-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none; /* Скрыто по умолчанию */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-popup.is-visible {
    display: flex;
    opacity: 1;
}

.video-popup__content {
    position: relative;
    width: 90%;
    max-width: 960px;
    background: #000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.video-popup__player {
    position: relative;
    padding-bottom: 56.25%; /* Соотношение сторон 16:9 */
    height: 0;
    overflow: hidden;
}

.video-popup__player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-popup__close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    font-weight: 300;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.video-popup__close:hover {
    opacity: 1;
    transform: rotate(90deg);
} 