.faq {
  background: #fff;
  color: #21201f;
  font-family: manrope;
  padding: 100px 50px 0;
}
@media (width < 768px) {
  .faq {
    padding: 64px 16px 0;
  }
}

.faq__block {
  max-width: 1822px;
  margin-inline: auto;
  padding: 64px 16px;
  border-radius: 64px;
  background: #efefef63;
}
@media (width < 768px) {
  .faq__block {
    border-radius: 24px;
    padding: 40px 16px 24px;
  }
}

.faq__wrapper {
  margin-top: 56px;
}
@media (width < 768px) {
  .faq__wrapper {
    margin-top: 16px;
  }
}

.faq__item {
  border-bottom: 1px solid #cccccc;
  padding-inline: 16px;

  transition: all 0.4s;
}
.faq__item._active {
  padding-bottom: 16px;

  & .faq__item-text {
    display: block;
  }

  & .faq__item-arrow {
    transform: rotateX(180deg);
  }

  & .faq__item-text-grid {
    grid-template-rows: 1fr;
  }
}
@media (width < 768px) {
  .faq__item {
    padding-inline: 0;
  }
}

.faq__item-title-wrapper {
  --arrow-width: 16px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 24px;
  gap: calc(var(--arrow-width) * 0.5);
}
@media (width < 768px) {
  .faq__item-title-wrapper {
    padding-block: 16px;
  }
}

.faq__item-title {
  font-weight: 500;
  font-size: 20px;
}
@media (width < 768px) {
  .faq__item-title {
    font-size: 18px;
  }
}

.faq__item-arrow {
  width: var(--arrow-width);
  height: var(--arrow-width);
  position: relative;
  flex-shrink: 0;
  transition: transform 0.4s;

  &::after,
  &::before {
    --width: calc(var(--arrow-width) / 8);

    content: "";
    width: 100%;
    height: var(--width);
    display: block;
    position: absolute;
    top: 60%;
    left: 0;

    background: linear-gradient(to right, #213564 calc(50% + var(--width) / 2), transparent calc(50% + var(--width) / 2), transparent);
    transform: rotate(45deg);
  }

  &::after {
    transform: rotate(135deg);
    right: 0;
    left: auto;
  }
}

.faq__item-text-grid {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s ease;
  overflow: hidden;
}
.faq__item-text {
  font-size: 16px;
  line-height: 1.3;
  overflow: hidden;
}
