:root {
  --white: hsl(0, 100%, 100%);
  --purple-100: hsl(275, 100%, 97%);
  --purple-600: hsl(292, 16%, 49%);
  --purple-950: hsl(292, 42%, 14%);
}

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

body {
  font-family: 'Work Sans', sans-serif;
  background-color: var(--purple-100);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background-image: url('./assets/images/background-pattern-desktop.svg');
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% 30%;
}

.faq-container {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.faq-card {
  background-color: var(--white);
  border-radius: 1rem;
  padding: 2.5rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}

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

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

.star-icon {
  width: 40px;
  height: 40px;
}

.faq-item {
  border-bottom: 1px solid var(--purple-100);
  padding: 1.25rem 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 1rem;
}

.faq-question h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--purple-950);
  line-height: 1.3;
  flex: 1;
}

.faq-question:hover h2 {
  color: var(--purple-600);
}

.toggle-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer p {
  color: var(--purple-600);
  font-size: 16px;
  line-height: 1.6;
  padding-top: 1.25rem;
  padding-right: 2.5rem;
}

.faq-item.active .faq-answer {
  max-height: 200px;
}

.faq-item.active .toggle-icon {
  content: url('./assets/images/icon-minus.svg');
}

.attribution {
  font-size: 11px;
  text-align: center;
  margin-top: 2rem;
  color: var(--purple-600);
}

.attribution a {
  color: var(--purple-950);
  text-decoration: none;
  font-weight: 600;
}

.attribution a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  body {
    background-image: url('./assets/images/background-pattern-mobile.svg');
    background-size: 100% 20%;
    padding: 1rem;
  }
  
  .faq-card {
    padding: 1.5rem;
  }
  
  .faq-header h1 {
    font-size: 2rem;
  }
  
  .star-icon {
    width: 30px;
    height: 30px;
  }
  
  .faq-question h2 {
    font-size: 1rem;
  }
  
  .faq-answer p {
    padding-right: 0;
    font-size: 15px;
  }
}
