/* --- CSS Variables & Reset --- */
:root {
  --white: hsl(0, 100%, 100%);
  --light-pink: hsl(275, 100%, 97%);
  --grayish-purple: hsl(292, 16%, 49%);
  --dark-purple: hsl(292, 42%, 14%);
  
  --font-family: 'Work Sans', sans-serif;
}

@font-face {
  font-family: 'Work Sans';
  src: url('./assets/fonts/WorkSans-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--light-pink);
  background-image: url('./assets/images/background-pattern-mobile.svg');
  background-repeat: no-repeat;
  background-size: 100% auto;
  background-position: top center;
  color: var(--dark-purple);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1.5rem;
}

/* --- Main Card Container --- */
.faq-container {
  background-color: var(--white);
  border-radius: 1rem;
  padding: 1.5rem;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.05);
}

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

.faq-header img {
  width: 1.5rem;
  height: 1.5rem;
}

.faq-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark-purple);
}

/* --- Accordion List --- */
.faq-list {
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-bottom: 1px solid var(--light-pink);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  padding: 1.5rem 0;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark-purple);
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease;
  gap: 1rem;
}

.faq-question:hover,
.faq-question:focus-visible,
.faq-question:hover .faq-question-text,
.faq-question:focus-visible .faq-question-text {
  color: #ad28eb; /* pinkish purple color */
  outline: none;
}

.faq-question-text {
  line-height: 1.2;
}

.faq-icon {
  flex-shrink: 0;
}

/* --- Answer Content --- */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--grayish-purple);
  padding-bottom: 1.5rem;
}

/* --- Active State --- */
.faq-item.active .faq-answer {
  max-height: 500px; /* An arbitrarily large max-height for transition */
}

/* --- Desktop Adjustments --- */
@media (min-width: 768px) {
  body {
    background-image: url('./assets/images/background-pattern-desktop.svg');
  }

  .faq-container {
    padding: 2.5rem;
    border-radius: 1rem;
  }

  .faq-header {
    margin-bottom: 2rem;
  }

  .faq-header img {
    width: 2.5rem;
    height: 2.5rem;
  }

  .faq-header h1 {
    font-size: 3.5rem;
  }

  .faq-question {
    font-size: 1.125rem;
    padding: 1.5rem 0;
  }

  .faq-answer p {
    font-size: 1rem;
    padding-bottom: 1.5rem;
  }
}
