/* =========================================================
   FAQ
========================================================= */

.faq-list {
  display: grid;
  gap: 10px;

  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================================================
   FAQ ITEM
========================================================= */

.faq-item {
  overflow: hidden;

  background: rgba(255, 255, 255, 0.025);

  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;

  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.018);

  transition:
    background 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease,
    transform 200ms ease;
}

.faq-item:hover {
  background: rgba(255, 255, 255, 0.034);
  border-color: rgba(255, 255, 255, 0.12);

  box-shadow:
    0 15px 34px rgba(0, 0, 0, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.024);

  transform: translateY(-1px);
}

.faq-item.is-open {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 49, 87, 0.18);

  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.024);
}

/* =========================================================
   QUESTION
========================================================= */

.faq-item__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  width: 100%;
  min-height: 64px;
  padding: 13px 16px 13px 22px;

  color: var(--text);
  background: transparent;

  border: 0;

  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.015em;
  text-align: left;

  cursor: pointer;
}

/* =========================================================
   PLUS BUTTON
========================================================= */

.faq-item__question > span {
  position: relative;

  display: flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;
  padding: 0;

  overflow: hidden;

  color: transparent;
  background: rgba(255, 49, 87, 0.055);

  border: 1px solid rgba(255, 49, 87, 0.15);
  border-radius: 10px;

  font-size: 0;
  line-height: 1;

  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    transform 200ms ease;
}

.faq-item__question > span::before,
.faq-item__question > span::after {
  position: absolute;
  top: 50%;
  left: 50%;

  content: '';

  background: var(--accent);
  border-radius: 999px;

  transform: translate(-50%, -50%);

  transition:
    background 180ms ease,
    transform 200ms ease;
}

.faq-item__question > span::before {
  width: 12px;
  height: 1px;
}

.faq-item__question > span::after {
  width: 1px;
  height: 12px;
}

.faq-item:hover .faq-item__question > span {
  background: rgba(255, 49, 87, 0.09);
  border-color: rgba(255, 49, 87, 0.24);
}

.faq-item.is-open .faq-item__question > span {
  background: var(--accent);
  border-color: var(--accent);

  transform: rotate(45deg);
}

.faq-item.is-open .faq-item__question > span::before,
.faq-item.is-open .faq-item__question > span::after {
  background: #fff;
}

/* =========================================================
   ANSWER
========================================================= */

.faq-item__answer {
  display: none;

  padding: 0 64px 18px 22px;

  color: var(--muted);

  font-size: 14px;
  line-height: 1.72;
}

.faq-item__answer p {
  margin: 0;
}

.faq-item__answer p + p {
  margin-top: 9px;
}

.faq-item.is-open .faq-item__answer {
  display: block;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 640px) {
  .faq-list {
    max-width: 100%;
    gap: 8px;
  }

  .faq-item {
    border-radius: 14px;
  }

  .faq-item__question {
    min-height: 58px;
    gap: 14px;

    padding: 11px 12px 11px 16px;

    font-size: 14px;
    line-height: 1.4;
  }

  .faq-item__question > span {
    flex-basis: 32px;

    width: 32px;
    height: 32px;

    border-radius: 9px;
  }

  .faq-item__question > span::before {
    width: 11px;
  }

  .faq-item__question > span::after {
    height: 11px;
  }

  .faq-item__answer {
    padding: 0 50px 15px 16px;

    font-size: 13px;
    line-height: 1.65;
  }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 380px) {
  .faq-item__question {
    min-height: 54px;

    padding-left: 14px;

    font-size: 13px;
  }

  .faq-item__question > span {
    flex-basis: 30px;

    width: 30px;
    height: 30px;
  }

  .faq-item__answer {
    padding-right: 14px;
    padding-left: 14px;
  }
}

/* =========================================================
   TOUCH DEVICES
========================================================= */

@media (hover: none) {
  .faq-item:hover {
    transform: none;
  }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .faq-item,
  .faq-item__question > span,
  .faq-item__question > span::before,
  .faq-item__question > span::after {
    transition: none;
  }
}
