/* ============================================
   yourcalculatorfree.com — Global Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

:root {
  --primary: #1A56DB;
  --primary-dark: #1140A8;
  --primary-light: #EBF2FF;
  --accent: #0EA271;
  --accent-light: #E6F7F2;
  --text: #111827;
  --text-2: #4B5563;
  --text-3: #9CA3AF;
  --border: #E5E7EB;
  --bg: #F9FAFB;
  --white: #FFFFFF;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --font: 'DM Sans', sans-serif;
  --mono: 'DM Mono', monospace;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ── HEADER ── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.site-logo {
  font-size: 1.1rem; font-weight: 700;
  color: var(--primary); letter-spacing: -.02em;
  display: flex; align-items: center; gap: 8px;
}
.site-logo span { color: var(--text); }
.site-logo .icon { font-size: 1.3rem; }

.site-nav { display: flex; gap: 4px; align-items: center; }
.site-nav a {
  font-size: 14px; font-weight: 500; color: var(--text-2);
  padding: 6px 12px; border-radius: 6px;
  transition: background .15s, color .15s;
}
.site-nav a:hover { background: var(--bg); color: var(--primary); text-decoration: none; }
.nav-cta {
  background: var(--primary) !important;
  color: var(--white) !important;
  border-radius: 7px !important;
}
.nav-cta:hover { background: var(--primary-dark) !important; }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: all .2s; }

/* ── HERO (calculator pages) ── */
.page-hero {
  background: linear-gradient(135deg, #1A56DB 0%, #0EA271 100%);
  color: white; text-align: center;
  padding: 3rem 1.5rem 2.5rem;
}
.page-hero .breadcrumb {
  font-size: 13px; opacity: .75; margin-bottom: .75rem;
}
.page-hero .breadcrumb a { color: rgba(255,255,255,.85); }
.page-hero .breadcrumb a:hover { color: white; text-decoration: none; }
.page-hero h1 { font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 700; line-height: 1.2; margin-bottom: .5rem; }
.page-hero p { font-size: 1rem; opacity: .85; max-width: 560px; margin: 0 auto; }

/* ── LAYOUT ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.layout-2col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  padding: 2.5rem 0;
  align-items: start;
}
@media(max-width:900px){ .layout-2col { grid-template-columns: 1fr; } }

/* ── CALCULATOR CARD ── */
.calc-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.calc-card h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1.5rem; color: var(--text); }

/* ── FORM ELEMENTS ── */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block; font-size: 14px; font-weight: 500;
  color: var(--text-2); margin-bottom: 6px;
}
.form-group input,
.form-group select {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font); font-size: 15px; color: var(--text);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,.1);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media(max-width:500px){ .form-row { grid-template-columns: 1fr; } }

.input-with-unit { position: relative; }
.input-with-unit input { padding-right: 52px; }
.input-unit {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: var(--text-3); font-family: var(--mono);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: var(--radius); border: none;
  font-family: var(--font); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .15s; text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; width: 100%; margin-top: .5rem; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,86,219,.3); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-reset { background: none; color: var(--text-3); font-size: 13px; padding: 6px 12px; margin-top: 8px; }
.btn-reset:hover { color: var(--text-2); }

/* ── RESULTS ── */
.result-box {
  background: var(--primary-light);
  border: 1.5px solid rgba(26,86,219,.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-top: 1.5rem;
  display: none;
}
.result-box.show { display: block; }
.result-box .result-label { font-size: 13px; font-weight: 500; color: var(--primary); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.result-box .result-value { font-size: 2rem; font-weight: 700; color: var(--primary-dark); font-family: var(--mono); }
.result-box .result-sub { font-size: 13px; color: var(--text-2); margin-top: 4px; }

.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.result-item {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem; text-align: center;
}
.result-item .lbl { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.result-item .val { font-size: 1.2rem; font-weight: 700; color: var(--text); font-family: var(--mono); }

/* ── AMORTIZATION TABLE ── */
.table-wrap { overflow-x: auto; margin-top: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { background: var(--bg); padding: 10px 14px; text-align: left; font-weight: 600; font-size: 12px; color: var(--text-2); border-bottom: 1px solid var(--border); }
td { padding: 9px 14px; border-bottom: 1px solid var(--border); color: var(--text); font-family: var(--mono); font-size: 13px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg); }

/* ── SIDEBAR ── */
.sidebar-section {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
  margin-bottom: 1.25rem; box-shadow: var(--shadow);
}
.sidebar-section h3 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: .75rem; }

/* Ad placeholder */
.ad-unit {
  background: var(--bg); border: 1px dashed var(--border);
  border-radius: var(--radius); min-height: 250px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text-3); text-align: center;
}

/* Related calculators */
.related-list { list-style: none; }
.related-list li { border-bottom: 1px solid var(--border); }
.related-list li:last-child { border-bottom: none; }
.related-list a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; font-size: 14px; color: var(--text-2);
  transition: color .15s;
}
.related-list a:hover { color: var(--primary); text-decoration: none; }
.related-list .emoji { font-size: 16px; width: 24px; text-align: center; }

/* ── CONTENT SECTION ── */
.content-section { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; margin-top: 2rem; box-shadow: var(--shadow); }
.content-section h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; color: var(--text); }
.content-section h3 { font-size: 1rem; font-weight: 600; margin: 1.25rem 0 .5rem; color: var(--text); }
.content-section p { font-size: 14px; color: var(--text-2); margin-bottom: .75rem; line-height: 1.7; }
.content-section ul { padding-left: 1.25rem; margin-bottom: .75rem; }
.content-section ul li { font-size: 14px; color: var(--text-2); margin-bottom: .4rem; }

/* ── FAQ ── */
.faq-item { border-bottom: 1px solid var(--border); padding: .75rem 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-q::after { content: '+'; font-size: 18px; color: var(--primary); font-weight: 300; }
.faq-q.open::after { content: '−'; }
.faq-a { font-size: 14px; color: var(--text-2); line-height: 1.7; padding-top: .5rem; display: none; }
.faq-a.open { display: block; }

/* ── AD BANNER ── */
.ad-banner-wrap { text-align: center; margin: 1.5rem 0; }
.ad-banner-label { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.ad-banner { background: var(--bg); border: 1px dashed var(--border); border-radius: var(--radius); min-height: 90px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text-3); }

/* ── HOMEPAGE SPECIFIC ── */
.home-hero {
  background: linear-gradient(135deg, #0f1e3d 0%, #1A56DB 50%, #0EA271 100%);
  color: white; text-align: center; padding: 5rem 1.5rem 4rem;
  position: relative; overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.home-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; line-height: 1.15; margin-bottom: 1rem; position: relative; }
.home-hero p { font-size: 1.1rem; opacity: .85; max-width: 600px; margin: 0 auto 2rem; position: relative; }
.home-search {
  max-width: 480px; margin: 0 auto; position: relative; z-index: 1;
}
.home-search input {
  width: 100%; padding: 14px 20px; padding-right: 110px;
  border-radius: 50px; border: none; font-size: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  outline: none; font-family: var(--font);
}
.home-search button {
  position: absolute; right: 5px; top: 5px;
  background: var(--primary); color: white;
  border: none; border-radius: 40px; padding: 9px 20px;
  font-family: var(--font); font-size: 14px; font-weight: 600; cursor: pointer;
}

.stats-bar {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.stats-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-item .num { font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.stat-item .lbl { font-size: 12px; color: var(--text-3); }

.categories-section { padding: 3rem 0; }
.section-heading { text-align: center; margin-bottom: 2rem; }
.section-heading h2 { font-size: 1.8rem; font-weight: 700; color: var(--text); margin-bottom: .5rem; }
.section-heading p { color: var(--text-2); font-size: 1rem; }

.category-block { margin-bottom: 3rem; }
.category-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 1rem; padding-bottom: .75rem;
  border-bottom: 2px solid var(--border);
}
.category-header .cat-icon { font-size: 1.5rem; }
.category-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.category-header .cat-count { font-size: 12px; color: var(--text-3); background: var(--bg); padding: 2px 8px; border-radius: 20px; border: 1px solid var(--border); }

.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.calc-card-home {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem 1.5rem;
  transition: all .2s; cursor: pointer; text-decoration: none;
  display: block; color: inherit;
}
.calc-card-home:hover {
  border-color: var(--primary); box-shadow: var(--shadow-md);
  transform: translateY(-2px); text-decoration: none; color: inherit;
}
.calc-card-home .card-icon { font-size: 1.75rem; margin-bottom: .6rem; }
.calc-card-home .card-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.calc-card-home .card-desc { font-size: 12px; color: var(--text-3); line-height: 1.5; }
.calc-card-home .card-badge {
  display: inline-block; margin-top: 8px;
  font-size: 11px; padding: 2px 8px; border-radius: 20px;
  background: var(--primary-light); color: var(--primary); font-weight: 500;
}

/* ── FOOTER ── */
.site-footer {
  background: #0f1e3d; color: rgba(255,255,255,.7);
  padding: 3rem 0 1.5rem; margin-top: 4rem;
}
.footer-grid {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem;
  margin-bottom: 2rem;
}
@media(max-width:768px){ .footer-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width:480px){ .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .logo { font-size: 1.1rem; font-weight: 700; color: white; margin-bottom: .75rem; }
.footer-brand p { font-size: 13px; line-height: 1.7; }
.footer-col h4 { font-size: 13px; font-weight: 600; color: white; margin-bottom: .75rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .4rem; }
.footer-col ul a { font-size: 13px; color: rgba(255,255,255,.6); transition: color .15s; }
.footer-col ul a:hover { color: white; text-decoration: none; }
.footer-bottom {
  max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem;
  font-size: 12px;
}

/* ── RESPONSIVE NAV ── */
@media(max-width:768px){
  .hamburger { display: block; }
  .site-nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    background: var(--white); padding: 1rem;
    flex-direction: column; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .site-nav.open { display: flex; }
  .site-nav a { width: 100%; padding: 10px 14px; }
}

/* ── UTILITIES ── */
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.badge-new { background: #FEF3C7; color: #92400E; font-size: 11px; padding: 2px 7px; border-radius: 20px; font-weight: 600; }
.badge-popular { background: #DCFCE7; color: #166534; font-size: 11px; padding: 2px 7px; border-radius: 20px; font-weight: 600; }

/* ── RANGE SLIDER ── */
input[type=range] { -webkit-appearance: none; width: 100%; height: 4px; background: var(--border); border-radius: 2px; outline: none; margin: 8px 0; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); cursor: pointer; box-shadow: 0 1px 4px rgba(26,86,219,.4); }
