/* ═══════════════════════════════════════════════
   Captain Help Center — Front Office Styles
   @author captainlinux.io
 ═══════════════════════════════════════════════ */

:root {
  --chc-front-primary: #1e293b;
  --chc-front-accent:  #2563eb;
  --chc-front-light:   #f8fafc;
  --chc-front-border:  #e2e8f0;
  --chc-front-muted:   #64748b;
  --chc-front-radius:  12px;
  --chc-front-shadow:  0 4px 20px -2px rgba(0,0,0,0.06);
}

.chc-front-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 15px;
  font-family: inherit;
  color: var(--chc-front-primary);
}

/* ── Hero / Search ── */
.chc-hero {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  border-radius: var(--chc-front-radius);
  padding: 40px 24px;
  text-align: center;
  margin-bottom: 35px;
}
.chc-hero-title {
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0 0 10px 0;
}
.chc-hero-subtitle {
  color: #94a3b8;
  font-size: 1.05rem;
  margin: 0 0 25px 0;
}
.chc-search-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
}
.chc-search-input {
  flex: 1;
  padding: 14px 20px;
  border-radius: 30px;
  border: none;
  font-size: 1rem;
  outline: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.chc-search-btn {
  background: var(--chc-front-accent);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 14px 28px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.chc-search-btn:hover {
  background: #1d4ed8;
}

/* ── Live Search Autocomplete Dropdown ── */
.chc-search-form {
  position: relative !important;
}
.chc-autocomplete-dropdown {
  position: absolute;
  top: 105%;
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  z-index: 9999;
  text-align: left;
}
.chc-autocomplete-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  color: #1e293b;
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
  cursor: pointer;
}
.chc-autocomplete-item:last-child {
  border-bottom: none;
}
.chc-autocomplete-item:hover,
.chc-autocomplete-item.chc-autocomplete-item--active {
  background: #f8fafc;
  text-decoration: none;
}
.chc-autocomplete-title {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chc-autocomplete-item:hover .chc-autocomplete-title {
  color: #2563eb;
}
.chc-autocomplete-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.chc-autocomplete-more {
  display: block;
  text-align: center;
  padding: 10px;
  background: #f1f5f9;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}
.chc-autocomplete-more:hover {
  background: #e2e8f0;
}

/* ── Type Navigation Pills ── */
.chc-types-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 35px;
}
.chc-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #fff;
  border: 1px solid var(--chc-front-border);
  border-radius: 20px;
  color: var(--chc-front-primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
}
.chc-type-pill:hover, .chc-type-pill--active {
  background: var(--chc-front-accent);
  color: #fff;
  border-color: var(--chc-front-accent);
  text-decoration: none;
}

/* ── Grid Layouts ── */
.chc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}
.chc-card {
  background: #fff;
  border: 1px solid var(--chc-front-border);
  border-radius: var(--chc-front-radius);
  padding: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.chc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--chc-front-shadow);
}
.chc-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  align-self: flex-start;
}
.chc-badge--faq { background: #dbeafe; color: #1e40af; }
.chc-badge--guide { background: #dcfce7; color: #166534; }
.chc-badge--glossary { background: #fef3c7; color: #92400e; }
.chc-badge--diagnostic { background: #fee2e2; color: #991b1b; }
.chc-badge--tutorial { background: #f3e8ff; color: #6b21a8; }

.chc-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  line-height: 1.35;
}
.chc-card-title a {
  color: var(--chc-front-primary);
  text-decoration: none;
}
.chc-card-title a:hover {
  color: var(--chc-front-accent);
}
.chc-card-summary {
  font-size: 0.9rem;
  color: var(--chc-front-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}
.chc-card-footer {
  font-size: 0.8rem;
  color: var(--chc-front-muted);
  border-top: 1px solid var(--chc-front-border);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
}

/* ── FAQ Accordion Dropdown ── */
.chc-faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}
.chc-faq-item {
  background: #fff;
  border: 1.5px solid var(--chc-front-border);
  border-radius: var(--chc-front-radius);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.chc-faq-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.chc-faq-item.chc-faq-item--open {
  border-color: var(--chc-front-accent);
  box-shadow: 0 4px 20px rgba(37,99,235,0.08);
}
.chc-faq-trigger {
  width: 100%;
  padding: 18px 24px;
  background: #fff;
  border: none;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--chc-front-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  user-select: none;
}
.chc-faq-question-text {
  flex: 1;
}
.chc-faq-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--chc-front-accent);
  flex-shrink: 0;
  transition: transform 0.3s ease, background 0.2s;
}
.chc-faq-item.chc-faq-item--open .chc-faq-icon {
  transform: rotate(180deg);
  background: #dbeafe;
}
.chc-faq-body {
  padding: 0 24px 22px 24px;
  font-size: 0.98rem;
  line-height: 1.65;
  color: #334155;
  border-top: 1px solid #f1f5f9;
  margin-top: 5px;
  padding-top: 18px;
}
.chc-faq-short-answer {
  font-size: 1.05rem;
  color: #1e293b;
  margin-bottom: 12px;
}
.chc-faq-summary-text {
  color: #475569;
  margin-bottom: 14px;
}
.chc-faq-content-html {
  color: #334155;
  margin-bottom: 16px;
}
.chc-faq-footer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px dashed var(--chc-front-border);
  margin-top: 15px;
  font-size: 0.88rem;
}
.chc-faq-cat-badge {
  background: #f1f5f9;
  color: #475569;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
}

/* ── Article View Layout ── */
.chc-article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 35px;
}
@media (max-width: 850px) {
  .chc-article-layout {
    grid-template-columns: 1fr;
  }
}
.chc-article-main {
  background: #fff;
  border: 1px solid var(--chc-front-border);
  border-radius: var(--chc-front-radius);
  padding: 35px;
}
.chc-article-title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 15px 0;
  line-height: 1.25;
}
.chc-article-meta {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--chc-front-muted);
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--chc-front-border);
}
.chc-article-summary {
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.6;
  color: #334155;
  background: var(--chc-front-light);
  padding: 20px;
  border-left: 4px solid var(--chc-front-accent);
  border-radius: 6px;
  margin-bottom: 30px;
}
.chc-article-body {
  font-size: 1rem;
  line-height: 1.7;
  color: #1e293b;
}

/* ── Table of Contents (TOC) Sidebar ── */
.chc-toc-card {
  position: sticky;
  top: 20px;
  background: #fff;
  border: 1px solid var(--chc-front-border);
  border-radius: var(--chc-front-radius);
  padding: 20px;
}
.chc-toc-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px 0;
}
.chc-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chc-toc-list a {
  font-size: 0.88rem;
  color: var(--chc-front-muted);
  text-decoration: none;
}
.chc-toc-list a:hover {
  color: var(--chc-front-accent);
}
.chc-toc-list .toc-h3 {
  padding-left: 15px;
}

/* ── Related Products ── */
.chc-products-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid var(--chc-front-border);
}
.chc-section-heading {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
}
