/* ============================================================
   Moulmall Studio Help Center — Custom Styles
   ============================================================ */

:root {
  --brand: #0FA958;
  --brand-light: #e8f8f0;
  --brand-dark: #0a8a45;
  --text-primary: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg-light: #f9fafb;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
}

/* ---- Navbar ---- */
.navbar { box-shadow: 0 1px 3px rgba(0,0,0,.05); min-height: 60px; }
.navbar-brand .brand-icon {
  width: 32px; height: 32px;
  background: var(--brand-light);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
  font-size: 1rem;
}
.navbar-brand .fw-semibold { font-size: 1rem; color: #111; }
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
}
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

/* ---- Hero ---- */
.hero-section {
  background: linear-gradient(160deg, #f0fdf7 0%, #fafffe 60%, #fff 100%);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 0;
}
.hero-section h1 { color: var(--text-primary); }
.hero-search { border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; }
.hero-search .input-group-text,
.hero-search .form-control {
  border: none !important;
  box-shadow: none !important;
  background: #fff;
}
.hero-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,169,88,.12); }

/* ---- Category Card (Homepage) ---- */
.category-card {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.25rem 1rem;
  transition: border-color .18s, box-shadow .18s, transform .18s;
  background: #fff;
  display: block;
  color: inherit;
}
.category-card:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 16px rgba(15,169,88,.1);
  transform: translateY(-2px);
  color: inherit;
}
.category-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.article-preview-list { list-style: none; border-top: 1px solid var(--border); padding-top: .6rem; margin-top: .6rem !important; }
.article-preview-list li { padding: .15rem 0; }

/* ---- Category icon large (category page) ---- */
.category-icon-lg {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

/* ---- Article list card (category page) ---- */
.article-list-card {
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.article-list-card:hover {
  border-color: var(--brand) !important;
  box-shadow: 0 2px 8px rgba(15,169,88,.08);
  color: inherit;
}

/* ---- Sidebar ---- */
.docs-sidebar-wrapper {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  padding-right: 4px;
}
.docs-sidebar-wrapper::-webkit-scrollbar { width: 4px; }
.docs-sidebar-wrapper::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

.docs-sidebar { font-size: .875rem; }

.sidebar-section { margin-bottom: .25rem; }

.sidebar-category-link {
  display: flex;
  align-items: center;
  padding: .45rem .75rem;
  border-radius: 7px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  transition: background .15s, color .15s;
}
.sidebar-category-link:hover { background: var(--bg-light); color: #333; }
.sidebar-category-link.active { color: var(--brand); }

.sidebar-articles { padding-left: .5rem; margin-bottom: .5rem; }
.sidebar-link {
  display: block;
  padding: .3rem .75rem;
  border-radius: 6px;
  color: #555;
  text-decoration: none;
  font-size: .85rem;
  transition: background .12s, color .12s;
  line-height: 1.4;
}
.sidebar-link:hover { background: var(--brand-light); color: var(--brand); }
.sidebar-link.active {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
}

/* ---- Article Content ---- */
.article-header .badge { font-weight: 500; }

.article-content { line-height: 1.75; color: #374151; }

.article-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 2.25rem;
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--border);
  color: var(--text-primary);
}
.article-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: .5rem;
  color: #1f2937;
}
.article-content h4 {
  font-size: .95rem;
  font-weight: 600;
  margin-top: 1.25rem;
  color: #374151;
}
.article-content p { margin-bottom: 1rem; }
.article-content ul, .article-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.article-content li { margin-bottom: .3rem; }

/* Tables */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: .9rem;
}
.article-content th {
  background: var(--bg-light);
  padding: .6rem 1rem;
  text-align: left;
  font-weight: 600;
  border: 1px solid var(--border);
  color: #374151;
}
.article-content td {
  padding: .55rem 1rem;
  border: 1px solid var(--border);
  vertical-align: top;
}
.article-content tr:nth-child(even) td { background: #fafafa; }

/* Blockquotes */
.article-content blockquote {
  border-left: 4px solid var(--brand);
  background: var(--brand-light);
  padding: .75rem 1rem .75rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1.25rem 0;
  color: #374151;
}
.article-content blockquote p { margin: 0; }

/* Code */
.article-content code {
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: .875em;
  color: #d63384;
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
}
.article-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.25rem;
  border-radius: 10px;
  overflow-x: auto;
  margin: 1.25rem 0;
}
.article-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: .875rem;
}

/* HR */
.article-content hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 1.75rem 0;
}

/* Strong */
.article-content strong { color: #111; font-weight: 600; }

/* ---- Article navigation (prev/next) ---- */
.nav-article-link {
  background: #fff;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.nav-article-link:hover {
  border-color: var(--brand) !important;
  box-shadow: 0 2px 8px rgba(15,169,88,.08);
  color: inherit;
}

/* ---- Breadcrumb ---- */
.breadcrumb { font-size: .825rem; }
.breadcrumb-item.active { color: var(--text-muted); }

/* ---- Responsive ---- */
@media (max-width: 992px) {
  .hero-section { padding: 2.5rem 0; }
}
