/* ══ Accordion ═══════════════════════════════════════════════════════════
   Opt-in: add the CSS class `eos-accordion` to a Divi Accordion module.
   Pairs with js/accordion.js, which flags the open item as `.is-open`.
   Never add a height/max-height transition — jQuery writes an inline height
   every frame and the panel visibly shrinks while it opens.
   ════════════════════════════════════════════════════════════════════════ */


/* ── The plus / minus mark — ::before is the bar, ::after the upright ──── */

.eos-accordion .et_pb_toggle_title {
  position : relative;   
}

.eos-accordion .et_pb_toggle_title::before,
.eos-accordion .et_pb_toggle_title::after {
  /* !important — Divi sets its own glyph in `content`, and display:none
     on the open state. */
  content          : "" !important;
  display          : block !important;
  position         : absolute;
  /* Aligns the mark to the title's first line. font-size:inherit is
     required — Divi sets 16px here, which would pin 0.625em at a flat 10px. */
  font-size        : inherit;
  top              : 0.625em;
  background-color : var(--black);
  border-radius    : 0;
  margin           : 0;
  padding          : 0;
  transition       : transform 260ms cubic-bezier(0.4, 0, 0.2, 1),
                     opacity   200ms ease-out;
}

/* Horizontal bar — 28 x 3, always visible. */
.eos-accordion .et_pb_toggle_title::before {
  right     : 0;
  width     : 1.75rem;
  height    : 0.1875rem;
  transform : translateY(-50%);
}

/* Vertical bar — 3 x 28, centred on the horizontal one. */
.eos-accordion .et_pb_toggle_title::after {
  right     : 0.78125rem;
  width     : 0.1875rem;
  height    : 1.75rem;
  transform : translateY(-50%) rotate(0deg) scaleY(1);
}

/* Open: the plus folds into the minus. */
.eos-accordion .et_pb_accordion_item.is-open .et_pb_toggle_title::after {
  transform : translateY(-50%) rotate(90deg) scaleY(0);
  opacity   : 0;
}


/* ── Content fade — brings the copy in behind Divi's height slide ─────── */

.eos-accordion .et_pb_toggle_content {
  opacity    : 0;
  transform  : translateY(-0.25rem);
  transition : opacity   280ms ease-out 120ms,
               transform 280ms ease-out 120ms;
}

.eos-accordion .et_pb_accordion_item.is-open .et_pb_toggle_content {
  opacity   : 1;
  transform : none;
}


/* ── Title affordance ───────────────────────────────────────────────────── */

.eos-accordion .et_pb_toggle_title {
  transition : color 200ms ease-out;
}


@media (prefers-reduced-motion: reduce) {
  .eos-accordion .et_pb_toggle_title::before,
  .eos-accordion .et_pb_toggle_title::after,
  .eos-accordion .et_pb_toggle_content {
    transition-duration : 1ms;
    transition-delay    : 0ms;
  }
}
