/* ==========================================================================
   REVIEWS.CSS - STYLY PRO STRÁNKU S RECENZEMI
   ========================================================================== */

/* Hlavní layout stránky */
.reviews-hero { text-align: center; margin: 4rem auto; animation: fadeInDown 0.8s ease-out both; }
.reviews-hero h2 { font-size: 3.2rem; font-weight: 700; }

.reviews-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); /* Rozdělení 1/3 pro formulář, 2/3 pro recenze */
    gap: 2rem;
    align-items: flex-start;
}

/* Formulář pro přidání recenze (levý sloupec) */
.add-review-card {
    position: sticky;
    top: 20px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}
.add-review-card h3 { color: var(--accent); margin-bottom: 1.5rem; }
.add-review-card .form-group { margin-bottom: 1rem; }
.add-review-card label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.add-review-card input, .add-review-card textarea {
    width: 100%; padding: 12px; border: 1px solid var(--border-color);
    background-color: var(--bg); border-radius: 8px; color: var(--fg);
    font-size: 1rem; transition: all 0.3s ease;
}
.add-review-card input:focus, .add-review-card textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 10px var(--accent-glow);
}
.add-review-card .btn { width: 100%; margin-top: 1rem; }
.form-message { padding: 1rem; margin-bottom: 1.5rem; border-radius: 8px; font-weight: 600; }
.form-message.success { background-color: rgba(76, 175, 80, 0.1); border: 1px solid #4CAF50; color: #4CAF50; }
.form-message.error { background-color: rgba(229, 57, 53, 0.1); border: 1px solid var(--accent); color: var(--accent); }

/* Interaktivní hvězdičkové hodnocení ve formuláři */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}
.star-rating input[type=radio] { display: none; }
.star-rating label {
    font-size: 2rem;
    color: var(--border-color);
    cursor: pointer;
    transition: color 0.2s ease-out;
}
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #fbc02d;
}

/* Zobrazení recenzí (pravý sloupec) */
.average-rating-box {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}
.average-rating-box .avg-title { color: var(--fg-muted); font-weight: 600; }
.average-rating-box .avg-score { font-size: 3rem; font-weight: bold; color: #fbc02d; line-height: 1; }
.average-rating-box .avg-count { color: var(--fg-muted); font-size: 0.9rem; }

.review-card {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out both;
}
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.review-name { font-weight: bold; font-size: 1.1rem; }
.review-rating .star { font-size: 1.2rem; color: var(--border-color); }
.review-rating .star.filled { color: #fbc02d; }
.review-text { color: var(--fg); font-style: italic; line-height: 1.8; margin-bottom: 1rem; }
.review-date { display: block; text-align: right; font-size: 0.8rem; color: var(--fg-muted); }

/* Paginace */
.pagination { text-align: center; margin-top: 2rem; }
.pagination a { display: inline-block; padding: 8px 14px; margin: 0 4px; background: var(--secondary); color: var(--fg); text-decoration: none; border-radius: 8px; border: 1px solid var(--border-color); transition: all 0.3s ease; }
.pagination a.active, .pagination a:hover { background: var(--accent); color: white; border-color: var(--accent); }

/* Responsivita */
@media (max-width: 992px) {
    .reviews-layout { grid-template-columns: 1fr; }
    .add-review-card { position: static; }
}