/* ==========================================================================
   Real Estate — Page-Specific Styles
   Shared components (page-hero, gallery, video-grid, lightbox, buttons, etc.)
   are defined in css/style.css. This file only contains overrides and
   additions unique to the real-estate page.
   ========================================================================== */

/* ----------------------------------------
   VIDEO HERO — Full-Width Background Video
   ---------------------------------------- */
.re-video-hero {
  position: relative;
  width: 100%;
  height: 120vh;           /* taller hero = video visible longer */
  min-height: 500px;
  /* clip-path keeps the fixed video clipped to hero bounds */
  clip-path: inset(0);
  -webkit-clip-path: inset(0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 20vh;
  background: #000;
  z-index: 1;
}

.re-video-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 0;
}

/* Content sections scroll OVER the video */
[data-page="real-estate"] .section-light {
  position: relative;
  z-index: 2;
  background: var(--cream);
}

.re-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.1) 40%,
    rgba(0, 0, 0, 0.2) 70%,
    rgba(0, 0, 0, 0.5) 100%
  );
  z-index: 1;
}

.re-video-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 2rem;
  max-width: 900px;
}

.re-video-label {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--terracotta);
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.re-video-title {
  font-family: var(--sans);
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 200;
  line-height: 1.05;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5), 0 4px 40px rgba(0, 0, 0, 0.3);
}

.re-video-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  color: var(--coral);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.re-video-desc {
  font-family: var(--body);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5), 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Nav white text over video */
[data-page="real-estate"] .nav:not(.scrolled) .nav-links a,
[data-page="real-estate"] .nav:not(.scrolled) .nav-logo-img {
  filter: brightness(0) invert(1);
}
[data-page="real-estate"] .nav:not(.scrolled) .nav-links a.active {
  color: var(--coral);
  filter: none;
}
[data-page="real-estate"] .nav:not(.scrolled) .lang-btn {
  border-color: #fff;
  color: #fff;
}
[data-page="real-estate"] .nav:not(.scrolled) .lang-btn.active {
  background: #E8E4DF;
  color: #0A0A0A;
  border-color: #E8E4DF;
}
[data-page="real-estate"] .nav:not(.scrolled) .nav-toggle span {
  background: #fff;
}

/* Stats Row */
.stats-row {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.stat-number {
  font-family: 'Monument Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--coral);
  line-height: 1;
}

.stat-label {
  font-family: 'Monument Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--terracotta);
}

/* Gallery heading — slim style (inspired by Monument Grotesk) */
.re-gallery-heading {
  font-family: 'Monument Grotesk', sans-serif;
  font-weight: 400;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 3.5vw, 3.2rem);
  line-height: 1;
  color: var(--coral);
  white-space: nowrap;
}

/* ----------------------------------------
   PHOTO GALLERY — Uniform Grid
   ---------------------------------------- */
.re-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 2.5rem;
}

.re-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  cursor: pointer;
  aspect-ratio: 3 / 2;
}

.re-gallery-item.re-gallery-wide {
  grid-column: span 1;
}

.re-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  display: block;
}

.re-gallery-item:hover img {
  transform: scale(1.05);
}

.re-gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0) 50%
  );
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.re-gallery-item:hover .re-gallery-overlay {
  opacity: 1;
}

.re-gallery-tag {
  display: none;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fff;
  background: var(--coral);
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
}

/* Photo Lightbox */
.re-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: zoom-out;
}

.re-photo-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.re-photo-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.re-photo-lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.re-photo-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Featured project videos — 2-column layout */
[data-page="real-estate"] .video-grid {
  grid-template-columns: repeat(2, 1fr);
}

/* Sound toggle button */
.video-sound-toggle {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.2s ease;
  z-index: 2;
  padding: 0;
}

.video-sound-toggle.visible {
  opacity: 1;
}

.video-sound-toggle:hover {
  background: rgba(0, 0, 0, 0.7);
}

.video-sound-toggle svg {
  width: 18px;
  height: 18px;
}

.video-sound-toggle .icon-unmuted {
  display: none;
}

.video-sound-toggle.unmuted .icon-muted {
  display: none;
}

.video-sound-toggle.unmuted .icon-unmuted {
  display: block;
}

/* CTA section centering */
.cta-section {
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  padding: 2rem 0;
}

.cta-section .section-title {
  text-align: center;
}

.cta-section .section-text {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  [data-page="real-estate"] .video-grid {
    grid-template-columns: 1fr;
  }

  .re-video-hero {
    height: 100vh;
    min-height: 400px;
    padding-bottom: 15vh;
    padding-top: 0;
  }

  .re-video-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
  }

  .re-video-title {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }

  .stats-row {
    justify-content: center;
    gap: 2rem;
  }

  .stat-number {
    font-size: 2.25rem;
  }

  .re-gallery {
    grid-template-columns: 1fr;
    gap: 4px;
    margin-left: calc(-1 * clamp(20px, 4vw, 48px));
    margin-right: calc(-1 * clamp(20px, 4vw, 48px));
  }

  .re-gallery-item.re-gallery-wide {
    grid-column: span 1;
  }
}

@media (max-width: 480px) {
  .stats-row {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .re-gallery {
    grid-template-columns: 1fr;
    gap: 4px;
    margin-left: calc(-1 * clamp(20px, 4vw, 48px));
    margin-right: calc(-1 * clamp(20px, 4vw, 48px));
  }
}
