/* ============================================================
   СТРАНИЦА ВСЕХ ОТЗЫВОВ (page-reviews.php)
   ============================================================ */

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

.reviews-archive .page-title {
    margin-bottom: 30px;
}

/* Вкладки фильтра по типу */
.reviews-tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.reviews-tab-btn {
    padding: 8px 24px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.2s;
}

.reviews-tab-btn:hover {
    background: #e2e8f0;
}

.reviews-tab-btn.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

/* Форма фильтра */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
    align-items: flex-end;
    border: 1px solid #e2e8f0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 180px;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.filter-group select {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: white;
    font-size: 0.95rem;
    color: #1e293b;
    transition: all 0.2s;
    min-width: 180px;
}

.filter-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-submit,
.filter-reset {
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-submit {
    background: #3b82f6;
    color: white;
}

.filter-submit:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.filter-reset {
    background: #e5e7eb;
    color: #374151;
    text-decoration: none;
    line-height: 1.5;
    display: inline-flex;
    align-items: center;
}

.filter-reset:hover {
    background: #d1d5db;
}

/* Количество отзывов */
.reviews-count {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 25px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.reviews-count strong {
    color: #1e293b;
}

/* КАРТОЧКА ОТЗЫВА */
.review-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 30px;
    padding: 30px 0;
    border-bottom: 1px solid #e2e8f0;
    align-items: start;
}

.review-item:last-child {
    border-bottom: none;
}

/* Фото */
.review-avatar {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.review-avatar:hover {
    transform: scale(1.03);
    border-color: #3b82f6;
}

.review-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Аватар физлица (круглый) */
.review-avatar.individual .review-avatar-img {
    border-radius: 50%;
    object-fit: cover;
}

/* Аватар организации (прямоугольный с заливкой) */
.review-avatar.organization .review-avatar-img {
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
    padding: 10px;
    border: 1px solid #e2e8f0;
}

/* Правая часть */
.review-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.review-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}

.review-author-info {
    display: flex;
    flex-direction: column;
    margin-right: auto;
}

.review-author-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
}

.review-position {
    font-size: 0.875rem;
    color: #64748b;
}

.review-course {
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.rating-stars .star {
    color: #d1d5db;
    font-size: 1.2rem;
}

.rating-stars .star.filled {
    color: #f59e0b;
}

.review-text {
    color: #334155;
    line-height: 1.7;
    font-size: 0.95rem;
}

.review-text p:last-child {
    margin-bottom: 0;
}

/* Прикрепления */
.review-attachments {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-gallery {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.review-gallery .gallery-thumb {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    transition: all 0.2s;
    cursor: pointer;
}

.review-gallery .gallery-thumb:hover {
    transform: scale(1.05);
    border-color: #3b82f6;
}

.review-gallery .gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Пагинация */
.reviews-pagination {
    margin-top: 40px;
    text-align: center;
}

.reviews-pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border-radius: 6px;
    color: #1e293b;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.reviews-pagination .page-numbers:hover {
    background: #f1f5f9;
}

.reviews-pagination .page-numbers.current {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.reviews-pagination .page-numbers.prev,
.reviews-pagination .page-numbers.next {
    padding: 8px 20px;
}

/* Пустое состояние */
.reviews-empty {
    text-align: center;
    padding: 60px 20px;
}

.reviews-empty svg {
    color: #94a3b8;
    margin-bottom: 20px;
}

.reviews-empty h3 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 10px;
}

.reviews-empty p {
    color: #64748b;
    margin-bottom: 20px;
}

.reviews-empty .filter-reset {
    display: inline-block;
}

/* Адаптивность */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .filter-group {
        min-width: 100%;
    }

    .filter-group select {
        min-width: 100%;
    }

    .filter-submit,
    .filter-reset {
        width: 100%;
        justify-content: center;
    }

    .review-item {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px 0;
    }

    .review-avatar {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }

    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .review-author-info {
        margin-right: 0;
        width: 100%;
    }

    .review-course {
        font-size: 0.8rem;
        align-self: flex-start;
    }

    .review-gallery .gallery-thumb {
        width: 60px;
        height: 60px;
    }

    .reviews-pagination .page-numbers {
        padding: 6px 12px;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .review-item {
        padding: 15px 0;
    }

    .review-avatar {
        width: 70px;
        height: 70px;
    }

    .review-gallery .gallery-thumb {
        width: 50px;
        height: 50px;
    }
}

/* Оверлей (затемнение + глазик) для аватара организации */
.review-avatar.organization {
    position: relative;
}

.review-avatar.organization .review-avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
    pointer-events: none;
}

.review-avatar.organization:hover .review-avatar-overlay {
    opacity: 1;
}

.review-avatar.organization .review-avatar-overlay svg {
    width: 40px;
    height: 40px;
    color: #fff;
}

/* Бейдж архивной программы */
.review-course--archive {
    background: #f3f4f6;
    color: #6b7280;
}