/* ============================================================
   নামজারি ফি ক্যালকুলেটর — কম্পোনেন্ট স্টাইল
   namjari-fee.md ডিজাইন অনুযায়ী (navbar/footer সাইট থেকেই আসে)
   ============================================================ */

:root {
  --nf-primary:    #15803d;
  --nf-primary-d:  #166534;
  --nf-primary-x:  #dcfce7;
  --nf-ink:        #111827;
  --nf-muted:      #6b7280;
  --nf-border:     #e5e7eb;
  --nf-bg:         #f8fafc;
  --nf-card:       #ffffff;
  --nf-sky:        #0284c7;
  --nf-sky-x:      #e0f2fe;
  --nf-amber:      #b45309;
  --nf-amber-x:    #fef3c7;
  --nf-red:        #b91c1c;
  --nf-red-x:      #fee2e2;
  --nf-radius:     14px;
  --nf-shadow:     0 1px 3px rgba(15, 23, 42, .08), 0 8px 24px rgba(15, 23, 42, .06);
}

.nf-shell,
.nf-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 48px;
  font-family: "Hind Siliguri", "Noto Sans Bengali", system-ui, sans-serif;
  color: var(--nf-ink);
  line-height: 1.65;
}

.nf-wrap { padding-top: 8px; }

/* ---------- Breadcrumb ---------- */
.nf-breadcrumb {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--nf-muted);
  padding: 10px 2px 14px;
}
.nf-breadcrumb-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nf-breadcrumb a { color: var(--nf-primary); text-decoration: none; }
.nf-breadcrumb a:hover { text-decoration: underline; }

/* ---------- ভাষা টগল ---------- */
.nf-lang { display: flex; gap: 6px; }
.nf-lang .lang-btn {
  border: 1px solid var(--nf-border);
  background: #fff;
  color: var(--nf-muted);
  border-radius: 999px;
  padding: 4px 12px;
  font: 600 12.5px/1.4 "Hind Siliguri", "Noto Sans Bengali", sans-serif;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.nf-lang .lang-btn:hover { border-color: var(--nf-primary); color: var(--nf-primary); }
.nf-lang .lang-btn.active { background: var(--nf-primary); color: #fff; border-color: var(--nf-primary); }

/* ---------- Buttons ---------- */
.nf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 15px/1.2 "Hind Siliguri", "Noto Sans Bengali", sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.nf-btn:active { transform: translateY(1px); }
.nf-btn-primary { background: var(--nf-primary); color: #fff; box-shadow: 0 6px 16px rgba(21, 128, 61, .25); }
.nf-btn-primary:hover { background: var(--nf-primary-d); }
.nf-btn-outline { border-color: var(--nf-border); background: #fff; color: var(--nf-primary); }
.nf-btn-outline:hover { border-color: var(--nf-primary); }
.nf-btn-ghost { background: transparent; color: var(--nf-muted); }
.nf-btn-ghost:hover { color: var(--nf-primary); }

/* ---------- Hero ---------- */
.nf-hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 32px;
  align-items: center;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 55%, #f0f9ff 100%);
  border: 1px solid var(--nf-border);
  border-radius: 22px;
  padding: 40px 36px;
  margin-bottom: 22px;
}
.nf-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--nf-primary);
  background: var(--nf-primary-x);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.nf-hero h1 {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.25;
  font-weight: 800;
  margin: 0 0 12px;
}
.nf-lead { color: var(--nf-muted); font-size: 17px; margin: 0 0 22px; }
.nf-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.nf-hero-visual { position: relative; min-height: 230px; }
.nf-vcard {
  position: absolute;
  background: #fff;
  border: 1px solid var(--nf-border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--nf-shadow);
  animation: nf-float 4s ease-in-out infinite;
}
.nf-vcard-a { top: 6px; left: 6px; animation-delay: 0s; }
.nf-vcard-b { top: 52px; right: 8px; animation-delay: .6s; }
.nf-vcard-c { bottom: 58px; left: 34px; animation-delay: 1.2s; }
.nf-vcard-d { bottom: 10px; right: 40px; animation-delay: 1.8s; }
@keyframes nf-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

.nf-fee-chips {
  position: absolute;
  right: -8px;
  top: 6px;
  bottom: 8px;
  width: 118px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}
.nf-chip {
  background: #fff;
  border: 1px solid var(--nf-border);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--nf-shadow);
  display: flex;
  gap: 6px;
  align-items: center;
}
.nf-chip-total { background: var(--nf-primary); color: #fff; border-color: var(--nf-primary); }

/* ---------- Generic section card ---------- */
.nf-section {
  background: var(--nf-card);
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius);
  box-shadow: var(--nf-shadow);
  padding: 26px 26px 28px;
  margin-bottom: 20px;
}
.nf-h2 { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.nf-h3 { font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.nf-sub { color: var(--nf-muted); margin: 0 0 18px; }

/* ---------- Info icon grid ---------- */
.nf-info-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.nf-info-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--nf-bg);
  border: 1px dashed var(--nf-border);
  border-radius: 12px;
  padding: 14px;
}
.nf-info-icon { font-size: 26px; }
.nf-info-card strong { font-size: 14.5px; }
.nf-info-card small { color: var(--nf-muted); font-size: 12.5px; }

/* ---------- Calculator form ---------- */
.nf-form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
.nf-form-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nf-label { font-size: 13.5px; font-weight: 600; color: var(--nf-ink); }
.nf-input {
  width: 100%;
  padding: 11px 12px;
  font: 500 15px "Hind Siliguri", "Noto Sans Bengali", sans-serif;
  border: 1px solid var(--nf-border);
  border-radius: 10px;
  background: #fff;
  color: var(--nf-ink);
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.nf-input:focus {
  outline: none;
  border-color: var(--nf-primary);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, .12);
}
.nf-form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

.nf-alert {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14.5px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.nf-alert-error { background: var(--nf-red-x); color: var(--nf-red); border-color: #fecaca; }

/* ---------- Receipt ---------- */
.nf-receipt {
  background: #fff;
  border: 1px solid #d1d5db;
  border-top: 5px solid var(--nf-primary);
  border-radius: 14px;
  padding: 20px 22px 16px;
  box-shadow: var(--nf-shadow);
  position: relative;
}
.nf-receipt-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 2px dashed var(--nf-border);
}
.nf-receipt-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--nf-primary-x);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.nf-receipt-title { flex: 1; line-height: 1.35; }
.nf-receipt-title strong { font-size: 16px; display: block; }
.nf-receipt-title span { color: var(--nf-muted); font-size: 12.5px; }
.nf-receipt-stamp {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--nf-amber);
  border: 1.5px solid var(--nf-amber);
  border-radius: 6px;
  padding: 4px 10px;
  transform: rotate(-4deg);
}

.nf-receipt-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px 18px;
  margin: 14px 0;
}
.nf-receipt-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dotted var(--nf-border);
  padding: 3px 0;
}
.nf-receipt-meta dt { color: var(--nf-muted); font-size: 13px; }
.nf-receipt-meta dd { margin: 0; font-weight: 700; font-size: 13.5px; }

.nf-receipt-lines { padding: 4px 0; }
.nf-receipt-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 15px;
}
.nf-receipt-line-value { font-variant-numeric: tabular-nums; font-weight: 600; }

.nf-receipt-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 8px;
  padding: 14px 0 6px;
  border-top: 2px dashed var(--nf-border);
  font-size: 17px;
  font-weight: 800;
}
.nf-receipt-total .nf-count { color: var(--nf-primary); font-size: 26px; font-variant-numeric: tabular-nums; }
.nf-receipt-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--nf-muted);
  margin-top: 4px;
}

.nf-receipt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px; }

/* ---------- Stacked breakdown bar ---------- */
.nf-stack .nf-stack-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 13.5px;
  margin-bottom: 10px;
}
.nf-stack-bar {
  display: flex;
  width: 100%;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--nf-bg);
}
.nf-stack-seg { width: 0%; transition: width 1s cubic-bezier(.22, 1, .36, 1); }
.nf-stack-seg.nf-legend-application { background: var(--nf-sky); }
.nf-stack-seg.nf-legend-record     { background: var(--nf-primary); }
.nf-stack-seg.nf-legend-charges    { background: #f59e0b; }
.nf-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.nf-legend-item::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: 0 0 auto;
}
.nf-legend-item.nf-legend-application::before { background: var(--nf-sky); }
.nf-legend-item.nf-legend-record::before     { background: var(--nf-primary); }
.nf-legend-item.nf-legend-charges::before    { background: #f59e0b; }

/* ---------- Detail accordion ---------- */
.nf-detail { margin-top: 18px; }
.nf-detail summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--nf-primary);
  padding: 8px 0;
}
.nf-detail-table { border: 1px solid var(--nf-border); border-radius: 10px; overflow: hidden; }
.nf-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--nf-border);
  background: #fff;
}
.nf-detail-total { background: var(--nf-bg); font-weight: 800; border-bottom: none; }

/* ---------- Infographic "খরচ কোথায় যায়?" ---------- */
.nf-breakdown-top { display: flex; justify-content: center; margin: 6px 0 0; }
.nf-breakdown-root {
  background: var(--nf-primary);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 22px;
  text-align: center;
}
.nf-breakdown-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
  position: relative;
}
.nf-breakdown-cols::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 16.66%;
  right: 16.66%;
  height: 24px;
  border-left: 2px dashed var(--nf-border);
  border-right: 2px dashed var(--nf-border);
  border-bottom: 2px dashed var(--nf-border);
  border-radius: 0 0 20px 20px;
  z-index: 0;
}
.nf-branch {
  position: relative;
  z-index: 1;
  background: var(--nf-bg);
  border: 1px solid var(--nf-border);
  border-radius: 12px;
  padding: 12px;
  transition: box-shadow .15s ease, transform .15s ease;
}
.nf-branch:hover { box-shadow: var(--nf-shadow); transform: translateY(-2px); }
.nf-branch summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}
.nf-branch summary::-webkit-details-marker { display: none; }
.nf-branch-icon { font-size: 22px; }
.nf-branch-body { margin-top: 10px; font-size: 13.5px; color: var(--nf-muted); }
.nf-branch-body p { margin: 0 0 6px; }
.nf-branch-list { margin: 0; padding-left: 18px; }

/* ---------- ৩ ধাপে ---------- */
.nf-flow-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 6px;
}
.nf-flow-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--nf-bg);
  border: 1px solid var(--nf-border);
  border-radius: 12px;
  padding: 14px;
  text-decoration: none;
  color: var(--nf-ink);
  transition: box-shadow .15s ease, transform .15s ease;
}
.nf-flow-step:hover { box-shadow: var(--nf-shadow); transform: translateY(-2px); }
.nf-flow-step .nf-flow-num {
  font-size: 26px;
  line-height: 1;
  color: var(--nf-primary);
}
.nf-flow-step strong { display: block; font-size: 15.5px; }
.nf-flow-step small { color: var(--nf-muted); font-size: 12.5px; }

/* ---------- Example ---------- */
.nf-example-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
  align-items: stretch;
}
.nf-example-scenario {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 16px;
}
.nf-example-head {
  display: inline-block;
  background: var(--nf-primary);
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 8px;
}
.nf-example-scenario ul { margin: 8px 0 14px; padding-left: 20px; font-size: 14.5px; }
.nf-example-note {
  background: var(--nf-amber-x);
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 16px;
  font-size: 13.5px;
  color: #78350f;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ---------- Timeline ---------- */
.nf-timeline {
  list-style: none;
  margin: 8px 0 0;
  padding: 8px 12px 4px;
  position: relative;
}
.nf-timeline::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--nf-primary), var(--nf-border));
}
.nf-timeline li {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 8px 0 14px 0;
}
.nf-timeline-num {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--nf-primary-x);
  border: 2px solid var(--nf-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  z-index: 1;
}
.nf-timeline strong { display: block; font-size: 15.5px; }
.nf-timeline small { color: var(--nf-muted); font-size: 13px; }

/* ---------- Warning banner ---------- */
.nf-warn {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: none;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 20px;
}
.nf-warn h3 { margin: 0 0 4px; font-size: 16px; color: #7f1d1d; }
.nf-warn p { margin: 0; font-size: 14px; color: #7f1d1d; }

/* ---------- Guides ---------- */
.nf-guide-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.nf-guide-list a {
  display: block;
  background: var(--nf-bg);
  border: 1px solid var(--nf-border);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--nf-ink);
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}
.nf-guide-list a:hover { border-color: var(--nf-primary); color: var(--nf-primary); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nf-hero { grid-template-columns: 1fr; padding: 26px 18px; }
  .nf-hero-visual { min-height: 200px; }
  .nf-fee-chips { right: 0; width: 104px; }
  .nf-info-cards { grid-template-columns: repeat(2, 1fr); }
  .nf-form-row { grid-template-columns: 1fr; }
  .nf-receipt-meta { grid-template-columns: 1fr; }
  .nf-breakdown-cols { grid-template-columns: 1fr; }
  .nf-breakdown-cols::before { display: none; }
  .nf-flow-steps { grid-template-columns: 1fr; }
  .nf-example-grid { grid-template-columns: 1fr; }
  .nf-guide-list { grid-template-columns: 1fr; }
}

/* ---------- Print ---------- */
@media print {
  .no-print,
  .nf-hero-visual,
  .nf-info-grid,
  .nf-flow,
  .nf-breakdown,
  .nf-timeline,
  .nf-example,
  .nf-guides,
  .nf-calculator { display: none !important; }
  body { background: #fff; }
  .nf-wrap { max-width: 100%; padding: 0; }
  .nf-receipt { box-shadow: none; }
}