/* ---------- RESET ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Work Sans", sans-serif;
  background-color: hsl(275, 100%, 97%); /* Purple 100 */
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem;

  /* Mobile background pattern */
  background-image: url("assets/images/background-pattern-mobile.svg");
  background-repeat: no-repeat;
  background-size: 100% auto;
}

/* ---------- CARD ---------- */
.faq-card {
  background: hsl(0, 100%, 100%); /* White */
  padding: 2rem;
  border-radius: 1rem;
  max-width: 600px;
  width: 100%;
  margin-top: 8rem; /* pushes card below the purple pattern */
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* ---------- HEADER ---------- */
.faq-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.faq-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: hsl(292, 42%, 14%); /* Purple 950 */
}

/* ---------- FAQ ITEMS ---------- */
.faq-item {
  border-bottom: 1px solid hsl(275, 100%, 90%);
  padding: 1.25rem 0;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: hsl(292, 42%, 14%);
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-question:hover {
  color: hsl(292, 16%, 49%);
}

/* ---------- ANSWERS WITH SMOOTH ANIMATION ---------- */
.faq-answer {
  color: hsl(292, 16%, 49%);
  line-height: 1.5;
  font-size: 1rem;
  font-weight: 400;

  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer.open {
  max-height: 500px; /* large enough for longest answer */
  margin-top: 1rem; /* moved here so it animates smoothly */
}

/* ---------- DESKTOP BACKGROUND ---------- */
@media (min-width: 768px) {
  body {
    background-image: url("assets/images/background-pattern-desktop.svg");
    background-size: 100% auto;
    align-items: center;
  }

  .faq-card {
    margin-top: 10rem;
    padding: 3rem;
  }
}
