/* WordPress + header fixes */
html.panorama-wp-site,
html,
body.panorama-wp-site,
body.panorama-wp-site html {
  margin: 0 !important;
  padding: 0 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  overflow-x: hidden;
  background: #0c1f3d !important;
}

/* Kill theme / Elementor headers that create a white strip above nav */
body.panorama-wp-site #masthead,
body.panorama-wp-site .site-header,
body.panorama-wp-site .elementor-location-header,
body.panorama-wp-site .hello-elementor-header,
body.panorama-wp-site header.site-header,
body.panorama-wp-site .wp-site-blocks > header {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Remove white gap above header (admin bar / theme) */
body.panorama-wp-site #wpadminbar {
  display: none !important;
}

html.panorama-wp-site,
body.panorama-wp-site.admin-bar,
body.panorama-wp-site.admin-bar html {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.panorama-wp-site .nav {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 !important;
  background: rgba(12, 31, 61, 0.96);
  backdrop-filter: blur(12px);
}

body.panorama-wp-site #page,
body.panorama-wp-site .site,
body.panorama-wp-site .site-content,
body.panorama-wp-site main,
body.panorama-wp-site .entry-content {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

/* Hero badge — space below fixed nav */
body.panorama-wp-site .hero-content {
  margin-top: 5rem;
}

body.panorama-wp-site .hero-badge {
  margin-top: 30px;
  margin-bottom: 1.5rem;
}

/* Scroll sliders — building (desktop only) */
html:not(.panorama-lite) body.panorama-wp-site .building-section {
  height: 100vh;
}

body.panorama-wp-site .floor-open-section {
  display: none !important;
}

html:not(.panorama-lite) body.panorama-wp-site .building-pin {
  align-items: flex-start;
  justify-content: center;
  padding-top: calc(5.5rem - 50px);
  padding-bottom: calc(3rem - 50px);
}

html:not(.panorama-lite) body.panorama-wp-site .building-stage {
  width: min(960px, 92vw);
  height: min(640px, 70vh);
}

/* Simple floor plan */
.floorplan-simple {
  padding-top: calc(clamp(2.5rem, 5vw, 3.5rem) - 40px);
  padding-bottom: calc(clamp(2.5rem, 5vw, 3.5rem) - 20px);
  background: var(--navy);
  color: var(--white);
}
.floorplan-simple-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 1.25rem;
}
.floorplan-simple-header .label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.35rem;
}
.floorplan-simple-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  margin-bottom: 0;
}
.floorplan-simple-image {
  margin: 0 auto;
  max-width: min(900px, 92vw);
  border-radius: 16px;
  overflow: hidden;
  background: #0a1828;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  cursor: zoom-in;
}
.floorplan-simple-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.floorplan-simple-cta {
  text-align: center;
  margin-top: 1.25rem;
}
.floorplan-fullscreen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border: 1px solid rgba(201, 169, 98, 0.45);
  border-radius: 999px;
  background: rgba(201, 169, 98, 0.12);
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
}
.floorplan-fullscreen-btn:hover {
  background: rgba(201, 169, 98, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}
.floorplan-lightbox {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(5, 13, 24, 0.94);
  backdrop-filter: blur(8px);
}
.floorplan-lightbox[hidden] {
  display: none !important;
}
.floorplan-lightbox img {
  max-width: min(1200px, 96vw);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.floorplan-lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}
.floorplan-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

body.panorama-wp-site .door-section {
  display: none !important;
}

body.panorama-wp-site .stats-section {
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-bottom: clamp(1.5rem, 3vw, 2rem);
}

body.panorama-wp-site .tour-pin {
  padding-top: calc(5.5rem - 50px);
}

body.panorama-wp-site .tour-track-wrap {
  padding-bottom: calc(1.5rem - 50px);
}

body.panorama-wp-site .tour-header {
  padding-top: 0.5rem;
  padding-bottom: 0.75rem;
}

body.panorama-wp-site .amenities-section {
  padding-top: clamp(3rem, 6vw, 5rem);
}

/* Neighbourhood list — ensure places are visible */
body.panorama-wp-site .hood-list li {
  opacity: 1;
  transform: none;
}

body.floorplan-lightbox-open {
  overflow: hidden;
}
/* Hero dynamic background from admin */
.hero-layer--back:not([style*="background-image"]) {
  background-image: url('https://images.unsplash.com/photo-1545324418-cc1a3fa10c00?w=1920&q=80');
}
.hero-layer--mid:not([style*="background-image"]) {
  background-image: url('https://images.unsplash.com/photo-1512917774080-9991f1c4c750?w=1920&q=80');
}

/* 3D Tour section */
.tour-3d-section {
  padding: clamp(4rem, 8vw, 6rem) 0;
  background: var(--navy);
  color: var(--white);
}

.tour-3d-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem;
  padding: 0 1.5rem;
}

.tour-3d-header .label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.tour-3d-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.tour-3d-header p {
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
}

.tour-3d-frame {
  width: min(1100px, 92vw);
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
  aspect-ratio: 16/10;
  max-height: 80vh;
}

.tour-3d-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.tour-3d-cta {
  text-align: center;
  margin-top: 2rem;
}

.tour-3d-cta a {
  display: inline-block;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
  font-weight: 600;
}

/* ===== Performance — mobile / touch lite mode ===== */
html.panorama-lite .grain,
html.panorama-lite .hero-orb,
html.panorama-lite #hero-canvas {
  display: none !important;
}

html.panorama-lite .marquee-track {
  animation-duration: 48s;
}

/* Building — mobile stacked layout (no split-panel scroll) */
html.panorama-lite body.panorama-wp-site .building-section {
  height: auto !important;
  padding: clamp(2rem, 5vw, 3rem) 0;
  overflow: visible;
}

html.panorama-lite body.panorama-wp-site .building-pin {
  position: relative !important;
  top: auto !important;
  height: auto !important;
  min-height: 0 !important;
  padding: calc(5rem + 8px) 0 1.5rem;
  overflow: visible !important;
  display: block;
}

html.panorama-lite body.panorama-wp-site .building-stage {
  position: relative;
  width: min(960px, 92vw);
  height: auto !important;
  min-height: 0 !important;
  margin: 0 auto;
  perspective: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

html.panorama-lite .building-caption {
  position: relative !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: 100%;
  text-align: center;
  order: 1;
  padding: 0 0.25rem 0.35rem;
  pointer-events: auto;
}

html.panorama-lite .building-caption h2 {
  font-size: clamp(1.65rem, 6vw, 2.35rem);
  line-height: 1.15;
}

html.panorama-lite .building-caption p,
html.panorama-lite #building-sub {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
  font-size: 0.92rem;
  line-height: 1.55;
}

html.panorama-lite #building-title,
html.panorama-lite .building-panel,
html.panorama-lite .building-interior {
  opacity: 1 !important;
  visibility: visible !important;
}

html.panorama-lite .building-panel {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 200px;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  transform: none !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

html.panorama-lite .building-panel img {
  width: 100% !important;
  height: auto !important;
  min-height: 200px;
  aspect-ratio: 16 / 10;
  margin-left: 0 !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block;
}

html.panorama-lite .building-panel--left { order: 2; }
html.panorama-lite .building-panel--right { order: 3; }

html.panorama-lite .building-interior {
  position: relative !important;
  inset: auto !important;
  order: 4;
  aspect-ratio: 16 / 10;
  min-height: 200px;
  height: auto !important;
  transform: none !important;
  scale: 1 !important;
  opacity: 1 !important;
  border-radius: 14px;
  overflow: hidden;
}

html.panorama-lite .building-interior img {
  width: 100%;
  height: auto !important;
  min-height: 200px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

html.panorama-lite .building-progress {
  display: none !important;
}

@media (min-width: 560px) and (max-width: 1024px) {
  html.panorama-lite body.panorama-wp-site .building-stage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
  }
  html.panorama-lite .building-caption,
  html.panorama-lite .building-interior {
    grid-column: 1 / -1;
  }
}

html.panorama-lite .tour-section {
  overflow: visible;
}

html.panorama-lite .tour-pin,
body.panorama-wp-site html.panorama-lite .tour-pin {
  height: auto !important;
  overflow: visible;
}

html.panorama-lite .tour-track-wrap,
body.panorama-wp-site html.panorama-lite .tour-track-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(5vw, 1.5rem);
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  padding-bottom: 1rem;
}

html.panorama-lite .tour-track {
  transform: none !important;
  will-change: auto;
}

html.panorama-lite .tour-room {
  scroll-snap-align: start;
}

html.panorama-lite .tour-room-info {
  transform: none !important;
  opacity: 1 !important;
}

@media (prefers-reduced-motion: reduce) {
  html.panorama-lite .marquee-track {
    animation: none;
  }
}
