/* ==========================================
   СТРАНИЦА ОТЗЫВОВ — адаптировано под темы
========================================== */

.reviews-container {
    max-width: 1750px;
    margin: auto;
    padding: 0 40px 100px;
}

.reviews {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    align-items: start;
}

/* ==========================================
   ШАПКА СТРАНИЦЫ
========================================== */

.reviews-header {
    max-width: 900px;
    margin: 30px auto 25px;
    padding: 0 20px;
    text-align: center;
    position: relative;
}

.reviews-header h1 {
    font-size: 54px;
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.reviews-header h1::after {
    content: "";
    display: block;
    width: 90px;
    height: 3px;
    margin: 22px auto 0;
    background: var(--accent);
    border-radius: 20px;
}

.reviews-header p {
    max-width: 700px;
    margin: 35px auto 0;
    color: var(--text-muted);
    line-height: 1.9;
    font-size: 19px;
}

/* ==========================================
   АКЦЕНТНАЯ ПОЛОСА РАЗГРАНИЧЕНИЯ
========================================== */

.reviews-header::after {
    content: "";
    display: block;
    width: 50%;
    height: 2px;
    margin: 30px auto 0;
    background: var(--accent);
    border-radius: 20px;
    opacity: 0.6;
}

/* ==========================================
   КАРТОЧКА ОТЗЫВА
========================================== */

.review-card {
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 35px;
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: 0.45s;
    box-shadow: 0 20px 45px var(--shadow-color);
    height: auto;
    min-height: 200px;
}

.review-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        var(--accent-light),
        transparent 45%
    );
    opacity: 0;
    transition: 0.45s;
}

.review-card:hover {
    transform: translateY(-12px);
    border-color: var(--accent);
    box-shadow: 0 30px 70px var(--shadow-hover);
}

.review-card:hover::before {
    opacity: 1;
}

.review-name {
    margin: 0 0 8px;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
}

.review-rating {
    color: var(--accent);
    font-size: 22px;
    letter-spacing: 4px;
}

.review-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* ==========================================
   АВАТАРКИ
========================================== */

.review-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    background: var(--accent-gradient);
    color: var(--accent-text);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 8px 18px var(--accent-glow);
}

.review-avatar.gold {
    background: #d4af37;
    color: #111;
}

.review-avatar.bronze {
    background: #b98b20;
    color: white;
}

.review-avatar.silver {
    background: #8d959d;
    color: white;
}

.review-avatar.graphite {
    background: #35393f;
    color: white;
}

.review-avatar.amber {
    background: #cc8f2d;
    color: white;
}

.review-avatar.copper {
    background: #9f5d3d;
    color: white;
}

/* Для синей темы — добавляем синие аватары */
[data-theme="cobalt"] .review-avatar.gold {
    background: #4a8cff;
    color: white;
}

[data-theme="cobalt"] .review-avatar.bronze {
    background: #2a6cd4;
    color: white;
}

[data-theme="cobalt"] .review-avatar.amber {
    background: #3a7ce4;
    color: white;
}

[data-theme="cobalt"] .review-avatar.copper {
    background: #1a5cc4;
    color: white;
}

/* ==========================================
   ТЕКСТ ОТЗЫВА
========================================== */

.review-text-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.review-text {
    overflow: hidden;
    transition: 0.4s;
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 16px;
    flex: 1;
    max-height: 200px;
}

.review-card.open .review-text {
    max-height: 1500px;
}

.review-more {
    display: none;
    margin-top: 12px;
    padding: 0;
    background: none;
    border: none;
    color: var(--accent);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    flex-shrink: 0;
    align-self: flex-start;
}

.review-more:hover {
    color: var(--accent-hover);
}

.review-more.visible {
    display: inline-block;
}

/* ==========================================
   ПУСТЫЕ ОТЗЫВЫ
========================================== */

.empty-reviews {
    padding: 80px 20px;
}

.empty-reviews h2 {
    font-size: 36px;
    color: var(--text-secondary);
}

.empty-reviews p {
    color: var(--text-muted);
}

/* ==========================================
   АДАПТИВ
========================================== */

@media (max-width: 1200px) {
    .reviews {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .reviews-header {
        margin: 20px auto 20px;
        padding: 0 15px;
    }

    .reviews-header h1 {
        font-size: 34px;
    }

    .reviews-header h1::after {
        width: 60px;
        margin: 16px auto 0;
    }

    .reviews-header p {
        font-size: 16px;
        margin: 25px auto 0;
    }

    .reviews-header::after {
        width: 70%;
        margin: 25px auto 0;
    }

    .reviews {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .review-card {
        padding: 28px;
    }

    .review-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .review-top h3 {
        font-size: 22px;
    }

    .review-text {
        font-size: 16px;
        max-height: 150px;
    }

    .reviews-container {
        padding: 0 20px 60px;
    }

    /* ===== Блок заявки ===== */
    .contact-section,
    .contacts-section {
        flex-direction: column;
        padding: 30px 20px;
        gap: 30px;
    }

    .contacts-info,
    .contact-form,
    .contacts-map {
        width: 100%;
    }

    .contact-form {
        padding: 25px;
    }

    .contact-text {
        font-size: 18px;
        line-height: 1.6;
    }

    .advantages {
        font-size: 18px;
    }

    .contact-form input,
    .contact-form textarea,
    .contact-form button {
        font-size: 16px;
    }

    .contacts-map {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .reviews-header {
        margin: 15px auto 15px;
    }

    .reviews-header h1 {
        font-size: 28px;
    }

    .reviews-header p {
        font-size: 15px;
    }

    .reviews-header::after {
        width: 80%;
        margin: 20px auto 0;
    }

    .review-card {
        padding: 20px;
    }

    .review-avatar {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .review-name {
        font-size: 20px;
    }

    .review-rating {
        font-size: 18px;
    }

    .reviews {
        gap: 20px;
    }

    .review-text {
        max-height: 120px;
    }
}

/* ==========================================
   ПАГИНАЦИЯ
========================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 30px 0 10px;
    flex-wrap: wrap;
}

.pagination-link {
    display: inline-block;
    padding: 10px 18px;
    background: var(--bg-card, #1a1a24);
    color: var(--text-secondary, #f0f0f0);
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid var(--border-color, #2a2a35);
    transition: 0.3s;
    font-size: 15px;
    min-width: 44px;
    text-align: center;
}

.pagination-link:hover {
    background: var(--accent, #d4af37);
    color: #fff;
    transform: translateY(-2px);
}

.pagination-link.active {
    background: var(--accent, #d4af37);
    color: #fff;
    border-color: var(--accent, #d4af37);
}

.empty-reviews {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted, #8a8a9a);
}

.empty-reviews p {
    font-size: 20px;
}

@media (max-width: 480px) {
    .pagination-link {
        padding: 8px 14px;
        font-size: 13px;
        min-width: 38px;
    }
}