/* ============================================================
   Страница «Отзывы» — /o-sajte/
   ============================================================ */

/* ---- Сброс глобальных ::after подчёркиваний ---- */
.reviews-hero h1::after,
.reviews-hero h2::after,
.reviews-hero h3::after,
.reviews-stats h2::after,
.reviews-stats h3::after,
.reviews-section h2::after,
.reviews-section h3::after,
.reviews-form-section h2::after,
.reviews-form-section h3::after,
.reviews-cta h1::after,
.reviews-cta h2::after,
.reviews-cta h3::after {
    content: none !important;
}

/* Сброс text-align: center для заголовков внутри комментариев */
.reviews-comment-list h2,
.reviews-comment-list h3,
.reviews-comment-list h4,
.reviews-comment-list h5 {
    text-align: left;
}

.reviews-comment-list h2::after,
.reviews-comment-list h3::after,
.reviews-comment-list h4::after,
.reviews-comment-list h5::after,
.reviews-pagination h3::after {
    content: none !important;
}

/* ---- Кнопки (дублируем из about.css для независимости) ---- */
.reviews-hero .about-btn,
.reviews-form-section .about-btn,
.reviews-cta .about-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.reviews-hero .about-btn--primary,
.reviews-form-section .about-btn--primary {
    background: #005DAC;
    color: #fff;
    border: 2px solid #005DAC;
}

.reviews-hero .about-btn--primary:hover,
.reviews-form-section .about-btn--primary:hover {
    background: #004a8a;
    border-color: #004a8a;
    color: #fff;
}

.reviews-hero .about-btn--outline {
    background: transparent;
    color: #005DAC;
    border: 2px solid #005DAC;
}

.reviews-hero .about-btn--outline:hover {
    background: #005DAC;
    color: #fff;
}

.reviews-cta .about-btn--white {
    background: #fff;
    color: #005DAC;
    border: 2px solid #fff;
}

.reviews-cta .about-btn--white:hover {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

/* ---- Глобальная защита от overflow на мобильных ---- */
.reviews-hero,
.reviews-stats,
.reviews-section,
.reviews-form-section,
.reviews-cta {
    overflow: hidden;
}

/* ---- Hero ---- */
.reviews-hero {
    padding: 80px 0 60px;
    background: linear-gradient(135deg, #f0f6fd 0%, #e8f0fb 100%);
}

.reviews-hero__inner {
    display: flex;
    align-items: center;
    gap: 60px;
}

.reviews-hero__content {
    flex: 1;
    min-width: 0;
}

.reviews-hero__label {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #005DAC;
    background: rgba(0, 93, 172, 0.1);
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 20px;
}

.reviews-hero__title {
    font-size: clamp(28px, 3.5vw, 44px);
    font-weight: 800;
    line-height: 1.2;
    color: #11172D;
    margin: 0 0 16px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.reviews-hero__title::after {
    content: none !important;
}

.reviews-hero__text {
    font-size: 16px;
    line-height: 1.75;
    color: #5D6584;
    margin: 0 0 32px;
    max-width: 560px;
}

.reviews-hero__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* Hero — правая часть (Яндекс-бейдж + доверие) */
.reviews-hero__badge {
    flex-shrink: 0;
    width: 360px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.reviews-hero__yandex {
    background: #fff;
    border-radius: 16px;
    padding: 28px 32px;
    box-shadow: 0 8px 40px rgba(0, 93, 172, 0.1);
    text-align: center;
}

.reviews-hero__yandex-label {
    font-size: 15px;
    font-weight: 700;
    color: #11172D;
    margin: 0 0 14px;
}

.reviews-hero__yandex iframe {
    display: block;
    margin: 0 auto;
    max-width: 100%;
}

.reviews-hero__trust-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reviews-hero__trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 12px;
    padding: 14px 20px;
    box-shadow: 0 2px 16px rgba(0, 93, 172, 0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.reviews-hero__trust-item:hover {
    box-shadow: 0 8px 24px rgba(0, 93, 172, 0.14);
    transform: translateY(-2px);
}

.reviews-hero__trust-item svg {
    flex-shrink: 0;
}

.reviews-hero__trust-item span {
    font-size: 15px;
    font-weight: 600;
    color: #11172D;
}

/* ---- Цифры ---- */
.reviews-stats {
    padding: 0;
    position: relative;
    z-index: 1;
}

.reviews-stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0, 93, 172, 0.12);
    margin-top: -20px;
    overflow: visible;
    border: 1px solid rgba(0, 93, 172, 0.06);
}

.reviews-stats__item {
    padding: 44px 28px;
    text-align: center;
    position: relative;
    transition: background 0.3s ease;
}

.reviews-stats__item:first-child {
    border-radius: 20px 0 0 20px;
}

.reviews-stats__item:last-child {
    border-radius: 0 20px 20px 0;
}

.reviews-stats__item:hover {
    background: #f8fbff;
}

.reviews-stats__item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: #e0e8f4;
}

.reviews-stats__number {
    display: block;
    font-size: 48px;
    font-weight: 800;
    color: #005DAC;
    line-height: 1;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.reviews-stats__label {
    font-size: 13px;
    font-weight: 700;
    color: #5D6584;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ---- Секция отзывов ---- */
.reviews-section {
    padding: 80px 0 60px;
    background: #fff;
}

.reviews-section__title {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    color: #11172D;
    line-height: 1.25;
    margin: 0 0 12px;
    text-align: center;
}

.reviews-section__title::after {
    content: none !important;
}

.reviews-section__subtitle {
    font-size: 17px;
    line-height: 1.6;
    color: #5D6584;
    text-align: center;
    margin: 0 0 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Список комментариев ---- */
.reviews-comments-wrap {
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

.reviews-comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reviews-comment-list > li {
    margin-bottom: 24px;
    min-width: 0;
}

.reviews-comment-list .ast-comment {
    background: #fff;
    border: 1px solid #e8eff8;
    border-radius: 16px;
    padding: 32px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    overflow: hidden;
    min-width: 0;
}

.reviews-comment-list .ast-comment:hover {
    box-shadow: 0 8px 32px rgba(0, 93, 172, 0.1);
    transform: translateY(-2px);
}

/* Аватар */
.reviews-comment-list .ast-comment-avatar-wrap {
    margin-right: 16px;
}

.reviews-comment-list .ast-comment-avatar-wrap img {
    width: 52px !important;
    height: 52px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e8eff8;
}

/* Информация о комментаторе */
.reviews-comment-list .ast-comment-info {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    min-width: 0;
    overflow: hidden;
}

.reviews-comment-list .ast-comment-meta {
    flex-direction: column;
    gap: 2px;
}

.reviews-comment-list .ast-comment-cite-wrap cite {
    font-style: normal;
}

.reviews-comment-list .ast-comment-cite-wrap .fn {
    font-size: 16px;
    font-weight: 700;
    color: #11172D;
    overflow-wrap: break-word;
    word-break: break-word;
}

.reviews-comment-list .ast-comment-cite-wrap .fn a {
    color: #11172D;
    text-decoration: none;
    font-weight: 700;
    overflow-wrap: break-word;
    word-break: break-word;
}

.reviews-comment-list .ast-comment-cite-wrap .fn a:hover {
    color: #005DAC;
}

/* Бейдж автора поста */
.reviews-comment-list .ast-highlight-text.ast-cmt-post-author {
    display: inline-block;
    background: rgba(0, 93, 172, 0.1);
    color: #005DAC;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    margin-left: 8px;
    letter-spacing: 0.03em;
}

.reviews-comment-list .ast-highlight-text.ast-cmt-post-author::before {
    content: 'Автор';
}

/* Время */
.reviews-comment-list .ast-comment-time {
    margin-top: 2px;
}

.reviews-comment-list .timendate a {
    font-size: 13px;
    color: #9ba3b8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.reviews-comment-list .timendate a:hover {
    color: #005DAC;
}

/* Текст комментария */
.reviews-comment-list .ast-comment-content {
    font-size: 15px;
    line-height: 1.75;
    color: #5D6584;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}

.reviews-comment-list .ast-comment-content p {
    margin: 0 0 12px;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Длинные URL внутри комментариев */
.reviews-comment-list .ast-comment-content a {
    word-break: break-all;
    overflow-wrap: break-word;
}

/* Изображения внутри комментариев */
.reviews-comment-list .ast-comment-content img {
    max-width: 100%;
    height: auto;
}

.reviews-comment-list .ast-comment-content p:last-of-type {
    margin-bottom: 0;
}

/* Ссылка «Ответить» */
.reviews-comment-list .ast-comment-edit-reply-wrap {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f3f8;
}

.reviews-comment-list .comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #005DAC;
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 8px;
    background: rgba(0, 93, 172, 0.06);
    transition: all 0.2s;
}

.reviews-comment-list .comment-reply-link:hover {
    background: rgba(0, 93, 172, 0.12);
    color: #004a8a;
}

/* Вложенные комментарии */
.reviews-comment-list .children {
    list-style: none;
    padding: 0;
    margin: 16px 0 0 0;
    min-width: 0;
}

.reviews-comment-list .children > li {
    margin-bottom: 16px;
    margin-left: 24px;
}

.reviews-comment-list .children > li:last-child {
    margin-bottom: 0;
}

.reviews-comment-list .children .ast-comment {
    background: #f8fafe;
    border-color: #e0e8f4;
    padding: 24px;
}

.reviews-comment-list .children .children .ast-comment {
    background: #f2f6fc;
}

/* ---- Пагинация ---- */
.reviews-pagination {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #e8eff8;
}

.reviews-pagination .nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reviews-pagination .nav-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #005DAC;
    text-decoration: none;
    padding: 10px 24px;
    border: 2px solid #005DAC;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.reviews-pagination .nav-links a:hover {
    background: #005DAC;
    color: #fff;
}

/* ---- Секция формы ---- */
.reviews-form-section {
    padding: 60px 0 80px;
    background: #f5f7fb;
}

.reviews-form-wrap {
    max-width: 720px;
    margin: 0 auto;
    overflow: hidden;
}

.reviews-form-intro {
    margin-bottom: 32px;
}

/* Стили формы комментариев */
.reviews-form-section #respond {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 2px 16px rgba(0, 92, 165, 0.06);
}

.reviews-form-section .comment-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #11172D;
    margin-bottom: 6px;
}

.reviews-form-section .comment-form input[type="text"],
.reviews-form-section .comment-form input[type="email"],
.reviews-form-section .comment-form input[type="url"],
.reviews-form-section .comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: 'Manrope', sans-serif;
    color: #11172D;
    background: #f8fafe;
    border: 2px solid #e8eff8;
    border-radius: 10px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.reviews-form-section .comment-form input[type="text"]:focus,
.reviews-form-section .comment-form input[type="email"]:focus,
.reviews-form-section .comment-form input[type="url"]:focus,
.reviews-form-section .comment-form textarea:focus {
    outline: none;
    border-color: #005DAC;
    box-shadow: 0 0 0 4px rgba(0, 93, 172, 0.1);
    background: #fff;
}

.reviews-form-section .comment-form textarea {
    resize: vertical;
    min-height: 120px;
}

.reviews-form-section .comment-form p {
    margin: 0 0 20px;
}

.reviews-form-section .comment-form .required {
    color: #F34441;
}

/* Кнопка отправки */
.reviews-form-section .reviews-submit-btn {
    width: 100%;
    padding: 16px 32px;
    font-size: 16px;
    cursor: pointer;
    border: none;
}

/* Чекбокс согласия */
.reviews-form-section .comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.reviews-form-section .comment-form-cookies-consent input[type="checkbox"] {
    margin-top: 3px;
    accent-color: #005DAC;
}

.reviews-form-section .comment-form-cookies-consent label {
    font-size: 13px;
    font-weight: 500;
    color: #5D6584;
    display: inline;
    margin-bottom: 0;
}

/* Скрываем title_reply если он пустой, и стилизуем reply-to */
.reviews-form-section .comment-reply-title {
    font-size: 20px;
    font-weight: 700;
    color: #11172D;
    margin: 0 0 20px;
    text-align: left;
}

.reviews-form-section .comment-reply-title::after {
    content: none !important;
}

.reviews-form-section .comment-reply-title small {
    display: block;
    margin-top: 8px;
}

.reviews-form-section .comment-reply-title small a {
    font-size: 13px;
    font-weight: 600;
    color: #005DAC;
    text-decoration: none;
}

/* ---- CTA ---- */
.reviews-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #005DAC 0%, #003d75 100%);
}

.reviews-cta__inner {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.reviews-cta__title {
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 800;
    color: #fff;
    margin: 0 0 16px;
    line-height: 1.25;
}

.reviews-cta__title::after {
    content: none !important;
}

.reviews-cta__text {
    font-size: 17px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 36px;
}

.reviews-cta__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.reviews-cta__phone {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
}

.reviews-cta__phone:hover {
    opacity: 0.8;
    color: #fff;
}

/* ---- Адаптив ---- */
@media (max-width: 1024px) {
    .reviews-hero__inner {
        gap: 40px;
    }

    .reviews-hero__badge {
        width: 300px;
    }
}

@media (max-width: 991.98px) {
    .reviews-hero {
        padding-top: 140px;
    }
}

@media (max-width: 768px) {
    .reviews-hero__inner {
        flex-direction: column;
        text-align: center;
    }

    .reviews-hero__badge {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .reviews-hero__text {
        max-width: 100%;
    }

    .reviews-hero__actions {
        justify-content: center;
    }

    .reviews-stats__grid {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 24px;
        border-radius: 12px;
    }

    .reviews-stats__item:nth-child(2)::after {
        display: none;
    }

    .reviews-stats__number {
        font-size: 36px;
    }

    .reviews-comment-list .ast-comment {
        padding: 24px;
    }

    .reviews-comment-list .children > li {
        margin-left: 12px;
    }

    .reviews-comment-list .children .ast-comment {
        padding: 20px;
    }

    .reviews-form-section #respond {
        padding: 28px 20px;
    }

    .reviews-pagination .nav-links {
        flex-direction: column;
        gap: 12px;
    }

    .reviews-cta {
        padding: 60px 0;
    }

    .reviews-cta__actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .reviews-hero__badge {
        max-width: 100%;
    }

    .reviews-hero__yandex {
        padding: 20px;
    }

    .reviews-hero__trust-item {
        padding: 10px 14px;
    }

    .reviews-hero__trust-item span {
        font-size: 13px;
    }

    .reviews-stats__grid {
        grid-template-columns: 1fr 1fr;
    }

    .reviews-stats__item {
        padding: 24px 12px;
        overflow: hidden;
    }

    .reviews-stats__number {
        font-size: 30px;
    }

    .reviews-stats__label {
        font-size: 11px;
        letter-spacing: 0;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .reviews-comment-list .ast-comment {
        padding: 16px 14px;
    }

    .reviews-comment-list .ast-comment-avatar-wrap img {
        width: 40px !important;
        height: 40px !important;
    }

    .reviews-comment-list .ast-comment-avatar-wrap {
        margin-right: 10px;
    }

    .reviews-comment-list .ast-comment-cite-wrap .fn {
        font-size: 14px;
    }

    .reviews-comment-list .children > li {
        margin-left: 8px;
    }

    .reviews-comment-list .children .ast-comment {
        padding: 14px 12px;
    }

    .about-btn {
        width: 100%;
        white-space: normal;
    }

    .reviews-section {
        padding: 60px 0 40px;
    }

    .reviews-section__subtitle {
        font-size: 15px;
        margin-bottom: 32px;
    }

    .reviews-form-section #respond {
        padding: 20px 16px;
    }

    .reviews-cta__phone {
        font-size: 18px;
    }

    .reviews-cta__text {
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    .reviews-stats__grid {
        grid-template-columns: 1fr 1fr;
    }

    .reviews-stats__number {
        font-size: 26px;
    }

    .reviews-stats__label {
        font-size: 10px;
    }

    .reviews-hero__title {
        font-size: 24px;
    }

    .reviews-comment-list .ast-comment-info {
        flex-wrap: wrap;
    }

    .reviews-comment-list .children > li {
        margin-left: 4px;
    }
}
