/* ============================================
   SA Property Tools — Global Stylesheet
   ============================================ */

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

:root {
  --navy: #0d1b2a;
  --navy2: #1a2d42;
  --navy3: #243d57;
  --gold: #d4a017;
  --gold2: #e6b420;
  --gold3: #f0c84a;
  --cream: #f5f0e8;
  --cream2: #ede8df;
  --white: #ffffff;
  --ink: #1a1a1a;
  --ink2: #3a3a3a;
  --ink3: #6b6b6b;
  --green-ok: #1a6b3a;
  --amber-warn: #b85c00;
  --red-bad: #c00;
  --border: rgba(0,0,0,0.1);
  --border-light: rgba(255,255,255,0.1);
  --r: 10px;
  --r-lg: 16px;
  --shadow: 0 2px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.14);
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; color: var(--ink); background: var(--white); line-height: 1.6; }

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin-bottom: 1rem; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- LAYOUT ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

/* ---- NAV ---- */
.nav {
  background: var(--navy);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border-light);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem; max-width: 1200px; margin: 0 auto;
}
.nav-logo { font-size: 1.25rem; font-weight: 800; color: var(--white); text-decoration: none; }
.nav-logo span { color: var(--gold); }
.nav-links { display: flex; gap: 2rem; align-items: center; list-style: none; }
.nav-links a { color: rgba(255,255,255,0.8); font-size: 0.92rem; font-weight: 500; text-decoration: none; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--navy2); border: 1px solid var(--border-light);
  border-radius: var(--r); min-width: 220px; padding: 0.5rem 0;
  box-shadow: var(--shadow-lg); margin-top: 8px;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block; padding: 0.6rem 1.2rem; color: rgba(255,255,255,0.8);
  font-size: 0.85rem; transition: all 0.2s;
}
.nav-dropdown-menu a:hover { background: var(--navy3); color: var(--gold); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: white; margin: 5px 0; transition: 0.3s; }

/* ---- BUTTONS ---- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: var(--r); font-weight: 700; font-size: 0.92rem; cursor: pointer; transition: all 0.2s; border: none; text-decoration: none; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold2); color: var(--navy); text-decoration: none; }
.btn-outline { background: transparent; border: 2px solid rgba(255,255,255,0.4); color: white; }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }
.btn-outline-dark { background: transparent; border: 2px solid var(--border); color: var(--ink2); }
.btn-outline-dark:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }

/* ---- HERO ---- */
.hero {
  background: var(--navy);
  padding: 6rem 0 5rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(212,160,23,0.08) 0%, transparent 60%);
}
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; position: relative; }
.hero-badge { display: inline-block; background: rgba(212,160,23,0.15); border: 1px solid rgba(212,160,23,0.3); color: var(--gold); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 14px; border-radius: 20px; margin-bottom: 1.5rem; }
.hero h1 { color: white; margin-bottom: 1.25rem; }
.hero h1 span { color: var(--gold); }
.hero p { color: rgba(255,255,255,0.7); font-size: 1.1rem; margin-bottom: 2rem; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-graphic { display: flex; justify-content: center; align-items: center; }
.hero-graphic svg { width: 100%; max-width: 420px; opacity: 0.9; }

/* ---- STATS BAR ---- */
.stats-bar { background: var(--navy2); padding: 2rem 0; border-top: 1px solid var(--border-light); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; text-align: center; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--gold); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 0.82rem; color: rgba(255,255,255,0.6); }

/* ---- TOOL CARDS ---- */
.tools-section { background: var(--cream); }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.tool-card {
  background: var(--white); border-radius: var(--r-lg); padding: 1.75rem;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tool-icon { width: 48px; height: 48px; background: var(--cream); border-radius: var(--r); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; font-size: 1.4rem; }
.tool-card h3 { color: var(--navy); margin-bottom: 0.5rem; }
.tool-card p { color: var(--ink3); font-size: 0.88rem; flex: 1; }
.tool-card .btn { margin-top: 1.25rem; width: 100%; justify-content: center; }

/* ---- FEATURES ---- */
.features-section { background: var(--navy); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.feature-item { background: rgba(255,255,255,0.05); border: 1px solid var(--border-light); border-radius: var(--r); padding: 1.5rem; }
.feature-check { color: var(--gold); font-size: 1.2rem; margin-bottom: 0.75rem; }
.feature-item h4 { color: white; margin-bottom: 0.5rem; font-size: 0.95rem; }
.feature-item p { color: rgba(255,255,255,0.6); font-size: 0.82rem; margin: 0; }

/* ---- BLOG CARDS ---- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; margin-top: 3rem; }
.blog-card { background: var(--white); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card-img { height: 200px; background: var(--navy); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.blog-card-img svg { width: 100%; height: 100%; }
.blog-card-body { padding: 1.5rem; }
.blog-tag { display: inline-block; background: rgba(212,160,23,0.12); color: var(--gold); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 10px; border-radius: 20px; margin-bottom: 0.75rem; }
.blog-card h3 { color: var(--navy); margin-bottom: 0.5rem; font-size: 1rem; line-height: 1.4; }
.blog-card p { color: var(--ink3); font-size: 0.85rem; margin-bottom: 1rem; }
.blog-card .read-more { color: var(--gold); font-size: 0.85rem; font-weight: 700; }

/* ---- NEWSLETTER ---- */
.newsletter { background: var(--gold); padding: 4rem 0; text-align: center; }
.newsletter h2 { color: var(--navy); margin-bottom: 0.5rem; }
.newsletter p { color: rgba(13,27,42,0.7); margin-bottom: 2rem; }
.newsletter-form { display: flex; gap: 1rem; max-width: 480px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.newsletter-form input { flex: 1; min-width: 240px; padding: 12px 18px; border-radius: var(--r); border: none; font-size: 0.95rem; }
.newsletter-form input:focus { outline: 2px solid var(--navy); }
.newsletter-form button { background: var(--navy); color: white; border: none; padding: 12px 28px; border-radius: var(--r); font-weight: 700; cursor: pointer; font-size: 0.95rem; transition: background 0.2s; }
.newsletter-form button:hover { background: var(--navy2); }

/* ---- FOOTER ---- */
.footer { background: var(--navy); color: rgba(255,255,255,0.6); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand .nav-logo { display: block; margin-bottom: 1rem; font-size: 1.1rem; }
.footer-brand p { font-size: 0.85rem; line-height: 1.7; }
.footer h4 { color: white; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1rem; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer ul a { color: rgba(255,255,255,0.6); font-size: 0.85rem; transition: color 0.2s; }
.footer ul a:hover { color: var(--gold); text-decoration: none; }
.footer-bottom { border-top: 1px solid var(--border-light); padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { font-size: 0.78rem; margin: 0; }
.footer-disclaimer { font-size: 0.72rem; color: rgba(255,255,255,0.4); margin-top: 0.5rem; }

/* ---- BREADCRUMB ---- */
.breadcrumb { background: var(--cream); padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.breadcrumb ol { display: flex; list-style: none; gap: 0.5rem; align-items: center; font-size: 0.8rem; }
.breadcrumb li { color: var(--ink3); }
.breadcrumb li + li::before { content: '›'; margin-right: 0.5rem; color: var(--ink3); }
.breadcrumb a { color: var(--ink3); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb li:last-child { color: var(--ink2); font-weight: 600; }

/* ---- PAGE HEADER ---- */
.page-header { background: var(--navy); padding: 4rem 0 3rem; }
.page-header h1 { color: white; margin-bottom: 0.75rem; }
.page-header p { color: rgba(255,255,255,0.7); font-size: 1.05rem; max-width: 600px; margin: 0; }

/* ---- CALCULATOR STYLES ---- */
.calc-wrap { max-width: 860px; margin: 0 auto; }
.calc-card { background: var(--white); border-radius: var(--r-lg); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 2rem; }
.calc-header { background: var(--navy); padding: 1.5rem 2rem; }
.calc-header h2 { color: white; font-size: 1.2rem; margin: 0; }
.calc-header p { color: rgba(255,255,255,0.6); font-size: 0.85rem; margin: 0.25rem 0 0; }
.calc-body { padding: 2rem; }
.field-group { margin-bottom: 1.25rem; }
.field-label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--ink2); margin-bottom: 6px; }
.field-hint { font-size: 0.75rem; color: var(--ink3); margin-bottom: 6px; }
.field-input { width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--r); font-size: 0.95rem; font-family: inherit; color: var(--ink); background: var(--white); transition: border 0.2s; }
.field-input:focus { outline: none; border-color: var(--gold); }
.field-prefix { position: relative; }
.field-prefix .prefix-sym { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink3); font-size: 0.9rem; pointer-events: none; }
.field-prefix .field-input { padding-left: 28px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.calc-btn { width: 100%; padding: 14px; background: var(--gold); color: var(--navy); border: none; border-radius: var(--r); font-size: 1rem; font-weight: 800; cursor: pointer; transition: background 0.2s; margin-top: 0.5rem; }
.calc-btn:hover { background: var(--gold2); }
.results-panel { display: none; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 2px solid var(--cream2); }
.results-panel.show { display: block; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.result-card { background: var(--cream); border-radius: var(--r); padding: 1rem; text-align: center; }
.result-card.highlight { background: var(--navy); }
.result-num { font-size: 1.4rem; font-weight: 800; color: var(--navy); }
.result-card.highlight .result-num { color: var(--gold); }
.result-lbl { font-size: 0.72rem; color: var(--ink3); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 4px; }
.result-card.highlight .result-lbl { color: rgba(255,255,255,0.6); }
.verdict { display: flex; align-items: center; gap: 12px; padding: 1rem 1.25rem; border-radius: var(--r); margin-bottom: 1rem; font-weight: 700; font-size: 0.95rem; }
.verdict.green { background: #e8f5ee; color: var(--green-ok); border: 1px solid rgba(26,107,58,0.2); }
.verdict.amber { background: #fff3e0; color: var(--amber-warn); border: 1px solid rgba(184,92,0,0.2); }
.verdict.red { background: #ffeaea; color: var(--red-bad); border: 1px solid rgba(200,0,0,0.2); }
.breakdown-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.breakdown-table th { background: var(--navy); color: white; padding: 9px 12px; text-align: left; }
.breakdown-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.breakdown-table tr:last-child td { font-weight: 700; color: var(--navy); background: var(--cream); }

/* ---- ARTICLE STYLES ---- */
.article-wrap { max-width: 760px; margin: 0 auto; padding: 3rem 1.5rem; }
.article-meta { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 2rem; font-size: 0.82rem; color: var(--ink3); }
.article-tag { background: rgba(212,160,23,0.12); color: var(--gold); font-weight: 700; padding: 4px 10px; border-radius: 20px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.article-body h2 { color: var(--navy); margin: 2.5rem 0 1rem; font-size: 1.4rem; border-left: 4px solid var(--gold); padding-left: 1rem; }
.article-body h3 { color: var(--navy); margin: 1.75rem 0 0.75rem; font-size: 1.1rem; }
.article-body p { font-size: 0.97rem; line-height: 1.8; color: var(--ink2); }
.article-body ul, .article-body ol { margin: 1rem 0 1rem 1.5rem; }
.article-body li { margin-bottom: 6px; font-size: 0.97rem; color: var(--ink2); line-height: 1.7; }
.article-callout { background: var(--cream); border-left: 4px solid var(--gold); border-radius: 0 var(--r) var(--r) 0; padding: 1rem 1.25rem; margin: 1.5rem 0; }
.article-callout p { margin: 0; font-size: 0.9rem; }
.article-warn { background: #fff8e1; border-left: 4px solid var(--gold); border-radius: 0 var(--r) var(--r) 0; padding: 1rem 1.25rem; margin: 1.5rem 0; }
.article-warn p { margin: 0; font-size: 0.88rem; color: #5a4500; }
.toc-box { background: var(--cream); border-radius: var(--r); padding: 1.5rem; margin-bottom: 2.5rem; }
.toc-box h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink3); margin-bottom: 0.75rem; }
.toc-box ol { padding-left: 1.2rem; }
.toc-box li { font-size: 0.85rem; margin-bottom: 6px; }
.toc-box a { color: var(--navy); }
.toc-box a:hover { color: var(--gold); }

/* ---- RELATED TOOLS CTA ---- */
.tool-cta { background: var(--navy); border-radius: var(--r-lg); padding: 2rem; margin: 2.5rem 0; text-align: center; }
.tool-cta h3 { color: white; margin-bottom: 0.5rem; }
.tool-cta p { color: rgba(255,255,255,0.6); font-size: 0.88rem; margin-bottom: 1.25rem; }

/* ---- SECTION TITLES ---- */
.section-title { text-align: center; margin-bottom: 0.5rem; }
.section-title.light { color: white; }
.section-sub { text-align: center; color: var(--ink3); font-size: 1rem; margin-bottom: 0; }
.section-sub.light { color: rgba(255,255,255,0.6); }

/* ---- UTILS ---- */
.text-gold { color: var(--gold); }
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; }
.hidden { display: none; }

/* ---- MOBILE ---- */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy2); padding: 1rem 1.5rem; gap: 1rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-inner { position: relative; }
  .nav-dropdown-menu { position: static; box-shadow: none; border: none; background: transparent; padding: 0 0 0 1rem; }
  .nav-dropdown:hover .nav-dropdown-menu { display: none; }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-graphic { display: none; }
  .stats-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
}
