@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&display=swap');

/* Общие стили для попапов */
.rs-popup {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2147483647 !important;
    transform: translateZ(0);
}

.rs-popup-content {
    background: white;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    border-radius: 8px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 2147483648 !important;
}

/* Кнопка закрытия крестиком */
.rs-close-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ccc;
    color: #666;
    font-size: 24px;
    line-height: 26px;
    text-align: center;
    cursor: pointer;
    background: white;
    z-index: 10;
    transition: all 0.2s;
}
.rs-close-icon:hover {
    border-color: #999;
    color: #333;
}

body.rs-popup-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Скрытие фиксированного сайдбара при открытом попапе */
body.rs-popup-open .sidebar-fixed {
    display: none !important;
}

/* Отключение кликов по фиксированным элементам */
body.rs-popup-open .fixed-header,
body.rs-popup-open .fixed-menu,
body.rs-popup-open .floating-button {
    pointer-events: none !important;
    opacity: 0.5;
    z-index: 1 !important;
}

/* Стили для заголовков */
.rs-title1,
.rs-title2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: 0;
    margin-top: 60px;
    margin-bottom: 20px;
}

/* Стили для подзаголовков */
.rs-subtitle1,
.rs-subtitle2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-style: normal;
    font-size: 18px;
    line-height: 1;
    letter-spacing: 0;
    margin-top: -10px;  /* компенсация отступа между заголовком и подзаголовком */
    margin-bottom: 20px;
    color: #666;
}

/* Стили для попапа полного отзыва */
.rs-full-review-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
}
.rs-full-review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}
.rs-full-review-icon {
    width: 30px;
    height: auto;
}
.rs-full-review-name {
    font-weight: 600;
    color: #61D2A0;
}
.rs-full-review-text {
    margin-bottom: 15px;
    line-height: 1.6;
}
.rs-full-review-date {
    color: #999;
    font-size: 0.9em;
    margin-bottom: 20px;
}

/* Форма */
.rs-form-row {
    margin-bottom: 15px;
}
.rs-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}
.rs-rating input[type="radio"] {
    display: none;
}
.rs-star {
    font-size: 30px;
    color: #ccc;
    cursor: pointer;
}
.rs-rating input:checked ~ label,
.rs-rating label:hover,
.rs-rating label:hover ~ label {
    color: #f5b301;
}
.rs-row-fields {
    display: flex;
    gap: 10px;
}
.rs-row-fields input {
    flex: 1;
    padding: 8px;
}
textarea, input[type="text"], input[type="email"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.rs-row-buttons {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

/* Карусель */
.rs-carousel {
    margin: 20px 0;
}
.rs-carousel .slick-slide {
    margin: 0 5px;
}
.rs-carousel .slick-prev,
.rs-carousel .slick-next {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;                /* убираем стандартную обводку */
    z-index: 1;
}
.rs-carousel .slick-prev img,
.rs-carousel .slick-next img {
    width: 100%;
    height: auto;
    display: block;
}
.rs-carousel .slick-prev:before,
.rs-carousel .slick-next:before {
    content: none !important;     /* отключаем стандартные иконки */
}
.rs-carousel .slick-prev {
    left: -50px;
}
.rs-carousel .slick-next {
    right: -50px;
}
/* Пагинация (dots) полностью скрыта, так как в JS dots: false */
.rs-carousel .slick-dots {
    display: none !important;
}
@media (max-width: 768px) {
    .rs-carousel .slick-prev { left: 10px; }
    .rs-carousel .slick-next { right: 10px; }
}
@media (max-width: 576px) {
    .rs-carousel .slick-prev { left: 5px; }
    .rs-carousel .slick-next { right: 5px; }
}

/* Декоративное изображение под каруселью */
.rs-carousel-decoration {
    text-align: center;
    margin: 20px 0 30px;
}

/* Сетка отзывов */
.rs-reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}
@media (max-width: 768px) {
    .rs-reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .rs-reviews-grid {
        grid-template-columns: 1fr;
    }
}

/* Карточка отзыва */
.rs-review-card {
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 5px;
}
.rs-review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.rs-review-icon {
    width: 30px;
    height: auto;
}
.rs-review-name {
    font-weight: 600;
    flex: 1;
}
.rs-review-rating {
    color: #f5b301;
    white-space: nowrap;
}
.rs-review-text {
    margin-bottom: 10px;
    line-height: 1.5;
}
.rs-review-date {
    color: #999;
    font-size: 0.9em;
}

/* Кнопка показать ещё */
.rs-load-more-container {
    text-align: center;
    margin: 30px 0;
}
/* Улучшение адаптивности карточек */
.rs-review-card {
    box-sizing: border-box;           /* Учитываем padding и border в ширине */
    width: 100%;                      /* Занимаем всю доступную ширину */
    overflow-wrap: break-word;         /* Перенос длинных слов */
    word-wrap: break-word;             /* Для старых браузеров */
    hyphens: auto;                     /* Расстановка переносов (опционально) */
}

.rs-review-header {
    flex-wrap: wrap;                   /* Разрешаем перенос элементов при нехватке места */
}

.rs-review-icon {
    max-width: 100%;                   /* Иконка не вылезет за пределы */
    height: auto;                      /* Сохраняем пропорции */
}

/* Дополнительные корректировки для самых маленьких экранов */
@media (max-width: 480px) {
    .rs-review-header {
        gap: 5px;                      /* Уменьшаем отступы */
    }
    .rs-review-name {
        font-size: 14px;               /* Чуть уменьшаем шрифт */
    }
    .rs-review-text {
        font-size: 14px;
    }
}
body.rs-popup-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    left: 0;           /* добавьте для надёжности */
    right: 0;          /* добавьте для надёжности */
}
.rs-form-row input[type="checkbox"]{
width:20px;
}
button.rs-close-popup{
display: block;
margin:0 auto;
width:40%;
}
.rs-form-row.rs-row-buttons button{
width:40%;
}
.rs-form-row.rs-row-buttons button.rs-close-popup{
width:40%;
margin:0;
}