.faq {
  position: relative;
  width: 100%;
  padding-top: 150px;
}

/* FAQ 컨테이너 */
.faq__container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 100px 40px 140px;
}

.faq__banner {
  width: 100%;
  max-width: 1331px;
  height: 323px;
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  margin-bottom: 80px;
  background: url('../public/pngs/faq-banner.png') no-repeat center;
  padding: 60px 80px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.faq__banner__content {
  display: flex;
  align-items: center;
  gap: 40px;
}

.faq__banner__title {
  font-family: 'Urbanist', sans-serif;
  font-weight: 700;
  font-size: 60px;
  color: #00b6c1;
  line-height: 1;
}

.faq__banner__decoration {
  width: 59px;
  height: 15px;
}

.faq__banner__decoration img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.faq__categories {
  display: flex;
  gap: 9px;
}

.faq__category {
  padding: 8px 16px;
  border-radius: 8px;
  font-family: 'Pretendard', sans-serif;
  font-weight: 500;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  border: 1px solid #98a4a4;
  background-color: #fff;
  color: #98a4a4;
}

.faq__category--active {
  background-color: #00b6c1;
  color: #fff;
  border-color: #00b6c1;
}

.faq__category:hover:not(.faq__category--active) {
  border-color: #00b6c1;
  color: #00b6c1;
}

/* 검색창 */
.faq__search {
  position: relative;
  width: 448px;
  margin-bottom: 40px;
  align-self: flex-end;
  margin-right: calc((100vw - 1374px) / 2);
}

.faq__search__input {
  width: 100%;
  height: 53px;
  padding: 0 50px 0 22px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  font-family: 'Pretendard', sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: #333;
  outline: none;
  line-height: 1.6;
  box-sizing: border-box;
}

.faq__search__input:focus {
  border: 2px solid #00b6c1;
}

.faq__search__input::placeholder {
  color: #c5c5c5;
}

.faq__search__button {
  position: absolute;
  right: 19px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.faq__search__button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* FAQ 리스트 */
.faq__list {
  width: 100%;
  max-width: 1374px;
  display: flex;
  flex-direction: column;
  gap: 64px;
  margin-bottom: 96px;
}

/* FAQ 아이템 */
.faq__item {
  width: 100%;
}

.faq__item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 0;
}

.faq__item__question {
  display: flex;
  align-items: center;
  gap: 40px;
}

.faq__item__q {
  font-family: 'Pretendard', sans-serif;
  font-weight: 700;
  font-size: 42px;
  color: #00b6c1;
  line-height: 1;
  text-align: center;
  flex-shrink: 0;
}

.faq__item__title {
  font-family: 'Pretendard', sans-serif;
  font-weight: 600;
  font-size: 32px;
  color: #333333;
  line-height: 1;
  white-space: nowrap;
}

.faq__item__toggle {
  width: 28px;
  height: 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq__item__toggle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

/* FAQ 답변 (열린 상태) */
.faq__item--open {
  border: 1px solid rgba(91, 204, 211, 0);
  padding: 43px 0;
  position: relative;
}

.faq__item--open::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to left, #ffffff 0%, #5bccd3 50%, #ffffff 100%);
}

.faq__item--open::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to left, #ffffff 0%, #5bccd3 50%, #ffffff 100%);
}

.faq__item--open .faq__item__header {
  margin-bottom: 40px;
}

.faq__item__answer {
  display: none;
  font-family: 'Pretendard', sans-serif;
  font-weight: 400;
  font-size: 20px;
  color: #444444;
  line-height: 1.6;
  padding-left: 82px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.faq__item--open .faq__item__answer {
  display: block;
  opacity: 1;
}

.faq__item--open .faq__item__toggle img {
  transform: rotate(180deg);
}

.faq__item__answer p {
  margin: 0;
  white-space: pre-line;
}

.faq__item__answer p:not(:last-child) {
  margin-bottom: 0;
}

/* 페이지네이션 */
.faq__pagination {
  display: flex;
  align-items: center;
  gap: 41px;
}

.faq__pagination__arrow {
  width: 5px;
  height: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq__pagination__arrow img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.faq__pagination__arrow--prev img {
  transform: rotate(0deg);
}

.faq__pagination__numbers {
  display: flex;
  gap: 21px;
  align-items: center;
}

.faq__pagination__number {
  font-family: 'Pretendard', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.6;
  color: #a4a4a4;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.3s;
}

.faq__pagination__number--active {
  color: #00b6c1;
}

.faq__pagination__number:hover {
  color: #00b6c1;
}

@media (max-width: 768px) {
  .faq__container {
    padding: 0 20px 100px;
  }

  .faq__banner {
    height: auto;
    padding: 40px 20px;
    gap: 40px;
    margin-bottom: 60px;
  }

  .faq__banner__title {
    font-size: 36px;
  }

  .faq__banner__content {
    gap: 20px;
  }

  .faq__categories {
    flex-wrap: wrap;
    gap: 8px;
  }

  .faq__category {
    font-size: 18px;
    padding: 6px 12px;
  }

  .faq__search {
    width: 100%;
    margin-right: 0;
  }

  .faq__list {
    max-width: 100%;
    gap: 48px;
  }

  .faq__item__question {
    gap: 20px;
  }

  .faq__item__q {
    font-size: 32px;
  }

  .faq__item__title {
    font-size: 20px;
    white-space: wrap;
    line-height: 1.4;
  }

  .faq__item__answer {
    font-size: 16px;
    padding-left: 45px;
  }
}
