/* Public review pages — the list at reviews.php and the form at review_write.php.
   Built to sit beside about.css: same Poppins/DM Serif pairing, same green. */

:root {
  --rv-green: #12433a;
  --rv-green-2: #1d6b41;
  --rv-sand: #e8a33d;
  --rv-ink: #1f2937;
  --rv-muted: #6b7280;
  --rv-border: #e5e7eb;
  --rv-bg: #f7f8f7;
  --rv-card: #fff;
  --rv-radius: 16px;
  --rv-shadow: 0 10px 30px rgba(18, 67, 58, .08);
}

.rv-page {
  font-family: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--rv-ink);
  background: var(--rv-bg);
  margin: 0;
}
.rv-wrap { width: min(1140px, 92vw); margin: 0 auto; }

/* ---------- Public navbar ----------
   Deliberately a copy of the rules in about.css rather than a shared file:
   those styles are defined inside each public page's own stylesheet, and the
   review pages load neither index.css nor about.css. Keep the two in step. */
.navbar {
  position: sticky; top: 0; z-index: 100;
  height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 64px);
  border-bottom: 1px solid rgba(23, 79, 56, .1);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 6px 25px rgba(18, 52, 39, .06);
  backdrop-filter: blur(14px);
}
.navbar .brand {
  display: inline-flex; align-items: center; gap: 11px;
  color: var(--rv-ink); font-size: 1rem; font-weight: 700; text-decoration: none;
}
.navbar .brand img { width: 46px; height: 46px; object-fit: contain; }

.navbar .links { display: flex; align-items: center; gap: 8px; }
.navbar .links a {
  position: relative;
  padding: 10px 12px;
  color: #30453d;
  font-size: .9rem; font-weight: 600; text-decoration: none;
}
.navbar .links a::after {
  content: ""; position: absolute;
  left: 12px; right: 12px; bottom: 4px; height: 2px;
  border-radius: 2px; background: var(--rv-green-2);
  transform: scaleX(0); transform-origin: center;
  transition: transform .18s ease;
}
.navbar .links a:hover::after,
.navbar .links a[aria-current="page"]::after { transform: scaleX(1); }
.navbar .links a[aria-current="page"] { color: var(--rv-green); }

.navbar .nav-toggle {
  width: 44px; height: 44px; display: none;
  border: 0; border-radius: 10px; background: transparent; cursor: pointer;
}
.navbar .bar {
  width: 23px; height: 2px; display: block; margin: 5px auto;
  border-radius: 999px; background: var(--rv-ink);
  transition: transform .2s ease, opacity .2s ease;
}

@media (max-width: 900px) {
  .navbar .nav-toggle { display: block; }
  .navbar .links {
    position: absolute; left: 0; right: 0; top: 72px;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 18px 16px;
    background: #fff;
    border-bottom: 1px solid rgba(23, 79, 56, .1);
    box-shadow: 0 12px 24px rgba(18, 52, 39, .1);
    max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height .22s ease, visibility .22s;
  }
  .navbar.open .links { max-height: 380px; visibility: visible; }
  .navbar .links a { padding: 13px 6px; border-bottom: 1px solid #f0f3f1; }
  .navbar .links a::after { display: none; }
  .navbar.open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .navbar.open .bar:nth-child(2) { opacity: 0; }
  .navbar.open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.rv-hero {
  position: relative;
  padding: 54px 0 40px;
  background: linear-gradient(135deg, var(--rv-green) 0%, #0d3229 100%);
  color: #fff;
  overflow: hidden;
}
.rv-hero::after {
  content: "";
  position: absolute;
  right: -80px; top: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(232, 163, 61, .13);
}
.rv-hero h1 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(2rem, 4.4vw, 3rem);
  margin: 0 0 10px;
  line-height: 1.1;
}
.rv-hero p { margin: 0; max-width: 62ch; color: rgba(255, 255, 255, .85); line-height: 1.6; }
.rv-hero .rv-crumb {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 14px; font-size: .86rem; color: rgba(255, 255, 255, .7);
}
.rv-hero .rv-crumb a { color: inherit; text-decoration: none; }
.rv-hero .rv-crumb a:hover { text-decoration: underline; }

/* ---------- Summary panel ---------- */
.rv-summary {
  position: relative;
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 28px;
  align-items: center;
  margin: -34px auto 26px;
  padding: 22px 26px;
  background: var(--rv-card);
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius);
  box-shadow: var(--rv-shadow);
}
.rv-score { text-align: center; }
.rv-score-num {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 3.2rem; line-height: 1; color: var(--rv-green);
}
.rv-score-out { color: var(--rv-muted); font-size: .82rem; }
.rv-score .rv-stars { justify-content: center; margin: 6px 0 4px; }

.rv-bars { display: grid; gap: 6px; min-width: 0; }
.rv-bar-row { display: grid; grid-template-columns: 52px 1fr 40px; gap: 10px; align-items: center; font-size: .8rem; }
.rv-bar-track { height: 9px; border-radius: 999px; background: #eef1ef; overflow: hidden; }
.rv-bar-fill { height: 100%; border-radius: 999px; background: var(--rv-sand); }
.rv-bar-row span:last-child { color: var(--rv-muted); text-align: right; }

/* ---------- Stars ---------- */
.rv-stars { display: inline-flex; gap: 2px; line-height: 1; }
.rv-stars i, .rv-stars span { color: var(--rv-sand); font-size: .95rem; }
.rv-stars .rv-off { color: #d7dbd8; }

/* ---------- Buttons ---------- */
.rv-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--rv-green-2);
  color: #fff;
  font: inherit; font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .12s;
  white-space: nowrap;
}
.rv-btn:hover { background: #175734; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(29, 107, 65, .25); }
.rv-btn.ghost { background: #fff; color: var(--rv-green); border-color: var(--rv-border); }
.rv-btn.ghost:hover { background: #f2f6f3; box-shadow: none; }
.rv-btn:focus-visible { outline: 3px solid var(--rv-sand); outline-offset: 2px; }

/* ---------- Filter bar ---------- */
.rv-tools {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  margin-bottom: 20px; padding: 14px 16px;
  background: var(--rv-card);
  border: 1px solid var(--rv-border);
  border-radius: 14px;
}
.rv-tools label { display: grid; gap: 4px; font-size: .78rem; font-weight: 600; color: #475569; }
.rv-tools select, .rv-tools input {
  min-width: 165px; padding: 9px 11px;
  border: 1px solid var(--rv-border); border-radius: 10px;
  background: #fff; font: inherit; font-weight: 400;
}
.rv-tools .rv-tools-go { margin-left: auto; display: flex; gap: 8px; }
.rv-count { margin: 0 0 14px; color: var(--rv-muted); font-size: .88rem; }

/* ---------- Review cards ---------- */
.rv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.rv-card {
  display: flex; flex-direction: column;
  padding: 20px 22px;
  background: var(--rv-card);
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius);
  box-shadow: 0 4px 16px rgba(18, 67, 58, .05);
  transition: transform .14s, box-shadow .14s;
}
.rv-card:hover { transform: translateY(-2px); box-shadow: var(--rv-shadow); }

.rv-card-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.rv-avatar {
  flex: none;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--rv-green);
  color: #fff;
  font-weight: 700; font-size: 1rem;
  letter-spacing: .02em;
}
.rv-who { min-width: 0; }
.rv-name { font-weight: 700; font-size: .96rem; }
.rv-meta { color: var(--rv-muted); font-size: .78rem; margin-top: 1px; }
.rv-flag { margin-right: 4px; }

.rv-card h3 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.16rem; line-height: 1.3;
  margin: 6px 0 8px;
  color: var(--rv-green);
}
.rv-body { margin: 0; color: #374151; line-height: 1.65; font-size: .92rem; }

.rv-tour {
  display: inline-block; margin-top: 12px;
  padding: 4px 11px; border-radius: 999px;
  background: #eef5f0; color: var(--rv-green-2);
  font-size: .74rem; font-weight: 600;
}

/* The operator's answer, tucked under the review it belongs to. */
.rv-reply {
  margin-top: 14px; padding: 13px 15px;
  border-left: 3px solid var(--rv-green-2);
  border-radius: 0 10px 10px 0;
  background: #f4f8f5;
}
.rv-reply-head {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 5px;
  font-size: .78rem; font-weight: 700; color: var(--rv-green-2);
}
.rv-reply p { margin: 0; font-size: .87rem; line-height: 1.6; color: #40514a; }

/* ---------- Empty + pagination ---------- */
.rv-empty {
  padding: 40px 20px; text-align: center;
  background: var(--rv-card); border: 1px dashed var(--rv-border);
  border-radius: var(--rv-radius); color: var(--rv-muted);
}
.rv-pager { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 26px 0 40px; }
.rv-pager a, .rv-pager span {
  min-width: 40px; padding: 9px 12px; text-align: center;
  border: 1px solid var(--rv-border); border-radius: 10px;
  background: #fff; color: var(--rv-ink);
  text-decoration: none; font-size: .88rem;
}
.rv-pager a:hover { background: #f2f6f3; }
.rv-pager .is-current { background: var(--rv-green-2); border-color: var(--rv-green-2); color: #fff; font-weight: 700; }
.rv-pager .is-gap { border: 0; background: transparent; }

/* ---------- Alerts ---------- */
.rv-alert {
  margin: 0 0 18px; padding: 13px 16px;
  border-radius: 12px; font-size: .9rem; font-weight: 500;
}
.rv-alert.ok    { background: #e7f4ec; color: #15603a; border: 1px solid #bfe3cd; }
.rv-alert.warn  { background: #fdf3e2; color: #8a5d0f; border: 1px solid #f2dcb3; }
.rv-alert.error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.rv-alert ul { margin: 6px 0 0; padding-left: 20px; font-weight: 400; }

/* ---------- Write-a-review form ---------- */
.rv-form-card {
  max-width: 760px; margin: -34px auto 44px;
  padding: 26px 28px;
  background: var(--rv-card);
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius);
  box-shadow: var(--rv-shadow);
}
.rv-form { display: grid; gap: 18px; }
.rv-field { display: grid; gap: 6px; }
.rv-field > label, .rv-legend { font-weight: 600; font-size: .9rem; }
.rv-field input[type="text"],
.rv-field select,
.rv-field textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--rv-border); border-radius: 11px;
  background: #fff; font: inherit;
}
.rv-field textarea { resize: vertical; min-height: 160px; line-height: 1.6; }
.rv-field input:focus, .rv-field select:focus, .rv-field textarea:focus {
  outline: none; border-color: var(--rv-green-2);
  box-shadow: 0 0 0 3px rgba(29, 107, 65, .12);
}
.rv-hint { color: var(--rv-muted); font-size: .8rem; }
.rv-req { color: #b03030; }
.rv-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Star picker: real radios, styled labels, so it works without JS. */
.rv-rate { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rv-rate input { position: absolute; opacity: 0; width: 0; height: 0; }
.rv-rate label {
  font-size: 1.9rem; line-height: 1; color: #d7dbd8;
  cursor: pointer; transition: color .1s, transform .1s;
}
.rv-rate label:hover, .rv-rate label:hover ~ label,
.rv-rate input:checked ~ label { color: var(--rv-sand); }
.rv-rate label:hover { transform: scale(1.12); }
.rv-rate input:focus-visible + label { outline: 2px solid var(--rv-green-2); outline-offset: 3px; }

.rv-signed {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; margin-bottom: 4px;
  background: #f4f8f5; border: 1px solid #dbe9e0; border-radius: 12px;
  font-size: .88rem; color: #40514a;
}
.rv-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Login gate ---------- */
.rv-gate {
  max-width: 560px; margin: -34px auto 44px;
  padding: 34px 30px; text-align: center;
  background: var(--rv-card); border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius); box-shadow: var(--rv-shadow);
}
.rv-gate-icon {
  width: 62px; height: 62px; margin: 0 auto 16px;
  display: grid; place-items: center; border-radius: 50%;
  background: #eef5f0; color: var(--rv-green-2); font-size: 1.6rem;
}
.rv-gate h2 { font-family: "DM Serif Display", Georgia, serif; margin: 0 0 8px; color: var(--rv-green); }
.rv-gate p { margin: 0 0 20px; color: var(--rv-muted); line-height: 1.6; }
.rv-gate .rv-actions { justify-content: center; }

/* ---------- Footer ---------- */
.rv-foot { margin-top: 30px; padding: 30px 0 26px; background: var(--rv-green); color: rgba(255, 255, 255, .82); }
.rv-foot-inner { display: grid; gap: 16px; justify-items: center; text-align: center; }
.rv-foot-brand { display: flex; align-items: center; gap: 12px; }
.rv-foot-brand strong { display: block; color: #fff; font-size: 1rem; }
.rv-foot-brand span { font-size: .82rem; }
.rv-foot-links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.rv-foot-links a { color: rgba(255, 255, 255, .86); text-decoration: none; font-size: .88rem; }
.rv-foot-links a:hover { color: #fff; text-decoration: underline; }
.rv-foot-copy { margin: 0; font-size: .78rem; color: rgba(255, 255, 255, .6); }

/* ---------- Utilities ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 10px 16px; background: var(--rv-green); color: #fff;
  border-radius: 0 0 10px 0; text-decoration: none;
}
.skip-link:focus { left: 0; }
.rv-count-short { color: #b45309; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .rv-summary { grid-template-columns: 1fr; text-align: center; gap: 18px; }
  .rv-summary .rv-btn { justify-self: center; }
  .rv-bar-row { grid-template-columns: 48px 1fr 36px; }
}
@media (max-width: 620px) {
  .rv-grid { grid-template-columns: 1fr; }
  .rv-two { grid-template-columns: 1fr; }
  .rv-tools select, .rv-tools input { min-width: 0; width: 100%; }
  .rv-tools label { width: 100%; }
  .rv-tools .rv-tools-go { margin-left: 0; width: 100%; }
  .rv-tools .rv-tools-go .rv-btn { flex: 1; justify-content: center; }
  .rv-form-card, .rv-gate { border-radius: 0; margin-left: -4vw; margin-right: -4vw; }
}
