/* ============================================================
   Help Center — guide article pages (/help-center/*)
   Source: Figma page "FAQ" (1061:418), frames Ep1–Ep6
   ============================================================ */

/* ---------- Hero header (Used on /help-center landing) ---------- */
.hc-header {
  background: linear-gradient(180deg, #e7f3fb 0%, #ffffff 80%);
  padding: 64px 0 48px;
  border-bottom: 1px solid #e2e8f0;
}
.hc-header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-align: center;
}
.hc-header h1 {
  font: var(--text-h1);
  color: var(--navy);
  margin-bottom: 8px;
}
.hc-header-sub {
  font: var(--text-body-lg);
  color: #64748b;
  margin: 0 0 28px 0;
}
.hc-search {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 640px;
  padding: 16px 24px;
  background: var(--color-surface);
  border: 1.5px solid var(--primary-500);
  border-radius: var(--radius-xl);
}
.hc-search img { width: 24px; height: 24px; flex-shrink: 0; }
.hc-search input {
  flex: 1;
  border: none;
  outline: none;
  font: var(--text-body-md);
  color: var(--navy);
}
.hc-search input::placeholder { color: #64748b; }

/* ---------- Article Top Search Bar (Clean Centered) ---------- */
.hc-top-bar {
  background: #ffffff;
  padding: 24px 0 20px;
  border-bottom: 1px solid #eef2f6;
}
.hc-top-bar-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hc-mobile-page-title {
  display: none;
}
.hc-search-bar-wrap {
  width: 100%;
  max-width: 580px;
}
.hc-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 20px;
  background: #ffffff;
  border: 1.5px solid #19b5a5;
  border-radius: 9999px;
  cursor: text;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(25, 181, 165, 0.05);
}
.hc-search-bar:focus-within {
  border-color: #149386;
  box-shadow: 0 0 0 3px rgba(25, 181, 165, 0.15);
}
.hc-search-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.hc-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-thai);
  font-size: 15px;
  line-height: 22px;
  color: var(--navy);
}
.hc-search-input::placeholder {
  color: #94a3b8;
}
.hc-search-desktop {
  display: block;
}
.hc-search-mobile {
  display: none;
}

/* ---------- Grid shell ---------- */
.hc-grid {
  display: flex;
  align-items: flex-start;
  gap: 64px;
  padding-top: 48px;
  padding-bottom: 120px;
}

/* ---------- Mobile Sub-Bar (TOC Toggle + EP Badge) ---------- */
.hc-sub-bar {
  display: none;
}

/* ---------- Sidebar ---------- */
.hc-sidebar {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 96px;
}
.hc-cat-group { display: flex; flex-direction: column; gap: 8px; }
.hc-cat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.hc-cat-header img { width: 18px; height: 18px; }
.hc-cat-header span { font: var(--text-h6); color: var(--navy); }
.hc-sub-items { display: flex; flex-direction: column; gap: 2px; }
.hc-sidebar-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 14px;
  border-radius: var(--radius-md, 8px);
  font: 500 15px/22px var(--font-family-base);
  color: #64748b;
  text-decoration: none;
  transition: all 0.15s ease;
}
.hc-sidebar-item::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 8px;
  border-radius: 50%;
  background: #94a3b8;
  transition: all 0.15s ease;
}
.hc-sidebar-item:hover {
  color: #19b5a5;
}
.hc-sidebar-item:hover::before {
  background: #19b5a5;
}
.hc-sidebar-item.active {
  background: #e6f7f5;
  color: #19b5a5;
  font-weight: 600;
}
.hc-sidebar-item.active::before {
  background: #19b5a5;
  border-radius: 50%;
  width: 6px;
  height: 6px;
}
.hc-sidebar-item.is-soon { opacity: 0.55; cursor: default; }
.hc-sidebar-item.is-soon:hover { color: inherit; }
.hc-sidebar-item.is-soon:hover::before { background: var(--color-text-secondary); }
.hc-divider { height: 1px; background: #e4e9f1; border: none; margin: 0; }

/* ---------- Content ---------- */
.hc-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.hc-meta { display: flex; flex-direction: column; gap: 16px; }

/* Breadcrumbs (Teal active/current) */
.hc-breadcrumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hc-breadcrumb a,
.hc-breadcrumb span {
  font: 500 13px/20px var(--font-family-base);
  color: #64748b;
  text-decoration: none;
}
.hc-breadcrumb a:hover { color: #19b5a5; }
.hc-breadcrumb .current {
  color: #19b5a5;
  font-weight: 600;
}
.hc-breadcrumb img { width: 12px; height: 12px; }

/* Mobile Category Label */
.hc-category-label {
  display: none;
}

.hc-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.hc-title-row h2 {
  font: var(--text-h3);
  color: var(--navy);
  margin: 0;
}

/* Video Button (Teal outline, rounded-lg, play icon, teal text) */
.hc-watch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1.5px solid #19b5a5;
  border-radius: 10px;
  font-family: var(--font-thai);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: #19b5a5;
  background: transparent;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.2s ease;
}
.hc-watch-btn img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.hc-watch-btn:hover {
  background: #e6f7f5;
  color: #149386;
  border-color: #149386;
}

/* Steps */
.hc-steps { display: flex; flex-direction: column; gap: 40px; }
.hc-step {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 36px;
  border-bottom: 1px solid #e4e9f1;
}
.hc-step:last-child { border-bottom: none; padding-bottom: 0; }
.hc-step-header { display: flex; align-items: flex-start; gap: 16px; }

/* Step numbers: Soft pastel cyan/teal (#80d5cb) */
.hc-step-num {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: 36px;
  line-height: 44px;
  color: #80d5cb;
  flex-shrink: 0;
}
.hc-step-header h3 { font: var(--text-h6); color: var(--navy); padding-top: 6px; margin: 0; }
.hc-step-desc {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 20px;
  list-style: disc;
  font: var(--text-body-md);
  color: var(--color-text-secondary);
  margin: 0;
}

/* Step screenshots (displayed on both desktop & mobile) */
.hc-step-img {
  width: 100%;
  max-width: 936px;
  height: auto;
  border-radius: var(--radius-lg, 12px);
  display: block;
  border: 1px solid #eef2f6;
  box-shadow: 0 4px 16px rgba(11, 31, 77, 0.05);
}
.hc-step-desc strong { font-weight: 700; color: var(--navy); }
.hc-step-desc a { color: var(--primary-500); text-decoration: underline; }
.hc-accent { color: var(--primary-500); }
.hc-sub-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  padding-left: 20px;
  list-style: disc;
}
.hc-intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Support section */
.hc-support {
  border-top: 1px solid #e4e9f1;
  padding-top: 48px;
  margin-top: 48px;
}
.hc-support h3 { font: 700 22px/30px var(--font-family-base); color: var(--navy); margin-bottom: 24px; }
.hc-support-row { display: flex; gap: 24px; flex-wrap: wrap; }
.hc-support-card {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.hc-support-card img { width: 24px; height: 24px; }
.hc-support-card h4 { font: 700 16px/24px var(--font-family-base); color: var(--navy); }
.hc-support-card p { font: 400 13px/20px var(--font-family-base); color: #64748b; }
.hc-support-card a { font: 700 20px/30px var(--font-family-base); color: var(--primary-500); }
.hc-support-card a:hover { text-decoration: underline; }

/* ---------- Help Center Index Landing Page ---------- */
.hc-index-wrap {
  padding: 48px 0 80px;
}
.hc-index-category {
  margin-bottom: 48px;
}
.hc-index-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #eef2f6;
}
.hc-index-category-header img {
  width: 24px;
  height: 24px;
}
.hc-index-category-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy, #0b1f4d);
  margin: 0;
}
.hc-index-category-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--teal, #19b5a5);
  background: #e6f7f5;
  padding: 2px 10px;
  border-radius: 20px;
}

.hc-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .hc-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .hc-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.hc-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e6ecf5;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(11, 31, 77, 0.04);
}
.hc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(11, 31, 77, 0.1);
  border-color: var(--teal, #19b5a5);
}

.hc-card-thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f1f5f9;
  overflow: hidden;
  position: relative;
}
.hc-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.3s ease;
}
.hc-card:hover .hc-card-thumb {
  transform: scale(1.03);
}
.hc-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(11, 31, 77, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.hc-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
}
.hc-card-title {
  font-size: 17px;
  line-height: 24px;
  font-weight: 700;
  color: var(--navy, #0b1f4d);
  margin-bottom: 8px;
}
.hc-card:hover .hc-card-title {
  color: var(--teal, #19b5a5);
}
.hc-card-desc {
  font-size: 13px;
  line-height: 20px;
  color: #64748b;
  flex: 1;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hc-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
}
.hc-card-steps-count {
  color: #94a3b8;
  font-weight: 500;
}
.hc-card-link-text {
  color: var(--teal, #19b5a5);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hc-empty-search {
  display: none;
  text-align: center;
  padding: 48px 20px;
  color: #64748b;
}
.hc-empty-search.show {
  display: block;
}

/* ---------- Responsive (Tablet & Mobile: <= 991px) ---------- */
@media (max-width: 991px) {
  /* Hide Navbar 'เข้าสู่ระบบ' button on mobile/tablet viewports */
  .navbar-actions .btn-outline {
    display: none !important;
  }

  .hc-header .container,
  .hc-grid.container,
  .hc-top-bar .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Top Bar on Mobile */
  .hc-top-bar {
    padding: 24px 0 18px;
  }
  .hc-mobile-page-title {
    display: block;
    font-size: 22px;
    line-height: 30px;
    font-weight: 700;
    color: var(--navy, #0b1f4d);
    text-align: center;
    margin: 0 0 16px 0;
  }
  .hc-search-bar-wrap {
    max-width: 100%;
  }
  .hc-search-bar {
    padding: 10px 16px;
  }
  .hc-search-desktop {
    display: none;
  }
  .hc-search-mobile {
    display: block;
  }

  .hc-grid {
    flex-direction: column;
    gap: 0;
    padding-top: 20px;
    padding-bottom: 64px;
  }

  /* Dedicated Sub-bar (Left: TOC Button, Right: EP Badge) */
  .hc-sub-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
    margin-bottom: 20px;
    overflow: hidden;
  }
  .hc-toc-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 7px 12px;
    font-size: 13px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: var(--font-thai);
    font-weight: 600;
    color: var(--navy, #0b1f4d);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
  }
  .hc-toc-trigger:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
  }
  .hc-toc-icon {
    font-size: 15px;
  }
  .hc-toc-text {
    white-space: nowrap;
  }
  .hc-toc-chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
  }
  .hc-toc-trigger.active .hc-toc-chevron {
    transform: rotate(180deg);
  }
  .hc-ep-badge {
    display: inline-flex;
    align-items: center;
    background: #e6f7f5;
    color: #19b5a5;
    font-family: var(--font-thai);
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 1;
    min-width: 0;
    max-width: calc(100% - 170px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 9999px;
  }

  /* Mobile Sidebar accordion content */
  .hc-sidebar {
    display: none;
    position: static;
    flex: none;
    width: 100%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 14px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(11, 31, 77, 0.08);
  }
  .hc-sidebar.hc-sidebar-open {
    display: flex;
  }
  .hc-sidebar-item {
    font-size: 14px;
    line-height: 20px;
    padding: 8px 12px;
  }

  /* Content area */
  .hc-content {
    gap: 28px;
    width: 100%;
  }
  .hc-meta {
    gap: 8px;
  }
  /* Hide desktop breadcrumbs on mobile */
  .hc-breadcrumb {
    display: none;
  }
  /* Show Category label above heading on mobile */
  .hc-category-label {
    display: block;
    font-family: var(--font-thai);
    font-size: 14px;
    font-weight: 600;
    color: #19b5a5;
    margin-bottom: 2px;
  }

  .hc-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 4px;
  }
  .hc-title-row h2 {
    font-size: 22px;
    line-height: 32px;
    font-weight: 700;
  }
  .hc-watch-btn {
    font-size: 13px;
    line-height: 18px;
    padding: 7px 14px;
    border-radius: 8px;
  }

  /* Steps spacing */
  .hc-steps {
    gap: 28px;
  }
  .hc-step {
    gap: 14px;
    padding-bottom: 28px;
    border-bottom: 1px solid #e4e9f1;
  }
  .hc-step-header {
    gap: 12px;
    align-items: center;
  }
  .hc-step-num {
    font-size: 32px;
    line-height: 38px;
    color: #80d5cb;
  }
  .hc-step-header h3 {
    font-size: 17px;
    line-height: 25px;
    padding-top: 0;
  }
  .hc-step-desc {
    list-style: none;
    padding-left: 0;
    margin: 4px 0 14px;
    font-size: 14px;
    line-height: 22px;
    color: #475569;
  }
  .hc-step-desc li {
    list-style: none;
    font-size: 14px;
    line-height: 22px;
    color: #475569;
  }
  /* Step screenshot displayed cleanly on mobile */
  .hc-step-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(11, 31, 77, 0.06);
  }
  .hc-sub-list {
    list-style: none;
    padding-left: 12px;
    font-size: 14px;
    line-height: 22px;
    color: #475569;
  }
  .hc-sub-list li { list-style: none; }

  /* Support cards */
  .hc-support {
    border-top: 1px solid #e4e9f1;
    padding-top: 32px;
    margin-top: 24px;
  }
  .hc-support h3 {
    font-size: 20px;
    line-height: 28px;
    margin-bottom: 16px;
  }
  .hc-support-row {
    flex-direction: column;
    gap: 16px;
  }
  .hc-support-card {
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: center;
    column-gap: 10px;
    row-gap: 6px;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #e6ecf5;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(11, 31, 77, 0.04);
  }
  .hc-support-card img {
    grid-column: 1;
    grid-row: 1;
    width: 22px;
    height: 22px;
  }
  .hc-support-card h4 {
    grid-column: 2;
    grid-row: 1;
    font-size: 16px;
    line-height: 24px;
    margin: 0;
  }
  .hc-support-card p {
    grid-column: 1 / span 2;
    font-size: 13px;
    line-height: 20px;
    color: #64748b;
    margin: 4px 0 6px;
  }
  .hc-support-card a {
    grid-column: 1 / span 2;
    font-size: 16px;
    line-height: 24px;
    font-weight: 700;
    color: var(--teal);
    word-break: break-all;
  }
}
