/* ── Arrow carousel — About PMV cards + Meet the Doctors bio ──
   ≤1024px: sibling .ac-card groups loop one-at-a-time via the ‹ › pager
   (js/arrow-carousel.js). --left = left-aligned text · .ac-mobile-only = dupe slide. */

/* desktop: About image absolute-fills so both columns match height */
@media (min-width: 1025px) {
  .ac-image { position: relative; }
  .ac-image .et_pb_image_wrap { position: static; }
  .ac-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 1.5625rem; }
  .ac-mobile-only { display: none !important; }
}

.ac-pager { display: none; }

/* ── Stacked (≤1024px) — fully-rounded image above, then ONE white
      rounded box: slides + pager as a single continuous card ── */
@media (max-width: 1024px) {
  /* slides grid-stack in one cell — the area stays as tall as the longest */
  .et_pb_column:has(> .ac-card) {
    display: grid;
    grid-template-columns: 100%;
    gap: 0 !important;               /* pager sits flush under the slides */
  }
  /* About variant only (no duplicate slides): the container is the white
     rounded box, so fades happen over white. Doctors has .ac-mobile-only
     dupes and keeps its own builder-styled card. */
  .et_pb_column:has(> .ac-card):not(:has(> .ac-mobile-only)) {
    background: var(--white);
    border-radius: 1.5625rem;
  }

  .ac-card {
    grid-area: 1 / 1;
    justify-self: center;
    visibility: hidden;
    text-align: center;
    border-radius: 1.5625rem 1.5625rem 0 0 !important;   /* child white bgs: top corners here, bottom on the pager */
  }
  /* outranks Divi's emitted align-self:center — short slides must fill
     the cell or green shows between card and pager */
  .et_pb_column:has(> .ac-card) > .ac-card { align-self: stretch !important; }
  .ac-card.is-active { visibility: visible; animation: ac-fade 0.25s ease; }
  .ac-card--left { text-align: left; }

  .ac-image, .ac-image .et_pb_image_wrap, .ac-image img { border-radius: 1.5625rem !important; }

  .ac-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 0 0.25rem;   /* top space between bio text and arrows (Doctors) */
    width: 100%;
  }
  /* About variant: the pager is the white bottom of the card box */
  .et_pb_column:has(> .ac-card):not(:has(> .ac-mobile-only)) > .ac-pager {
    padding: 0.25rem 0 1.5rem;
    background: var(--white);
    border-radius: 0 0 1.5625rem 1.5625rem;
  }
  .ac-pager button { background: none; border: 0; cursor: pointer; color: var(--dark-tan); line-height: 0; padding: 0.25rem; }
  .ac-pager svg { width: 0.9rem; height: 1.5rem; display: block; }
}

@keyframes ac-fade { from { opacity: 0; } to { opacity: 1; } }
