/* =====================================================================
   AndaPintar - Stylesheet Situs Publik
   Dimuat setelah base.css. Semua warna diatur lewat variabel di :root
   sehingga mengubah tema cukup dengan mengganti nilai di bawah.
   Tidak ada framework atau font dari CDN, jadi halaman tetap ringan
   dan tampil utuh walau koneksi pengunjung lambat.
   ===================================================================== */

:root {
  --brand:        #1d4ed8;
  --brand-dark:   #1e3a8a;
  --brand-light:  #eff4ff;
  --accent:       #f59e0b;
  --ink:          #0f172a;
  --ink-soft:     #475569;
  --ink-muted:    #64748b;
  --line:         #e2e8f0;
  --surface:      #ffffff;
  --surface-alt:  #f8fafc;
  --ok:           #059669;
  --warn:         #d97706;
  --danger:       #dc2626;
  --info:         #0284c7;
  --radius:       14px;
  --radius-sm:    9px;
  --shadow-sm:    0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow:       0 4px 6px -1px rgba(15, 23, 42, .07), 0 2px 4px -2px rgba(15, 23, 42, .05);
  --shadow-lg:    0 12px 28px -8px rgba(15, 23, 42, .18);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body { font-family: var(--font); color: var(--ink); background: var(--surface-alt); }

h1, h2, h3, h4, h5 { color: var(--ink); }
h1 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin-top: 2rem; }
h3 { font-size: 1.15rem; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

.skip-link {
  position: absolute; top: 0; left: 0; z-index: 2000;
  background: var(--brand); color: #fff; padding: .6rem 1rem;
}

/* ------------------------------------------------------------ HEADER */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1030;
}

.navbar { padding: .65rem 0; }

.navbar-brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; color: var(--ink); }
.navbar-brand:hover { color: var(--brand); text-decoration: none; }

.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #3b82f6);
  color: #fff; font-weight: 800; font-size: .95rem; letter-spacing: .5px;
}

.brand-text { font-size: 1.15rem; letter-spacing: -.02em; }

.navbar-nav .nav-link { font-weight: 600; color: var(--ink-soft); padding: .5rem .9rem; }
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active { color: var(--brand); }

.dropdown-menu { border: 1px solid var(--line); box-shadow: var(--shadow-lg); border-radius: var(--radius-sm); padding: .4rem; }
.dropdown-item { border-radius: 7px; padding: .5rem .7rem; font-weight: 500; }
.dropdown-item:hover { background: var(--brand-light); color: var(--brand-dark); }
.cat-emoji { display: inline-block; width: 1.5rem; }

.nav-search { gap: .4rem; }
.nav-search .form-control { min-width: 190px; border-radius: 999px; padding-left: 1rem; border-color: var(--line); }
.nav-search .form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 78, 216, .12); }
.btn-search { border-radius: 999px; background: var(--brand); color: #fff; font-weight: 600; padding: .375rem 1.1rem; }
.btn-search:hover { background: var(--brand-dark); color: #fff; }

/* --------------------------------------------------------------- HERO */

.hero {
  background: linear-gradient(160deg, #1e3a8a 0%, #1d4ed8 55%, #2563eb 100%);
  color: #fff; padding: 3.2rem 0 3.6rem; margin-bottom: 2rem;
}
.hero h1 { color: #fff; margin-bottom: .8rem; }
.hero p { color: rgba(255, 255, 255, .88); font-size: 1.05rem; max-width: 44rem; }

.hero-search { max-width: 34rem; margin-top: 1.6rem; }
.hero-search .form-control { height: 52px; border: none; border-radius: 999px 0 0 999px; padding-left: 1.3rem; font-size: 1rem; }
.hero-search .btn { height: 52px; border-radius: 0 999px 999px 0; padding-inline: 1.6rem; font-weight: 600; background: var(--accent); border-color: var(--accent); color: #1f2937; }
.hero-search .btn:hover { background: #d97706; border-color: #d97706; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 1.8rem; margin-top: 1.8rem; }
.hero-stat strong { display: block; font-size: 1.5rem; line-height: 1.2; }
.hero-stat span { color: rgba(255, 255, 255, .8); font-size: .87rem; }

/* -------------------------------------------------------------- CARDS */

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: .25rem 0 0; color: var(--ink-muted); font-size: .95rem; }

.tool-card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem 1.2rem; box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #cbd5e1; text-decoration: none; }
.tool-card .tool-icon { font-size: 1.7rem; line-height: 1; margin-bottom: .6rem; }
.tool-card h3 { font-size: 1.02rem; margin: 0 0 .35rem; color: var(--ink); }
.tool-card p { font-size: .89rem; color: var(--ink-muted); margin: 0; flex: 1; }
.tool-card .tool-cat {
  display: inline-block; margin-top: .8rem; font-size: .74rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--brand);
}

.cat-card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.3rem; height: 100%;
  box-shadow: var(--shadow-sm); transition: transform .16s ease, box-shadow .16s ease;
  border-top: 3px solid var(--chip, var(--brand));
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.cat-card .cat-icon { font-size: 1.9rem; }
.cat-card h3 { margin: .5rem 0 .35rem; font-size: 1.05rem; }
.cat-card p { font-size: .87rem; color: var(--ink-muted); margin: 0; }
.cat-card .cat-count { display: inline-block; margin-top: .7rem; font-size: .8rem; font-weight: 600; color: var(--chip, var(--brand)); }

/* --------------------------------------------------------- KALKULATOR */

.calc-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.calc-head { padding: 1.4rem 1.5rem 1.1rem; border-bottom: 1px solid var(--line); }
.calc-head .calc-icon { font-size: 2rem; }
.calc-head h1 { margin: .4rem 0 .3rem; }
.calc-head .lead { color: var(--ink-soft); font-size: 1rem; margin: 0; }

.calc-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 0; }
@media (max-width: 991.98px) { .calc-body { grid-template-columns: minmax(0, 1fr); } }

.calc-inputs { padding: 1.4rem 1.5rem; min-width: 0; }
.calc-output { padding: 1.4rem 1.5rem; background: var(--surface-alt); border-left: 1px solid var(--line); min-width: 0; }
@media (max-width: 991.98px) { .calc-output { border-left: none; border-top: 1px solid var(--line); } }

.calc-field { margin-bottom: 1rem; }
.calc-field .form-label { font-weight: 600; font-size: .9rem; margin-bottom: .3rem; color: var(--ink-soft); }
.calc-field .form-control, .calc-field .form-select { border-color: var(--line); font-weight: 600; }
.calc-field .form-control:focus, .calc-field .form-select:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 78, 216, .12);
}
.calc-field .input-group-text { background: var(--surface-alt); border-color: var(--line); font-size: .85rem; color: var(--ink-muted); font-weight: 600; }
.calc-field .form-text { font-size: .8rem; color: var(--ink-muted); }

.calc-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.calc-actions .btn { font-weight: 600; }

.result-primary {
  background: linear-gradient(150deg, var(--brand-dark), var(--brand));
  color: #fff; border-radius: var(--radius-sm); padding: 1.15rem 1.25rem; margin-bottom: 1rem;
}
.result-primary .result-label { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; opacity: .85; font-weight: 600; }
.result-primary .result-value { font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 800; line-height: 1.2; margin-top: .15rem; }
.result-primary .result-value .unit { font-size: .95rem; font-weight: 600; opacity: .85; }
.result-primary .result-note { font-size: .8rem; opacity: .85; margin-top: .45rem; }

.result-band {
  display: inline-block; margin-top: .7rem; padding: .28rem .7rem; border-radius: 999px;
  font-size: .82rem; font-weight: 700; background: rgba(255, 255, 255, .18);
}
.result-band-note { font-size: .82rem; opacity: .9; margin-top: .4rem; }
.result-primary .band-success { background: rgba(16, 185, 129, .28); }
.result-primary .band-warning { background: rgba(245, 158, 11, .3); }
.result-primary .band-danger  { background: rgba(248, 113, 113, .32); }

.result-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .35rem .75rem;
  padding: .6rem 0; border-bottom: 1px dashed var(--line);
}
.result-row:last-of-type { border-bottom: none; }
.result-row-label { color: var(--ink-soft); font-size: .9rem; flex: 1 1 55%; min-width: 0; }
.result-row-value { font-weight: 700; text-align: right; white-space: nowrap; flex: 0 0 auto; margin-left: auto; }
.result-row-value .unit { font-weight: 500; font-size: .82rem; color: var(--ink-muted); }
.result-row-band { font-size: .8rem; font-weight: 600; margin: -.3rem 0 .5rem; }
.band-success { color: var(--ok); } .band-warning { color: var(--warn); }
.band-danger { color: var(--danger); } .band-info { color: var(--info); }

.result-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; background: var(--line);
  color: var(--ink-muted); font-size: .68rem; font-weight: 700; cursor: help;
}

.calc-table { font-size: .86rem; }
.calc-table th { background: var(--surface-alt); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-muted); }
.table-wrap { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }

/* ------------------------------------------------------------- CTA/AD */

.cta-box {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm); padding: 1.1rem 1.2rem; margin: 1.2rem 0;
}
.cta-box h3 { font-size: 1.02rem; margin: 0 0 .35rem; }
.cta-box p { font-size: .9rem; color: var(--ink-soft); margin: 0 0 .8rem; }

.btn-wa { background: #25d366; border-color: #25d366; color: #fff; font-weight: 700; }
.btn-wa:hover { background: #1da851; border-color: #1da851; color: #fff; }

.btn-affiliate {
  display: inline-block; background: var(--accent); color: #1f2937; font-weight: 700;
  border-radius: var(--radius-sm); padding: .6rem 1.1rem; border: none;
}
.btn-affiliate:hover { background: #d97706; color: #1f2937; text-decoration: none; }
.affiliate-note { font-size: .78rem; color: var(--ink-muted); margin-top: .4rem; }
.affiliate-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-sm); padding: 1rem 1.1rem; margin: 1.2rem 0; }
.affiliate-box h3 { font-size: .95rem; margin: 0 0 .6rem; }

.ad-slot { margin: 1.4rem 0; text-align: center; overflow: hidden; }
.ad-slot .ad-label {
  display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em;
  color: #94a3b8; margin-bottom: .3rem;
}
.ad-header { margin: 0; padding: .8rem 0; background: var(--surface); border-bottom: 1px solid var(--line); }
.widget-ad { padding: 0; border: none; background: transparent; box-shadow: none; }

/* ------------------------------------------------------------ SIDEBAR */

.sidebar { position: sticky; top: 84px; }
@media (max-width: 991.98px) { .sidebar { position: static; } }

.widget {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; margin-bottom: 1.2rem; box-shadow: var(--shadow-sm);
}
.widget-title { font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-muted); margin: 0 0 .8rem; }
.widget-list { list-style: none; padding: 0; margin: 0; }
.widget-list li { border-bottom: 1px solid var(--line); }
.widget-list li:last-child { border-bottom: none; }
.widget-list a { display: flex; gap: .6rem; align-items: center; padding: .55rem 0; color: var(--ink-soft); font-size: .9rem; font-weight: 500; }
.widget-list a:hover { color: var(--brand); text-decoration: none; }
.widget-icon { flex: 0 0 auto; }

.widget-cats { display: flex; flex-wrap: wrap; gap: .4rem; }
.cat-chip {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 600;
  padding: .3rem .65rem; border-radius: 999px; background: var(--surface-alt);
  border: 1px solid var(--line); color: var(--chip, var(--brand));
}
.cat-chip:hover { background: var(--chip, var(--brand)); color: #fff; text-decoration: none; border-color: transparent; }

.widget-promo { background: linear-gradient(160deg, #fff7ed, #ffffff); border-color: #fed7aa; }
.promo-badge { display: inline-block; background: var(--accent); color: #1f2937; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .18rem .5rem; border-radius: 5px; }
.promo-price { font-size: 1.1rem; margin: .5rem 0 .8rem; }
.promo-price del { color: var(--ink-muted); font-size: .9rem; margin-right: .35rem; }

/* -------------------------------------------------------------- ARTIKEL */

.article-body { font-size: 1.03rem; color: #1f2937; }
.article-body h2 { margin-top: 2rem; padding-bottom: .35rem; border-bottom: 2px solid var(--brand-light); }
.article-body h3 { margin-top: 1.4rem; }
.article-body ul, .article-body ol { padding-left: 1.3rem; }
.article-body li { margin-bottom: .4rem; }
.article-body table { width: 100%; margin: 1.2rem 0; font-size: .92rem; }
.article-body code { background: var(--brand-light); color: var(--brand-dark); padding: .12rem .4rem; border-radius: 5px; font-size: .92em; }
.article-body blockquote { border-left: 4px solid var(--brand-light); padding-left: 1rem; color: var(--ink-soft); }

.post-card {
  display: flex; flex-direction: column; height: 100%; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem;
  box-shadow: var(--shadow-sm); transition: transform .16s ease, box-shadow .16s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.post-card h3 { font-size: 1.05rem; margin: .4rem 0 .5rem; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--brand); text-decoration: none; }
.post-card p { font-size: .89rem; color: var(--ink-muted); flex: 1; }
.post-meta { font-size: .78rem; color: var(--ink-muted); }

.faq-item { border-bottom: 1px solid var(--line); padding: .9rem 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { font-size: .98rem; margin: 0 0 .35rem; }
.faq-item p { margin: 0; color: var(--ink-soft); font-size: .93rem; }

.breadcrumb { font-size: .84rem; margin-bottom: 1rem; }
.breadcrumb a { color: var(--ink-muted); }

.page-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 1.8rem 0; margin-bottom: 1.8rem; }
.page-hero h1 { margin: .3rem 0 .4rem; }
.page-hero p { color: var(--ink-muted); margin: 0; }

/* --------------------------------------------------------------- MISC */

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--ink-muted); }
.empty-state .big { font-size: 2.4rem; }

.pagination .page-link { color: var(--brand); border-color: var(--line); font-weight: 600; }
.pagination .page-item.active .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }

.back-to-top {
  position: fixed; right: 18px; bottom: 18px; width: 42px; height: 42px;
  border-radius: 50%; border: none; background: var(--brand); color: #fff;
  font-size: 1.1rem; box-shadow: var(--shadow-lg); display: none; z-index: 1040;
}
.back-to-top.show { display: block; }

/* -------------------------------------------------------------- FOOTER */

.site-footer { background: #0f172a; color: #cbd5e1; padding: 2.6rem 0 1.4rem; margin-top: 3rem; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; color: #fff; margin-bottom: .7rem; }
.footer-about { font-size: .88rem; color: #94a3b8; }
.footer-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #fff; margin-bottom: .8rem; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: .45rem; font-size: .88rem; }
.footer-wa { font-size: .88rem; font-weight: 600; }
.footer-disclosure { font-size: .78rem; color: #64748b; border-top: 1px solid #1e293b; padding-top: 1rem; margin-top: 1.8rem; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; border-top: 1px solid #1e293b; padding-top: 1rem; margin-top: 1rem; font-size: .82rem; color: #94a3b8; }

/* --------------------------------------------------------------- PRINT */

@media print {
  .site-header, .site-footer, .sidebar, .ad-slot, .calc-actions,
  .back-to-top, .cta-box, .affiliate-box, .navbar { display: none !important; }
  body { background: #fff; }
  .calc-wrap { border: none; box-shadow: none; }
  .result-primary { background: #eee !important; color: #000 !important; }
}
