/* =========================================================================
   Accordion block override — FAQ look (Figma "bardown_web_sept2026")
   Loaded automatically by Concrete alongside ./view.php whenever an
   Accordion block is on the page, and uses the theme's design tokens
   (--accent, --main, --white, --radius-notch, …) from the theme's
   css/styles.css.

   Figma: 944px list, 65px rows with a 2px #FBAD23 outline and the theme's
   bevelled bottom-right notch, 14px apart; 17px New Science Medium question
   in Main green with the ↗ arrow on the right (turns ↘ when open).
   Opened/closed by initFaqAccordion() in the theme's js/bardown.js.
   ========================================================================= */

.faq { max-width: 944px; margin: 0 auto; }
.faq-item {
  --notch: var(--radius-notch);
  border: 2px solid var(--accent);
  corner-shape: bevel;
  border-radius: 0 0 var(--notch) 0;
  margin-bottom: 14px;
  background: transparent;
  transition: background-color 0.2s ease;
}
.faq-item:last-child { margin-bottom: 0; }
.faq-item:hover,
.faq-item[data-open="true"] { background: var(--white); }
/* The item heading tag (h2 by default, editable in the block) must not pick
   up the theme's heading styles — it's only there for document outline. */
.faq-item__heading {
  margin: 0;
  font: inherit;
  text-transform: none;
}
.faq-item__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 61px; /* 65px row incl. the 2px border */
  padding: 16px 20px 16px 33px;
  background: none;
  border: 0;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  color: var(--main);
  cursor: pointer;
}
.faq-item__question .faq-item__title { font-weight: 600; }
.faq-item__question:hover .faq-item__title { color: var(--main-lighter); }
.faq-item__question:focus-visible { outline: 2px solid var(--main); outline-offset: -6px; }
.faq-item__icon {
  flex: none;
  width: 12px;
  line-height: 1;
  text-align: center;
  transition: transform 0.2s ease;
}
.faq-item__icon::before {
      font-family: "Font Awesome 5 Free";
    font-weight: 900;
    content: "\f061";
    font-size: 15px;
    display: inline-block;
    transform: rotate(-45deg);
    top: -2px;
    position: relative;
}
.faq-item[data-open="true"] .faq-item__icon { transform: rotate(90deg); }
/* Height animates via grid rows (0fr → 1fr) so answers of any length open
   fully without a fixed max-height. */
.faq-item__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
.faq-item[data-open="true"] .faq-item__answer { grid-template-rows: 1fr; }
.faq-item__answer-inner {
  overflow: hidden;
  min-height: 0;
  padding: 0 33px;
  color: var(--main);
  font-size: 17px;
  line-height: 1.5;
  transition: padding-bottom 0.25s ease;
}
.faq-item[data-open="true"] .faq-item__answer-inner { padding-bottom: 22px; }
.faq-item__answer-inner > :last-child { margin-bottom: 0; }

@media (max-width: 600px) {
  .faq-item__question { padding: 16px 20px; font-size: 15px; }
  .faq-item__answer-inner { padding-left: 20px; padding-right: 20px; font-size: 15px; }
}
