/* Figure-8 dual ellipse carousel — housing bodies left, covers right */

.housing-dual-ellipse {
  padding: 2.5rem 0 2rem;
  background: var(--background);
}

.housing-dual-ellipse__intro {
  max-width: 760px;
  margin: 0 auto 1.25rem;
}

.housing-dual-ellipse__subtitle {
  margin-top: 0.75rem;
  color: var(--gray-600);
}

.housing-dual-ellipse__stage {
  position: relative;
  width: min(98vw, 1080px);
  height: min(62vh, 540px);
  margin: 0 auto;
  border-radius: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  background: transparent;
  box-shadow: none;
}

[data-theme="light"] .housing-dual-ellipse__stage {
  background: transparent;
  box-shadow: none;
}

.housing-dual-ellipse__stage.is-dragging {
  cursor: grabbing;
}

.housing-dual-ellipse__stage canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.housing-dual-ellipse__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 2;
}

[data-theme="light"] .housing-dual-ellipse__loading {
  color: var(--gray-600);
}

.housing-dual-ellipse__loading.is-hidden {
  opacity: 0;
}

.housing-dual-ellipse__assembly-label {
  position: absolute;
  left: 50%;
  top: 8%;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  max-width: min(92vw, 560px);
  text-align: center;
  color: #ffffff;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.55),
    0 8px 28px rgba(0, 0, 0, 0.45),
    0 0 48px rgba(0, 168, 232, 0.35);
  opacity: 0;
  transition: opacity 0.35s ease;
  user-select: none;
}

.housing-dual-ellipse__assembly-label-title {
  font-family: var(--font-heading, 'Barlow Condensed', 'Arial Narrow', sans-serif);
  font-size: clamp(1.1rem, 3.2vw, 1.65rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.housing-dual-ellipse__assembly-label-sub {
  font-family: var(--font-body, 'Geologica', system-ui, sans-serif);
  font-size: clamp(0.8rem, 2.2vw, 1rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  opacity: 0.92;
}

.housing-dual-ellipse__assembly-label.is-visible {
  opacity: 1;
}

[data-theme="light"] .housing-dual-ellipse__assembly-label {
  color: #0a2540;
  text-shadow:
    0 2px 4px rgba(255, 255, 255, 0.85),
    0 6px 20px rgba(255, 255, 255, 0.65),
    0 0 32px rgba(0, 142, 201, 0.2);
}

@media (max-width: 640px) {
  .housing-dual-ellipse__stage {
    width: min(98vw, 100%);
    height: min(52vh, 380px);
  }

  .housing-dual-ellipse__stage--hero {
    height: min(42vh, 320px);
  }
}

/* Hero column — 3D assembly beside headline */
.page-hero__product--3d {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  overflow: visible;
}

.housing-dual-ellipse__stage--hero {
  width: 100%;
  max-width: 640px;
  height: min(54vh, 500px);
  margin: 0 0 0 auto;
}

.page-hero .housing-dual-ellipse__loading {
  color: rgba(255, 255, 255, 0.75);
}

.page-hero .housing-dual-ellipse__assembly-label {
  top: 6%;
}

@media (max-width: 960px) {
  .page-hero__content {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .page-hero__product--3d {
    justify-content: center;
    width: 100%;
  }

  .housing-dual-ellipse__stage--hero {
    max-width: 100%;
    height: min(46vh, 400px);
    margin: 0 auto;
  }
}

/* Divi hero iframe — /embed/housing-assembly?variant=hero (full-width stack) */
.housing-dual-ellipse__stage--embed-hero {
  width: 100%;
  max-width: min(1100px, 96vw);
  height: min(52vh, 680px);
  margin: 0 auto;
  min-height: 0;
}

@media (max-width: 980px) {
  .housing-dual-ellipse__stage--embed-hero {
    max-width: 100%;
    height: 480px;
  }
}

@media (max-width: 640px) {
  .housing-dual-ellipse__stage--embed-hero {
    height: min(42vh, 380px);
  }
}

html.exb-embed .housing-dual-ellipse__assembly-label {
  color: #ffffff;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.55),
    0 8px 28px rgba(0, 0, 0, 0.45),
    0 0 48px rgba(0, 168, 232, 0.35);
}

html.exb-embed .housing-dual-ellipse__loading {
  color: rgba(255, 255, 255, 0.75);
}
