/* AI Features block — "KI Funktionen" (Figma 274-7182). Exact desktop values; responsive below. */
.sun-aif {
  background: var(--sun-border);                 /* #efefef */
  padding: clamp(48px, 6vw, 80px) 0;
}
.sun-aif__inner {
  box-sizing: border-box;
  width: min(1280px, 100% - 48px);
  margin-inline: auto;
}

/* Navy panel — one rounded rectangle: header on top, cards row below. */
.sun-aif__panel {
  position: relative;
  /* clip (not hidden): clips the panel corners WITHOUT becoming a scroll
     container, which would freeze the heading's .sun-accent-reveal view()
     timeline. See assets/css/theme.css. */
  overflow: clip;
  border-radius: 4px;
  background: var(--sun-secondary);              /* #132140 */
}

/* ---- Header ---------------------------------------------------------- */
.sun-aif__header {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 385px;
}
.sun-aif__header-text {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  flex: 0 1 auto;
  max-width: 590px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 48px clamp(24px, 3vw, 40px);
}
.sun-aif__heading {
  margin: 0;
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1667;                            /* 56/48 */
  letter-spacing: -0.48px;
}
.sun-aif__heading-lead   { color: #ffffff; }
.sun-aif__heading-accent { color: #c7d0f1; --sun-accent-base: #ffffff; --sun-accent-hi: #c7d0f1; }
.sun-aif__subhead {
  margin: 0;
  max-width: 520px;
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
  color: var(--sun-border);                       /* #efefef */
}

/* Header photo — covers the right portion, feathered into the navy on its left. */
.sun-aif__header-media {
  position: absolute;
  inset: 0 0 0 auto;
  width: 52%;
  overflow: hidden;
  /* Crisp diagonal cut against the navy panel (Figma), no gradient fade. */
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
}
.sun-aif__header-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ---- Cards row ------------------------------------------------------- */
.sun-aif__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));  /* equal thirds; a wide image must not stretch its column */
  gap: 0;                                          /* cards butt together = continuous navy */
}
.sun-aif__card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px;
  background: var(--sun-secondary);
}
.sun-aif__card-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Pill label */
.sun-aif__label {
  box-sizing: border-box;                         /* 28px TOTAL height incl. padding+border */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  column-gap: 0.28em;                             /* flex collapses the text-node space between lead/num */
  height: 28px;
  padding: 3.5px 8px 4.5px;
  border: 1px solid var(--sun-accent);            /* #4a67d2 */
  border-radius: 4px;
  background: var(--sun-accent);
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
}
.sun-aif__label-lead { color: #c7d0f1; }
.sun-aif__label-num  { color: #ffffff; }

.sun-aif__card-title {
  margin: 0;
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: 24px;
  line-height: 32px;
  color: #ffffff;
}
.sun-aif__card-subtitle {
  margin: 0;
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: var(--sun-muted);                        /* #b6bac4 */
}

/* Card image — blue box sized by the graphic: the PNG at its own size, flush
   with the box (the 20px blue frame was dropped on design feedback, 2026-10-05).
   The mock-ups are screenshots with their own margins; cover-cropping them cut
   the interface off at the edges (Figma 313-7890). Never enlarged. */
.sun-aif__card-media {
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border-radius: 4px;
  background: var(--sun-accent);                  /* #4a67d2 behind the create mock-up */
}
.sun-aif__card-media--empty {
  aspect-ratio: 160 / 90;                          /* no graphic to size it */
  background: #edf0fb;                             /* PRIMARY/Blue/Light */
}
.sun-aif__card-img {
  display: block;
  /* Original size: no CSS width, so the full file's width attribute sizes it.
     Only shrinks when the card is narrower than the image, never stretched. */
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top center;
  /* Centred as the file is: the former 2.4% optical shift to the right was
     dropped on design feedback (2026-10-05). */
}

/* ---- Responsive ------------------------------------------------------ */
/* Medium: the absolute side-image collides with the text — stack instead. */
@media (max-width: 1100px) {
  .sun-aif__header {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
  }
  .sun-aif__header-text {
    order: 1;
    max-width: none;
    padding: clamp(24px, 6vw, 40px);
  }
  .sun-aif__header-media {
    position: static;
    order: 2;
    width: auto;
    clip-path: none;                              /* straight edge when stacked */
    margin-inline: clamp(24px, 6vw, 40px);
  }
  /* No fixed height / no cover-crop: person stays fully visible. */
  .sun-aif__header-img {
    height: auto;
    aspect-ratio: auto;
  }
}
@media (max-width: 900px) {
  .sun-aif__cards {
    grid-template-columns: 1fr;
  }
}

/* Button centred at the bottom of the navy panel */
.sun-aif__cta {
  display: flex;
  justify-content: center;
  padding: 40px 28px;
}
