/*------------------------------------*\
    
    Half & Half Image + Text Block
    Full-height media with text column. Figma: idk-bcd-redesign-jb-edits-CURRENT
    (Half Text & Half Full-Height Media). Uses design tokens from custom-properties.css.

    Layout:
    - Mobile through 1024px: stacked (image on top, text below; column-reverse).
    - 1025px+: 50 / 50 row, image object-fit cover fills its half.
    - half-and-half--media-right: text left, image right (default row).
    - half-and-half--media-left: row-reverse so image is left, text right.

    Legacy: .half-and-half.white-bg / .gray-bg still map to backgrounds.

\*------------------------------------*/

.half-and-half__flex {
  display: flex;
  flex-direction: column-reverse;
  flex-wrap: nowrap;
  align-items: stretch;
}

.half-and-half {
  width: 100%;
  max-width: none;
  overflow: hidden;
}

/*
 * Full-bleed row: no max-width or side padding on the outer shell so the
 * section spans the full viewport (image and text halves edge to edge).
 */
.half-and-half__container {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

.half-and-half--bg-off-white {
  background-color: var(--color-off-white);
}

.half-and-half--bg-white,
.half-and-half.white-bg {
  background-color: var(--color-white);
}

.half-and-half.gray-bg {
  background-color: #f7f7f7;
}

.half-and-half-image,
.half-and-half-text {
  position: relative;
  flex: 1 1 100%;
  min-width: 0;
}

.half-and-half-image {
  min-height: 200px;
  height: 200px;
  overflow: hidden;

}

.half-and-half-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.half-and-half-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 52px;
  padding-bottom: var(--section-margins);
  padding-left: var(--container-padding-left);
  padding-right: var(--container-padding-right);
}



/* Taller media band on tablet while layout stays stacked (768px-1024px). */
@media (min-width: 768px) and (max-width: 1024px) {
  .half-and-half-image {
    min-height: 400px;
    height: 400px;
  }
}

.video-button {
  position: absolute;
  top:0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: none !important;
  text-decoration: none;
  border-radius: 20px;
  overflow: hidden;

  color: var(--color-quaternary) !important;
}
.video-button::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(0deg, var(--color-primary-50) 0%, var(--color-primary-50) 100%);
}
.bg-light .video-button::before{
  background: linear-gradient(101deg, var(--color-primary) 0%, var(--color-secondary) 33%, var(--color-tertiary) 66%, var(--color-quaternary) 100%);
  opacity: 0.9;
}
.video-button span {
  width: 65px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--color-white);
  aspect-ratio: 1/1;
  font-size: 22px;
  z-index: 1;
  box-sizing: border-box;
  border: 2px solid var(--color-white);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.22));
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  color: var(--color-quaternary);
}

@keyframes half-image-text-video-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
  }
  100% {
    box-shadow: 0 0 0 16px rgba(255, 255, 255, 0);
  }
}

.video-button:hover span,
.video-button:focus-visible span {
  animation: half-image-text-video-pulse 1.2s ease-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .video-button:hover span,
  .video-button:focus-visible span {
    animation: none;
  }
}

@media(min-width:768px) {
  .video-button span { 
    width: 100px;
    height: 100px;
    font-size: 30px;
  }
}

@media (min-width: 1025px) {
  .half-and-half__flex {
    flex-direction: row;
    align-items: stretch;
  }

  .half-and-half--media-left .half-and-half__flex {
    flex-direction: row-reverse;
  }

  .half-and-half-image,
  .half-and-half-text {
    flex: 1 1 50%;
    max-width: 50%;
  }

  .half-and-half-image {
    min-height: 400px;
    height: auto;
    align-self: stretch;
  }

  .half-and-half-image img {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
  }

  .half-and-half-text {
    padding-top: var(--section-margins);
    padding-bottom: var(--section-margins);
    padding-left: var(--container-padding-left);
    padding-right: 52px;
    justify-content: center;
  }

  .half-and-half--media-left .half-and-half-text {
    padding-left: 52px;
    padding-right: var(--container-padding-right);
  }

  .half-and-half--media-right .half-and-half-text {
    padding-right: 52px;
    padding-left: var(--container-padding-left);
  }

}

@media (min-width: 1200px) {
  .half-and-half-text {
    padding-left: var(--container-padding-left);
    padding-right: 63px;
  }

  .half-and-half--media-left .half-and-half-text {
    padding-left: 63px;
    padding-right: var(--container-padding-right);
  }

  .half-and-half--media-right .half-and-half-text {
    padding-right: 63px;
    padding-left: var(--container-padding-left);
  }
}

@media (min-width: 1367px) {
  .half-and-half-text {
    padding-right: 80px;
  }

  .half-and-half--media-left .half-and-half-text {
    padding-left: 80px;
    padding-right: var(--container-padding-right);
  }

  .half-and-half--media-right .half-and-half-text {
    padding-right: 80px;
    padding-left: var(--container-padding-left);
  }
}
