/* FAQ wrapper */
.faq-wrapper {
  display: flex;
  padding: 20px;
  justify-content: center;
}
.faq-content {
  width: 50%;
}
.faq-box {
  padding: 0 10px;
  /* min-width: 380px; */
  margin-left: auto;
}
.faq-image-box {
  width: 50%;
  padding: 0 10px;
  margin-top: auto;
  margin-bottom: auto;
}
.faq-image {
  width: auto;
  height: auto;
  min-width: 380px;
}
.faq-heading {
  text-align: center;
  color: var(--color-accent);
}
/* Każdy element FAQ */
.faq-item {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 15px;
  border: 1px solid #e4e4e4;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
}

/* Styl pytania */
.faq-question {
  position: relative;
  cursor: pointer;
  padding: 18px 34px 18px 24px;
  font-size: 18px;
  font-weight: 600;
  list-style: none;
}

/* Dodanie + i animacja do × */
.faq-question::after {
  content: "+";
  position: absolute;
  right: 24px;
  font-size: 24px;
  transition: transform 0.3s ease;
}

/* Gdy otwarte, zamieniamy + na × */
.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
}

/* Odpowiedź */
.faq-answer {
  padding: 0 24px 20px;
  font-size: 16px;
  line-height: 1.6em;
  color: #555555;
  animation: fadeInfaq 0.3s ease;
}

/* Subtelna animacja pojawiania */
@keyframes fadeInfaq {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover efekt */
.faq-item:hover {
  border-color: var(--color-accent);
  box-shadow: 0 6px 14px rgba(255, 188, 44, 0.15);
}

/* ✅ Płynne otwieranie/zamykanie (bez JS) */
.faq-answer-wrapper {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 1s ease-in-out, opacity 0.9s ease-in-out;
}

/* Gdy <details> jest otwarte */
.faq-item[open] .faq-answer-wrapper {
  max-height: 1000px; /* wystarczająco duża wartość */
  opacity: 1;
}

@media (max-width: 760px) {
  .faq-wrapper {
    flex-direction: column-reverse;
  }
  .faq-content {
    width: unset;
  }
  .faq-image-box {
    width: 60%;
    margin: 15px auto;
  }
  .faq-image {
    width: auto;
    height: auto;
    min-width: unset;
  }
}
