/* =============================================================================
   TopCV FAQ — Pixel-perfect replication of topcv.vn/faqs
   Source CSS: /v4/css/components/desktop/faq.c8937a2f35f6b5cdZ.css
   ============================================================================= */

/* ── Google Fonts: Inter ────────────────────────────────────────────────────── */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* ── Reset body-level overrides ─────────────────────────────────────────────── */
#faq {
  background-color: #f7f9fc;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

/* ── Bootstrap-style container (1200px max) ─────────────────────────────────── */
#faq .faq-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ── Two-column layout ───────────────────────────────────────────────────────── */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .faq-container {
    flex-direction: row;
    gap: 24px;
    margin-top: 24px;
  }
}

/* ── Sidebar: wrapper-categories ─────────────────────────────────────────────── */
.wrapper-categories {
  background: #fff;
  border-radius: 10px;
  display: none; /* hidden on mobile */
  flex-shrink: 0;
  height: fit-content;
  position: sticky;
  top: 24px;
  width: 222px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .wrapper-categories {
    display: block;
  }
}

@media (min-width: 1366px) {
  .wrapper-categories {
    width: 316px;
  }
}

.wrapper-categories .sidebar-title {
  color: #009643;
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: 28px;
  margin: 0;
  padding: 24px 24px 16px;
}

.wrapper-categories ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wrapper-categories ul li {
  margin: 0;
}

.wrapper-categories ul a {
  border-left: 4px solid #fff;
  color: #263a4d;
  display: block;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: -0.16px;
  line-height: 24px;
  padding: 16px 24px;
  text-decoration: none;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.wrapper-categories ul a:hover:not(.active) {
  background: #f4f5f5;
  border-left-color: #f4f5f5;
}

.wrapper-categories ul a.active {
  background: rgba(0, 177, 79, 0.1);
  border-left: 4px solid #009643;
}

/* ── Mobile: select dropdown ─────────────────────────────────────────────────── */
.wrapper-categories-mobile {
  background: #fff;
  margin-left: -15px;
  margin-right: -15px;
  padding: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}

@media (min-width: 768px) {
  .wrapper-categories-mobile {
    display: none;
  }
}

.wrapper-categories-mobile .mobile-title {
  color: #263a4d;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.175px;
  line-height: 22px;
  margin: 0 0 8px;
}

.wrapper-categories-mobile select {
  width: 100%;
  height: 44px;
  appearance: none;
  -webkit-appearance: none;
  background: #fff
    url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.688 1.492 6.465 6.496A.739.739 0 0 1 6 6.687a.743.743 0 0 1-.465-.164l-5.25-5.03a.653.653 0 0 1-.027-.93.653.653 0 0 1 .93-.028L6 5.13 10.785.535a.652.652 0 0 1 .93.027.653.653 0 0 1-.027.93Z' fill='%237F878F'/%3E%3C/svg%3E")
    no-repeat right 14px center;
  border: 1px solid #eef1f5;
  border-radius: 6px;
  color: #263a4d;
  font-size: 14px;
  font-weight: 500;
  font-family: Inter, sans-serif;
  padding: 0 40px 0 12px;
  outline: none;
  cursor: pointer;
}

.wrapper-categories-mobile select:focus {
  border-color: #009643;
  box-shadow: 0 0 0 3px rgba(0, 177, 79, 0.1);
}

/* ── Main content area ───────────────────────────────────────────────────────── */
.faq-content {
  flex-grow: 1;
  min-width: 0;
}

/* ── Category section ─────────────────────────────────────────────────────────── */
.faq-category-section {
  margin-bottom: 26px;
}

.faq-category-section h2 {
  color: #263a4d;
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.24px;
  line-height: 28px;
  margin: 0 0 16px;
}

@media (min-width: 768px) {
  .faq-category-section h2 {
    font-size: 24px;
    line-height: 32px;
  }
}

/* ── Page wrapper background ─────────────────────────────────────────────────── */
.faq-page-wrapper {
  background: #f7f9fc;
  flex: 1;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

.faq-page-wrapper * {
  box-sizing: border-box;
}

/* ── Single FAQ page — keep basic styling ────────────────────────────────────── */
.faq-article {
  background: #fff;
  border-radius: 8px;
  padding: 24px 30px;
  margin-bottom: 20px;
}

.faq-article__title {
  color: #263a4d;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 16px;
}

.faq-article__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef1f5;
}

.faq-article__cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  background: rgba(0, 177, 79, 0.1);
  color: #009643;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.faq-article__date {
  font-size: 12px;
  color: #7f878f;
}

.faq-article__content {
  font-size: 14px;
  line-height: 22px;
  color: #263a4d;
  letter-spacing: 0.14px;
}

.faq-article__content p {
  margin: 0 0 12px;
}
.faq-article__content h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 20px 0 10px;
}
.faq-article__content h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 16px 0 8px;
}
.faq-article__content ul,
.faq-article__content ol {
  padding-left: 20px;
  margin: 0 0 12px;
}
.faq-article__content li {
  margin-bottom: 4px;
}
.faq-article__content img {
  max-width: 100%;
  border-radius: 6px;
  margin: 10px 0;
  display: block;
}
.faq-article__content a {
  color: #009643;
}
.faq-article__content blockquote {
  border-left: 3px solid #009643;
  margin: 16px 0;
  padding: 10px 16px;
  background: rgba(0, 177, 79, 0.06);
  border-radius: 0 6px 6px 0;
}

/* Single sidebar categories — reuse same style */
.faq-sidebar-single .wrapper-categories {
  position: static;
  display: block;
}

/* Post nav */
.faq-post-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.faq-post-nav__item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: #fff;
  border-radius: 8px;
  text-decoration: none;
  color: #263a4d;
  font-size: 14px;
  transition:
    border 0.15s,
    color 0.15s;
  border: 1px solid #eef1f5;
}

.faq-post-nav__item:hover {
  border-color: #009643;
  color: #009643;
}
.faq-post-nav__item--next {
  justify-content: flex-end;
  text-align: right;
}
.faq-post-nav__item span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.faq-post-nav__item small {
  font-size: 11px;
  color: #7f878f;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.faq-post-nav__item svg {
  flex-shrink: 0;
  color: #b3b8bd;
}
.faq-post-nav__item:hover svg {
  color: #009643;
}

/* Back link */
.faq-back-link {
  margin-bottom: 16px;
}
.faq-back-link__a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: #7f878f;
  text-decoration: none;
  transition: color 0.15s;
}
.faq-back-link__a:hover {
  color: #009643;
}

/* ── Single page layout ──────────────────────────────────────────────────────── */
.faq-layout-single {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  margin-bottom: 24px;
  align-items: flex-start;
}

.faq-layout-single .wrapper-categories {
  display: block;
  position: sticky;
  top: 24px;
  width: 222px;
  flex-shrink: 0;
}

@media (min-width: 1366px) {
  .faq-layout-single .wrapper-categories {
    width: 316px;
  }
}

.faq-layout-single .faq-main-single {
  flex: 1;
  min-width: 0;
}

/* Sidebar sub-list on single page */
.sidebar-sub-list {
  border-top: 1px solid #eef1f5;
  padding: 8px 0;
}

.sidebar-sub-list h4 {
  font-size: 11px;
  font-weight: 700;
  color: #7f878f;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 24px 6px;
  margin: 0;
}

.sidebar-sub-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-sub-list li a {
  display: block;
  padding: 8px 24px;
  font-size: 13px;
  color: #263a4d;
  text-decoration: none;
  border-left: 4px solid #fff;
  line-height: 1.4;
  transition: all 0.15s;
}

.sidebar-sub-list li a:hover {
  color: #009643;
  background: rgba(0, 177, 79, 0.05);
  border-left-color: #009643;
}
.sidebar-sub-list li.is-current a {
  color: #009643;
  font-weight: 600;
  background: rgba(0, 177, 79, 0.1);
  border-left-color: #009643;
}

/* ── Mobile responsive ───────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .faq-layout-single {
    flex-direction: column;
    margin-top: 0;
  }

  .faq-layout-single .wrapper-categories {
    display: none;
  }

  .faq-article {
    padding: 18px 16px;
  }

  .faq-post-nav {
    flex-direction: column;
  }
}

/* =============================================================================
   FAQ CARD LIST — title cards linking to single page
   ============================================================================= */

.faq-category-section__title {
  color: #263a4d;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.24px;
  line-height: 28px;
  margin: 0 0 12px;
}

@media (min-width: 768px) {
  .faq-category-section__title {
    font-size: 24px;
    line-height: 32px;
    margin-bottom: 16px;
  }
}

.faq-card-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}

/* ── Card item ──────────────────────────────────────────────────────────────── */
.faq-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 24px;
  background: #fff;
  text-decoration: none;
  transition: background 0.15s;
  cursor: pointer;
  border-radius: 16px;
  border: 1px solid #e9efeb;
  background: #fff;
  box-shadow: 0 2px 8px 0 rgba(16, 40, 28, 0.04);
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .faq-card {
    padding: 16px 30px;
  }
}

.faq-card:last-child {
  border-bottom: none;
}

.faq-card:hover {
  background: rgba(0, 177, 79, 0.05);
}

.faq-card:hover .faq-card__title {
  color: #009643;
}

.faq-card:hover .faq-card__arrow svg {
  color: #009643;
  transform: translateX(2px);
}

.faq-card__title {
  color: #263a4d;
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: -0.16px;
  flex: 1;
  transition: color 0.15s;
}

@media (min-width: 768px) {
  .faq-card__title {
    font-size: 16px;
    line-height: 24px;
  }
}

.faq-card__arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.faq-card__arrow svg {
  color: #b3b8bd;
  transition:
    color 0.15s,
    transform 0.15s;
}

/* ── Empty state ────────────────────────────────────────────────────────────── */
.faq-empty {
  color: #7f878f;
  padding: 40px 0;
  text-align: center;
  font-size: 14px;
}

/* =============================================================================
   SEARCH BOX
   ============================================================================= */

.faq-search-box {
  margin-bottom: 24px;
}

.faq-search-box__inner {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid #e9eaec;
  border-radius: 10px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  overflow: hidden;
}

.faq-search-box__inner:focus-within {
  border-color: #009643;
  box-shadow: 0 0 0 3px rgba(0, 177, 79, 0.1);
}

.faq-search-box__icon {
  display: flex;
  align-items: center;
  padding: 0 0 0 16px;
  color: #7f878f;
  flex-shrink: 0;
  pointer-events: none;
}

.faq-search-box__input {
  flex: 1;
  height: 48px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  font-family: Inter, sans-serif;
  color: #263a4d;
  padding: 0 12px;
}

.faq-search-box__input::placeholder {
  color: #b3b8bd;
  font-size: 15px;
}

.faq-search-box__clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: 6px;
  border: none;
  background: #f4f5f5;
  border-radius: 50%;
  cursor: pointer;
  color: #7f878f;
  flex-shrink: 0;
  transition:
    background 0.15s,
    color 0.15s;
  padding: 0;
}

.faq-search-box__clear:hover {
  background: #e9eaec;
  color: #263a4d;
}

/* =============================================================================
   SEARCH RESULTS
   ============================================================================= */

.faq-search-results__meta {
  margin-bottom: 12px;
  font-size: 14px;
  color: #7f878f;
  line-height: 22px;
}

.faq-search-results__count strong {
  color: #263a4d;
}

.faq-search-results__count--empty {
  color: #7f878f;
}

/* Result cards */
.faq-search-results__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
}

/* Search result card — same base as .faq-card but with excerpt + badge */
.faq-card--search {
  flex-direction: row;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #f2f4f5;
  padding: 14px 20px;
  text-decoration: none;
  transition: background 0.15s;
  gap: 16px;
}

@media (min-width: 768px) {
  .faq-card--search {
    padding: 16px 30px;
  }
}

.faq-card--search:last-child {
  border-bottom: none;
}

.faq-card--search:hover {
  background: rgba(0, 177, 79, 0.05);
}

.faq-card--search:hover .faq-card__title {
  color: #009643;
}

.faq-card--search:hover .faq-card__arrow svg {
  color: #009643;
  transform: translateX(2px);
}

.faq-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.faq-card__cat-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 1px 8px;
  background: rgba(0, 177, 79, 0.1);
  color: #009643;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  margin-bottom: 2px;
}

.faq-card__excerpt {
  display: block;
  font-size: 13px;
  color: #7f878f;
  line-height: 20px;
  letter-spacing: 0.13px;
  /* Clamp 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Highlight mark */
.faq-hl {
  background: #fff3cd;
  color: #263a4d;
  border-radius: 2px;
  padding: 0 1px;
  font-style: normal;
}

/* Empty search result */
.faq-search-results__empty {
  text-align: center;
  padding: 48px 20px;
  background: #fff;
  border-radius: 8px;
  color: #7f878f;
  font-size: 14px;
  line-height: 22px;
}

.faq-search-results__empty svg {
  display: block;
  margin: 0 auto 12px;
}

/* =============================================================================
   MOBILE — search box adjustments
   ============================================================================= */

@media (max-width: 767px) {
  .faq-search-box {
    margin-bottom: 16px;
  }

  .faq-search-box__input {
    height: 44px;
    font-size: 14px;
  }

  .faq-search-box__input::placeholder {
    font-size: 14px;
  }

  .faq-card {
    padding: 12px 16px;
  }

  .faq-card--search {
    padding: 12px 16px;
  }

  .faq-category-section__title {
    font-size: 18px;
  }
}
