/* ==========================================================================
   Home Hero Component - Dynamic Constellation Version
   ========================================================================== */

.section--hero {
  position: relative;
  background-color: var(--nebula-blue, #313A4C); /* Deep blue base color */
  z-index: 1;
}

/* --- BACKGROUND LAYER --- */
/* Target for the Nebula Constellation Generator */
.hero__background {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  /* Dynamically stops where the media or white box begins */
  bottom: var(--media-half-height, 0px); 
  margin-left: -50vw;
  background-position: center center;
  background-size: cover; 
  background-repeat: no-repeat;
  z-index: 0; 
  pointer-events: none;
}

/* REMOVED: .hero__background-overlay 
   Removing this ensures the constellation shapes are fully visible 
   without being dimmed by the 80% opacity blue layer.
*/

/* 1. Layout Adjustments */
.section--hero.has-video,
.section--hero.has-image {
  padding-bottom: 0 !important;
}

/* 2. White Bleed Effect */
/* This creates the white background that covers the bottom half of the media */
.hero__video::before,
.hero__image::before {
  content: "";
  display: block;
  position: absolute;
  top: 50%; 
  bottom: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  background-color: #var(--nebula-white, #FFFFFF);
  opacity: 0.8;
  z-index: -1; 
}

.hero__wrap {
  padding: 0 20px;
  position: relative;
  z-index: 2; /* Keeps content above the background pattern */
}

@media screen and (min-width: 1024px) {
  .hero__wrap {
    padding: 0 40px;
  }
}

.hero__inner {
  max-width: 1540px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__heading {
  max-width: 1075px;
  margin: 0 auto 20px auto;
  text-align: center;
}

.hero__heading h1 {
  /* Ensure title is legible against the dark background */
  color: var(--nebula-white, #FFFFFF);
}

.hero__heading strong {
  font-weight: 700;
  color: var(--aurora-green, #BAD532);
}

.hero__text {
  max-width: 1075px;
  margin: 0 auto 20px auto;
  padding: 0 0 25px 0;
  text-align: center;
  color: var(--nebula-white, #FFFFFF);
}

.hero__action {
  display: flex;
  justify-content: center;
  padding: 0 0 25px 0;
  position: relative;
  z-index: 2;
}

/* Media Containers (Video/Image) */
.hero__video,
.hero__image {
  padding-top: 20px;
  position: relative;
  z-index: 1;
}

.vimeo-embed {
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  width: 80%;
  margin: 0 auto;
  aspect-ratio: 16/9;
  border-radius: 22px;
  overflow: hidden;
  z-index: 1;
}

@media (min-width: 48em) {
  .vimeo-embed {
    border-radius: 45px;
  }
}

.hero__image img {
  border-radius: 22px;
}

@media (min-width: 48em) {
  .hero__image img {
    border-radius: 45px;
  }
}

.vimeo-embed img,
.vimeo-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  object-fit: cover;
}

/* Play Button Styling */
.vimeo-embed__overlay-link {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 99;
  cursor: pointer;
}

.vimeo-embed__overlay-link:hover .vimeo-embed__button {
  background-color: var(--nebula-blue, #313A4C);
}

.vimeo-embed__button {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--aurora-green, #BAD532);
  transition: all 0.3s ease-in-out;
}

.vimeo-embed__button:before {
  content: "";
  display: block;
  width: 0px;
  height: 0px;
  border-style: solid;
  border-width: 15px 0 15px 25px;
  border-color: transparent transparent transparent var(--nebula-blue, #313A4C);
  transform: translateX(3px);
}

@media (min-width: 48em) {
  .vimeo-embed__button {
    width: 120px;
    height: 120px;
  }
  .vimeo-embed__button:before {
    border-width: 30px 0 30px 50px;
    transform: translateX(6px);
  }
}

.vimeo-embed iframe:not([src=""]) + .vimeo-embed__overlay-link {
  display: none;
}

/* Post Overrides */
body.single-post .section--hero {
  background-color: var(--nebula-blue, #313A4C);
}

body.single-post .section--hero .hero__image {
  text-align: center;
}

body.single-post .section--hero .hero__image img {
  object-fit: cover;
  object-position: 50% 50%;
  width: 100%;
  height: clamp(200px, 45vw, 600px) !important;
}