  :root {

  --line-height-relaxed: 1.6;
  --line-height-loose: 1.8;
 

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition: 0.3s ease;

  /* Z-Index Scale */
  --z-close-btn: 10;
  --z-skip-link: 100;
  --z-scroll-top: 1000;
}

.page-title{
      max-width: var(--max-width-container);
    margin: 0 auto 30px;
}
/* ==========================================================================
 Building Types — hero, modal, carousel, space list, highlight details

 Breakpoints: desktop ≥1024px (base); tablet and mobile share (max-width: 1023px) for space list,
 modal, detail scene, stacked tabs, and FAB. Extra-small tweaks remain in that same query.

 ========================================================================== */

/* Hero Section */
.hero-section {
  max-width: var(--max-width-container);
  margin: 0 auto 46px;
  padding: 0 20px;
  position: relative;
  height: 100vh;
  max-height: 470px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ==========================================================================
 Design Narrative Tab (Split Layout)
 ========================================================================== */
.design-narrative-layout {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 158px);
  display: flex;
  flex-direction: column; /* Stack Title and Split Content vertically */
  background-color: rgb(var(--color-white));
  padding: 16px 80px;
  gap: 30px;
  box-sizing: border-box;
}

/* Title Styling */
.design-narrative-layout h2 {
  width: 100%;
  min-height: 27px;
  color: rgb(var(--color-near-black));
  font-family: var(--font-family-bold);
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  flex-shrink: 0;
}

/* Split Container for Body and Image */
.design-narrative-split {
  display: flex;
  flex-direction: row;
  flex: 1;
  gap: 60px;
  overflow: hidden; /* Prevent spillover */
}

.design-narrative-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-right: 20px;
  max-height: calc(100vh - 248px);
}

.design-narrative-text p,
.design-narrative-text li {
color: rgb(var(--color-near-black));

font-size: 16px;
line-height: 1.6;
margin-bottom: 16px;
}
.design-narrative-text p{
font-family: var(--font-family-medium);
}

.design-narrative-text li {
font-family: var(--font-family-semi-bold);
}

/* CMS narrative body headings (Key terms, Factory Provided Controls, etc.) */
.design-narrative-text h2,
.design-narrative-text h3 {
  font-family: var(--font-family-bold);
  font-size: 18px;
  font-weight: 700;
  color: rgb(var(--color-near-black));
  margin: 24px 0 12px 0;
  line-height: 1.3;
}
.design-narrative-text h2:first-child,
.design-narrative-text h3:first-child {
  margin-top: 0;
}

/* Custom Scrollbar for text area */
.design-narrative-text::-webkit-scrollbar {
  width: 6px;
}

.design-narrative-text::-webkit-scrollbar-track {
  background: rgb(var(--color-bg-light-1));
  border-radius: 3px;
}

.design-narrative-text::-webkit-scrollbar-thumb {
  background: rgba(var(--color-sky-blue), 1); /* rgb(var(--color-dark-blue)) scrollbar as seen in design */
  border-radius: 3px;
}

.design-narrative-image {
  flex: 1;
  display: flex;
  align-items: flex-start; /* Center vertically in the split area */
  justify-content: center;
  height: 100%;
  overflow: hidden;
  max-height: calc(100vh - 248px);
}

.design-narrative-image img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain; /* Ensure image fits nicely */
  border-radius: 4px;
}

/* Design narrative glossary: clickable terms in narrative text */
.design-narrative-text strong[data-title][data-description] {
  cursor: pointer;
  font-family: var(--font-family-extra-bold);
}

.design-narrative-text strong[data-title][data-description]:hover {
  text-decoration: underline;
}

/* Key terms / definitions block (built from strong[data-title][data-description] in narrative)
   Hidden on desktop (users click bold terms → modal); on mobile the
   "Highlight Details" button opens the full-screen highlight-details-scene. */
.design-narrative-definitions {
  display: none;
}

/* Narrative glossary modal: fixed 150px from top, horizontally centred */
.cgh-mc-modal.cgh-mc-modal--narrative {
  align-items: flex-start;
  padding-top: 150px;
}


/* Narrative glossary modal: title and description (design system tokens) */
.cgh-mc-modal.cgh-mc-modal--narrative .cgh-mc-modal__title {
  width: 307px;
  min-height: 50px;
  color: var(--modal-title-color);
  font-family: var(--font-family-bold);
  font-size: 20px;
  font-weight: 700;
}

.cgh-mc-modal.cgh-mc-modal--narrative .cgh-mc-modal__body,
.cgh-mc-modal.cgh-mc-modal--narrative .cgh-narrative-modal-description {
  width: 462px;
  max-width: 100%;
  min-height: 0;
  max-height: 219px;
  color: var(--modal-body-color);
  font-family: var(--font-family-semi-bold);
  font-size: 14px;
  font-weight: 600;
}

/* Narrative glossary tooltip (first-instance hint) */
.cgh-narrative-tooltip {
  position: fixed;
  z-index: 10001;
  width: 200px;
  min-height: 104px;
  border-radius: 12px;
  background-color: rgba(51, 51, 51, 1);
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.cgh-narrative-tooltip::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid rgba(51, 51, 51, 1);
}

.cgh-narrative-tooltip__content {
  width: 160px;
  min-height: 40px;
  color: rgba(255, 255, 255, 1);
  font-family: var(--font-family-semi-bold, "SharpSans-SemiBold", sans-serif);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 16px;
  margin: 0 0 12px 0;
}

.cgh-narrative-tooltip__btn {
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 1);
  font-family: var(--font-family-semi-bold, "SharpSans-SemiBold", sans-serif);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  border-bottom: 1px solid #fff;
}

.cgh-narrative-tooltip__btn:hover {
  text-decoration: underline;
}

.cgh-narrative-tooltip__btn:focus-visible {
  outline: none;
  text-decoration: underline;
}



.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(var(--color-near-black), 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.hero-content {
  text-align: center;
  color: rgb(var(--color-white));
  max-width: 800px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-title {
  color: rgba(var(--color-sky-blue), 1);
  font-family: var(--font-family-bold);
  font-size: 56px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-description {
  color: rgba(rgb(var(--color-white)), 1);
  font-family: var(--font-family-semi-bold);
  font-size: 22px;
  font-weight: 400;
  text-align: center;
  line-height: 27px;
  text-transform: uppercase;
  padding-bottom: 18px;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-btn {
  align-items: center;
  background-color: rgb(var(--color-white));
  border-radius: 6px;
  border: 1px solid rgba(var(--color-sky-blue), 1);
  color: rgba(var(--color-sky-blue), 1);
  cursor: pointer;
  display: flex;
  font-family: var(--font-family-medium);
  font-size: 20px;
  font-weight: 500;
  gap: 8px;
  height: 50px;
  justify-content: center;
  min-width: 160px;
  padding: 0 30px;
  text-decoration: none;
  transition: var(--transition-base);
  white-space: nowrap;
}
.hero-btn:hover {
  scale: 1.02;
}


.hero-btn-primary {
  background-color: rgba(var(--color-sky-blue), 1);
  color: rgb(var(--color-white));
  border: 1px solid rgba(var(--color-sky-blue), 1);
}
.hero-btn-primary img {
  filter: brightness(0) invert(1);
}
.hero-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  transition: var(--transition-base);
}

.hero-btn-primary:hover {
  background-color: rgb(var(--color-white));
  color: rgba(var(--color-sky-blue), 1);
}
.hero-btn-primary:hover img {
  filter: brightness(1) invert(0);
}

.hero-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.section-title{
  color: rgb(var(--color-gray));
  font-family: var(--font-family-bold);
  font-size: 22px;
  font-weight: 700;
  max-width: var(--max-width-container);
  margin: 0 auto 6px;
}
.section-description{
  color: rgb(var(--color-near-black));
  font-family: var(--font-family-medium);
  font-size: 15px;
  font-weight: 400;
  max-width: var(--max-width-container);
  margin: 0 auto;
  line-height: 21px;
  padding: 0 0 20px 0;
}


/* Space Selection Modal Styles */
.space-selection-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(var(--color-near-black), 0.8);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 1002;
  padding-top: 0;
}

.space-selection-modal-container {
  position:relative;
  background-color: rgb(var(--color-bg-light-1));
  width: 100%;
  max-width: 1417px;
  max-height: 90%;
  display: flex;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(var(--color-near-black), 0.3);
  flex-direction: column;
}

.space-selection-modal-header {
  background-color: rgb(var(--color-black));
  color: rgb(var(--color-white));
  padding: 18px 84px 18px 74px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap:30px
}

.space-selection-modal-header-left {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.space-selection-modal-back-btn {
  background: none;
  border: none;
  color: rgb(var(--color-white));
  cursor: pointer;
  padding: 0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  margin-right: 3px;
}

.space-selection-modal-back-btn:hover {
  background-color: rgba(var(--color-white), 0.1);
}
.space-selection-modal-back-btn .material-symbols-outlined{
  color: rgb(var(--color-white)) !important;
  font-size: 44px;
}
.space-selection-modal-title {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 4px;
}

.space-selection-modal-space-name {
  font-size: 34px;
  font-weight: 700;
  color: rgb(var(--color-white));
  font-family: var(--font-family-bold);
  text-transform: uppercase;
  line-height: 34px;
}

.space-selection-modal-system-name {
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-family-semi-bold);
  color: rgb(var(--color-white));
  line-height: 21px;
}

.space-selection-modal-tabs {
  display: flex;
  gap: 20px;
  flex-wrap: nowrap;
  min-width: 0;
}

.space-selection-modal-tab {
  height: 50px;
  align-items: center;
  background-color: rgb(var(--color-white));
  border-radius: 6px;
  border: 1px solid rgba(var(--color-sky-blue), 1);
  color: rgba(var(--color-sky-blue), 1);
  cursor: pointer;
  display: flex;
  font-family: var(--font-family-bold);
  font-size: 18px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-width: 120px;
  padding: 11px 30px;
  transition: var(--transition-base);
  white-space: nowrap;
  flex-shrink: 0;
}

.space-selection-modal-tab:hover {
  scale: 1.02;
  background-color: rgba(var(--color-sky-blue), 1);
  color: rgb(var(--color-white));
}

.space-selection-modal-tab.active {
  background-color: rgba(var(--color-sky-blue), 1);
  color: rgb(var(--color-white));
  border: 1px solid rgba(var(--color-sky-blue), 1);
}

.space-selection-modal-tab:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.space-selection-modal-share-btn {
  background: none;
  border: 1px solid rgb(var(--color-black));
  color: rgb(var(--color-white));
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-family-bold);
}

.space-selection-modal-share-btn:hover {
  background-color: rgb(var(--color-black));
  color: rgb(var(--color-white));
}

.space-selection-modal-share-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.space-selection-modal-close-btn {
  background: rgb(var(--color-black));
  color: rgb(var(--color-white));
  cursor: pointer;
  padding: 5px;
  border-radius: 0;
  all: unset;
  border: 1px solid rgb(var(--color-black));
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 20px;
  top: 0;
  cursor: pointer;
}

.space-selection-modal-close-btn:hover {
  background-color: rgb(var(--color-near-black));
  border: 1px solid rgb(var(--color-near-black));
}
.space-selection-modal-close-btn .material-symbols-outlined{
  font-size: 30px !important;
  color: rgb(var(--color-white));
}

.space-selection-modal-content {
  flex: 1;
  min-height: 0; /* Allow flex shrink so scenes are constrained and can scroll */
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Scenes */
.scene {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.scene.active {
  display: flex;
  top: 0;
  overflow: hidden;
}

/* Popover */
.space-popover {
  position: fixed;
  background-color: rgb(var(--color-white));
  box-shadow: 0 8px 32px rgba(var(--color-near-black), 0.2);
  z-index: 10001;
  min-width: 245px;
  transform: translateX(-50%);
  border: 1px solid rgb(var(--color-popover-border));
  display: none;
  max-width: 275px;
}

/* Arrow tail border (bottom-center) */
.space-popover::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 9px solid rgb(var(--color-popover-border));
  z-index: 0;
}

/* Arrow tail fill (bottom-center) */
.space-popover::after {
  content: '';
  position: absolute;
  top: calc(100% - 1px);
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgb(var(--color-white));
  z-index: 1;
}

/* Adjust pointer position for top markers */
.space-popover[data-pointer-left]::before,
.space-popover[data-pointer-left]::after {
  left: 50%;
  transform: translateX(-50%);
}

.popover-content {
  padding: 0;
  width: 100%;
}

.popover-content h3 {
  margin: 0;
  font-family: var(--font-family-bold);
  font-size: 22px;
  font-weight: 500;
  color: rgb(var(--color-gray));
}
.popover-content p {
  font-family: var(--font-family-semi-bold);
  font-size: 13px;
  font-weight: 400;
  color: rgb(var(--color-gray));
  padding: 0;
  margin: 0;
}
.popover-space-description {
  line-height: var(--line-height-relaxed, 1.6);
  margin-top: 4px;
  text-align: center;
}
.popover-system-name {
  font-size: 13px;
  color: rgba(var(--color-dark-gray), 0.9);
}
.popover-close-btn {
  background: none;
  border: none;
  color: rgb(var(--color-near-black));
  cursor: pointer;
  transition: var(--transition-base);
  position: absolute;
  right: 14px;
  top: 14px;
}

.popover-close-btn:hover {
  background-color: rgb(var(--color-bg-hover));
  color: rgb(var(--color-near-black));
}

.popover-close-btn .material-symbols-outlined {
  font-size: 18px;
}

.popover-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  border: 1px solid #979797;
}


.popover-view-btn {
  background-color: rgba(var(--color-sky-blue), 1);
  color: rgb(var(--color-white));
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-family: var(--font-family-medium);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-base);
  margin-top: 20px;
}

.popover-view-btn:hover {
  background-color: rgb(var(--color-dark-blue));
}

/* Detail Scene */
.detail-content {
  display: flex;
  width: 100%;
  height: 100%;
  gap: 30px;
}

.detail-left-panel {
  flex: 1;
  background-color: rgb(var(--color-white));
  border-radius: 0;
  padding: 0;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(var(--color-near-black), 0.1);
}

.detail-text-content {
  height: 100%;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.detail-text-content h3 {
  font-family: var(--font-family-bold);
  font-size: 24px;
  font-weight: 700;
  color: rgb(var(--color-gray));
  margin: 0 0 20px 0;
}

.detail-text-content p {
  font-family: var(--font-family-medium);
  font-size: 15px;
  line-height: 1.6;
  color: rgb(var(--color-near-black));
  margin: 0 0 20px 0;
}
.detail-text-content p strong{
  font-family: var(--font-family-extra-bold);
}
.detail-text-content li {
  font-family: var(--font-family-semi-bold);
  font-size: 15px;
  line-height: 1.6;
  color: rgb(var(--color-near-black));
  margin: 0 0 10px 0;
}

/* Space SVG Container */

/* Exploded 3D View (kept for backward compatibility if needed) */

/* Product Carousel */
.product-carousel {
  position: relative;
}

.hvac-unit-3d {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, rgb(var(--color-bg-gradient-start)), rgb(var(--color-bg-light-3)));
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-medium);
  font-size: 12px;
  color: rgb(var(--color-gray));
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 0 20px 0;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgb(var(--color-border-medium));
  cursor: pointer;
  transition: var(--transition-base);
}

.dot.active {
  background-color: rgba(var(--color-sky-blue), 1);
}

.dot:hover {
  background-color: rgb(var(--color-dark-blue));
}

.view-product-details-btn {
  background-color: rgba(var(--color-sky-blue), 1);
  color: rgb(var(--color-white));
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-family: var(--font-family-bold);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-base);
  width: 100%;
}

.view-product-details-btn:hover {
  background-color: rgb(var(--color-dark-blue));
  transform: translateY(-1px);
}

.school-building-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.school-building {
  position: relative;
  width: 100%;
  aspect-ratio: 1417 / 600;
  background: linear-gradient(145deg, rgb(var(--color-bg-light-2)), rgb(var(--color-bg-light-1)));
  border-radius: 0;
  box-shadow:
    0 20px 40px rgba(var(--color-near-black), 0.1),
    inset 0 1px 0 rgba(var(--color-white), 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.school-building-image {
  width: 100%;
  height: 100%;
  display: block;
}

.school-building-overlay-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  /* pointer-events: none; - Removed to allow button interaction */
}

.school-building-overlay-image.is-visible {
  display: block;
  /* pointer-events: none; - Removed to allow button interaction */
}

.school-building-image object {
  width: 100%;
  height: 100%;
  display: block;
}

/* Overview Tab Styling */
.overview-full-layout {width: 100%;height: 100%;min-height: calc(100vh - 160px);background-size: cover;background-position: center;background-repeat: no-repeat;display: flex;align-items: flex-start;justify-content: flex-start;padding: 30px 0 50px 80px;position: relative;}

.overview-overlay-card {width: 479px;height: calc(100vh - 220px);padding: 32px;background-color: rgba(var(--color-white), 0.8);border-radius: 0;box-shadow: 0 4px 12px rgba(var(--color-near-black), 0.1);overflow-y: auto;}

.overview-overlay-card h2 {
width: 100%;
height: 27px;
color: rgb(var(--color-near-black));
font-family: var(--font-family-bold);
font-size: 22px;
font-weight: 700;
margin-bottom: 12px;
}

.overview-overlay-card p {
color: rgb(var(--color-near-black));
font-family: var(--font-family-medium);
font-size: 15px;
font-weight: 400;
padding-bottom: 20px;
margin: 0;
line-height: 1.5;
}

.overview-overlay-card li {
color: rgb(var(--color-near-black));
font-family: var(--font-family-medium);
font-size: 15px;
font-weight: 500;
margin-bottom: 8px;
}

/* ==========================================================================
 System Equipment Tab (New Layout)
 ========================================================================== */

/* Container overrides */
#system-equipment-content {
  height: 100%;
  min-height: calc(100vh - 160px); /* Ensure minimum height */
  padding: 0 !important; /* Remove default padding from .detail-right-panel if it leaks */
}

.product-carousel {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 160px); /* Ensure minimum height */
  position: relative;
  overflow: hidden;
  border-radius: 0; /* Match container radius */
}

/* Individual Slide */
.product-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background-size: cover; */
  /* background-position: center; */
  /* background-repeat: no-repeat; */
  display: none;
  align-items: center; /* Vertically center the card */
  justify-content: flex-start; /* Left align */
  padding-left: 80px; /* Match Overview tab padding */
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.product-slide.active {
  display: flex;
  opacity: 1;
  align-items: flex-start;
}

/* Overlay Card */
.product-overlay-card {
  width: 480px; /* Fixed width as per design intent */
  max-height: calc(100vh - 220px);
  margin-top: 30px;
  background-color: rgba(var(--color-white), 0.8);
  backdrop-filter: blur(5px);
  border-radius: 0;
  box-shadow: 0 8px 32px rgba(var(--color-near-black), 0.15);
  padding: 29px 40px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden; /* Changed from auto to hidden to manage scrolling internally */
  margin-bottom: 30px;
}

/* Card Header */
.product-card-header h3 {
  font-family: var(--font-family-bold);
  font-size: 20px;
  font-weight: 700;
  color: rgb(var(--color-gray));
  margin: 0;
  line-height: 23px;
}

/* Visual Section (Image + Arrows + Dots) */
.product-visual-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-bottom: 39px;
  flex-shrink: 0; /* Don't shrink the image */
}

.product-image-wrapper {
  width: 100%;
  height: 151px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 24px;
}


.product-image-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 15px rgba(var(--color-near-black),0.1));
}

/* Navigation Arrows (Integrated into visual section) */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(var(--color-sky-blue), 1);
  cursor: pointer;
  z-index: 2;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.carousel-nav-btn:hover:not(:disabled) {
  transform: translateY(-50%) scale(1.2);
  color: rgb(var(--color-dark-blue));
}

.carousel-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.carousel-nav-btn.prev { left: 0; }
.carousel-nav-btn.next { right: 0; }

.carousel-nav-btn .material-symbols-outlined {
  font-size: 36px !important;
  font-weight: bold;
}

/* Specific styling for carousel arrows in System Equipment */
#system-equipment-content .carousel-nav-btn .material-symbols-outlined {
  width: 38px;
  height: 31px;
  background-color: transparent;
  color:  rgba(var(--color-sky-blue), 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: 4px;
}

/* Dots */
#system-equipment-content .carousel-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 0;
}

.carousel-dots button.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgb(var(--color-tag-gray));
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.2s;
}

.carousel-dots button.dot.active {
  background-color: rgba(var(--color-sky-blue), 1);
}

.carousel-dots button.dot:hover {
  background-color: rgb(var(--color-tag-gray));
}

/* Info Section */
.product-info-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex: 1; /* Take remaining height */
  min-height: 0; /* Important for nested flex scrolling */
  /* overflow: hidden; */ /* Contain children */
}

.product-body-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 5px; /* Space for scrollbar */
}

/* Custom Scrollbar for the body content */
.product-body-content::-webkit-scrollbar {
  width: 11px;
}
.product-body-content::-webkit-scrollbar-track {
  background-color: rgba(var(--color-near-border-gray), 1);
  border-radius: 6px;
}
.product-body-content::-webkit-scrollbar-thumb {
  background-color: rgba(var(--color-sky-blue), 1);
  border-radius: 6px;
}
.product-body-content::-webkit-scrollbar-thumb:hover {
  background-color: rgba(var(--color-sky-blue), 0.8);
}

.product-info-section p {
  font-family: var(--font-family-medium);
  font-size: 14px;
  line-height: 1.5;
  color: rgb(var(--color-near-black));
  margin: 0;
}
.product-info-section p strong,
.product-info-section p b{
  font-family: var(--font-family-bold);
}
.product-info-section li {
  font-family: var(--font-family-semi-bold);
  font-size: 13px;
  line-height: 1.4;
  color: rgb(var(--color-near-black));
  margin-bottom: 6px;
}

/* CTA Button */
.view-product-details-btn {
  align-self: flex-start;
  background-color: rgba(var(--color-sky-blue), 1);
  color: rgb(var(--color-white));
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-family: var(--font-family-bold);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 10px;
  flex-shrink: 0; /* Ensure button doesn't shrink */
}

.view-product-details-btn:hover {
  background-color: rgb(var(--color-dark-blue));
}



/* Marker Visibility System */

/* Base class for marker groups to enable transitions */
.gh-marker-group {
  transition: opacity 0.3s ease-in-out;
}

/* State: Faded/Hidden (when another marker is active) */
.gh-marker-dimmed {
  opacity: 0;
  pointer-events: none;
}

/* State: Child Visibility Control */
.gh-child-visible {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.gh-child-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Layered Map Styles */
.k12-layered-map {
position: relative;
}

.markers-layer,
.overlay-layer {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
transition: opacity 0.3s ease-in-out;
}

.map-layer {
position: absolute;
top: 0;
left: 0;
z-index: 10;
width: 100%;
height: 100%;
display: block;
}

.markers-layer {
z-index: 30; /* Always on top of map (Layer 1) and overlay (Layer 3) */
}

.overlay-layer {
z-index: 20;
pointer-events: none; /* Initially allow clicks to pass through */
opacity: 0;
}

.overlay-layer.is-visible {
pointer-events: auto;
opacity: 1;
}

/* Map/overlay PNG-JPG support: hide img or object depending on which is active */
.k12-map-img-inactive,
.k12-overlay-img-inactive {
display: none;
}

.k12-map-object-inactive,
.k12-overlay-object-inactive {
display: none;
}

.building-layer-img,
.building-overlay-img {
object-fit: contain;
}

svg g{
  cursor: pointer;
}

/* ==========================================================================
   Hero PRO TIP (mobile-only)
   ========================================================================== */
.hero-pro-tip {
  display: none;
  font-family: var(--font-family-medium);
  font-size: 13px;
  color: rgba(var(--color-white), 0.85);
  margin: 0;
  text-align: center;
}


/* ==========================================================================
   Mobile / tablet Space List (replaces SVG map below desktop)
   Same white-panel / mobile-menu styling for all widths < 1024px (see @media).
   ========================================================================== */
.mobile-space-list {
  display: none;
}






/* ==========================================================================
   Mobile Share FAB
   ========================================================================== */
.mobile-share-fab {
  display: none;
}


/* ==========================================================================
   Highlight Details (mobile full-screen sub-view)
   ========================================================================== */
.highlight-details {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: rgb(var(--color-white));
}

.highlight-details__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background-color: rgb(var(--color-black));
  color: rgb(var(--color-white));
  flex-shrink: 0;
}

.highlight-details__back-btn {
  background: none;
  border: none;
  color: rgb(var(--color-white));
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.highlight-details__back-btn:hover {
  background-color: rgba(var(--color-white), 0.1);
}

.highlight-details__title {
  font-family: var(--font-family-bold);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: rgb(var(--color-white));
}

.highlight-details__body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  -webkit-overflow-scrolling: touch;
}

.highlight-details__term-block {
  padding: 16px 0;
  border-bottom: 1px solid rgb(var(--color-light-gray));
}

.highlight-details__term-block:first-child {
  padding-top: 0;
}

.highlight-details__term-block:last-child {
  border-bottom: none;
}

.highlight-details__term-name {
  font-family: var(--font-family-bold);
  font-size: 16px;
  font-weight: 700;
  color: rgb(var(--color-near-black));
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.highlight-details__term-desc {
  font-family: var(--font-family-medium);
  font-size: 14px;
  color: rgb(var(--color-near-black));
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   Mobile Highlight Details button (in design narrative tab)
   ========================================================================== */
.mobile-highlight-details-btn {
  display: none;
}
.design-narrative-mobile-header h2{
  line-height: normal;
}
/* ==========================================================================
   Responsive — tablet and mobile only (desktop ≥1024px = base styles above)
   Space list + children: (max-width: 1023px)
   Detail scene, modal, stacked tabs, FAB: (max-width: 1023px) — same as former ≤877 mobile tier
   ========================================================================== */

/* Space list + descendants: every viewport < 1024px */
@media (max-width: 1023px) {
  .mobile-space-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-space-list:not(:has(.mobile-space-item)) {
    display: none;
  }

  .mobile-space-list__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: 16px 20px;
  }

  .mobile-space-list__title {
    font-family: var(--font-family-medium);
    font-size: 14px;
    color: rgb(var(--color-text-gray));
    margin: 0;
  }

  .mobile-space-list__title-text--tablet {
    display: none;
  }

  .mobile-space-list__title-text--mobile {
    display: inline;
  }

  .mobile-space-list__close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: rgb(var(--color-near-black));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--transition-fast);
  }

  .mobile-space-list__close:hover {
    opacity: 0.8;
  }

  .mobile-space-list__close .material-symbols-outlined {
    font-size: 24px;
  }

  .mobile-space-list__items {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 36px;
  }

  .mobile-space-list .mobile-space-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid rgb(var(--color-light-gray));
    cursor: pointer;
    transition: background-color var(--transition-fast);
    background-color: rgb(var(--color-white));
  }

  .mobile-space-list .mobile-space-item:last-child {
    border-bottom: none;
  }

  .mobile-space-list .mobile-space-item:hover,
  .mobile-space-list .mobile-space-item:active {
    background-color: rgb(var(--color-light-gray));
  }

  .mobile-space-item__icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: rgba(var(--color-sky-blue), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-space-item__icon .material-symbols-outlined {
    font-size: 22px;
    color: rgba(var(--color-sky-blue), 1);
  }

  .mobile-space-item__info {
    flex: 1;
    min-width: 0;
    padding: 16px 0;
    max-width: 736px;
    width: 100%;
    margin: auto;
  }
  .overview-overlay-card, .product-overlay-card, .design-narrative-mobile-body, .space-selection-modal-header-left, .space-selection-modal-tabs {
    max-width: 736px;
    width: 100%;
    margin: auto;
  }

  .mobile-space-item__info:hover .mobile-space-item__name,
  .mobile-space-item__info:hover .mobile-space-item__desc {
    color: rgb(var(--color-dark-blue));
  }
  .mobile-space-item__name {
    font-family: var(--font-family-bold);
    font-size: 16px;
    font-weight: 700;
    color: rgb(var(--color-near-black));
    margin: 0 0 4px 0;
    line-height: 1.3;
  }

  .mobile-space-item__desc {
    font-family: var(--font-family-medium);
    font-size: 13px;
    color: rgb(var(--color-text-gray));
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-space-item__arrow {
    flex-shrink: 0;
    color: rgba(var(--color-sky-blue), 1);
    display: flex;
    align-items: center;
  }

  .mobile-space-item__arrow .material-symbols-outlined {
    font-size: 20px;
  }

  .mobile-space-list:has(.mobile-space-item) ~ .school-building-container {
    display: none;
  }

  /* White panel / fixed stack (was scoped to ≤877 only) */
  .mobile-space-list {
    background-color: rgb(var(--color-white));
    max-width: 100%;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    align-self: center;
    position: fixed;
    top: 0;
  }

  .mobile-space-list__header {
    padding: 18px 20px 16px;
    justify-content: flex-end;
    position: absolute;
    right: 0;
  }

  .mobile-space-list__title {
    color: rgb(var(--color-text-gray));
    font-size: 14px;
  }

  .mobile-space-list .mobile-space-item {
    padding: 0px;
    border-bottom: none;
    gap: 0;
  }

  .mobile-space-item:nth-child(even) {
    background-color: #f5f5f5;
  }

  .mobile-space-list .mobile-space-item:hover,
  .mobile-space-list .mobile-space-item:active {
    background-color: rgb(var(--color-light-gray));
  }

  .mobile-space-item__name {
    text-transform: uppercase;
    font-size: 20px;
    margin: 0 0 2px 0;
  }

  .mobile-space-item__desc {
    font-size: 13px;
    white-space: normal;
  }

  .mobile-space-item__icon,
  .mobile-space-item__arrow {
    display: none;
  }

  .mobile-space-list__items {
    padding-top: 20px;
  }

  .space-selection-modal-overlay {
    padding: 0;
    align-items: stretch;
    z-index: 2101;
  }
  .space-selection-modal-header {
    padding: 20px 38px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    background-color: #202020;
  }


  /* Below-desktop layout: detail scene, modal, stacked tab content (tablet + mobile) */
  /* Design narrative: stacked layout */
  .design-narrative-layout, .product-carousel {
      padding: 0;
      height: auto;
      gap: 40px;
  }

  .design-narrative-split {
      flex-direction: column;
      gap: 30px;
  }

  .design-narrative-image {
      height: 300px; /* Fixed height for mobile image */
      width: 100%;
  }

  .design-narrative-text {
      overflow-y: visible; /* Let page scroll on mobile */
  }

  /* System equipment / product carousel */
  #system-equipment-content {
    min-height: 500px;
  }

  .product-carousel {
    min-height: 500px;
  }

  .product-slide {
    padding-left: 24px;
  }

  .product-overlay-card {
    width: 100%;
    max-width: 100%;
  }

  /* Space selection modal + detail scene + building / overview / narrative / popover */
  .space-selection-modal-container {
    max-height: 95vh;
    max-width: 100%;
    border-radius: 0;
  }

  .space-selection-modal-content {
    align-items: stretch;
  }

  /* Detail scene: column flex so tab content scrolls on mobile */
  #detail-scene.scene.active {
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  .detail-content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    flex-direction: column;
  }

  .detail-left-panel {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .detail-text-content {
    min-height: 0;
    height: auto;
  }

  .space-selection-modal-header-left {
    min-height: 0;
  }

  .space-selection-modal-back-btn {
    margin-top: 2px !important;
    margin-right: 6px !important;
  }

  .space-selection-modal-back-btn .material-symbols-outlined {
    font-size: 32px !important;
  }

  .space-selection-modal-title {
    order: 1;
  }

  .space-selection-modal-space-name {
    font-size: 22px;
    line-height: 1.2;
  }

  .space-selection-modal-system-name {
    font-size: 13px;
    line-height: 19px;
  }

  .space-selection-modal-tabs {
    order: 2;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .space-selection-modal-tabs::-webkit-scrollbar {
    display: none;
  }

  .space-selection-modal-tab {
    flex-shrink: 0;
    min-width: auto;
    padding: 8px 16px;
    font-size: 18px;
    height: 40px;
    white-space: nowrap;
  }

  /* Ensure only the active tab has blue background on mobile (no double-active) */
  .space-selection-modal-tab:not(.active) {
    background-color: rgb(var(--color-white));
    color: rgba(var(--color-sky-blue), 1);
    border: 1px solid rgba(var(--color-sky-blue), 1);
  }

  .space-selection-modal-share-btn {
    order: 3;
    padding: 6px 12px;
    font-size: 18px;
    margin-left: auto;
  }

  .space-selection-modal-close-btn {
    right: 12px;
    top: 12px;
    padding: 4px;
  }

  .space-selection-modal-close-btn .material-symbols-outlined {
    font-size: 28px !important;
  }

  .space-selection-modal-content {
    min-height: 0;
    align-items: stretch;
  }

  /* Detail scene: column flex so tab content area can scroll on mobile */
  #detail-scene.scene.active {
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  .detail-content {
    flex-direction: column;
    gap: 0;
    min-height: 0;
    flex: 1;
    overflow: hidden;
  }

  .detail-left-panel {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: none; /* allow flex to constrain instead */
  }

  .detail-text-content {
    min-height: 0;
    height: auto;
  }

  .school-building {
    width: 100%;
    height: 400px;
    aspect-ratio: auto;
  }

  .school-building-container {
    min-height: 320px;
  }

  .overview-full-layout {
    padding: 16px;
    min-height: 400px;
  }

  .overview-overlay-card {
    width: 100%;
    max-width: 736px;
    margin: auto;
    height: auto;
    padding: 40px 0 20px;
    box-shadow: none;
    
  }

  .overview-overlay-card h2 {
    margin: 0;
        flex: 1;
        min-width: 0;
        color: rgb(var(--color-near-black));
        font-family: var(--font-family-bold);
        font-size: 20px;
        margin-bottom: 16px;
  }

  .overview-overlay-card p,
  .overview-overlay-card li {
    font-size: 14px;
    line-height: 1.6;
  }

 

  .design-narrative-layout h2, .overview-overlay-card > p > strong {
    font-size: 20px;
    font-family: var(--font-family-bold);
  }

  .design-narrative-split {
    gap: 20px;
  }

  .design-narrative-text p,
  .design-narrative-text li {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .design-narrative-image {
    height: 508px;
  }

  /* Popover: keep on screen on small viewports */
  .space-popover {
    min-width: 508px;
    max-width: calc(100vw - 32px);
    left: 50%;
    right: auto;
  }

  .popover-content h3 {
    font-size: 18px;
  }

  .popover-body {
    padding: 14px;
  }

  .popover-view-btn {
    margin-top: 12px;
    padding: 10px 16px;
    font-size: 14px;
  }

  /* Hero */
  .hero-section {
    height: 80vh;
  }

  .hero-title {
    font-size: clamp(3rem, 12vw, 5rem);
    margin-bottom: 0;
    line-height: 1.2;
  }

  .hero-description {
    font-size: clamp(1rem, 4vw, 1.4rem);
    margin-bottom: 16px;
    padding-bottom: 18px;
  }

  .hero-buttons {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
  }

  .hero-btn {
    width: fit-content;
    max-width: 280px;
    padding: 14px 26px;
    font-size: 15px;
    gap: 0px;
    font-family: var(--font-family-bold);
    min-width: auto;
  }

  /* System equipment (mobile) */
  .product-slide {
    padding: 20px;
    align-items: flex-end;
    justify-content: center;
  }

  .product-overlay-card {
    width: 100%;
    max-height: 80%;
    padding: 20px;
  }

  .product-image-wrapper {
    height: 151px;
  }
  .carousel-dots{
    margin-bottom: 0 !important;
  }

  #system-equipment-content {
    min-height: 400px;
  }

  .product-carousel {
    min-height: 400px;
  }

  .product-slide {
    padding: 16px;
    align-items: flex-end;
  }

  .product-overlay-card {
    padding: 16px;
    max-height: 75%;
  }

  .product-card-header h3 {
    margin: 0;
    flex: 1;
    min-width: 0;
    color: rgb(var(--color-near-black));
    font-family: var(--font-family-bold);
    font-size: 20px;
  }

 

  .carousel-nav-btn {
    padding: 4px;
    
  }
  #system-equipment-content .carousel-nav-btn .material-symbols-outlined{
    font-size: 24px !important;
  }
  .product-visual-section{
    margin-bottom: 12px !important;
  }
  .hero-pro-tip {
    display: block;
  }

  /* Hide FAB when on building overview (no space selected) */
  .mobile-share-fab.is-hidden {
    display: none;
  }

 
  /* Overview: remove overlay card, stack image above text */
  .overview-full-layout.mobile-stacked {
    flex-direction: column;
    padding: 0;
    min-height: auto;
    background-size: auto;
    background-position: top center;
  }

  .overview-full-layout.mobile-stacked .overview-hero-img {
    width: 100%;
    height: 508px;
    object-fit: cover;
    flex-shrink: 0;
  }

  .overview-full-layout.mobile-stacked .overview-overlay-card {
    position: relative;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    padding: 24px 38px;
    background-color: rgb(var(--color-white));
    box-shadow: none;
    border-radius: 0;
  }

  /* Equipment: stacked layout */
  .product-slide.mobile-stacked {
    flex-direction: column;
    padding: 0;
    position: relative;
    align-items: stretch;
    justify-content: flex-start;
  }

  .product-slide.mobile-stacked .product-hero-wrap {
    position: relative;
    flex-shrink: 0;
    width: 100%;
  }

  .product-slide.mobile-stacked .product-hero-img {
    width: 100%;
    height: 508px;
    object-fit: cover;
    flex-shrink: 0;
  }

  .product-slide.mobile-stacked .product-overlay-card {
    position: relative;
    width: 100%;
    max-width: none;
    max-height: none;
    padding: 20px;
    background-color: rgb(var(--color-white));
    box-shadow: none;
    border-radius: 0;
    backdrop-filter: none;
  }

  /* Narrative: stacked layout */
  .design-narrative-layout.mobile-stacked .design-narrative-mobile-body{
    padding: 0 0 24px 0;
    gap: 0;
  }

  .narrative-hero-wrap {
    position: relative;
    flex-shrink: 0;
    width: 100%;
  }

  .narrative-hero-img {
    display: block;
    width: 100%;
    height: 508px;
    object-fit: cover;
  }

  .design-narrative-mobile-body {
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    padding-bottom: 32px;
    max-width: 736px;
    box-shadow: none;
  }

  /* Design Narrative title and Highlight Details button in one row, just below the hero */
  .design-narrative-mobile-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-shrink: 0;
    margin-bottom: 16px;
  }

  .design-narrative-mobile-header h2 {
    margin: 0;
    flex: 1;
    min-width: 0;
    color: rgb(var(--color-near-black));
    font-family: var(--font-family-bold);
    font-size: 20px;
    font-weight: 700;
    line-height: 32px;
  }

  .mobile-highlight-details-btn {
    flex-shrink: 0;
    margin-top: 0;
    display: none;
  }

  /* Let narrative text flow naturally below the header row */
  .design-narrative-text {
    max-height: none;
    overflow-y: visible;
    flex: none;
    padding-right: 0;
  }

  .design-narrative-split {
    flex-direction: column;
  }

  .design-narrative-image {
    display: none;
  }

  /* Former ≤480px refinements (single mobile tier) */
  .school-building {
    height: 320px;
  }

  .school-building-container {
    min-height: 280px;
  }

  .space-selection-modal-space-name {
    font-size: 18px;
  }

  .space-selection-modal-tab {
    padding: 0px 20px;
    font-size: 18px;
    height: 50px;
    font-family: var(--font-family-bold);
  }
 

  

  .design-narrative-image {
    height: 180px;
  }

  /* Keep detail scene scrollable; only adjust gap on smallest screens */
  .detail-content {
    gap: 20px;
  }

  /* Hero (tighter mobile) */
  .hero-section {
    height: 70vh;
    min-height: 400px;
    margin: 0 -38px;
  }

  .hero-content {
    padding: 0 16px;
  }

  .hero-title {
    font-size: clamp(2.5rem, 15vw, 4rem);
  }

  .hero-description {
    font-size: clamp(0.9rem, 5vw, 1.2rem);
  }

  #system-equipment-content {
    min-height: 100%;
    overflow: auto;
  }

  .product-carousel {
    min-height: 360px;
  }

  .product-slide {
    padding: 12px;
  }

  .product-overlay-card {
    padding: 40px 0 !important;
    margin: 0 auto;
    gap: 24px;
    max-height: 100% !important;
    overflow: auto;
    max-width: 736px;
    box-shadow: none;
  }
 

  /* Narrative glossary modal: comfortable padding on narrow viewports */
  .cgh-mc-modal.cgh-mc-modal--narrative {
    padding-top: 1rem;
  }
  .product-overlay-card .btn-secondary-small {
    height: 50px !important;
    font-size: 18px !important;
    margin-top: 40px;
    margin-bottom: 26px;
  }
  .narrative-hero-share-btn{
    display: none;
  }
  .carousel-nav-btn {
    top: 50px;
  }
  .mobile-space-item__info, .product-slide.mobile-stacked .product-overlay-card {
    max-width: 736px;
    margin: auto
  }
}
@media (max-width: 877px) {
  
  /* Share icon overlapping bottom-right of hero image (custom icon, white border) */
  .narrative-hero-share-btn {
    position: absolute;
    bottom: -18px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(var(--color-sky-blue), 1);
    border: 2px solid rgb(var(--color-white));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(var(--color-near-black), 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 1;
  }
  .overview-overlay-card{
    box-shadow: none;
  }

  .narrative-hero-share-btn:active {
    transform: scale(0.92);
  }

  .narrative-hero-share-btn .material-symbols-outlined {
    font-size: 24px;
    color: rgb(var(--color-white));
  }
  .mobile-highlight-details-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    height: 24px;
    box-sizing: border-box;
    border: none;
    padding: 0 10px;
    border-radius: 11px;
    background-color: rgb(var(--color-near-black));
    color: rgb(var(--color-white));
    font-family: var(--font-family-bold);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 16px;
    transition: background-color 0.2s ease;
  }

  .mobile-highlight-details-btn:active {
    background-color: rgba(31, 31, 31, 1);
  }
  .space-selection-modal-tab {
    font-size: 11px;
    height: 28px;
    padding: 0 7px;
    white-space: nowrap !important;
    letter-spacing: 0;
    font-family: var(--font-family-semi-bold) !important;
    font-weight: 600 !important;
    border: 0 !important;
}

  .space-selection-modal-share-btn {
    display: none;
  }
  .product-overlay-card .btn-secondary-small{
    height: 36px !important;
    font-size: 14px !important;
    padding: 0 20px !important;
    font-family: var(--font-family-medium) !important;
  }

  
  .overview-overlay-card, .product-overlay-card, .design-narrative-mobile-body, .space-selection-modal-header-left, .space-selection-modal-tabs {
    max-width: 332px;
    width: 100%;
    margin: auto;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-shadow: none;
  }
  .space-selection-modal-tabs{
    gap: 10px;
    padding: 0 16px !important;
  }
  .space-selection-modal-space-name{
    font-size: 20px;
    font-family: var(--font-family-bold);
  }
  
  .design-narrative-mobile-header h2, .product-card-header h3, .overview-overlay-card h2{
    line-height: normal;
  }
  .mobile-space-item__info, .product-slide.mobile-stacked .product-overlay-card {
    max-width: 332px;
    margin: auto
  }
  .space-selection-modal-header {
    padding: 17px 0 15px;
    gap: 19px;
  }
  .space-selection-modal-tabs .space-selection-modal-tab:nth-child(1) {
    width: 68px !important;
  }
  
  .space-selection-modal-tabs .space-selection-modal-tab:nth-child(2) {
    width: 119px !important;
  }
  
  .space-selection-modal-tabs .space-selection-modal-tab:nth-child(3) {
    width: 107px !important;
  }
  .design-narrative-image, 
  .space-popover, 
  .narrative-hero-img, 
  .product-slide.mobile-stacked .product-hero-img, 
  .overview-full-layout.mobile-stacked .overview-hero-img {
    height: 236px;
  }
  .design-narrative-layout, .product-carousel{
    gap: 24px;
  }
  .design-narrative-mobile-header{
    margin-bottom: 9px;
  }
  .mobile-highlight-details-btn{
    margin-top: 0;
  }
  .design-narrative-layout.mobile-stacked .design-narrative-mobile-body{
    gap: 8px;
  }
  .overview-overlay-card, .product-overlay-card{
    padding: 24px 0 16px !important;
  }
}

/* ==========================================================================
   Intermediate tablet tier (878px – 1023px):
   Keep the modal tabs legible and single-line before dropping to the compact
   mobile sizing at ≤877px. Prevents the jump from 18px to 12px.
   ========================================================================== */
@media (min-width: 878px) and (max-width: 1023px) {
  .space-selection-modal-tab {
    font-size: 16px;
    height: 44px;
    padding: 0 18px;
    white-space: nowrap;
  }

  .space-selection-modal-tabs {
    gap: 14px;
  }
}
@media (max-height: 800px) {
  .space-selection-modal-container {
    max-height: 100%;
  }
}
/* ==========================================================================
   Landscape-specific refinements for short-height viewports (mobile + small
   tablet landscape). Keeps the hero from being oversized and stops tab text
   from wrapping even on extreme narrow landscape widths.
   ========================================================================== */
@media (orientation: landscape) and (max-height: 500px) {
  .hero-section {
    height: auto;
    min-height: 360px;
    max-height: none;
    padding-top: 24px;
    padding-bottom: 24px;
    margin-bottom: 24px;
  }

  .hero-title {
    font-size: 42px;
    margin-bottom: 0;
  }

  .hero-description {
    font-size: clamp(0.85rem, 2.6vw, 1.1rem);
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .hero-buttons {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
  }

  .hero-btn {
    height: 44px;
    padding: 0 18px;
    font-size: 15px;
    min-width: auto;
    white-space: nowrap;
  }

  /* Allow modal to take full viewport in landscape mobile */
  .space-selection-modal-container {
    max-height: 100vh;
    height: 100vh;
  }

  .space-selection-modal-header {
    padding: 10px 20px;
    gap: 8px;
  }

  .space-selection-modal-space-name {
    font-size: 18px;
    line-height: 1.15;
  }

  .space-selection-modal-tab {
    font-size: 13px;
    height: 32px;
    padding: 0 12px;
    white-space: nowrap;
  }

  .space-selection-modal-tabs {
    gap: 10px;
  }

  /* Give product / overview image sections a reasonable landscape height */
  .overview-full-layout.mobile-stacked .overview-hero-img,
  .product-slide.mobile-stacked .product-hero-img,
  .narrative-hero-img {
    height: 240px;
  }

  .school-building {
    height: 260px;
  }

  .school-building-container {
    min-height: 220px;
  }
}

/* ==========================================================================
   Portrait-specific safeguards for narrow widths — ensure that on portrait
   phones (≤480px width) the modal tabs remain on one line even when the
   three labels are long, and the hero buttons stack gracefully.
   ========================================================================== */
@media (orientation: portrait) and (max-width: 480px) {
  .space-selection-modal-tabs {
    gap: 8px;
    padding-bottom: 4px;
  }

  .space-selection-modal-tab {
    font-size: 12px;
    height: 32px;
    padding: 0 10px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .hero-btn {
    width: 100%;
    max-width: 320px;
  }
}

/* ==========================================================================
   Universal safeguard — regardless of media query stacking order, the three
   modal tab labels must never wrap onto multiple lines. This is a defensive
   rule with high specificity so that any future override keeps the contract.
   ========================================================================== */
.space-selection-modal-tabs .space-selection-modal-tab,
.space-selection-modal-tabs > button.space-selection-modal-tab {
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

/* ==========================================================================
   Responsive hardening pass — added to address issues found during
   mobile/tablet QA (Galaxy S20 360w clip, landscape short-height scroll,
   narrative glossary modal off-screen, iOS scroll momentum). Additive rules
   only — prior declarations are preserved.
   ========================================================================== */

/* iOS momentum scrolling inside the modal container and detail panel so the
   body-scroll-lock applied in JS does not kill touch scrolling. */
.space-selection-modal-overlay,
.space-selection-modal-container,
.detail-left-panel,
.mobile-space-list__items {
  -webkit-overflow-scrolling: touch;
}

/* Samsung Galaxy S20 / narrow phones (≤380w): the existing max-width: 332px
   cap at ≤877w becomes a hard clip when the parent adds padding. Expand the
   cap to the available viewport minus a safe gutter so content never clips
   horizontally, while preserving the centered narrow look. */
@media (max-width: 380px) {
  .overview-overlay-card,
  .product-overlay-card,
  .design-narrative-mobile-body,
  .space-selection-modal-header-left,
  .space-selection-modal-tabs,
  .mobile-space-item__info,
  .product-slide.mobile-stacked .product-overlay-card {
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
  }

  .space-selection-modal-tabs {
    gap: 6px;
    padding: 0 6px !important;
  }

  .space-selection-modal-tab {
    font-size: 11px;
    padding: 0 8px;
  }
}

/* Landscape short-height viewports (phones in landscape, ~390–430 tall):
   ensure the modal chrome is sticky/compact and the content region is
   scrollable within the remaining height. Extends the existing landscape
   media query without overriding its values. */
@media (orientation: landscape) and (max-height: 500px) {
  .space-selection-modal-overlay {
    overflow-y: auto;
  }

  .space-selection-modal-container {
    display: flex;
    flex-direction: column;
  }

  .space-selection-modal-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Prevent Design Narrative glossary modal from being pushed off-screen
     on landscape phones where available height is tiny. */
  .cgh-mc-modal.cgh-mc-modal--narrative {
    padding-top: 20px;
    align-items: center;
  }
}

/* Narrative glossary modal responsive padding — the fixed 150px padding-top
   pushes the dialog off-screen on short viewports. Reduce progressively. */
@media (max-height: 700px) {
  .cgh-mc-modal.cgh-mc-modal--narrative {
    padding-top: 80px;
  }
}

@media (max-height: 500px) {
  .cgh-mc-modal.cgh-mc-modal--narrative {
    padding-top: 40px;
    align-items: center;
  }
}

/* Narrative glossary modal body width at ≤480w — the 462px width declared
   at desktop sizing overflows narrow phones. Keep it fluid. */
@media (max-width: 480px) {
  .cgh-mc-modal.cgh-mc-modal--narrative .cgh-mc-modal__title,
  .cgh-mc-modal.cgh-mc-modal--narrative .cgh-mc-modal__body,
  .cgh-mc-modal.cgh-mc-modal--narrative .cgh-narrative-modal-description {
    width: auto;
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
  }
}

/* Product carousel card on ≤877w: relax fixed image height so long product
   descriptions do not cause the overlay card to clip, and allow the card
   body to scroll when content exceeds the available height. */
@media (max-width: 877px) {
  .product-overlay-card {
    max-height: none;
    min-height: 0;
  }

  .product-overlay-card .product-card-body,
  .product-overlay-card .product-card-body-inner {
    overflow-wrap: break-word;
    word-wrap: break-word;
  }

  .tab-content img,
  .product-slide img,
  .overview-full-layout img,
  .design-narrative-layout img {
    max-width: 100%;
    /* height: auto; */
  }
}

/* Safe-area insets for iPhone notch / home indicator — keep the close btn
   and share FAB inside the reachable area. */
@supports (padding: max(0px)) {
  .space-selection-modal-close-btn {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
  }

  #mobile-share-fab {
    bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
  }
}

/* Body scroll-lock helper class (applied by JS). Using a class rather than
   inline styles so we can remove cleanly on close and play nicely with iOS
   which ignores `overflow: hidden` on body in some cases. */
body.space-modal-open {
  position: fixed;
  width: 100%;
  overflow: hidden;
}
@media (min-width: 1285px) and (min-height: 800px) {
  .space-selection-modal-container {
    max-height: 695px;
    min-height: 695px;
    height: 695px;
  }
  #overview-content, .space-selection-modal-content, .scene.active, .overview-full-layout, #system-equipment-content, .product-carousel, #design-narrative-content {
    padding-top: 0;
    max-height: 600px;
    min-height: 600px;
    height: 600px;
  }  
  .overview-overlay-card, .product-overlay-card {
    margin: 0;
    max-height: 520px;
    min-height: 520px;
    height: 520px;
  }   
  .product-overlay-card, .overview-overlay-card {
    margin-top: 30px;
  } 
  #design-narrative-content{
    padding-top: 30px;
  }
  .design-narrative-layout{
    padding-top: 0;
    padding-bottom: 0;
    max-height: 520px;
    min-height: 520px;
    height: 520px;
  }
  .design-narrative-text, .design-narrative-image {
    flex: 1;
    height: 100%;
    max-height: 100%;
  }
}
/* 1024–1284w + tall-enough viewports: lock the modal to its designed
   775/600/520 sizes. Requires ≥800px of viewport height so the 775px
   modal plus browser chrome actually fits on screen. */
@media (min-width: 1024px) and (max-width: 1284px) and (min-height: 800px) {
  .space-selection-modal-container {
    max-height: 775px;
    min-height: 775px;
    height: 775px;
  }
  #overview-content, .space-selection-modal-content, .scene.active, .overview-full-layout, #system-equipment-content, .product-carousel, #design-narrative-content {
    padding-top: 0;
    max-height: 600px;
    min-height: 600px;
    height: 600px;
  }  
  .overview-overlay-card, .product-overlay-card {
    margin: 0;
    max-height: 520px;
    min-height: 520px;
    height: 520px;
  }   
  .product-overlay-card, .overview-overlay-card {
    margin-top: 30px;
  } 
  #design-narrative-content{
    padding-top: 30px;
  }
  .design-narrative-layout{
    padding-top: 0;
    padding-bottom: 0;
    max-height: 520px;
    min-height: 520px;
    height: 520px;
  }
  .design-narrative-text, .design-narrative-image {
    flex: 1;
    height: 100%;
    max-height: 100%;
  }
}

/* 1024–1284w + short viewports (<800h): the 775px modal can't fit, so
   let it shrink to the viewport and scroll internally instead of
   clipping off-screen. Uses dvh where supported so iOS Safari's URL-bar
   collapse doesn't chop the modal.

   Key rule: every intermediate container that is either (a) a
   positioning parent for absolute children, or (b) a flex parent with
   `flex: 1` descendants, MUST have a DEFINITE height — not `auto`.
   Otherwise `.product-slide` (position: absolute; height: 100%)
   collapses and `.design-narrative-split { flex: 1 }` can't claim the
   remaining space. */
@media (min-width: 1024px) and (max-width: 1284px) and (max-height: 799px) {
  /* Outermost modal shell — shrinks to content, capped by viewport. */
  .space-selection-modal-container {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    min-height: 0;
    height: auto;
  }

  /* Tab body + its direct flex ancestors: definite height so nested
     position:absolute slides and flex:1 children can resolve. */
  .space-selection-modal-content,
  .scene.active,
  #overview-content,
  #system-equipment-content,
  #design-narrative-content,
  .overview-full-layout,
  .product-carousel {
    padding-top: 0;
    height: calc(100vh - 200px);
    height: calc(100dvh - 200px);
    max-height: calc(100vh - 200px);
    max-height: calc(100dvh - 200px);
    min-height: 0;
  }

  /* Overview tab scrolls at the tab level if the overlay card is tall. */
  #overview-content {
    overflow-y: auto;
  }
  /* System Equipment: carousel clips its absolute-positioned slides. */
  #system-equipment-content,
  .product-carousel {
    overflow: hidden;
  }
  /* Design narrative: no tab-level scroll — the text column handles it. */
  #design-narrative-content {
    overflow: hidden;
    padding-top: 30px;
  }

  /* Overview + Product overlay cards + narrative layout: definite
     height, capped to what fits above the modal chrome. */
  .overview-overlay-card,
  .product-overlay-card,
  .design-narrative-layout {
    margin: 0;
    height: calc(100vh - 280px);
    height: calc(100dvh - 280px);
    max-height: calc(100vh - 280px);
    max-height: calc(100dvh - 280px);
    min-height: 0;
  }
  .overview-overlay-card,
  .product-overlay-card {
    margin-top: 30px;
  }

  /* ---- System Equipment: product overlay card internals ---- */

  /* Tighten padding so the image + body both fit in the shorter card. */
  .product-overlay-card {
    padding: 30px 28px;
    gap: 0;
  }
  /* Shrink the image slot so the body has more room to scroll. */
  .product-image-wrapper {
    height: 110px;
    margin-bottom: 12px;
  }
  .product-visual-section {
    margin-bottom: 16px;
  }
  /* Info section is a flex:1 child — chain min-height:0 so the nested
     .product-body-content can actually scroll. */
  .product-info-section {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }
  .product-body-content {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
  }

  /* ---- Design Narrative: layout + split internals ---- */

  .design-narrative-layout {
    padding-top: 0;
    padding-bottom: 0;
    gap: 16px;
  }

  /* Split row: flex:1 inside a layout with definite height now
     resolves correctly. min-height:0 allows it to shrink. */
  .design-narrative-split {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    gap: 30px;
    overflow: hidden;
  }

  /* Text column: min-height:0 is the critical bit — without it the
     flex item refuses to shrink below content and `overflow-y: auto`
     never activates. */
  .design-narrative-text {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
    max-height: 100%;
    overflow-y: auto;
    padding-right: 12px;
  }

  /* Image column: contain the image within the split's height and
     prevent it from pushing the row taller than the modal. */
  .design-narrative-image {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
    max-height: 100%;
    overflow: hidden;
  }
  .design-narrative-image img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }
}