/*
Theme Name: DigitalBankingPro
Theme URI: https://digitalbankingpro.com
Author: DigitalBankingPro
Author URI: https://digitalbankingpro.com
Description: Custom WordPress theme for DigitalBankingPro - free financial calculators and personal finance blog. AdSense-ready, fast, mobile-first, with built-in calculator shortcodes.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: digitalbankingpro
Tags: blog, two-columns, right-sidebar, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   1) Reset & base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #0D1F1A;
  background: #F8FAF9;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: #0F6E56; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #0D1F1A;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); }
h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.25rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid #e5e7eb; margin: 24px 0; }
button { font-family: inherit; }
code { background: #f1f3f5; padding: 2px 6px; border-radius: 4px; font-size: .92em; }

/* ============================================================
   2) Layout
   ============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.site { min-height: 100vh; display: flex; flex-direction: column; }
.site-content { flex: 1; padding: 40px 0; }
.section { padding: 60px 0; }

/* ============================================================
   3) Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid #e5e7eb;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 16px;
}
.site-branding { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: #1D9E75; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem;
}
.site-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.5rem; margin: 0; color: #0D1F1A; font-weight: 400;
}
.site-title .brand-suffix { color: #0F6E56; }

.main-nav ul {
  list-style: none; display: flex; align-items: center;
  gap: 4px; margin: 0; padding: 0;
}
.main-nav a {
  display: block; padding: 8px 14px;
  color: #0D1F1A; font-weight: 500; font-size: .95rem;
  border-radius: 8px; text-decoration: none;
}
.main-nav a:hover, .main-nav .current-menu-item > a {
  background: #E1F5EE; color: #0F6E56;
}
.btn-header {
  background: #1D9E75; color: #fff !important;
  border-radius: 10px; padding: 10px 18px;
  font-weight: 600; font-size: .9rem;
  display: inline-flex; align-items: center;
  transition: background .15s;
}
.btn-header:hover { background: #085041; text-decoration: none !important; }

.menu-toggle {
  display: none; background: none; border: 0;
  padding: 8px; cursor: pointer; color: #0D1F1A;
}
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .main-nav, .btn-header { display: none; }
  .main-nav.is-open {
    display: block; position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid #e5e7eb;
    padding: 12px 16px;
  }
  .main-nav.is-open ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav.is-open a { padding: 12px 8px; border-bottom: 1px solid #f1f3f5; }
}

/* ============================================================
   4) Hero
   ============================================================ */
.hero {
  background: linear-gradient(180deg, #E1F5EE 0%, #F8FAF9 100%);
  padding: 80px 0 60px; text-align: center;
}
.hero h1 { margin: 0 0 16px; }
.hero p.lead {
  font-size: 1.15rem; color: #4b5563;
  max-width: 640px; margin: 0 auto 28px; line-height: 1.5;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 28px; }
.btn-primary {
  background: #1D9E75; color: #fff;
  padding: 14px 26px; border-radius: 12px; font-weight: 600;
  border: 0; cursor: pointer; transition: background .15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { background: #085041; color: #fff; text-decoration: none; }
.btn-secondary {
  background: #fff; color: #0D1F1A;
  padding: 14px 26px; border-radius: 12px; font-weight: 600;
  border: 1px solid #e5e7eb; cursor: pointer; transition: border-color .15s;
  display: inline-flex; align-items: center;
}
.btn-secondary:hover { border-color: #1D9E75; text-decoration: none; color: #0D1F1A; }
.trust-badges {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 6px 24px; color: #6b7280; font-size: .9rem;
}
.trust-badges span::before { content: "✓ "; color: #1D9E75; font-weight: 700; }

/* ============================================================
   5) Cards / Grids
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 16px;
  padding: 24px; transition: border-color .15s, box-shadow .15s;
  display: block; color: inherit;
}
.card:hover { border-color: #9FE1CB; box-shadow: 0 4px 16px rgba(13, 110, 86, 0.06); text-decoration: none; }
.card-eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #0F6E56; font-weight: 700; margin-bottom: 6px; }
.card h3 { font-size: 1.25rem; margin: 0 0 6px; }
.card p { color: #4b5563; font-size: .92rem; margin: 0 0 12px; line-height: 1.5; }
.card-link { color: #0F6E56; font-weight: 600; font-size: .9rem; }

/* ============================================================
   6) Section heading
   ============================================================ */
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { margin: 0 0 8px; }
.section-head p { color: #6b7280; max-width: 560px; margin: 0 auto; }

/* ============================================================
   7) Article / single
   ============================================================ */
.article-header { padding-bottom: 24px; margin-bottom: 32px; border-bottom: 1px solid #e5e7eb; }
.article-meta { color: #6b7280; font-size: .9rem; }
.article-meta strong { color: #0D1F1A; }
.entry-content { font-size: 1.08rem; line-height: 1.75; color: #1f2937; max-width: 720px; }
.entry-content h2 { font-size: 1.75rem; margin: 1.8em 0 .5em; }
.entry-content h3 { font-size: 1.3rem; margin: 1.5em 0 .4em; }
.entry-content p { margin: 0 0 1.1em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.entry-content li { margin-bottom: .4em; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; }
.entry-content th, .entry-content td { padding: 10px 14px; border: 1px solid #e5e7eb; text-align: left; }
.entry-content th { background: #E1F5EE; font-weight: 600; }
.entry-content blockquote {
  border-left: 4px solid #1D9E75;
  margin: 1.5em 0; padding: .5em 1.5em;
  font-style: italic; color: #4b5563; background: #E1F5EE;
}
.entry-content a { color: #0F6E56; text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }

/* Calculator CTA box (embed in articles) */
.calc-cta {
  background: #E1F5EE; border: 1px solid #9FE1CB;
  border-radius: 14px; padding: 24px; margin: 28px 0;
}
.calc-cta .eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #0F6E56; font-weight: 700; margin-bottom: 6px; }
.calc-cta h4 { font-family: 'Instrument Serif', Georgia, serif; font-size: 1.4rem; margin: 0 0 8px; font-weight: 400; }
.calc-cta p { font-size: .95rem; margin: 0 0 14px; color: #1f2937; }
.calc-cta .btn-primary { padding: 10px 18px; font-size: .9rem; }

/* Author box */
.author-box {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  padding: 24px; margin: 40px 0;
  display: flex; gap: 18px; align-items: flex-start;
}
.author-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: #E1F5EE; color: #0F6E56;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Instrument Serif', serif; font-size: 1.6rem;
  flex-shrink: 0;
}
.author-box h4 { font-size: 1.2rem; margin: 0 0 4px; }
.author-box .credentials { font-size: .85rem; color: #6b7280; margin-bottom: 8px; }
.author-box p { font-size: .92rem; color: #4b5563; margin: 0; line-height: 1.55; }

/* Table of Contents */
.toc {
  background: #F8FAF9; border: 1px solid #e5e7eb;
  border-radius: 12px; padding: 16px 22px; margin: 0 0 32px;
}
.toc h4 { margin: 0 0 8px; font-family: 'DM Sans', sans-serif; font-size: .85rem; font-weight: 700; text-transform: uppercase; color: #6b7280; letter-spacing: .06em; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin-bottom: 4px; font-size: .95rem; }

/* Related */
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }

/* Breadcrumbs */
.breadcrumb {
  font-size: .85rem; color: #6b7280; margin-bottom: 12px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
}
.breadcrumb a { color: #6b7280; }
.breadcrumb a:hover { color: #0F6E56; }
.breadcrumb .sep { color: #d1d5db; }

/* ============================================================
   8) Calculator UI
   ============================================================ */
.calc-wrap {
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 16px; padding: 28px; margin: 24px 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.02);
}
.calc-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px; margin-bottom: 20px;
}
.calc-field { display: flex; flex-direction: column; }
.calc-field label {
  font-size: .85rem; font-weight: 600; color: #0D1F1A;
  margin-bottom: 6px;
}
.calc-field .input-row {
  display: flex; align-items: stretch;
  border: 1px solid #d1d5db; border-radius: 10px;
  background: #fff; overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.calc-field .input-row:focus-within {
  border-color: #1D9E75;
  box-shadow: 0 0 0 3px rgba(29,158,117,.15);
}
.calc-field .input-row .prefix,
.calc-field .input-row .suffix {
  background: #F8FAF9; color: #6b7280;
  padding: 0 12px; font-size: .9rem;
  display: inline-flex; align-items: center;
  border-right: 1px solid #e5e7eb;
}
.calc-field .input-row .suffix { border-right: 0; border-left: 1px solid #e5e7eb; }
.calc-field input[type=number],
.calc-field input[type=text],
.calc-field select {
  flex: 1; min-width: 0;
  border: 0; padding: 12px 14px;
  font-size: 1rem; outline: 0; background: #fff; color: #0D1F1A;
  font-family: inherit;
}
.calc-field input[type=range] {
  width: 100%; margin-top: 8px;
  accent-color: #1D9E75;
}
.calc-field .hint { font-size: .78rem; color: #6b7280; margin-top: 4px; }

.calc-results {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin: 18px 0;
}
.stat {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 16px;
}
.stat.primary { background: #1D9E75; border-color: #1D9E75; }
.stat .stat-label {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
  color: #6b7280; font-weight: 600; margin-bottom: 4px;
}
.stat.primary .stat-label { color: #C9F0E0; }
.stat .stat-value {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.85rem; color: #0D1F1A; font-weight: 400;
}
.stat.primary .stat-value { color: #fff; }

/* Visual bar */
.bar-wrap {
  background: #F8FAF9; border-radius: 12px;
  padding: 16px; margin: 12px 0;
}
.bar-wrap .bar-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px; font-size: .9rem;
}
.bar-wrap .bar-row span { min-width: 110px; color: #4b5563; }
.bar-wrap .bar-track {
  flex: 1; height: 10px; background: #e5e7eb; border-radius: 6px; overflow: hidden;
}
.bar-wrap .bar-fill { height: 100%; background: #1D9E75; border-radius: 6px; transition: width .25s; }
.bar-wrap .bar-fill.alt { background: #F59E0B; }
.bar-wrap .bar-row b { min-width: 100px; text-align: right; font-weight: 600; }

/* Disclosure / table */
details.calc-table { margin-top: 12px; }
details.calc-table > summary {
  cursor: pointer; color: #0F6E56; font-weight: 600; font-size: .9rem;
  text-decoration: underline; text-underline-offset: 2px;
}
details.calc-table table {
  width: 100%; margin-top: 12px; font-size: .9rem; border-collapse: collapse;
  max-height: 360px; overflow-y: auto; display: block;
}
details.calc-table th, details.calc-table td {
  padding: 8px 10px; border-bottom: 1px solid #f1f3f5; text-align: right;
}
details.calc-table th:first-child, details.calc-table td:first-child { text-align: left; }
details.calc-table th { background: #F8FAF9; position: sticky; top: 0; }

/* Debt rows */
.debt-row {
  display: grid; grid-template-columns: 1fr 110px 80px 110px 30px;
  gap: 8px; margin-bottom: 6px;
}
.debt-row input { padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: .9rem; }
.debt-row button.remove { background: none; border: 0; cursor: pointer; color: #9ca3af; font-size: 1.2rem; }
.debt-row button.remove:hover { color: #dc2626; }
.debt-add {
  background: #1D9E75; color: #fff; border: 0; padding: 8px 14px;
  border-radius: 8px; cursor: pointer; font-weight: 600; font-size: .85rem;
}

/* PMI / notes */
.calc-note {
  font-size: .85rem; color: #6b7280; margin-top: 10px;
}
.calc-warn {
  background: #FEF3C7; border: 1px solid #FCD34D;
  border-radius: 10px; padding: 10px 14px; font-size: .9rem;
  color: #78350F; margin-top: 12px;
}

/* Two-column net worth */
.calc-two {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
}
@media (max-width: 720px) { .calc-two { grid-template-columns: 1fr; } }
.calc-two h3 { font-size: 1.2rem; margin-bottom: 12px; padding-bottom: 6px; border-bottom: 2px solid #1D9E75; display: inline-block; }
.calc-two .liabilities h3 { border-bottom-color: #dc2626; color: #991b1b; }

/* ============================================================
   9) FAQ accordion
   ============================================================ */
.faq-section { margin-top: 50px; }
.faq-item {
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 14px; padding: 18px 22px; margin-bottom: 12px;
}
.faq-item summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; color: #0D1F1A;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; color: #1D9E75; font-size: 1.5rem; line-height: 1;
  transition: transform .15s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-answer {
  margin-top: 12px; color: #4b5563; line-height: 1.65;
}

/* ============================================================
   10) Newsletter
   ============================================================ */
.newsletter {
  background: #0D1F1A; color: #fff;
  border-radius: 20px; padding: 50px 32px; text-align: center;
  margin: 60px 0;
}
.newsletter h2 { color: #fff; }
.newsletter p { color: #d1d5db; max-width: 480px; margin: 0 auto 24px; }
.newsletter form { display: flex; gap: 8px; max-width: 460px; margin: 0 auto; flex-wrap: wrap; }
.newsletter input[type=email] {
  flex: 1; min-width: 220px; padding: 14px 16px;
  border-radius: 10px; border: 0; font-size: 1rem; font-family: inherit;
}
.newsletter button {
  background: #1D9E75; color: #fff; border: 0;
  padding: 14px 22px; border-radius: 10px; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.newsletter button:hover { background: #27AC7E; }
.newsletter .small { font-size: .8rem; color: #9ca3af; margin-top: 12px; }

/* Trust */
.trust-section { background: #fff; border: 1px solid #e5e7eb; border-radius: 20px; padding: 40px; }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin-top: 20px; }
.trust-card { padding: 18px; }
.trust-card .icon {
  width: 44px; height: 44px; border-radius: 10px; background: #E1F5EE; color: #0F6E56;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700;
  margin-bottom: 12px;
}
.trust-card h4 { font-size: 1.1rem; margin: 0 0 6px; }
.trust-card p { font-size: .9rem; color: #6b7280; margin: 0; }

/* ============================================================
   11) Ads
   ============================================================ */
.ad-container {
  margin: 24px 0; text-align: center;
  min-height: 100px; display: flex; justify-content: center; align-items: center;
}
.ad-container:empty { display: none; }
.ad-container ins { width: 100%; }

/* ============================================================
   12) Footer
   ============================================================ */
.site-footer { background: #0D1F1A; color: #d1d5db; padding: 50px 0 24px; margin-top: 50px; }
.footer-cols {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
  margin-bottom: 36px;
}
@media (max-width: 700px) { .footer-cols { grid-template-columns: 1fr; gap: 28px; } }
.footer-cols h4 { color: #fff; font-family: 'DM Sans', sans-serif; font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin-bottom: 8px; font-size: .92rem; }
.footer-cols a { color: #d1d5db; }
.footer-cols a:hover { color: #9FE1CB; }
.footer-brand-name {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.4rem; color: #fff; margin-bottom: 8px;
}
.footer-brand-name .brand-suffix { color: #9FE1CB; }
.footer-tagline { color: #9ca3af; font-size: .9rem; line-height: 1.55; margin-bottom: 14px; }
.footer-disclaimer {
  background: rgba(255,255,255,.04); border-radius: 12px;
  padding: 16px 20px; font-size: .82rem; line-height: 1.55;
  color: #9ca3af; margin-bottom: 20px;
}
.footer-disclaimer strong { color: #fff; }
.footer-bottom {
  border-top: 1px solid #1f2937; padding-top: 18px;
  display: flex; flex-wrap: wrap; justify-content: space-between;
  font-size: .82rem; color: #9ca3af; gap: 8px;
}
.footer-bottom ul { list-style: none; display: flex; gap: 16px; padding: 0; margin: 0; flex-wrap: wrap; }

/* ============================================================
   13) Utility
   ============================================================ */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-4 { margin-bottom: 32px; }
.screen-reader-text { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error-404 { text-align: center; padding: 80px 20px; }
.error-404 .big { font-family: 'Instrument Serif', serif; font-size: 6rem; color: #1D9E75; line-height: 1; margin: 0; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 6px; margin: 32px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 8px 14px; background: #fff; border: 1px solid #e5e7eb;
  border-radius: 8px; color: #0D1F1A; font-weight: 500;
}
.pagination .current { background: #1D9E75; color: #fff; border-color: #1D9E75; }

/* Search form */
.search-form { display: flex; gap: 8px; }
.search-form input[type=search] { flex: 1; padding: 10px 14px; border: 1px solid #e5e7eb; border-radius: 10px; font-size: .95rem; }
.search-form button { background: #1D9E75; color: #fff; border: 0; padding: 10px 18px; border-radius: 10px; font-weight: 600; cursor: pointer; }

/* Print */
@media print {
  .site-header, .site-footer, .ad-container, .calc-cta { display: none !important; }
}
