/* ═══════════════════════════════════════════════════════════════════
   shared.css — MFTools.in global styles
   Nav · Footer · Tool Cards · Calculator Layout · Blog
═══════════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body { background: #09090b; color: #e2e8f0; font-family: 'Inter', system-ui, -apple-system, sans-serif; margin: 0; }
a { color: inherit; }
img { max-width: 100%; }

/* ── Site Navigation ─────────────────────────────────────────────── */
.site-nav {
  background: rgba(9, 9, 11, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #1e1e28;
  position: sticky;
  top: 0;
  z-index: 200;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}
.nav-logo-text span { color: #2dd4bf; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: flex-end;
}
.nav-links a {
  display: block;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-links a:hover { color: #e2e8f0; background: #1a1a22; }
.nav-links a.nav-active { color: #2dd4bf; background: #042f2e; }
.nav-links .nav-cta-item a {
  background: #0d9488;
  color: #fff;
  padding: 8px 18px;
  font-weight: 600;
}
.nav-links .nav-cta-item a:hover { background: #0f766e; color: #fff; }

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #9ca3af;
  flex-shrink: 0;
}
.mobile-menu {
  display: none;
  border-top: 1px solid #1e1e28;
  padding: 10px 20px 16px;
  background: #09090b;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #9ca3af;
  text-decoration: none;
  margin-bottom: 2px;
  transition: color 0.15s, background 0.15s;
}
.mobile-menu a:hover { color: #e2e8f0; background: #1a1a22; }
.mobile-menu a.nav-active { color: #2dd4bf; background: #042f2e; }
.mobile-cta { margin-top: 8px !important; background: #0d9488 !important; color: #fff !important; text-align: center; font-weight: 600; }
.mobile-cta:hover { background: #0f766e !important; color: #fff !important; }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* ── Site Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: #060609;
  border-top: 1px solid #1e1e28;
  padding: 60px 24px 36px;
  margin-top: 80px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }

.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 52px;
}
.footer-brand p {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.75;
  margin: 14px 0 20px;
  max-width: 340px;
}
.footer-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid #1e1e28;
  font-size: 0.75rem;
  color: #6b7280;
  background: #0d0d12;
}
.footer-badge svg { color: #10b981; flex-shrink: 0; }
.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  font-size: 0.875rem;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col ul li a:hover { color: #e2e8f0; }

.footer-bottom {
  border-top: 1px solid #1e1e28;
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-disclaimer { font-size: 0.78rem; color: #4b5563; line-height: 1.65; max-width: 920px; }
.footer-disclaimer strong { color: #6b7280; }
.footer-copy { font-size: 0.78rem; color: #4b5563; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ── Shared Section Helpers ───────────────────────────────────────── */
.section-wrap { padding: 72px 24px; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0d9488;
  margin: 0 0 12px;
  display: block;
}
.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 16px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.section-desc { font-size: 0.95rem; color: #6b7280; line-height: 1.75; margin: 0; }
.divider { border: none; border-top: 1px solid #1e1e28; margin: 64px auto; max-width: 1100px; }

/* ── Tool Cards (homepage grid) ───────────────────────────────────── */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.tool-card {
  background: #0d0d14;
  border: 1px solid #1e1e28;
  border-radius: 14px;
  padding: 24px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color 0.2s, background 0.2s, transform 0.18s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.tool-card:hover {
  border-color: #0d9488;
  background: #0a1512;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(13, 148, 136, 0.14);
}
.tool-card.featured { border-color: #0d9488; background: linear-gradient(140deg, #090d0d 0%, #042f2c 100%); }
.tool-card.coming-soon { opacity: 0.45; pointer-events: none; cursor: default; }
.tool-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.tool-card h3 { font-size: 1.05rem; font-weight: 700; color: #e2e8f0; margin: 0 0 8px; }
.tool-card p { font-size: 0.83rem; color: #6b7280; line-height: 1.65; margin: 0 0 16px; flex: 1; }
.tool-card-arrow {
  font-size: 0.8rem;
  font-weight: 700;
  color: #2dd4bf;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
}
.tool-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tool-badge.flagship { background: #042f2e; color: #2dd4bf; }
.tool-badge.soon { background: #1e1e28; color: #4b5563; }

/* ── Calculator Page Layout ──────────────────────────────────────── */
.calc-layout { max-width: 1100px; margin: 0 auto; padding: 36px 24px 80px; }
.calc-header { margin-bottom: 32px; }
.calc-header h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; color: #fff; margin: 0 0 8px; letter-spacing: -0.02em; }
.calc-header p { font-size: 0.9rem; color: #6b7280; margin: 0; }

.calc-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 860px) { .calc-grid { grid-template-columns: 1fr; } }

.calc-panel {
  background: #111116;
  border: 1px solid #1e1e28;
  border-radius: 16px;
  padding: 24px;
}

/* Form controls inside calculator */
.calc-panel label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}
.calc-panel input[type="number"],
.calc-panel input[type="text"],
.calc-panel select {
  width: 100%;
  background: #0d0d12;
  border: 1px solid #1e1e28;
  color: #e2e8f0;
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
  appearance: none;
  -moz-appearance: textfield;
}
.calc-panel input:focus, .calc-panel select:focus { border-color: #0d9488; }
.calc-panel input[type="range"] {
  width: 100%;
  margin-top: 8px;
  accent-color: #0d9488;
  cursor: pointer;
  background: transparent;
  height: 4px;
}
.range-row { display: flex; justify-content: space-between; font-size: 0.72rem; color: #4b5563; margin-top: 4px; }
.field-group { margin-bottom: 20px; }
.field-group:last-of-type { margin-bottom: 0; }

/* ₹ input prefix — flex layout so the symbol never overlaps the number */
.input-prefix-wrap {
  display: flex;
  align-items: stretch;
  background: #0d0d12;
  border: 1px solid #1e1e28;
  border-radius: 9px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.input-prefix-wrap:focus-within { border-color: #0d9488; }
.input-prefix {
  padding: 0 11px;
  background: #181820;
  color: #6b7280;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  border-right: 1px solid #1e1e28;
}
.input-prefix-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e2e8f0;
  font-size: 0.9rem;
  padding: 10px 12px;
  min-width: 0;
  -moz-appearance: textfield;
}
.input-prefix-wrap input::-webkit-outer-spin-button,
.input-prefix-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* suffix variant (% / Yrs) */
.input-suffix-wrap {
  display: flex;
  align-items: stretch;
  background: #0d0d12;
  border: 1px solid #1e1e28;
  border-radius: 9px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.input-suffix-wrap:focus-within { border-color: #0d9488; }
.input-suffix {
  padding: 0 11px;
  background: #181820;
  color: #6b7280;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  border-left: 1px solid #1e1e28;
}
.input-suffix-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e2e8f0;
  font-size: 0.9rem;
  padding: 10px 12px;
  min-width: 0;
  -moz-appearance: textfield;
}
.input-suffix-wrap input::-webkit-outer-spin-button,
.input-suffix-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid #1e1e28;
  margin-top: 4px;
}
.toggle-row span { font-size: 0.85rem; font-weight: 500; color: #9ca3af; }
.toggle-switch { position: relative; width: 40px; height: 22px; display: inline-block; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #2a2a36;
  border-radius: 22px;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: #0d9488; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

.stepup-panel {
  background: #042f2e;
  border: 1px solid #0d4040;
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
}
.stepup-panel label { color: #6b7280; }

.calc-btn {
  width: 100%;
  padding: 13px;
  background: #0d9488;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 20px;
  letter-spacing: 0.01em;
}
.calc-btn:hover { background: #0f766e; }

/* Results panel */
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
@media (max-width: 600px) { .results-grid { grid-template-columns: 1fr 1fr; } }

.result-card {
  background: #0d0d12;
  border: 1px solid #1e1e28;
  border-radius: 12px;
  padding: 16px 18px;
  text-align: center;
}
.result-label { font-size: 0.72rem; font-weight: 600; color: #6b7280; margin: 0 0 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.result-value { font-size: 1.25rem; font-weight: 800; color: #e2e8f0; margin: 0; line-height: 1.2; word-break: break-word; }
.result-value.green { color: #4ade80; }
.result-value.teal { color: #2dd4bf; }
.result-value.blue { color: #60a5fa; }
.result-value.purple { color: #c084fc; }
.result-value.red { color: #f87171; }

.chart-wrap { background: #0d0d12; border: 1px solid #1e1e28; border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.chart-wrap h4 { font-size: 0.83rem; font-weight: 600; color: #9ca3af; margin: 0 0 16px; }
.chart-wrap canvas { max-height: 260px; }

.pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  background: #0d0d12;
  border: 1px solid #1e1e28;
  color: #9ca3af;
  border-radius: 9px;
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  text-decoration: none;
}
.pdf-btn:hover { border-color: #2dd4bf; color: #2dd4bf; }

.year-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; margin-top: 4px; }
.year-table th {
  background: #0a0a0e;
  color: #6b7280;
  font-weight: 600;
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid #1e1e28;
  position: sticky;
  top: 0;
}
.year-table th:not(:first-child) { text-align: right; }
.year-table td { padding: 8px 12px; border-bottom: 1px solid #111116; color: #9ca3af; vertical-align: middle; }
.year-table td:not(:first-child) { text-align: right; }
.year-table tr:hover td { background: #0f0f14; }
.year-table .total-row td { border-top: 1px solid #1e1e28; font-weight: 700; color: #e2e8f0; }
.table-scroll { max-height: 320px; overflow-y: auto; border-radius: 8px; border: 1px solid #1e1e28; }

/* ── Blog Styles ─────────────────────────────────────────────────── */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.blog-card {
  background: #0d0d14;
  border: 1px solid #1e1e28;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: border-color 0.2s, transform 0.18s, box-shadow 0.2s;
}
.blog-card:hover {
  border-color: #0d9488;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(13,148,136,0.12);
}
.blog-card-thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.blog-card-body { padding: 20px 22px 24px; }
.blog-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2dd4bf;
  background: #042f2e;
  padding: 3px 10px;
  border-radius: 10px;
  margin-bottom: 10px;
}
.blog-card h3 { font-size: 1rem; font-weight: 700; color: #e2e8f0; margin: 0 0 8px; line-height: 1.4; }
.blog-card p { font-size: 0.83rem; color: #6b7280; line-height: 1.65; margin: 0; }
.blog-meta { display: flex; align-items: center; gap: 12px; font-size: 0.72rem; color: #4b5563; margin-top: 12px; }

/* Article / Blog Post */
.article-wrap { max-width: 760px; margin: 0 auto; padding: 40px 24px 80px; }
.article-header { margin-bottom: 40px; }
.article-header .blog-tag { margin-bottom: 16px; }
.article-header h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 800; color: #fff; margin: 0 0 16px; line-height: 1.25; letter-spacing: -0.02em; }
.article-header .article-meta { font-size: 0.83rem; color: #4b5563; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.article-header .article-intro { font-size: 1rem; color: #9ca3af; line-height: 1.8; margin-top: 20px; padding-top: 20px; border-top: 1px solid #1e1e28; }

.article-body h2 { font-size: 1.3rem; font-weight: 700; color: #e2e8f0; margin: 44px 0 16px; padding-top: 4px; }
.article-body h3 { font-size: 1.05rem; font-weight: 600; color: #d1d5db; margin: 32px 0 12px; }
.article-body p { font-size: 0.95rem; color: #9ca3af; line-height: 1.85; margin: 0 0 20px; }
.article-body ul, .article-body ol { font-size: 0.95rem; color: #9ca3af; line-height: 1.8; margin: 0 0 20px; padding-left: 24px; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: #2dd4bf; text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: #99f6e4; }
.article-body strong { color: #d1d5db; font-weight: 600; }
.article-callout {
  background: #042f2e;
  border-left: 3px solid #0d9488;
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 28px 0;
}
.article-callout p { margin: 0; font-size: 0.9rem; color: #99f6e4; }
.article-table { width: 100%; border-collapse: collapse; margin: 28px 0; font-size: 0.875rem; }
.article-table th { background: #0a0a0e; color: #9ca3af; padding: 10px 14px; text-align: left; border-bottom: 1px solid #1e1e28; font-weight: 600; }
.article-table td { padding: 10px 14px; border-bottom: 1px solid #111116; color: #9ca3af; }
.article-table tr:hover td { background: #0f0f14; }

.article-cta {
  background: linear-gradient(135deg, #042f2e 0%, #031a1a 100%);
  border: 1px solid #0d9488;
  border-radius: 14px;
  padding: 28px 32px;
  text-align: center;
  margin-top: 48px;
}
.article-cta h3 { font-size: 1.05rem; font-weight: 700; color: #e2e8f0; margin: 0 0 8px; }
.article-cta p { font-size: 0.875rem; color: #6b7280; margin: 0 0 18px; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0d9488;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 11px 24px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: #0f766e; color: #fff; transform: translateY(-1px); }
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #9ca3af;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid #2a2a36;
  transition: border-color 0.15s, color 0.15s;
}
.btn-outline:hover { border-color: #4b5563; color: #e2e8f0; }

/* ── Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #111116; }
::-webkit-scrollbar-thumb { background: #2a2a36; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a48; }
