/**
 * Spartan Osteocare - Ultra-Realistic Interactive 3D Spine Stylesheet
 * Integrates directly into the homepage hero section.
 */

#spine-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 540px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  background: transparent;
}

@media (min-width: 1024px) {
  .spartan-hero {
    height: calc(100vh - 117px) !important;
    min-height: calc(100vh - 117px) !important;
    max-height: calc(100vh - 117px) !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .spartan-hero .relative.max-w-7xl {
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    align-items: center !important;
  }

  .spartan-hero .grid {
    height: 100% !important;
    width: 100% !important;
    align-items: center !important;
  }

  .spartan-hero-text-col {
    grid-column: span 6 / span 6 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 0.85rem !important;
  }

  .spartan-hero-spine-col {
    grid-column: span 6 / span 6 !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #spine-stage {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
  }
}

@media (min-width: 1024px) and (max-height: 820px) {
  .spartan-hero h1 {
    font-size: 2.35rem !important;
    line-height: 1.12 !important;
  }
  .spartan-hero p {
    font-size: 0.875rem !important;
    line-height: 1.45 !important;
  }
  .spartan-hero .btn-reserve-slot,
  .spartan-hero a[href="#modalities"] {
    padding: 0.65rem 1.4rem !important;
    font-size: 0.875rem !important;
  }
  .spartan-hero .spartan-hero-heritage-top-banner {
    margin-bottom: 0.25rem !important;
  }
  .spartan-hero .border-t {
    padding-top: 0.65rem !important;
    margin-top: 0.25rem !important;
  }
}

@media (max-width: 1023px) {
  #spine-stage {
    width: 100% !important;
    height: 560px !important;
    min-height: 560px !important;
  }
}

#spine-poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  transition: opacity 0.6s ease-out;
}

#spine-canvas {
  position: relative;
  z-index: 2;
  display: block;
  width: 100% !important;
  height: 100% !important;
  outline: none;
  cursor: default;
  touch-action: pan-y;
}

#spine-canvas:active {
  cursor: default;
}

/* Non-overlapping clinical callout card positioned safely on the right side of the spine */
#bone-label {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) translateY(8px);
  min-width: 185px;
  max-width: 220px;
  padding: 12px 14px;
  border: 1px solid rgba(215, 25, 32, 0.28);
  border-left: 4px solid #d71920;
  border-radius: 12px;
  color: #141414;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(18, 16, 14, 0.12), 0 2px 6px rgba(215, 25, 32, 0.08);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 20;
}

#bone-label.visible {
  opacity: 1 !important;
  transform: translateY(-50%) translateY(0);
}

.label-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d71920;
  background: rgba(215, 25, 32, 0.08);
  padding: 2px 7px;
  border-radius: 999px;
  margin-bottom: 5px;
}

.label-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #171717;
  line-height: 1.25;
  margin-bottom: 3px;
}

.label-sub {
  font-size: 11px;
  font-weight: 500;
  color: #57534e;
  line-height: 1.35;
}

/* Responsive mobile placement so the label never overlaps the bone */
@media (max-width: 640px) {
  #spine-stage {
    min-height: 460px;
  }
  #bone-label {
    left: auto;
    right: 12px;
    top: 12px;
    bottom: auto;
    transform: translateY(-6px);
    min-width: 155px;
    max-width: 58vw;
    padding: 9px 11px;
  }
  #bone-label.visible {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #bone-label {
    transition: none !important;
  }
}
