/* ==========================================================================
   Страница «Отзывы» — стили в едином дизайне VaPiBuild
   (цвета, шрифты и анимации совпадают с prices.css / projects.css)
   ========================================================================== */

.reviews-section {
    padding: 140px 0 80px 0;
    background-color: #ffffff;

    /* Плавное появление при загрузке (как на странице цен) */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

.reviews-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Заголовок страницы --- */
.reviews-header {
    text-align: center;
    margin-bottom: 50px;
}

.reviews-header h1 {
    font-size: 36px;
    color: #111111;
    margin-bottom: 15px;
    position: relative;
}

.reviews-header h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #e65c00;
    margin: 10px auto 0 auto;
}

.reviews-header p {
    color: #555555;
    font-size: 16px;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Блок формы добавления отзыва --- */
.review-form-block {
    background-color: #f9f9f9;
    border: 1px solid #eeeeee;
    border-radius: 10px;
    padding: 35px 40px;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.review-form-block h2 {
    font-size: 22px;
    color: #111111;
    margin-bottom: 25px;
    text-align: center;
}

.review-form .form-row {
    margin-bottom: 20px;
}

.review-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 8px;
}

.review-form input[type="text"],
.review-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dddddd;
    border-radius: 6px;
    font-size: 15px;
    color: #333333;
    background: #ffffff;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
}

.review-form input[type="text"]:focus,
.review-form textarea:focus {
    outline: none;
    border-color: #e65c00;
    box-shadow: 0 0 0 3px rgba(230, 92, 0, 0.12);
}

.review-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* Шкала оценки 1–10 */
.rating-input-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.rating-input-wrap input[type="range"] {
    flex: 1;
    min-width: 200px;
    accent-color: #e65c00;
    cursor: pointer;
}

.rating-value {
    font-size: 28px;
    font-weight: 700;
    color: #e65c00;
    min-width: 40px;
    text-align: center;
}

.rating-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999999;
    margin-top: 4px;
}

.btn-submit-review {
    display: block;
    width: 100%;
    background-color: #e65c00;
    color: #ffffff;
    border: none;
    padding: 14px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    margin-top: 10px;
}

.btn-submit-review:hover {
    background-color: #cc5200;
}

.btn-submit-review:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.form-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

.form-message.success {
    display: block;
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.form-message.error {
    display: block;
    background-color: #fdecea;
    color: #c62828;
    border-left: 4px solid #e53935;
}

.form-hint {
    margin-top: 8px;
    font-size: 13px;
    color: #777777;
}

/* --- Поиск --- */
.reviews-search-block {
    max-width: 600px;
    margin: 0 auto 40px auto;
    position: relative;
}

.reviews-search-block input {
    width: 100%;
    padding: 14px 20px 14px 45px;
    border: 1px solid #dddddd;
    border-radius: 30px;
    font-size: 15px;
    background: #f9f9f9;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
}

.reviews-search-block input:focus {
    outline: none;
    border-color: #e65c00;
    box-shadow: 0 0 0 3px rgba(230, 92, 0, 0.1);
    background: #ffffff;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #999999;
    font-size: 16px;
    pointer-events: none;
}

.search-hint {
    text-align: center;
    font-size: 13px;
    color: #999999;
    margin-top: 10px;
}

/* --- Сетка карточек отзывов --- */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.review-card {
    background-color: #f9f9f9;
    border: 1px solid #eeeeee;
    border-radius: 10px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

/* Шапка карточки: имя + дата */
.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 10px;
}

.review-author {
    font-size: 18px;
    font-weight: 700;
    color: #111111;
}

.review-date {
    font-size: 13px;
    color: #999999;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Блок оценки: цифра + заполненная шкала */
.review-rating-block {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.review-rating-number {
    font-size: 24px;
    font-weight: 700;
    color: #e65c00;
    min-width: 36px;
}

.review-rating-bar {
    flex: 1;
    height: 8px;
    background-color: #eeeeee;
    border-radius: 4px;
    overflow: hidden;
}

.review-rating-fill {
    height: 100%;
    background: linear-gradient(90deg, #e65c00, #ff8533);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.review-text {
    font-size: 15px;
    color: #444444;
    line-height: 1.7;
    flex-grow: 1;
}

/* --- Пустое состояние --- */
.reviews-empty {
    text-align: center;
    padding: 60px 30px;
    background-color: #fdf6f2;
    border-radius: 10px;
    border: 1px dashed #e65c00;
}

.reviews-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.reviews-empty p {
    font-size: 18px;
    color: #555555;
    line-height: 1.6;
}

/* --- Кнопка «Показать ещё» --- */
.load-more-wrap {
    text-align: center;
    margin-top: 20px;
}

.btn-load-more {
    background-color: #111111;
    color: #ffffff;
    border: none;
    padding: 14px 40px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-load-more:hover {
    background-color: #e65c00;
}

.btn-load-more:disabled {
    display: none;
}

/* --- Индикатор загрузки --- */
.reviews-loading {
    text-align: center;
    padding: 40px;
    color: #999999;
    font-size: 15px;
}

.reviews-loading.hidden {
    display: none;
}

/* --- Счётчик результатов поиска --- */
.search-results-info {
    text-align: center;
    font-size: 14px;
    color: #777777;
    margin-bottom: 20px;
    min-height: 20px;
}

/* ==========================================================================
   Адаптивность
   ========================================================================== */
@media (max-width: 768px) {
    .reviews-section {
        padding: 120px 0 60px 0;
    }

    .reviews-header h1 {
        font-size: 28px;
    }

    .review-form-block {
        padding: 25px 20px;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .review-card-header {
        flex-direction: column;
        gap: 5px;
    }

    .rating-input-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .rating-value {
        align-self: center;
    }
}

@media (max-width: 480px) {
    .review-form-block h2 {
        font-size: 18px;
    }
}
