/* =============================================================
   FAQ — Akordeon
   Plik: assets/css/faq.css
   ============================================================= */

/* === WRAPPER === */
.faq {
  max-width: 760px;
  padding: 60px 20px;
  margin: 0 auto;
  overflow: hidden;
}

/* === TYTUŁ === */
.faq-title {
  color: var(--blue-grey-50);
  margin: 0 auto;
  padding: 0 2rem 4rem;
  text-align: center;
}

/* === LISTA === */
.faq-list {
  display: grid;
  gap: 14px;
}

/* === ITEM === */
.faq-item {
  background-color: var(--color-blue-grey-900);
  border: 1px solid rgba(228, 228, 228, 0.06);
  border-radius: 12px;
  overflow: hidden;
  transition:
    background 0.25s ease,
    border-color 0.25s ease;
}

.faq-item.open {
  background: transparent;
  backdrop-filter: blur(10px);
}

/* === PYTANIE === */
.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 18px 48px 18px 18px;
  text-align: left;
  color: var(--blue-grey-50);
  cursor: pointer;
  position: relative;
  font-size: 1.05rem;
  line-height: 1.45;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.faq-question:hover {
  background: rgba(0, 0, 0, 0.03);
}

.faq-question:focus-visible {
  outline: 2px solid var(--blue-grey-50);
  outline-offset: -2px;
  border-radius: 12px;
}

/* === IKONA + / – === */
.faq-question::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--blue-grey-50);
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.faq-item.open .faq-question::after {
  content: "–";
  transform: translateY(-50%) rotate(180deg);
}

/* === ODPOWIEDŹ === */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 18px;
  transition:
    max-height 0.4s ease,
    opacity 0.3s ease,
    padding 0.3s ease;
  color: var(--blue-grey-50);
}

.faq-item.open .faq-answer {
  max-height: 600px; /* zwiększone z 400px dla dłuższych odpowiedzi */
  opacity: 1;
  padding: 0 18px 18px;
}

/* === TEKST ODPOWIEDZI === */
.faq-answer p {
  margin: 0 0 0.5em;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--blue-grey-50);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* === MOBILE === */
@media (max-width: 600px) {
  .faq {
    padding: 50px 16px;
  }

  .faq-question {
    padding: 16px 42px 16px 16px;
    font-size: 1rem;
  }

  .faq-answer {
    padding: 0 16px;
  }

  .faq-item.open .faq-answer {
    padding: 0 16px 16px;
  }
}
