/* v3 why_nova. Figma: Why Nova Partner? 10905:6713 (1440), mobile 11295:9970 (430) */
.v3-why {
  --v3-why-lines: calc(var(--v3-gutter) - 12px);
  background: var(--v3-bg-gray);
  overflow: hidden;
  isolation: isolate;
}
.v3-why::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg, var(--v3-gray-50) 0 3px, transparent 3px 5px) var(--v3-why-lines) 0 / 1px 100% no-repeat,
    repeating-linear-gradient(180deg, var(--v3-gray-50) 0 3px, transparent 3px 5px) calc(100% - var(--v3-why-lines)) 0 / 1px 100% no-repeat;
}
@media (min-width: 1440px) {
  .v3-why::before { background: url("../../../images/v3/why_nova/decorative-lines.svg") center top / 1440px 1093px no-repeat; }
}
.v3-why::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.04;
  background: url("../../../images/v3/hero/noise.webp") 0 0 / 256px;
}

/* ---- header: label in the first column, h2 in the second ---- */
.v3-why__header {
  display: grid;
  grid-template-columns: 332px minmax(0, 652px);
  margin-bottom: 80px;
}
.v3-why__label {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.v3-why__label::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--v3-primary);
}
.v3-why__muted { display: block; color: var(--v3-gray-200); }
.v3-why__muted--inline { display: inline; }

/* ---- grid ---- */
.v3-why__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 328px;
  gap: 12px;
}
.v3-why__photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--v3-radius-md);
  background: var(--v3-gray-50);
}
.v3-why__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.v3-why__slide.is-active { opacity: 1; }
.v3-why__slide img { width: 100%; height: 100%; object-fit: cover; }

.v3-why__card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border-radius: var(--v3-radius-md);
  background: var(--v3-white);
}
.v3-why__card-text {
  color: var(--v3-gray-200);
  line-height: var(--v3-lh-body-m);
}

/* ---- Medicover card ---- */
.v3-why__med {
  --v3-why-bubble-font: 24px;
  grid-column: span 2;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--v3-radius-md);
  background: var(--v3-dark);
  color: var(--v3-white);
}
.v3-why__med-img {
  position: absolute;
  z-index: -2;
  top: 0;
  bottom: 0;
  left: 50px;
  width: calc(100% - 50px);
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 27%;
  border-radius: 0 var(--v3-radius-md) var(--v3-radius-md) 0;
}
.v3-why__med::before {   /* Gradient Overlay/Dark layers from the Figma card */
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(5, 5, 5, 0.79) 0, rgba(5, 5, 5, 0) 158px) 0 100% / 100% 158px no-repeat,
    linear-gradient(90deg, #050505, rgba(5, 5, 5, 0)) 172px 0 / 263px 100% no-repeat,
    linear-gradient(90deg, #050505, rgba(5, 5, 5, 0)) 50px 0 / 459px 100% no-repeat,
    linear-gradient(90deg, #050505, rgba(5, 5, 5, 0)) 50px 0 / 459px 100% no-repeat,
    linear-gradient(90deg, #050505, rgba(5, 5, 5, 0)) 50px 0 / 459px 100% no-repeat;
}
.v3-why__med-text {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 24px;
}
.v3-why__med-head { display: flex; flex-direction: column; gap: 24px; max-width: 272px; }
.v3-why__med-price { max-width: 187px; color: var(--v3-primary); line-height: var(--v3-lh-body-m); }
.v3-why__med-price strong { font-weight: 700; }
.v3-why__med-desc { max-width: 282px; color: var(--v3-gray-100); line-height: var(--v3-lh-body-m); }

.v3-why__med-logo {
  position: absolute;
  left: 241px;
  top: 88.5px;
  width: 120px;
  height: 120px;
  border-radius: 60px;
  background: linear-gradient(211.8deg, #2fa1dc 0.7%, #abe354 100%);
}
.v3-why__med-logo img {
  position: absolute;
  left: 14.2%;
  top: 23.3%;
  width: 71.7%;
  height: auto;
}
.v3-why__bubble {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(9px);
  text-align: center;
  line-height: 1.3;
}
.v3-why__bubble strong { font-size: var(--v3-why-bubble-font); font-weight: 700; }
.v3-why__bubble span { font-size: 10px; }
.v3-why__bubble--1 { left: 331px; top: 35px; width: 108px; height: 108px; }
.v3-why__bubble--2 { left: 380px; top: 122px; width: 94px; height: 94px; }

@media (max-width: 1100px) {
  .v3-why__header { grid-template-columns: minmax(0, 1fr); row-gap: 8px; margin-bottom: 48px; }
  .v3-why__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .v3-why { --v3-why-lines: 16px; }
  .v3-why__header { margin-bottom: 36px; }
  .v3-why__grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; gap: 8px; }
  .v3-why__photo, .v3-why__card--hide-mobile { display: none; }
  .v3-why__card { gap: 20px; padding: 20px; }
  .v3-why__card-title br { display: none; }   /* manual desktop breaks collapse to a space */

  .v3-why__med { --v3-why-bubble-font: 20px; grid-column: auto; height: 384px; }
  .v3-why__med-img {
    top: 132px;
    left: 0;
    width: 100%;
    height: 252px;
    object-position: 100% 20%;
    border-radius: 0 0 var(--v3-radius-lg) var(--v3-radius-lg);
  }
  .v3-why__med { border-radius: var(--v3-radius-md); }
  .v3-why__med::before {
    background:
      linear-gradient(0deg, #050505, rgba(5, 5, 5, 0)) 0 0 / 100% 172px no-repeat,
      linear-gradient(180deg, #050505, rgba(5, 5, 5, 0)) 0 172px / 100% 65px no-repeat,
      linear-gradient(90deg, #050505, rgba(5, 5, 5, 0)) 0 0 / 201px 100% no-repeat;
  }
  .v3-why__med-text { display: block; padding: 20px; }
  .v3-why__med-head { gap: 16px; max-width: none; }
  .v3-why__med-price { max-width: none; margin-bottom: 16px; }
  .v3-why__med-desc { max-width: none; }
  .v3-why__med-logo { left: 20px; top: 235px; width: 116.7px; height: 116.7px; border-radius: 58.4px; }
  .v3-why__bubble span { font-size: 12px; }
  .v3-why__bubble--1 { left: 98px; top: 182px; width: 108px; height: 108px; }
  .v3-why__bubble--2 { left: 143px; top: 262px; width: 102px; height: 102px; }
}

@media (prefers-reduced-motion: reduce) {
  .v3-why__slide { transition: none; }
}
