/* =============================================
   CalcNow — Shared Styles
   ============================================= */

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

:root {
  --bg: #f7f8fc;
  --white: #ffffff;
  --border: #e2e5f0;
  --border2: #d0d5e8;
  --text: #111827;
  --muted: #6b7280;
  --muted2: #9ca3af;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --accent-mid: #bfdbfe;
  --green: #16a34a;
  --font: 'Plus Jakarta Sans', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.07), 0 4px 12px rgba(0,0,0,0.05);
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); min-height: 100vh; line-height: 1.5; }

/* ── NAV ── */
nav { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; padding: 0 1.5rem; }
.nav-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 1rem; }
.logo { font-size: 1.25rem; font-weight: 800; color: var(--text); text-decoration: none; letter-spacing: -0.03em; flex-shrink: 0; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 0.25rem; list-style: none; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.85rem; font-weight: 600; padding: 0.4rem 0.75rem; border-radius: var(--radius-sm); transition: all 0.15s; }
.nav-links a:hover { color: var(--accent); background: var(--accent-light); }
.nav-cta { background: var(--accent) !important; color: white !important; border-radius: var(--radius-sm); }
.nav-cta:hover { background: #1d4ed8 !important; color: white !important; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
.mobile-menu { display: none; background: var(--white); border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 0.65rem 0; color: var(--text); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.mobile-menu a:last-child { border: none; }

/* ── AD SLOTS ── */
/* Top banner 728x90 desktop / 320x50 mobile */
.ad-top {
  max-width: 1100px;
  margin: 1rem auto 0;
  padding: 0 1.5rem;
  text-align: center;
}

/* Sidebar ad 300x250 */
.ad-sidebar {
  width: 300px;
  min-height: 250px;
  background: var(--white);
  border: 1px dashed var(--border2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted2);
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* In-content ad */
.ad-inline {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.ad-placeholder {
  background: var(--white);
  border: 1px dashed var(--border2);
  border-radius: var(--radius-sm);
  padding: 1rem;
  color: var(--muted2);
  font-size: 0.72rem;
  text-align: center;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── BREADCRUMB ── */
.breadcrumb {
  max-width: 1100px;
  margin: 1rem auto 0;
  padding: 0 1.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--muted2); }

/* ── MAIN LAYOUT ── */
.main { max-width: 1100px; margin: 1.5rem auto; padding: 0 1.5rem 4rem; }
.main-with-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; align-items: start; }

/* ── SECTION HEADER ── */
.sec-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.sec-tag { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.25rem 0.65rem; border-radius: 6px; background: var(--accent-light); color: var(--accent); }
.sec-title { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }

/* ── CALC BOX ── */
.calc-box { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 1.5rem; }
.calc-box-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 1rem; background: var(--bg); }
.calc-box-icon { font-size: 1.4rem; width: 42px; height: 42px; background: var(--accent-light); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.calc-box-header h1, .calc-box-header h2 { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
.calc-box-header p { font-size: 0.78rem; color: var(--muted); margin-top: 0.1rem; }
.calc-body { padding: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.inputs-col { display: flex; flex-direction: column; gap: 1rem; }

/* ── FIELDS ── */
.field label { display: block; font-size: 0.77rem; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap input, .input-wrap select { width: 100%; border: 1.5px solid var(--border2); border-radius: var(--radius-sm); padding: 0.65rem 2.5rem 0.65rem 0.9rem; font-family: var(--mono); font-size: 0.92rem; color: var(--text); background: var(--white); outline: none; appearance: none; transition: border-color 0.15s, box-shadow 0.15s; }
.input-wrap input:focus, .input-wrap select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.input-suffix { position: absolute; right: 0.9rem; color: var(--muted2); font-family: var(--mono); font-size: 0.78rem; pointer-events: none; font-weight: 500; }

/* ── RESULT ── */
.result-col { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.result-main { background: var(--accent); border-radius: 10px; padding: 1.25rem; text-align: center; color: white; }
.result-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.8; margin-bottom: 0.4rem; }
.result-value { font-size: 1.9rem; font-weight: 800; font-family: var(--mono); letter-spacing: -0.03em; line-height: 1; }
.result-rows { display: flex; flex-direction: column; }
.result-row { display: flex; justify-content: space-between; align-items: center; padding: 0.55rem 0; border-bottom: 1px solid var(--border); font-size: 0.8rem; }
.result-row:last-child { border: none; }
.result-row-label { color: var(--muted); font-weight: 500; }
.result-row-val { font-family: var(--mono); font-weight: 600; font-size: 0.82rem; }
.result-row-val.green { color: var(--green); }

/* ── CHART ── */
.chart-section { padding: 0 1.5rem 1.5rem; border-top: 1px solid var(--border); }
.chart-label { font-size: 0.72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin: 1.25rem 0 0.75rem; }
.chart-bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; border-radius: 3px 3px 0 0; transition: height 0.4s ease; min-height: 2px; }
.bar.principal { background: var(--accent-mid); }
.bar.interest { background: var(--accent); }
.bar-lbl { font-size: 0.55rem; font-family: var(--mono); color: var(--muted2); margin-top: 3px; }
.chart-legend { display: flex; gap: 1.25rem; margin-top: 0.75rem; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

/* ── CALC GRID (homepage) ── */
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.calc-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 0.6rem; box-shadow: var(--shadow); transition: all 0.2s; }
.calc-card:hover { border-color: var(--accent); box-shadow: 0 4px 20px rgba(37,99,235,0.1); transform: translateY(-2px); }
.card-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; background: var(--accent-light); flex-shrink: 0; }
.card-name { font-size: 0.9rem; font-weight: 700; }
.card-desc { font-size: 0.77rem; color: var(--muted); line-height: 1.5; }
.card-arrow { font-size: 0.72rem; font-weight: 700; color: var(--accent); margin-top: auto; }

/* ── SEO CONTENT BLOCK ── */
.seo-block { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.seo-block h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; letter-spacing: -0.02em; }
.seo-block h3 { font-size: 0.95rem; font-weight: 700; margin: 1rem 0 0.5rem; color: var(--accent); }
.seo-block p { font-size: 0.88rem; color: var(--muted); line-height: 1.7; margin-bottom: 0.75rem; }
.seo-block p:last-child { margin-bottom: 0; }

/* ── TRUST BAR ── */
.trust-bar { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-around; gap: 1rem; flex-wrap: wrap; box-shadow: var(--shadow); margin-bottom: 2rem; }
.trust-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; font-weight: 600; color: var(--muted); }

/* ── FOOTER ── */
footer { background: var(--white); border-top: 1px solid var(--border); padding: 2rem 1.5rem; margin-top: 2rem; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.82rem; font-weight: 600; transition: color 0.15s; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: 0.78rem; color: var(--muted2); }
.footer-copy a { color: var(--accent); text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .main-with-sidebar { grid-template-columns: 1fr; }
  .ad-sidebar { display: none; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .calc-body { grid-template-columns: 1fr; padding: 1.25rem; gap: 1.25rem; }
  .result-value { font-size: 1.6rem; }
  .calc-grid { grid-template-columns: 1fr 1fr; }
  .main { padding: 0 1rem 3rem; }
  .trust-bar { gap: 0.75rem; }
  .ad-top { padding: 0 1rem; }
}

@media (max-width: 480px) {
  .calc-grid { grid-template-columns: 1fr; }
  .chart-bars { height: 70px; }
  .trust-bar { flex-direction: column; align-items: flex-start; }
  .footer-links { gap: 1rem; }
}
