:root {
  --white: hsl(0, 100%, 100%);
  --purple-100: hsl(275, 100%, 97%);
  --purple-600: hsl(292, 16%, 49%);
  --purple-950: hsl(292, 42%, 14%);
  --font-family: 'Work Sans', sans-serif;
}

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

html, body {
  height: 100%;
}

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

body {
  position: relative;
  font-family: var(--font-family);
  font-size: 16px;
  background-color: var(--purple-100);
  color: var(--purple-950);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  min-height: 100vh;
}

main.faq-container {
  background: var(--white);
  padding: 2rem;
  border-radius: 1rem;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.05);
}

/* === Accordion === */
.faq-title-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.faq-title-container .icon {
  width: 1.5rem;
  height: auto;
}

.faq-title {
  font-size: 2rem;
  font-weight: 700;
}

.accordion-header:first-of-type {
  border-top: none;
}

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

.accordion-header:hover:not([aria-expanded="true"]),
.accordion-header:focus:not([aria-expanded="true"]) {
  color: var(--purple-600);
  outline: none;
}

.accordion-header[aria-expanded="true"] {
  color: var(--purple-950);
  font-weight: 700;
}

.accordion-header .icon {
  width: 1rem;
  height: 1rem;
  transition: transform 0.3s;
}

.accordion-header[aria-expanded="true"] .icon {
  content: url('./assets/images/icon-minus.svg');
}

.accordion-content {
  padding: 0.5rem 0 1rem 0;
  color: var(--purple-600);
  line-height: 1.5;
}

.accordion-content p {
  margin: 0;
}

/* === Footer === */
.attribution {
  font-size: 11px;
  text-align: center;
  margin-top: auto;
  padding: 2rem 1rem 0;
  color: var(--purple-600);
}

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

/* === Responsive === */
@media (max-width: 500px) {
    body::before {
    background-image: url('./assets/images/background-pattern-mobile.svg');
    height: 130px;
  }

  body {
    align-items: flex-start;
  }
  
  main.faq-container {
    padding: 1.5rem;
  }

  .faq-title {
    font-size: 1.5rem;
  }

  .accordion-header {
    font-size: 0.95rem;
  }
}