/* ============================================================================
   STUDENT REVIEWS — page shell (header, score overview, filter bar).
   Page-scoped: only loaded for reviews.php (see $pageCssMap in header.php).

   The review CARD styles live in the shared assets/css/style.css instead,
   because the same renderReviewCard() output is used by the homepage
   testimonials section, the course-detail page and this page. Page-scoped CSS
   would have left two of those three unstyled.
   ========================================================================= */
.rv-page { padding: 42px 0 70px; }

.rv-page-head { text-align: center; max-width: 720px; margin: 0 auto 34px; }
.rv-page-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; margin-bottom: 16px;
    font-size: 0.74rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-aqua);
    background: rgba(0, 212, 232, 0.08);
    border: 1px solid rgba(0, 212, 232, 0.18);
    border-radius: 50px;
}
.rv-page-head h1 {
    margin: 0 0 12px;
    font-size: clamp(1.7rem, 1.1rem + 2vw, 2.4rem);
    font-weight: 800; letter-spacing: -0.5px; line-height: 1.2;
    background: var(--gradient-aqua);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.rv-page-head p { margin: 0; font-size: 0.96rem; line-height: 1.7; color: var(--text-tertiary); }

/* ── Aggregate score + star distribution ─────────────────────────────────── */
.rv-overview {
    display: grid;
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    max-width: 860px;
    margin: 0 auto 32px;
    padding: 28px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    background-image: linear-gradient(180deg, rgba(0, 212, 232, 0.05), transparent 45%);
}
.rv-overview-score { text-align: center; }
.rv-overview-num {
    margin-top: 10px;
    font-size: 3rem; font-weight: 800; line-height: 1;
    background: var(--gradient-aqua);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.rv-overview-of { margin-top: 4px; font-size: 0.82rem; color: var(--text-tertiary); }
.rv-overview-count { margin-top: 10px; font-size: 0.75rem; color: var(--text-muted); }

.rv-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.rv-bar { display: grid; grid-template-columns: 44px minmax(0, 1fr) 34px; align-items: center; gap: 12px; }
.rv-bar-label { font-size: 0.78rem; color: var(--text-tertiary); white-space: nowrap; }
.rv-bar-label i { color: #ffc107; font-size: 0.74rem; }
.rv-bar-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50px;
    overflow: hidden;
}
.rv-bar-fill {
    display: block; height: 100%;
    min-width: 2px;
    background: var(--gradient-aqua);
    border-radius: 50px;
    transition: width var(--duration-slow) cubic-bezier(0.32, 0.94, 0.6, 1);
}
.rv-bar-count { font-size: 0.78rem; color: var(--text-tertiary); text-align: right; font-variant-numeric: tabular-nums; }

/* ── Course filter ───────────────────────────────────────────────────────── */
.rv-filter {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 12px;
    margin: 0 auto 30px;
}
.rv-filter-label {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.8rem; font-weight: 600; color: var(--text-secondary);
    margin: 0;
}
.rv-filter-select {
    min-width: 230px;
    padding: 10px 14px 10px 14px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-primary);
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    appearance: none; -webkit-appearance: none;
    /* Chevron drawn with gradients, so the control needs no extra element and
       cannot inherit a light-mode platform dropdown arrow. */
    background-image:
        linear-gradient(45deg, transparent 50%, var(--text-tertiary) 50%),
        linear-gradient(135deg, var(--text-tertiary) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 38px;
    transition: border-color var(--duration-fast) ease;
}
.rv-filter-select:hover, .rv-filter-select:focus { border-color: var(--glass-border-hover); }
/* Keep the native dropdown list readable: the control is dark, so the popup
   options need an explicit background or the OS renders dark-on-dark. */
.rv-filter-select option { background-color: var(--bg-elevated); color: var(--text-primary); }
.rv-filter-go {
    padding: 10px 18px;
    font-family: var(--font-body); font-size: 0.85rem; font-weight: 700;
    color: #06121a;
    background: var(--primary-aqua);
    border: none; border-radius: var(--radius-sm); cursor: pointer;
}
.rv-filter-clear { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-tertiary); }
.rv-filter-clear:hover { color: var(--text-aqua); }

.rv-results-title {
    margin: 0 0 22px;
    font-size: 1.15rem; font-weight: 700; text-align: center;
    color: var(--text-secondary);
}
.rv-results-title span { color: var(--text-aqua); }

.rv-more { margin-top: 28px; text-align: center; font-size: 0.8rem; color: var(--text-tertiary); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 820px) {
    .rv-page { padding: 30px 0 54px; }
    .rv-overview { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 22px 18px; }
    .rv-filter { flex-direction: column; }
    .rv-filter-label { justify-content: center; }
    .rv-filter-select { min-width: 0; width: 100%; }
}