/* ═══════════════════════════════════════════
   SLEEK BILL KNOWLEDGE BASE - FRONTEND CSS
   ═══════════════════════════════════════════ */
:root {
  --brand-900: #0c4a6e; --brand-700: #0369a1; --brand-600: #0284c7;
  --brand-500: #0ea5e9; --brand-100: #e0f2fe; --brand-50: #f0f9ff;
  --slate-900: #0f172a; --slate-700: #334155; --slate-500: #64748b;
  --slate-400: #94a3b8; --slate-300: #cbd5e1; --slate-200: #e2e8f0;
  --slate-100: #f1f5f9; --slate-50: #f8fafc;
  --radius: 14px; --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 8px 30px rgba(0,0,0,.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.12);
  --font-body: 'DM Sans', sans-serif;
  --font-display: 'Instrument Serif', serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); background: var(--slate-50); color: var(--slate-700); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
button { font-family: var(--font-body); cursor: pointer; }

/* ─── NAVBAR ─── */
.navbar {
  background: #fff; border-bottom: 1px solid var(--slate-200);
  position: sticky; top: 0; z-index: 100; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: 700;
}
.nav-brand-text { font-weight: 700; font-size: 16px; color: var(--slate-900); }
.nav-badge {
  background: var(--brand-50); color: var(--brand-600);
  padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 600;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 16px; border-radius: 8px; border: none; background: transparent;
  color: var(--slate-500); font-weight: 600; font-size: 13px; transition: all .2s;
}
.nav-link:hover { background: var(--slate-100); color: var(--slate-900); }
.nav-cta {
  padding: 8px 18px; border-radius: 8px; border: none;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  color: #fff; font-weight: 600; font-size: 13px; margin-left: 8px;
}
.nav-mobile-toggle { display: none; background: none; border: none; font-size: 24px; color: var(--slate-700); }
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute;
    top: 64px; left: 0; right: 0; background: #fff;
    border-bottom: 1px solid var(--slate-200); padding: 12px 16px; gap: 4px;
    box-shadow: var(--shadow-md);
  }
  .nav-mobile-toggle { display: block; }
  .nav-badge { display: none; }
}

/* ─── MAIN ─── */
.main-wrap { max-width: 1000px; margin: 0 auto; padding: 36px clamp(16px, 4vw, 48px) 80px; }

/* ─── HERO ─── */
.hero {
  background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 40%, var(--brand-500) 100%);
  border-radius: var(--radius-lg); padding: 56px 40px 52px;
  margin-bottom: 48px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -80px; right: -80px;
  width: 280px; height: 280px; border-radius: 50%; background: rgba(255,255,255,.06);
}
.hero::after {
  content: ''; position: absolute; bottom: -60px; left: -40px;
  width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.04);
}
.hero-dot1, .hero-dot2 { position: absolute; border-radius: 50%; background: rgba(255,255,255,.15); }
.hero-dot1 { top: 30px; right: 120px; width: 8px; height: 8px; }
.hero-dot2 { bottom: 50px; right: 200px; width: 12px; height: 12px; }
.hero h1 {
  font-family: var(--font-display); font-size: clamp(28px, 5vw, 44px);
  color: #fff; font-weight: 400; margin-bottom: 10px; position: relative; z-index: 1;
}
.hero p {
  color: rgba(255,255,255,.7); font-size: 16px; max-width: 460px;
  line-height: 1.6; margin-bottom: 28px; position: relative; z-index: 1;
}
.search-wrap { position: relative; max-width: 560px; z-index: 10; }
.search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 18px; color: rgba(255,255,255,.5); pointer-events: none;
}
.search-input {
  width: 100%; padding: 16px 20px 16px 46px;
  border-radius: var(--radius); border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.12); backdrop-filter: blur(10px);
  color: #fff; font-size: 15px; outline: none; font-family: var(--font-body);
}
.search-input::placeholder { color: rgba(255,255,255,.45); }
.search-input:focus { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.18); }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  max-height: 380px; overflow: auto; display: none;
}
.search-results.visible { display: block; }
.search-result-item {
  padding: 14px 20px; cursor: pointer; border-bottom: 1px solid var(--slate-100);
  display: flex; align-items: center; gap: 12px; transition: background .15s;
}
.search-result-item:hover { background: var(--slate-50); }
.search-result-item:last-child { border-bottom: none; }
.search-result-icon { font-size: 20px; flex-shrink: 0; }
.search-result-title { font-weight: 600; color: var(--slate-900); font-size: 14px; }
.search-result-cat { color: var(--slate-400); font-size: 12px; }
.search-empty { padding: 24px; text-align: center; color: var(--slate-400); font-size: 14px; }

/* ─── SECTIONS ─── */
.section-title {
  font-family: var(--font-display); font-size: 28px;
  color: var(--slate-900); font-weight: 400; margin-bottom: 24px;
}

/* ─── CATEGORY GRID ─── */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 56px; }
.cat-card {
  background: #fff; border-radius: 16px; padding: 28px 24px;
  border: 1px solid var(--slate-200); transition: all .3s ease;
  position: relative; overflow: hidden; display: block;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.06); }
.cat-card-orb { position: absolute; top: -20px; right: -20px; width: 80px; height: 80px; border-radius: 50%; opacity: .08; }
.cat-card-icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 16px;
}
.cat-card h3 { font-size: 17px; font-weight: 600; color: var(--slate-900); margin-bottom: 8px; }
.cat-card p { font-size: 13px; color: var(--slate-500); line-height: 1.5; margin-bottom: 14px; }
.cat-card-count { font-size: 12px; font-weight: 600; }

/* ─── POPULAR ─── */
.popular-list { background: #fff; border-radius: 16px; border: 1px solid var(--slate-200); overflow: hidden; margin-bottom: 56px; }
.popular-item {
  padding: 18px 24px; border-bottom: 1px solid var(--slate-100);
  display: flex; align-items: center; gap: 16px; transition: background .15s;
}
.popular-item:last-child { border-bottom: none; }
.popular-item:hover { background: var(--slate-50); }
.popular-rank {
  width: 36px; height: 36px; border-radius: 10px; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.popular-info { flex: 1; min-width: 0; }
.popular-title { font-weight: 600; color: var(--slate-900); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.popular-cat { color: var(--slate-400); font-size: 12px; }
.popular-views { color: var(--slate-300); font-size: 12px; flex-shrink: 0; }

/* ─── FAQ ─── */
.faq-list { margin-bottom: 56px; }
.faq-item { background: #fff; border-radius: var(--radius); border: 1px solid var(--slate-200); margin-bottom: 10px; overflow: hidden; transition: box-shadow .2s; }
.faq-item.open { box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.faq-q {
  padding: 18px 24px; cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; font-weight: 600; color: var(--slate-900);
  font-size: 14px; background: none; border: none; width: 100%; text-align: left;
}
.faq-toggle { color: var(--slate-400); font-size: 22px; transition: transform .3s ease; flex-shrink: 0; line-height: 1; }
.faq-item.open .faq-toggle { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a-inner { padding: 0 24px 20px; color: var(--slate-500); font-size: 14px; line-height: 1.7; }

/* ─── CTA BANNER ─── */
.cta-banner {
  background: linear-gradient(135deg, var(--brand-50), #e0f2fe, #f0fdf4);
  border-radius: var(--radius-lg); padding: 40px 32px; text-align: center; border: 1px solid #bae6fd;
}
.cta-banner h3 { font-family: var(--font-display); font-size: 22px; font-weight: 400; color: var(--brand-900); margin-bottom: 8px; }
.cta-banner p { color: var(--slate-500); font-size: 14px; margin-bottom: 20px; }
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-600); color: #fff; padding: 12px 28px;
  border-radius: 12px; font-weight: 600; font-size: 14px; border: none; transition: background .2s;
}
.cta-btn:hover { background: var(--brand-700); }

/* ─── BREADCRUMB ─── */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--slate-400); flex-wrap: wrap; margin-bottom: 24px; }
.breadcrumb-link { color: var(--brand-600); font-weight: 500; }
.breadcrumb-link:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--slate-300); }
.breadcrumb-current { color: var(--slate-500); font-weight: 500; }

/* ─── CATEGORY PAGE ─── */
.cat-header { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.cat-header-icon { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; flex-shrink: 0; }
.cat-header h1 { font-family: var(--font-display); font-size: 32px; color: var(--slate-900); font-weight: 400; margin: 0; }
.cat-header p { color: var(--slate-500); font-size: 14px; margin: 4px 0 0; }
.art-list { display: grid; gap: 12px; }
.art-list-item {
  background: #fff; border-radius: var(--radius); padding: 22px 24px;
  border: 1px solid var(--slate-200); display: flex; align-items: flex-start;
  gap: 16px; transition: all .2s;
}
.art-list-item:hover { border-color: rgba(14,165,233,.25); box-shadow: 0 4px 20px rgba(14,165,233,.06); }
.art-num { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; margin-top: 2px; }
.art-list-info { flex: 1; }
.art-list-title { font-weight: 600; color: var(--slate-900); font-size: 15px; margin-bottom: 6px; }
.art-list-meta { display: flex; gap: 16px; color: var(--slate-400); font-size: 12px; flex-wrap: wrap; }
.art-list-arrow { color: var(--slate-300); font-size: 18px; flex-shrink: 0; margin-top: 4px; }

/* ─── ARTICLE PAGE ─── */
.art-layout { display: flex; gap: 40px; align-items: flex-start; }
.art-main { flex: 1 1 520px; min-width: 0; }
.art-sidebar { flex: 0 0 260px; position: sticky; top: 84px; }
@media (max-width: 860px) { .art-layout { flex-direction: column; } .art-sidebar { position: static; width: 100%; } }
.art-cat-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; margin-bottom: 16px; }
.art-page-title { font-family: var(--font-display); font-size: clamp(24px, 4vw, 34px); color: var(--slate-900); font-weight: 400; line-height: 1.3; margin-bottom: 12px; }
.art-page-meta { display: flex; gap: 16px; color: var(--slate-400); font-size: 13px; margin-bottom: 32px; flex-wrap: wrap; }

/* Article Content Body */
.art-body h3 { font-size: 18px; font-weight: 700; color: var(--slate-900); margin: 28px 0 10px; line-height: 1.4; }
.art-body p { margin: 0 0 14px; line-height: 1.8; font-size: 15px; }
.art-body strong { color: var(--slate-900); }
.art-body code { background: var(--slate-100); padding: 2px 7px; border-radius: 5px; font-size: 13px; color: #be185d; }
.art-body .tip { background: #eff6ff; border-left: 3px solid var(--brand-600); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 16px 0; font-size: 14px; }
.art-body img { max-width: 100%; height: auto; border-radius: 12px; margin: 16px 0; box-shadow: var(--shadow-sm); border: 1px solid var(--slate-200); }
.art-body .video-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 12px; margin: 20px 0; box-shadow: var(--shadow-md); }
.art-body .video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; border-radius: 12px; }
.art-body ul, .art-body ol { margin: 0 0 14px 20px; line-height: 1.8; font-size: 15px; }
.art-body li { margin-bottom: 6px; }
.art-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--slate-200); }
.art-tag { background: var(--slate-100); color: var(--slate-500); padding: 4px 12px; border-radius: 8px; font-size: 12px; font-weight: 500; }

.helpful-box { background: var(--slate-50); border-radius: var(--radius); padding: 24px 28px; margin-top: 24px; text-align: center; border: 1px solid var(--slate-200); }
.helpful-box p { margin-bottom: 14px; font-size: 15px; font-weight: 600; color: var(--slate-900); }
.helpful-btns { display: flex; gap: 12px; justify-content: center; }
.helpful-btn { padding: 10px 28px; border-radius: 10px; font-weight: 600; font-size: 14px; border: 1px solid; cursor: pointer; transition: all .2s; }
.helpful-yes { border-color: #d1fae5; background: #ecfdf5; color: #059669; }
.helpful-yes:hover { background: #d1fae5; }
.helpful-no { border-color: #fee2e2; background: #fef2f2; color: #dc2626; }
.helpful-no:hover { background: #fee2e2; }

.sidebar-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--slate-200); padding: 20px; margin-bottom: 16px; }
.sidebar-heading { font-size: 13px; font-weight: 700; color: var(--slate-400); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
.sidebar-link { display: block; padding: 10px 0; border-bottom: 1px solid var(--slate-100); color: var(--brand-600); font-size: 13px; font-weight: 500; transition: color .15s; }
.sidebar-link:last-child { border-bottom: none; }
.sidebar-link:hover { color: var(--brand-700); }
.sidebar-cta { background: linear-gradient(135deg, var(--brand-900), var(--brand-700)); border-radius: var(--radius); padding: 20px; color: #fff; }
.sidebar-cta h4 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.sidebar-cta p { font-size: 13px; opacity: .8; line-height: 1.5; margin-bottom: 14px; }
.sidebar-cta-btn { display: inline-block; background: rgba(255,255,255,.2); color: #fff; padding: 8px 18px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.sidebar-cta-btn:hover { background: rgba(255,255,255,.3); }

/* ─── FOOTER ─── */
.site-footer { border-top: 1px solid var(--slate-200); padding: 32px clamp(16px, 4vw, 48px); background: #fff; }
.footer-inner { max-width: 1000px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-brand span:first-child { font-size: 16px; }
.footer-brand span:last-child { font-weight: 600; font-size: 14px; color: var(--slate-900); }
.footer-copy { color: var(--slate-400); font-size: 13px; }
.footer-copy a { color: var(--brand-600); }
