/* ===================================================
   PaisaTrack Help Center — styles.css
   =================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #4CAF50;
  --green-light: #81C784;
  --green-dark: #388E3C;
  --gold: #FFD700;
  --gold-dark: #F9A825;
  --dark: #2C3E50;
  --dark-mid: #34495e;
  --bg: #f8faf9;
  --bg-white: #ffffff;
  --text: #1a2332;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --header-h: 68px;
  --font-body: 'Inter', sans-serif;
  --font-display: 'Nunito', sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}
a { text-decoration: none; color: inherit; }

.container { max-width: 1060px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 50px;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  cursor: pointer; border: 2px solid transparent; transition: all 0.2s; white-space: nowrap;
}
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(76,175,80,0.4); }

/* ── Header ── */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 36px; height: 36px; background: var(--green); color: #fff;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900;
}
.logo-img {
  width: 36px; height: 36px; object-fit: contain;
}
.logo-text { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--dark); }
.logo-text strong { color: var(--green); font-weight: 900; }
.header-badge {
  font-size: 13px; font-weight: 700; color: var(--green-dark);
  background: rgba(76,175,80,0.1); padding: 4px 14px; border-radius: 50px;
  letter-spacing: 0.3px;
}

/* ── Hero ── */
.hero {
  padding: calc(var(--header-h) + 48px) 0 40px;
  background: linear-gradient(135deg, #f0faf1 0%, #fafbf5 50%, #fff9e6 100%);
  text-align: center;
}
.hero h1 {
  font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px);
  font-weight: 900; color: var(--dark); margin-bottom: 8px;
}
.hero p { font-size: 16px; color: var(--text-muted); margin-bottom: 28px; }

/* ── Search ── */
.search-wrap {
  position: relative; max-width: 560px; margin: 0 auto;
  display: flex; align-items: center;
  background: var(--bg-white); border: 2px solid var(--border);
  border-radius: 50px; padding: 0 20px; transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrap:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(76,175,80,0.1);
}
.search-icon { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; }
.search-input {
  flex: 1; border: none; outline: none; padding: 14px 12px;
  font-size: 15px; font-family: var(--font-body); background: transparent; color: var(--text);
}
.search-input::placeholder { color: #9ca3af; }
.search-clear {
  background: none; border: none; font-size: 20px; color: var(--text-muted);
  cursor: pointer; padding: 4px; line-height: 1;
}

/* Search results */
.search-results {
  max-width: 560px; margin: 8px auto 0;
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  overflow: hidden; text-align: left;
}
.search-result {
  display: block; width: 100%; padding: 12px 20px; border: none; background: none;
  text-align: left; cursor: pointer; border-bottom: 1px solid #f3f4f6;
  font-family: var(--font-body); transition: background 0.15s;
}
.search-result:last-child { border-bottom: none; }
.search-result:hover { background: #f0fdf4; }
.search-result-title { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.search-result-meta { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.search-empty { padding: 16px 20px; font-size: 14px; color: var(--text-muted); text-align: center; }

/* ── Category Grid ── */
.categories { padding: 48px 0; }
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.cat-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 28px 24px; border-radius: var(--radius); color: #fff;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
  border: none; text-align: left; font-family: var(--font-body);
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.cat-icon { font-size: 32px; }
.cat-title { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.cat-desc { font-size: 13px; opacity: 0.9; line-height: 1.5; }
.cat-count { font-size: 12px; opacity: 0.75; font-weight: 600; margin-top: 4px; }

/* ── Popular ── */
.popular { padding: 0 0 64px; }
.section-title {
  font-family: var(--font-display); font-size: 22px; font-weight: 800;
  color: var(--dark); margin-bottom: 20px;
}
.popular-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.popular-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 20px; background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s;
  border-left: 3px solid var(--green); font-family: var(--font-body); text-align: left;
}
.popular-card:hover { border-color: var(--green); box-shadow: var(--shadow-sm); transform: translateX(2px); }
.popular-title { font-size: 14px; font-weight: 600; color: var(--text); }
.popular-meta { font-size: 12px; color: var(--text-muted); }

/* ── Breadcrumbs ── */
.breadcrumbs {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 16px 0 20px; font-size: 14px;
}
.bc-link {
  background: none; border: none; color: var(--green); font-weight: 600;
  cursor: pointer; font-family: var(--font-body); font-size: 14px; padding: 0;
}
.bc-link:hover { text-decoration: underline; }
.bc-sep { color: var(--text-muted); }
.bc-current { color: var(--text-muted); font-weight: 500; }

/* ── Category View ── */
.category-view { padding: calc(var(--header-h) + 24px) 0 64px; }
.cat-header {
  display: flex; align-items: center; gap: 16px;
  padding: 24px 28px; border-radius: var(--radius); color: #fff; margin-bottom: 32px;
}
.cat-header-icon { font-size: 40px; }
.cat-header-title { font-family: var(--font-display); font-size: 26px; font-weight: 800; margin: 0; }
.cat-header-desc { font-size: 14px; opacity: 0.9; margin: 4px 0 0; }

.sections-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.section-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
}
.section-card-title {
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
  color: var(--dark); margin-bottom: 16px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.article-link {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 0; border: none; background: none;
  font-family: var(--font-body); font-size: 14px; color: var(--text);
  cursor: pointer; text-align: left; transition: color 0.15s;
  border-bottom: 1px solid #f3f4f6;
}
.article-link:last-child { border-bottom: none; }
.article-link:hover { color: var(--green); }
.article-link-title { flex: 1; }
.article-link .fire { font-size: 12px; }
.article-link .arrow { color: var(--text-muted); font-size: 16px; }

/* ── Article View ── */
.article-view { padding: calc(var(--header-h) + 24px) 0 64px; }
.article-layout {
  display: grid; grid-template-columns: 1fr 260px; gap: 40px;
}
.article-main {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px 36px; box-shadow: var(--shadow-sm);
}
.article-title {
  font-family: var(--font-display); font-size: 28px; font-weight: 800;
  color: var(--dark); margin-bottom: 8px; line-height: 1.3;
}
.article-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 28px; }
.article-body { font-size: 15px; line-height: 1.8; color: #4b5563; }
.article-body h3 {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: var(--dark); margin: 28px 0 12px;
}
.article-body p { margin-bottom: 14px; }
.article-body ul, .article-body ol { padding-left: 20px; margin-bottom: 16px; }
.article-body li { margin-bottom: 6px; }
.article-body strong { color: var(--text); }

/* Article sidebar */
.article-sidebar {
  position: sticky; top: calc(var(--header-h) + 24px);
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm);
  align-self: start;
}
.sidebar-title {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  color: var(--dark); margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.sidebar-link {
  display: block; width: 100%; padding: 8px 10px; border: none; background: none;
  font-family: var(--font-body); font-size: 13px; color: var(--text-muted);
  cursor: pointer; text-align: left; border-radius: var(--radius-xs);
  transition: all 0.15s; margin-bottom: 2px;
}
.sidebar-link:hover { background: #f0fdf4; color: var(--green-dark); }
.sidebar-link.active { background: rgba(76,175,80,0.1); color: var(--green-dark); font-weight: 600; }

/* ── Contact ── */
.contact { padding: 0 0 64px; }
.contact-card {
  text-align: center; padding: 48px 32px;
  background: linear-gradient(135deg, #f0faf1 0%, #fff9e6 100%);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.contact-card h2 { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.contact-card p { font-size: 15px; color: var(--text-muted); margin-bottom: 20px; }
.contact-email { font-size: 13px; color: var(--text-muted); margin-top: 12px; }

/* ── Footer ── */
.footer {
  padding: 20px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-white);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--text-muted);
}
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--green); font-weight: 500; }
.footer-links a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .cat-grid { grid-template-columns: 1fr; }
  .sections-grid { grid-template-columns: 1fr; }
  .header-badge { display: none; }
  .article-main { padding: 28px 20px; }
}
