/* =========================================================
   RIVERVIEW ESTATE — page-specific styling
   ========================================================= */

/* ---------- Stats bar ---------- */
.rv-stats {
  background: var(--cream);
  padding: 56px 6vw;
  border-bottom: 1px solid var(--line);
}
.rv-stats-inner {
  max-width: var(--max-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
.rv-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}
.rv-stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 20%;
  height: 60%;
  width: 1px;
  background: rgba(31, 28, 24, 0.12);
}
.rv-stat-num {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(34px, 4vw, 56px);
  color: var(--bronze-deep);
  line-height: 1;
  margin-bottom: 14px;
}
.rv-stat-lbl {
  font-family: var(--f-heading);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--charcoal-mute);
}

@media (max-width: 760px) {
  .rv-stats { padding: 36px 6vw; }
  .rv-stats-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 18px;
  }
  .rv-stat:nth-child(5) { grid-column: 1 / -1; }
  .rv-stat:nth-child(2)::after,
  .rv-stat:nth-child(4)::after { display: none; }
}

/* ---------- Gallery ---------- */
.rv-gallery-section {
  padding: var(--pad-section) 5vw;
  background: var(--ivory);
}
.rv-gallery-head {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px;
}
.rv-gallery-head .eyebrow {
  display: block;
  margin-bottom: 16px;
  color: var(--bronze);
}
.rv-gallery-head h2 {
  font-family: var(--f-heading);
  font-weight: 300;
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin: 0;
}

.rv-gallery {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  grid-auto-flow: dense;
}
.rv-gallery-item {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--sand);
  cursor: zoom-in;
}
.rv-gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.6s ease;
  filter: saturate(0.96) contrast(1.02);
}
.rv-gallery-item:hover img {
  transform: scale(1.04);
  filter: saturate(1) contrast(1.04);
}
.rv-gallery-wide {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
}

@media (max-width: 980px) {
  .rv-gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rv-gallery-wide { grid-column: span 2; aspect-ratio: 16 / 9; }
}
@media (max-width: 580px) {
  .rv-gallery { grid-template-columns: 1fr; gap: 10px; }
  .rv-gallery-wide { grid-column: span 1; aspect-ratio: 4 / 3; }
  .rv-gallery-item { aspect-ratio: 4 / 3; }
}

/* ---------- Lightbox ---------- */
.rv-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 13, 11, 0.96);
  z-index: 9000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s linear;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rv-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}
.rv-lb-stage {
  position: relative;
  width: 92vw;
  height: 88vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.rv-lb-img {
  max-width: 100%;
  max-height: calc(100% - 36px);
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  user-select: none;
  -webkit-user-drag: none;
}
.rv-lb-count {
  font-family: var(--f-heading);
  color: rgba(245, 241, 234, 0.7);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-top: 18px;
}
.rv-lb-close,
.rv-lb-prev,
.rv-lb-next {
  position: absolute;
  background: rgba(245, 241, 234, 0.08);
  color: var(--ivory);
  border: 1px solid rgba(245, 241, 234, 0.22);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
  z-index: 2;
  font-family: var(--f-heading);
  line-height: 1;
  padding: 0;
}
.rv-lb-close:hover,
.rv-lb-prev:hover,
.rv-lb-next:hover {
  background: rgba(245, 241, 234, 0.18);
  transform: scale(1.06);
}
.rv-lb-close { top: 28px; right: 28px; font-size: 28px; }
.rv-lb-prev { left: 28px; top: 50%; transform: translateY(-50%); }
.rv-lb-next { right: 28px; top: 50%; transform: translateY(-50%); }
.rv-lb-prev:hover { transform: translateY(-50%) scale(1.06); }
.rv-lb-next:hover { transform: translateY(-50%) scale(1.06); }

@media (max-width: 720px) {
  .rv-lb-close, .rv-lb-prev, .rv-lb-next {
    width: 44px; height: 44px; font-size: 22px;
  }
  .rv-lb-close { top: 16px; right: 16px; }
  .rv-lb-prev { left: 10px; }
  .rv-lb-next { right: 10px; }
}
