/* ==========================================================
   DT PROPERTY IMPROVEMENTS
   Reviews section + "leave a review" form
   Loads AFTER site.css
   ========================================================== */

:root { --gold: #e6b450; }

/* ===== Section ===== */
.reviews { background: var(--ink); padding: clamp(5rem, 11vw, 9rem) 0; border-top: 1px solid var(--line); }
.reviews-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 2rem 3rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.reviews-head h2 { font-size: clamp(2.6rem, 6vw, 5rem); margin-top: 1.4rem; max-width: 12em; }

.reviews-summary { display: flex; align-items: center; gap: 1.2rem; }
.reviews-score { font-family: var(--serif); font-size: clamp(3.6rem, 6vw, 5.2rem); line-height: 0.9; color: #fff; }
.reviews-summary .stars { font-size: 1.15rem; }
.reviews-count { display: block; margin-top: 0.4rem; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }

.stars { color: var(--gold); letter-spacing: 0.14em; line-height: 1; white-space: nowrap; }

/* ===== Reviews fading through ===== */
.reviews-stage { display: grid; }
.review {
  grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity 0.8s ease, transform 0.8s var(--ease), visibility 0s 0.8s;
}
.review.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity 0.9s ease, transform 0.9s var(--ease); }
.review .stars { font-size: 1.1rem; margin-bottom: 1.6rem; }
.review blockquote { margin: 0; }
.review blockquote p {
  font-family: var(--serif); font-size: clamp(1.8rem, 3.8vw, 3.2rem); line-height: 1.15; letter-spacing: -0.01em; max-width: 26em;
  overflow-wrap: anywhere; white-space: pre-line;
}
.review.is-long blockquote p { font-size: clamp(1.25rem, 2.1vw, 1.75rem); line-height: 1.4; max-width: 38em; }
.review figcaption { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; }
.review-name { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: #fff; }
.review-meta { font-size: 0.82rem; color: var(--muted); }
.review-meta::before { content: ""; display: inline-block; width: 1.6rem; height: 1px; background: var(--red-hot); vertical-align: middle; margin-right: 0.9rem; }

.reviews-controls { display: flex; align-items: center; gap: 1.6rem; margin-top: 2.6rem; }
.reviews-arrows { display: flex; gap: 0.6rem; }
.reviews-arrows button {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.28); background: transparent; color: #fff;
  font-size: 1.2rem; line-height: 1; cursor: pointer; transition: border-color 0.3s, background-color 0.3s;
}
.reviews-arrows button:hover { border-color: var(--red-hot); background: rgba(211, 19, 27, 0.18); }
.reviews-dots { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.reviews-dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.25); cursor: pointer; transition: background-color 0.3s, transform 0.3s; }
.reviews-dots button[aria-current="true"] { background: var(--red-hot); transform: scale(1.3); }

.reviews-empty { max-width: 34rem; }
.reviews-empty p { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; color: var(--muted); }

.reviews-cta { margin-top: clamp(3rem, 6vw, 5rem); padding-top: 2.2rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.4rem 2rem; }
.reviews-cta p { color: var(--muted); max-width: 26rem; font-size: 0.98rem; }

/* ===== Leave a review (pop-up form) ===== */
.review-modal { overflow-y: auto; align-items: start; }
.review-box { position: relative; width: min(100%, 580px); margin: auto; max-height: none; padding: clamp(1.8rem, 4vw, 2.8rem); }
.review-box h3 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 0.6rem; }
.review-box .review-intro { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.8rem; }
.modal-x {
  position: absolute; top: 0.9rem; right: 0.9rem; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent;
  color: #fff; font-size: 1rem; cursor: pointer; transition: background-color 0.3s, border-color 0.3s;
}
.modal-x:hover { background: var(--red); border-color: var(--red); }

.rating { border: 0; margin: 0 0 1.6rem; padding: 0; }
.rating legend { padding: 0; margin-bottom: 0.7rem; font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.rating-stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 0.15rem; }
.rating-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating-stars label { font-size: 2.4rem; line-height: 1; color: rgba(255, 255, 255, 0.22); cursor: pointer; transition: color 0.2s, transform 0.2s; padding: 0 0.1rem; }
.rating-stars label:hover { transform: scale(1.12); }
.rating-stars input:checked ~ label,
.rating-stars label:hover,
.rating-stars label:hover ~ label { color: var(--gold); }
.rating-stars input:focus-visible + label { outline: 2px solid var(--red-hot); outline-offset: 2px; }
.rating.invalid .rating-stars label { color: rgba(255, 74, 81, 0.5); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.review-form > .field, .review-form > .form-row { margin-top: 1.4rem; }
.review-form .field-count { justify-self: end; font-size: 0.72rem; color: rgba(255, 255, 255, 0.45); }
.review-form .btn { width: 100%; margin-top: 1.8rem; }
.review-error { margin-top: 1rem; color: var(--red-hot); font-size: 0.9rem; min-height: 1.2em; }

.review-done { padding: 1rem 0 0.4rem; }
.review-done h3 em { color: var(--red-hot); }
.review-done p { color: var(--muted); margin-bottom: 1.8rem; }

@media (max-width: 640px) {
  .reviews-head { align-items: flex-start; }
  .rating-stars label { font-size: 2.1rem; }
}