.faq-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
  padding-block: 56px 80px;
}

.faq-index {
  align-self: start;
  position: sticky;
  top: 20px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.faq-index-title {
  margin: 0 0 12px;
  color: var(--green);
  font-weight: 700;
}

.faq-index ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.faq-index li + li {
  border-top: 1px solid var(--line);
}

.faq-index a {
  display: block;
  padding: 9px 0;
  text-decoration: none;
}

.faq-section {
  scroll-margin-top: 20px;
}

.faq-section + .faq-section {
  margin-top: 52px;
}

.faq-section h2,
.faq-contact h2 {
  margin: 0 0 18px;
  color: var(--green);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.5;
}

.faq-section h2 {
  padding-bottom: 10px;
  border-bottom: 3px solid var(--green);
}

details {
  overflow: hidden;
  margin-top: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
}

summary {
  position: relative;
  padding: 19px 54px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "Q";
  position: absolute;
  top: 17px;
  left: 20px;
  color: var(--green);
  font-size: 20px;
  font-weight: 800;
}

summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 20px;
  color: var(--green);
  font-size: 26px;
  font-weight: 400;
  transform: translateY(-50%);
}

details[open] summary::after {
  content: "−";
}

.answer {
  position: relative;
  padding: 18px 24px 22px 54px;
  background: var(--green-light);
  border-top: 1px solid var(--line);
}

.answer::before {
  content: "A";
  position: absolute;
  top: 16px;
  left: 20px;
  color: var(--orange);
  font-size: 20px;
  font-weight: 800;
}

.answer p {
  margin: 0;
}

.answer p + p {
  margin-top: 10px;
}

.faq-contact {
  margin-top: 56px;
  padding: 30px;
  text-align: center;
  background: #f2f7f4;
  border-radius: 14px;
}

.faq-contact-tel {
  margin: 10px 0 18px;
  font-size: clamp(25px, 5vw, 36px);
  font-weight: 700;
  line-height: 1.4;
}

.faq-contact-tel a {
  text-decoration: none;
}

@media (max-width: 820px) {
  .faq-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 36px;
  }

  .faq-index {
    position: static;
  }
}

@media (max-width: 520px) {
  summary {
    padding: 16px 46px;
  }

  summary::before,
  .answer::before {
    left: 16px;
  }

  summary::after {
    right: 16px;
  }

  .answer {
    padding: 16px 18px 20px 46px;
  }
}
