/* v8.48 — certificate geometry and uniform service FAQ behaviour. */

/* The desktop carousel uses card centres. Override the older top-left slot
   coordinates so every card starts inside the 1200 × 450 Figma viewport. */
@media (min-width: 701px) {
  body[data-page="about"] .about-cert-card[data-slot="0"],
  body[data-page="about"] .about-cert-card[data-slot="1"],
  body[data-page="about"] .about-cert-card[data-slot="2"],
  body[data-page="about"] .about-cert-card[data-slot="3"],
  body[data-page="about"] .about-cert-card[data-slot="6"] {
    top: 225px !important;
  }

  /* The landscape first-slot card is eight pixels lower in the Figma layout. */
  body[data-page="about"] .about-cert-card[data-slot="0"][data-cert-index="0"],
  body[data-page="about"] .about-cert-card[data-slot="0"][data-cert-index="5"],
  body[data-page="about"] .about-cert-card[data-slot="0"][data-cert-index="6"] {
    top: 233px !important;
  }
}

/* Mobile portrait certificates must be constrained by both axes. */
@media (max-width: 700px) {
  body[data-page="about"] .about-mobile-cert-card {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body[data-page="about"] .about-mobile-cert-track .about-mobile-cert-card > img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
  }
}

/* Keep the asynchronous subsection close to the FAQ heading. */
body[data-page="services"] .fig-faq h2 {
  margin-bottom: 24px !important;
}

body[data-page="services"] .fig-faq .faq-group-title {
  padding: 0 0 18px !important;
}

/* The FAQ answer and all content below it move together, as on the course page. */
body[data-page^="services"] .fig-faq .faq-a {
  transition: grid-template-rows .35s cubic-bezier(.22, 1, .36, 1) !important;
}

body[data-page^="services"] .fig-desktop-wrap .fig-frame-page > .fig-node.v848-faq-tail,
body[data-page^="services"] .fig-mobile-wrap .fig-frame-page > .fig-node.v848-faq-tail {
  translate: 0 var(--v848-faq-shift, 0px) !important;
  transition: translate .35s cubic-bezier(.22, 1, .36, 1) !important;
  will-change: translate;
}

body[data-page^="services"] .fig-frame-page.v848-faq-frame {
  transition: height .35s cubic-bezier(.22, 1, .36, 1) !important;
}

@media (max-width: 700px) {
  body[data-page="services"] .fig-faq h2 {
    margin-bottom: 12px !important;
  }

  body[data-page="services"] .fig-faq .faq-group-title {
    padding: 0 0 10px !important;
  }
}
