/* ===========================
   CSS Variables
=========================== */
:root {
  --primary: #16a34a;
  --primary-dark: #15803d;
  --primary-light: #dcfce7;
  --accent: #facc15;
  --accent-dark: #ca8a04;
  --text: #f0fdf4;
  --text-muted: #86efac;
  --text-dark: #1a2e1a;
  --bg: #0a1a0f;
  --bg-alt: #0f2317;
  --bg-card: #122a18;
  --border: #1e4027;
  --radius: 10px;
  --shadow: 0 2px 20px rgba(0,0,0,0.4);
  --shadow-hover: 0 8px 40px rgba(22,163,74,0.25);
  --font-display: 'Syne', Georgia, sans-serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --max-width: 1100px;
}

/* ===========================
   Reset & Base
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

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

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===========================
   Header & Nav
=========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,26,15,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--primary);
}

.site-nav { display: flex; align-items: center; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links > li > a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-links > li > a:hover,
.nav-links > li > a.nav-active {
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
}

/* Dropdown */
.dropdown { position: relative; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 220px;
  list-style: none;
  padding: 8px 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 200;
  max-height: 420px;
  overflow-y: auto;
}

.dropdown.active .dropdown-menu { display: block; }

.dropdown-menu li a {
  display: block;
  padding: 8px 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: all 0.15s;
}

.dropdown-menu li a:hover,
.dropdown-menu li a.nav-active {
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    background: var(--bg-alt);
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    -webkit-overflow-scrolling: touch;
  }
  .nav-links.open { display: flex; }
  .nav-links > li > a { display: block; }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: var(--bg-card);
    border-radius: 8px;
    margin-top: 4px;
  }
}

/* ===========================
   Hero
=========================== */
.hero {
  padding: 80px 0 70px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(22,163,74,0.15) 0%, transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.hero-badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}

.badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 18px;
}

.hero h1 em {
  font-style: italic;
  color: var(--primary);
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 32px;
}

.btn-calc {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 32px;
  border-radius: 8px;
  display: inline-block;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn-calc:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  text-decoration: none;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 48px;
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.03em;
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* ===========================
   AdSense
=========================== */
.adslot {
  min-height: 100px;
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin: 32px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ===========================
   Section Commons
=========================== */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 8px;
}

.section-title em {
  color: var(--primary);
  font-style: italic;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 36px;
}

/* ===========================
   Tools Grid
=========================== */
.tools-section {
  padding: 64px 0;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.tool-card {
  position: relative;
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}

.tool-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.tool-card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--accent);
  color: var(--text-dark);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tool-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  line-height: 1;
}

.tool-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  font-family: var(--font-display);
}

.tool-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

.tool-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

/* ===========================
   Why Section
=========================== */
.why-section {
  padding: 64px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.why-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.why-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 12px;
}

.why-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  font-family: var(--font-display);
}

.why-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ===========================
   Blog Section
=========================== */
.blog-section {
  padding: 64px 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.blog-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.blog-tag {
  display: inline-block;
  background: rgba(22,163,74,0.15);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.blog-card h3 {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  font-family: var(--font-display);
  line-height: 1.35;
}

.blog-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 14px;
}

.blog-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.view-all {
  display: inline-block;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
}

/* ===========================
   Footer
=========================== */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  display: inline-block;
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 280px;
}

.footer-links h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links ul li a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.15s;
}

.footer-links ul li a:hover {
  color: var(--text);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--text-muted);
}

.disclaimer {
  font-size: 0.75rem !important;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero-stats {
    gap: 24px;
  }
}

/* ===========================
   Tool Page
=========================== */
.tool-page {
  padding: 48px 0 80px;
}

.tool-page-header {
  margin-bottom: 40px;
}

.tool-page-header .tool-category {
  display: inline-block;
  background: rgba(22,163,74,0.15);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.tool-page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 10px;
}

.tool-page-header p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 600px;
}

.tool-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 768px) {
  .tool-layout { grid-template-columns: 1fr; }
}

.calc-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.calc-box h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 10px 14px;
  transition: border-color 0.2s;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group select option {
  background: var(--bg-alt);
}

.btn-primary {
  width: 100%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 13px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s;
  margin-top: 8px;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.result-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.result-box h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.result-placeholder {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.result-placeholder .result-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.4;
}

.result-main {
  display: none;
}

.result-highlight {
  background: rgba(22,163,74,0.1);
  border: 1px solid rgba(22,163,74,0.3);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
}

.result-highlight .result-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.result-highlight .result-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.03em;
}

.result-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-alt);
  border-radius: 8px;
  font-size: 0.875rem;
}

.breakdown-row .b-label {
  color: var(--text-muted);
}

.breakdown-row .b-value {
  font-weight: 700;
  color: var(--text);
}

/* ===========================
   Article / Blog Post
=========================== */
.article-page {
  padding: 48px 0 80px;
}

.article-header {
  max-width: 720px;
  margin: 0 auto 40px;
  text-align: center;
}

.article-tag {
  display: inline-block;
  background: rgba(22,163,74,0.15);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 16px;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin: 36px 0 14px;
  letter-spacing: -0.02em;
}

.article-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 10px;
}

.article-body p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 18px;
}

.article-body ul,
.article-body ol {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 18px;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 6px;
}

.article-body strong {
  color: var(--text);
  font-weight: 700;
}

.article-body .callout {
  background: rgba(22,163,74,0.1);
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===========================
   Blog Index
=========================== */
.blog-index-page {
  padding: 48px 0 80px;
}

.blog-index-header {
  margin-bottom: 40px;
}

/* ===========================
   Static Pages (About, Privacy, Contact)
=========================== */
.static-page {
  padding: 48px 0 80px;
  max-width: 720px;
  margin: 0 auto;
}

.static-page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 8px;
}

.static-page .page-sub {
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 1rem;
}

.static-page h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 12px;
}

.static-page p,
.static-page li {
  color: var(--text-muted);
  font-size: 0.975rem;
  line-height: 1.75;
  margin-bottom: 14px;
}

.static-page ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

.static-page a {
  color: var(--primary);
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 32px;
}

.contact-form .form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 10px 14px;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

/* ===========================
   Sidebar
=========================== */
.sidebar-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.sidebar-box h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sidebar-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-box ul li {
  font-size: 0.875rem;
}

.sidebar-box ul li a {
  color: var(--text-muted);
  transition: color 0.15s;
}

.sidebar-box ul li a:hover {
  color: var(--primary);
  text-decoration: none;
}

.sidebar-box ul li strong {
  color: var(--text);
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

/* Result box visible */
.result-box-tool {
  background: rgba(22,163,74,0.08);
  border: 1px solid rgba(22,163,74,0.3);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 20px;
  display: none;
}

.result-box-tool.visible {
  display: block;
}

.result-box-tool h3 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.result-box-tool .result-amount {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.result-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 14px;
  line-height: 1.5;
}

table { width: 100%; border-collapse: collapse; }
table td { padding: 6px 0; font-size: 0.875rem; color: var(--text-muted); border-bottom: 1px solid var(--border); }
table td:last-child { text-align: right; color: var(--text); font-weight: 600; }
table tr:last-child td { border-bottom: none; }

/* Nav fix for mobile dropdown overflow */
@media (max-width: 768px) {
  .dropdown-menu {
    max-height: 60vh;
    overflow-y: auto;
  }
}
