/* ============ FAQ ============ */

/* Akordeon: pojedyncza kolumna kart-pytań, jedno otwarte naraz.
   Stan sterowany aria-expanded na .faq__q — CSS działa bez JS
   (progressive enhancement), JS tylko przełącza atrybut i ikonę. */
.faq__list {
  max-width: 820px;
}

.faq__item {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg-base);
  overflow: hidden;
}
.faq__item + .faq__item {
  margin-top: 12px;
}

/* Pytanie = pełnowymiarowy button, dostępny z klawiatury. */
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 20px 22px;
  border: 0;
  background: transparent;
  color: var(--text-head);
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: color .18s ease;
}
.faq__q:hover {
  color: var(--copper-hover);
}
.faq__q:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: -2px;
}

/* Ikona przełącznika +/–. */
.faq__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  color: var(--copper);
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1;
  transition: border-color .18s ease, color .18s ease;
}
.faq__q[aria-expanded="true"] .faq__icon {
  border-color: var(--copper);
}

/* Odpowiedź — domyślnie zwinięta (max-height 0). */
.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .28s ease;
}
.faq__a > p {
  margin: 0;
  padding: 0 22px 22px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
}

/* Otwarte pytanie odsłania odpowiedź — sterowane aria-expanded. */
.faq__item:has(.faq__q[aria-expanded="true"]) {
  border-color: var(--border-2);
}
.faq__item:has(.faq__q[aria-expanded="true"]) .faq__a {
  max-height: 520px;
}

/* Fallback bez :has() — JS dopina data-open na .faq__item. */
.faq__item[data-open] {
  border-color: var(--border-2);
}
.faq__item[data-open] .faq__a {
  max-height: 520px;
}

@media (max-width: 860px) {
  .faq__q {
    padding: 18px 18px;
    font-size: 16px;
  }
  .faq__a > p {
    padding: 0 18px 18px;
  }
}

@media (max-width: 520px) {
  .faq__q {
    gap: 12px;
    font-size: 15px;
  }
}
