/* --- Стили для страницы отзывов (reviews.php) --- */
.reviews-page .container {
    padding-top: 40px;
    padding-bottom: 60px;
}

.reviews-title, .form-title {
    text-align: center;
    color: #333;
    margin-bottom: 40px;
    font-weight: 600;
}

.reviews-divider {
    border: 0;
    height: 1px;
    background-color: #e0e0e0;
    margin: 50px auto;
    max-width: 200px;
}

/* --- НОВЫЕ СТИЛИ для списка анонсов отзывов --- */
.reviews-list-public {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

.review-preview-link {
    text-decoration: none;
    color: inherit;
    display: block;
    background-color: #f9f9f9;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.review-preview-link:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    transform: translateY(-5px);
}

.review-preview-title {
    font-size: 1.4em;
    font-weight: 600;
    color: #009900;
    margin-top: 0;
    margin-bottom: 15px;
}

.review-preview-snippet {
    line-height: 1.7;
    word-wrap: break-word;
    color: #444;
    margin-bottom: 20px;
}

.review-preview-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.review-preview-photos img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.review-preview-readmore {
    font-weight: 500;
    color: #009900;
    display: inline-block;
    margin-top: 10px;
}

/* --- Пагинация --- */
.pagination-container {
    text-align: center;
    margin-top: 30px;
}

.pagination-container a, .pagination-container span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid #009900;
    color: #009900;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
    font-weight: 500;
}

.pagination-container a:hover {
    background-color: #009900;
    color: #fff;
    text-decoration: none;
}

.pagination-container .current-page {
    background-color: #009900;
    color: #fff;
    border-color: #009900;
    cursor: default;
}

/* --- Стили для формы добавления отзыва --- */
#add-review-section {
    max-width: 700px;
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-top: 3px solid #009900;
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: #555; }
.form-group input[type="text"],
.form-group input[type="file"],
.form-group textarea {
    width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 4px; font-size: 1em;
    font-family: inherit; transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: #009900; box-shadow: 0 0 5px rgba(0, 153, 0, 0.2);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group small { display: block; margin-top: 5px; font-size: 0.85em; color: #777; }
.captcha-group { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; }
.captcha-group input { flex: 1 1 150px; }
.captcha-group .captcha-img { border: 1px solid #ccc; border-radius: 4px; }
#review-form .error {
    color: #721c24; background-color: #f8d7da; border: 1px solid #f5c6cb;
    padding: 0.75rem 1.25rem; border-radius: 4px; text-align: center; margin-top: 1.5rem;
}
.loading-text, .placeholder-text, .error-text {
    text-align: center; padding: 40px 20px; font-size: 1.1em; color: #777;
}
.error-text { color: #a94442; background-color: #f2dede; border: 1px solid #ebccd1; border-radius: 4px; }

/* НОВЫЙ БЛОК: Стили для модального окна */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1010;
    opacity: 1;
    transition: opacity 0.3s ease;
    padding: 15px;
}
.modal-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}
.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 500px;
    width: 100%;
    transform: scale(1);
    transition: transform 0.3s ease;
}
.modal-overlay.is-hidden .modal-content {
    transform: scale(0.9);
}
.modal-content h3 {
    margin-top: 0;
    color: #333;
    font-weight: 600;
}
.modal-content p {
    margin-bottom: 25px;
    color: #555;
    font-size: 1.1em;
}
.modal-content .btn {
    width: auto;
    padding-left: 30px;
    padding-right: 30px;
}