/********************************/
/*         CSS VARIABLES        */
/********************************/

:root {
  /* Color */

  --White: #ffffff;
  --Black: #000000;
  --Purple950: #301534;
  --Purple600: #886990;
  --Purple100: #f8eeff;
  --Violet600: #ad28eb;

  /* Spacing */

  --Spacing-8px: 8px;
  --Spacing-16px: 16px;
  --Spacing-24px: 24px;
  --Spacing-32px: 32px;
  --Spacing-40px: 40px;

  /* Font */

  --Text-Font: 'Work Sans', sans-serif;
  --Letter-Spacing: 0%;
}

/********************************/
/*           CSS RESET          */
/********************************/

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

/* Remove default list styles */
ol,
ul {
  list-style: none;
}

/* Ensure images are responsive and don't exceed their container */
img,
picture,
video,
canvas,
svg {
  max-width: 100%;
  display: block;
}

/* Remove default anchor styles */
a {
  text-decoration: none;
  color: inherit;
}

/* Ensure form elements don't overflow */
input,
textarea {
  width: 100%;
}

/* Remove default table spacing */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none;
    transition: none;
  }
}

/* Set base font and line height */
html {
  font-size: 100%;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%; /* Prevent iOS font scaling */
  scroll-behavior: smooth;
}

/* Remove default focus outlines for better accessibility control */
:focus {
  outline: none;
}

/* Ensure body takes up at least full viewport height */
body {
  min-height: 100vh;
  background-color: var(--Purple100);
  display: flex;
  justify-content: center;
  align-items: center;
}

/********************************/
/*          Typography          */
/********************************/

.text-preset-1 {
  font-family: var(--Text-Font);
  font-size: 32px;
  font-weight: 700;
  line-height: 66px;
  letter-spacing: var(--Letter-Spacing);
  color: var(--Purple950);
}

.text-preset-2 {
  font-family: var(--Text-Font);
  font-size: 16px;
  font-weight: 600;
  line-height: 21px;
  letter-spacing: var(--Letter-Spacing);
  color: var(--Purple950);
}
.text-preset-3 {
  font-family: var(--Text-Font);
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: var(--Letter-Spacing);
  color: var(--Purple600);
}

/********************************/
/*         General Syling       */
/********************************/

.header-image {
  width: 100%;
  height: 232px;
  position: absolute;
  background-image: url(./images/background-pattern-mobile.svg);
  background-repeat: no-repeat;
  background-size: cover;
  z-index: -1000;
  top: 0px;
}

.main-container,
.header-section,
.faq-list,
.question-container,
.faq-item {
  display: flex;
}

.main-container,
.faq-list {
  flex-direction: column;
  gap: var(--Spacing-24px);
}

.main-container {
  padding: var(--Spacing-24px);
  background-color: var(--White);
  border-radius: 8px;
  width: 327px;
}

.header-section,
.question-container {
  gap: var(--Spacing-24px);
  align-items: center;
}

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

.faq-item {
  flex-direction: column;
}
.divider {
  border: 1px solid var(--Purple100);
}

.question-container {
  width: 275px;
}

.text-preset-2:focus-visible {
  color: var(--Violet600);
}

.accordion-button {
  min-width: 33px;
  height: 31px;
  border: none;
  background: none;
}

.accordion-button:hover {
  cursor: pointer;
}

.accordion-button:focus-visible {
  outline: 2px solid var(--Violet600);
  outline-offset: 2px;
}

.answer-text {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out;
}

.answer-text-active {
  padding-top: var(--Spacing-24px);
  max-height: 500px;
}

/********************************/
/*         Media Queries        */
/********************************/

@media (min-width: 48rem) {
  .header-image {
    background-image: url(./images/background-pattern-desktop.svg);
    height: 320px;
  }

  .main-container {
    padding: var(--Spacing-40px);
    width: 600px;
    border-radius: 16px;
  }

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

  .question-container {
    width: 525px;
    justify-content: space-between;
  }

  .text-preset-1 {
    font-size: 56px;
  }

  .text-preset-2 {
    font-size: 18px;
  }

  .text-preset-3 {
    font-size: 16px;
  }
}
