/* IV course popup on the home page (inc/iv-popup.php). Figma 5221:692. */

.iv-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.iv-popup[hidden] {
  display: none;
}

.iv-popup.is-open {
  opacity: 1;
}

.iv-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.iv-popup__dialog {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 900px;
  max-width: 100%;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  border-radius: 8px;
  background: #ede4db;
  transform: translateY(16px);
  transition: transform 0.3s ease;
}

.iv-popup.is-open .iv-popup__dialog {
  transform: none;
}

.iv-popup__text {
  position: relative;
  display: flex;
  flex: 0 0 460px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  min-height: 414px;
  padding: 44px 48px;
  overflow: hidden;
  box-sizing: border-box;
}

.iv-popup__circles {
  position: absolute;
  top: 278.74px;
  left: 309.74px;
  width: 240px;
  height: 240px;
  pointer-events: none;
}

.iv-popup__logo {
  position: absolute;
  top: 30.94px;
  left: 360px;
  width: 70px;
  height: 65.625px;
  object-fit: contain;
}

.iv-popup__head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.iv-popup__badge {
  padding: 4px 10px;
  border-radius: 4px;
  background: #561e12;
  color: #ede4db;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: normal;
}

.iv-popup__title {
  margin: 0;
  color: #561e12;
  font-family: "Unbounded", sans-serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
}

.iv-popup__btn {
  position: relative;
  padding: 16px 32px;
  border-radius: 2px;
  background: #d68e78;
  color: #561e12;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: normal;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.iv-popup__btn:hover,
.iv-popup__btn:focus-visible {
  background: #c97c65;
  color: #561e12;
}

.iv-popup__photo {
  flex: 0 0 440px;
  min-height: 414px;
}

.iv-popup__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Faces sit at ~50% / 38% of the photo: keep them in frame at any crop. */
  object-position: 50% 38%;
}

.iv-popup__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #ede4db;
  color: #561e12;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.iv-popup__close:hover {
  background: #fff;
}

body.iv-popup-open {
  overflow: hidden;
}

/* No mobile design in Figma: photo on top, text below. */
@media (max-width: 899px) {
  .iv-popup__dialog {
    flex-direction: column-reverse;
    width: 440px;
    overflow-y: auto;
  }

  .iv-popup__text,
  .iv-popup__photo {
    flex: none;
    min-height: 0;
  }

  .iv-popup__photo {
    height: clamp(120px, calc(100vh - 420px), 240px);
  }

  .iv-popup__text {
    gap: 20px;
    padding: 28px 24px 32px;
  }

  .iv-popup__logo {
    top: 24px;
    right: 24px;
    left: auto;
    width: 52px;
    height: 49px;
  }

  .iv-popup__circles {
    top: auto;
    right: -110px;
    bottom: -120px;
    left: auto;
  }

  .iv-popup__title {
    font-size: 22px;
  }

  .iv-popup__btn {
    align-self: stretch;
    text-align: center;
  }
}
