/* ---------- Vertical concertina (accordion) ----------
   Paste this at the end of /css/style.css
   Works with /js/vconcertina.js                                  */

.vconcertina {
  --speed: .35s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 32px 0 40px;
}

.vc-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--speed) ease, box-shadow var(--speed) ease;
}
.vc-item.is-open {
  border-color: #BFD0CC;
  box-shadow: 0 10px 28px rgba(22, 58, 71, 0.08);
}

/* ---- The bar (a real button inside a heading) ---- */
/* (".vconcertina" in front makes these win over the site's general heading rules) */
.vconcertina .vc-heading {
  margin: 0;
  font-size: inherit;
}

.vconcertina .vc-trigger {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 72px;
  padding: 18px 22px 18px 24px;
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .15s ease;
}
.vconcertina .vc-trigger:hover { background: #FBF8F4; }
.vconcertina .vc-trigger:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: -3px;
  border-radius: var(--radius-lg);
}

.vc-num {
  flex: 0 0 auto;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15px;
  color: var(--amber);
  min-width: 22px;
}

.vc-title {
  flex: 1 1 auto;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.3;
}

/* Plus that turns into a minus */
.vc-icon {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--sage-light);
  transition: background-color var(--speed) ease;
}
.vc-icon::before,
.vc-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  margin: -1px 0 0 -7px;
  border-radius: 2px;
  background: var(--teal);
  transition: transform var(--speed) ease, background-color var(--speed) ease;
}
.vc-icon::after { transform: rotate(90deg); }
.vc-item.is-open .vc-icon { background: var(--teal); }
.vc-item.is-open .vc-icon::before,
.vc-item.is-open .vc-icon::after { background: var(--white); }
.vc-item.is-open .vc-icon::after { transform: rotate(0deg); }

/* ---- The content: slides open smoothly ---- */
.vc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--speed) ease;
}
.vc-item.is-open .vc-panel { grid-template-rows: 1fr; }

.vc-panel-inner {
  overflow: hidden;
  visibility: hidden;                          /* closed content is skipped by keyboard and screen readers */
  transition: visibility 0s linear var(--speed);
}
.vc-item.is-open .vc-panel-inner { visibility: visible; transition: visibility 0s; }

.vc-body {
  padding: 2px 28px 26px 64px;                  /* lines up with the title */
  color: var(--text);
  font-size: 17px;
  line-height: 1.65;
}
.vconcertina .vc-body p { margin: 0 0 14px; color: var(--text); }
.vconcertina .vc-body p:last-child { margin-bottom: 0; }
.vc-body ul { margin: 0 0 14px; padding-left: 20px; }
.vc-body li { margin-bottom: 6px; }
.vc-body li::marker { color: var(--teal); }
.vc-body .btn { margin-top: 6px; }

/* Optional "Open all / Close all" link above the concertina */
.vc-toolbar { display: flex; justify-content: flex-end; margin: 24px 0 -20px; }
.vc-toggle-all {
  border: 0;
  background: none;
  padding: 8px 4px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--teal);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.vc-toggle-all:hover { color: var(--teal-dark); }

@media (max-width: 560px) {
  .vconcertina .vc-trigger { gap: 12px; padding: 16px 16px 16px 18px; }
  .vc-title { font-size: 17px; }
  .vc-body { padding: 0 20px 22px 18px; font-size: 16px; }
}

/* ---- Without JavaScript: everything open ---- */
html:not(.js) .vc-panel { grid-template-rows: 1fr; }
html:not(.js) .vc-panel-inner { visibility: visible; }
html:not(.js) .vc-icon,
html:not(.js) .vc-toolbar { display: none; }

@media (prefers-reduced-motion: reduce) {
  .vc-panel, .vc-panel-inner, .vc-icon, .vc-icon::before, .vc-icon::after { transition: none !important; }
}
