:root {
  --white: hsl(0, 0%, 100%);
  --light-pink: hsl(275, 100%, 97%);
  --grayish-purple: hsl(292, 16%, 49%);
  --dark-purple: hsl(292, 42%, 14%);
}

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

body {
  font-family: "Work Sans", sans-serif;
  background-color: var(--light-pink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40vh;
  background-image: url("../assets/images/background-pattern-mobile.svg");
  background-size: cover;
  background-repeat: no-repeat;
  z-index: -1;
}

.container {
  width: 100%;
  max-width: 600px;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

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

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

.star-icon {
  width: 2rem;
  height: 2rem;
}

h1 {
  color: var(--dark-purple);
  font-size: 2.5rem;
}

.accordion-item {
  border-bottom: 1px solid var(--light-pink);
  padding: 1.5rem 0;
}

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

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

.accordion-button:hover {
  color: var(--grayish-purple);
}

.toggle-icon {
  width: 1.5rem;
  height: 1.5rem;
  transition: transform 0.3s ease;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-content p {
  color: var(--grayish-purple);
  line-height: 1.5;
  padding-top: 1rem;
}

.accordion-item.active .accordion-button {
  color: var(--dark-purple);
}

.accordion-item.active .toggle-icon {
  transform: rotate(45deg);
}

.accordion-item.active .accordion-content {
  max-height: 500px;
}

.attribution {
  font-size: 11px;
  text-align: center;
  margin-top: 2rem;
}

.attribution a {
  color: hsl(228, 45%, 44%);
}

@media (max-width: 375px) {
  .faq-card {
    padding: 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }
}

@media (min-width: 768px) {
  body::before {
    background-image: url("../assets/images/background-pattern-desktop.svg");
    height: 35vh;
  }

  .container {
    padding: 0;
  }
}
