/* ── FAQ page ── */

/* ─── Hero header ───────────────────────────────── */
.faq-hero {
  margin-bottom: 48px;
  padding: 0 var(--padding-x);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.faq-hero__texts {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
}

.faq-hero__texts h2 {
  margin: 0;
}

.faq-hero__subtitle {
  color: var(--dark);
}

/* ─── Controls (search + dropdown) ─────────────── */
.faq-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* search */
.faq-controls__search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 420px;
}

.faq-controls__search-input {
  width: 100%;
  padding: 14px 48px 14px 20px;
  border: 1px solid var(--dark_beige, #d9d9d9);
  border-radius: 8px;
  background: white;
  color: var(--black);
  outline: none;
  transition: border-color .2s ease-out;
  appearance: none;
  -webkit-appearance: none;
}

.faq-controls__search-input:focus {
  border-color: var(--olive);
}

.faq-controls__search-input::placeholder {
  color: var(--light);
}

/* hide browser default ×-button */
.faq-controls__search-input::-webkit-search-cancel-button {
  display: none;
}

.faq-controls__search-icon {
  position: absolute;
  right: 16px;
  width: 20px;
  height: 20px;
  pointer-events: none;
  opacity: 0.5;
}

/* category dropdown */
.faq-controls__dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.faq-controls__select {
  padding: 14px 44px 14px 20px;
  border: 1px solid var(--dark_beige, #d9d9d9);
  border-radius: 8px;
  background: white;
  color: var(--black);
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .2s ease-out;
}

.faq-controls__select:focus {
  border-color: var(--olive);
}

.faq-controls__dropdown-icon {
  position: absolute;
  right: 16px;
  width: 18px;
  height: 18px;
  pointer-events: none;
  opacity: 0.6;
}

/* ─── FAQ accordion section ─────────────────────── */
.faq-list {
  padding: 0 var(--padding-x);
  margin-bottom: 96px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* override base accordion padding for faq */
.faq__accordion .accordion__item {
  padding: 24px 0;
}

/* question row: tag + title on left, button on right */
.faq__item-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1;
  margin-right: 24px;
}

.faq__item-left h5 {
  margin: 0;
  min-width: 0;
}

/* tag pill */
.faq__tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 100px;
  background-color: var(--bg_beige);
  color: var(--dark);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

/* answer text */
.faq__item-answer {
  color: var(--dark);
  padding-left: 0;
}

.faq__item-answer p {
  margin: 0;
}

/* ─── Empty / contact ───────────────────────────── */
.faq__empty,
.faq__no-items {
  color: var(--light);
  padding: 32px 0;
  text-align: center;
}

.faq__contact {
  margin-top: 32px;
  color: var(--dark);
}

.faq__contact-link {
  color: var(--olive);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s ease-out;
}

.faq__contact-link:hover {
  color: var(--black);
}

/* ─── Hidden items (JS filter) ──────────────────── */
.faq__item.faq-hidden {
  display: none;
}

@media (max-width: 768px) {
  .faq-hero {
    padding: 0 16px;
    margin-bottom: 32px;
    gap: 24px;
  }

  .faq-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .faq-controls__search {
    flex: none;
    width: 100%;
  }

  .faq-controls__select {
    width: 100%;
  }

  .faq-list {
    padding: 0 16px;
    margin-bottom: 64px;
  }

  .faq__item-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
