/* ═══════════════════════════════════════════════════════════
   Provident Fund (PF) Calculator — CSS
   ID root:  #pf-calculator  (JS uses getElementById — hardcoded)
   JS-refs:  #pf-salary (reads .value, inline style.borderColor)
             #pf-cap-eps (reads .checked)
             #resultText (style.display, style.borderLeftColor, .innerHTML)
             .pf-calculate-btn (classList.contains click trigger)
   Structural (no JS): .pf-form-group .pf-label .pf-input
                        .pf-checkbox .pf-checkbox-label .pf-checkbox-wrapper
                        .pf-result (display:none — JS sets style.display='block')
   Design System: Dark #0A0F1C | Green Silo #10B981 | Font: DM Sans
   ═══════════════════════════════════════════════════════════ */
/* Rank Math Breadcrumb Styling */
.rank-math-breadcrumb {
  max-width: 1000px;
  margin: 0 auto;
  padding: 12px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
}
.rank-math-breadcrumb a {
  color: #5A7090;
  text-decoration: none;
}
.rank-math-breadcrumb a:hover {
  color: #10B981;
}
.rank-math-breadcrumb .separator {
  color: #374B64;
  margin: 0 8px;
}
.rank-math-breadcrumb .last {
  color: #8899AA;
}

/* ── HERO ── */
.pf-hero {
  text-align: center;
  padding: 48px 20px 28px;
  max-width: 1100px;
  margin: 0 auto;
}

.pf-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 14px;
  color: #10B981;
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.pf-hero-title {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 14px;
  line-height: 1.2;
}

.pf-hero-title span { color: #10B981; }

.pf-hero-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #8899AA;
  max-width: 620px;
  margin: 0 auto 24px;
  line-height: 1.7;
}

.pf-hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.pf-htag {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #10B981;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 8px;
  padding: 6px 14px;
}

/* ── CALCULATOR SECTION WRAPPER ── */
.pf-calc-section {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 20px 48px;
}

/* ═══════════════════════════════════════════════════════════
   #pf-calculator
   JS root: document.getElementById('pf-calculator') — HARDCODED
   DO NOT change this ID.
   ═══════════════════════════════════════════════════════════ */
#pf-calculator {
  font-family: 'DM Sans', sans-serif;
  background: #111B2E;
  border: 1px solid rgba(55,75,100,0.3);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  /* Remove original max-width: 480px — wrapper .pf-calc-section controls width */
}

#pf-calculator * {
  box-sizing: border-box;
}

/* Green top accent bar */
#pf-calculator::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10B981, #34D399, #059669);
  z-index: 1;
}

/* ── CARD HEADER ── */
.pf-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 32px 20px;
  border-bottom: 1px solid rgba(55,75,100,0.2);
}

.pf-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(16,185,129,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.pf-card-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.pf-card-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #5A7090;
}

/* ── FORM BODY ── */
.pf-form-body {
  padding: 28px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@media (max-width: 540px) {
  .pf-card-header { padding: 20px 18px 16px; }
  .pf-form-body   { padding: 20px 18px 24px; }
}

/* ── FORM GROUP — .pf-form-group (JS: no interaction) ── */
#pf-calculator .pf-form-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 20px;
}

/* ── LABEL — .pf-label
   JS: no interaction
── */
#pf-calculator .pf-label {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #C8D8E8;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

/* ── INPUT WRAP (prefix icon container) ── */
.pf-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pf-input-prefix {
  position: absolute;
  left: 14px;
  font-size: 15px;
  font-weight: 600;
  color: #5A7090;
  pointer-events: none;
  z-index: 1;
  font-family: 'DM Sans', sans-serif;
}

/* ── INPUT — .pf-input  (#pf-salary)
   JS: reads .value
   JS: sets style.borderColor = '#d63638' (error) or '' (reset)
   CSS focus box-shadow is unaffected by inline borderColor change.
── */
#pf-calculator .pf-input {
  display: block;
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: rgba(10,15,28,0.6);
  border: 1px solid rgba(55,75,100,0.4);
  border-radius: 10px;
  color: #FFFFFF;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  outline: none;
  -moz-appearance: textfield;
}

#pf-calculator .pf-input::placeholder {
  color: #374B64;
}

#pf-calculator .pf-input:focus {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
  background: rgba(16,185,129,0.04);
}

/* Spin button hide */
#pf-calculator .pf-input::-webkit-outer-spin-button,
#pf-calculator .pf-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Field hint */
.pf-field-hint {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #5A7090;
  margin-top: 6px;
}

/* ── CHECKBOX WRAPPER — .pf-checkbox-wrapper (JS: no interaction) ── */
#pf-calculator .pf-checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(10,15,28,0.4);
  border: 1px solid rgba(55,75,100,0.25);
  border-radius: 12px;
  margin-bottom: 22px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

#pf-calculator .pf-checkbox-wrapper:hover {
  border-color: rgba(16,185,129,0.3);
  background: rgba(16,185,129,0.03);
}

/* ── CHECKBOX — .pf-checkbox  (#pf-cap-eps)
   JS: reads .checked
── */
#pf-calculator .pf-checkbox {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 2px 0 0;
  cursor: pointer;
  accent-color: #10B981;
  border-radius: 4px;
}

/* ── CHECKBOX LABEL — .pf-checkbox-label
   JS: no interaction — label association via for="#pf-cap-eps"
── */
#pf-calculator .pf-checkbox-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #C8D8E8;
  cursor: pointer;
  line-height: 1.5;
  flex: 1;
}

.pf-checkbox-hint {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #5A7090;
  margin-top: 3px;
  line-height: 1.5;
  display: block;
}

/* ── CALCULATE BUTTON — .pf-calculate-btn
   JS: e.target.classList.contains('pf-calculate-btn') click trigger
── */
#pf-calculator .pf-calculate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  background: #10B981;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.25s, box-shadow 0.25s, transform 0.1s;
  letter-spacing: 0.2px;
}

#pf-calculator .pf-calculate-btn:hover {
  background-color: #0EA573;
  box-shadow: 0 8px 24px rgba(16,185,129,0.3);
  transform: translateY(-1px);
}

#pf-calculator .pf-calculate-btn:active {
  transform: scale(0.98);
  box-shadow: none;
}

#pf-calculator .pf-calculate-btn:focus-visible {
  outline: 2px solid #10B981;
  outline-offset: 2px;
}

/* ── RESULT — #resultText  (.pf-result)
   JS: style.display = 'none' | 'block'
   JS: style.borderLeftColor = '#0073aa' (success) | '#d63638' (error)
   JS: writes .innerHTML with <strong> and <br> tags
   CSS default: display:none (JS overrides with inline style.display)
   Left border is visible — JS overrides borderLeftColor inline.
── */
#pf-calculator .pf-result {
  display: none; /* JS sets style.display='block' to show */
  margin-top: 20px;
  padding: 20px 22px;
  background: linear-gradient(135deg, rgba(16,185,129,0.10) 0%, rgba(16,185,129,0.04) 100%);
  border: 1px solid rgba(16,185,129,0.2);
  /* Left accent border — JS overrides borderLeftColor inline */
  border-left: 4px solid #10B981;
  border-radius: 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #C8D8E8;
  line-height: 1.9;
  animation: pf-fade-up 0.4s ease-out;
}

@keyframes pf-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* <strong> tags written by JS innerHTML */
#pf-calculator .pf-result strong {
  color: #10B981;
  font-weight: 700;
}

/* Error state — JS sets borderLeftColor to #d63638 inline */
/* Also handle error text color via the border signal */
#pf-calculator .pf-result:has(+ *) {
  /* Fallback: handled entirely by JS inline style */
}

/* Result row dividers — visual separation between JS-rendered <br> lines */
.pf-result-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── SHARED SECTION STYLES ── */
.pf-section-header {
  text-align: center;
  margin-bottom: 36px;
}

.pf-section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #10B981;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 8px;
}

.pf-section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 10px;
}

.pf-section-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #8899AA;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── HOW IT WORKS ── */
.pf-hiw-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 20px 20px;
}

.pf-hiw-card {
  background: #111B2E;
  border: 1px solid rgba(55,75,100,0.3);
  border-radius: 16px;
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
}

.pf-hiw-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10B981, #3B82F6, #8B5CF6, #F59E0B);
}

.pf-hiw-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}

@media (max-width: 600px) {
  .pf-hiw-steps { grid-template-columns: 1fr; gap: 20px; }
  .pf-hiw-card  { padding: 28px 20px; }
}

.pf-hiw-num {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 14px;
}

.pf-s1 { background: rgba(16,185,129,0.15);  color: #10B981; }
.pf-s2 { background: rgba(59,130,246,0.15);  color: #3B82F6; }
.pf-s3 { background: rgba(139,92,246,0.15);  color: #8B5CF6; }

.pf-hiw-stepname {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.pf-hiw-stepdesc {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #8899AA;
  line-height: 1.6;
}

/* ── INFO SECTIONS ── */
.pf-info-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.pf-info-block {
  background: #111B2E;
  border: 1px solid rgba(55,75,100,0.3);
  border-radius: 16px;
  padding: 32px;
}

@media (max-width: 540px) {
  .pf-info-block { padding: 24px 20px; }
}

.pf-info-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #10B981;
  margin: 0 0 16px;
}

.pf-info-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #8899AA;
  line-height: 1.8;
  margin: 0 0 12px;
}

.pf-info-text:last-child { margin-bottom: 0; }

.pf-info-note {
  color: #5A7090;
  font-style: italic;
  margin-top: 14px;
}

/* Breakdown table */
.pf-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  margin-top: 4px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(55,75,100,0.3);
}

.pf-breakdown-table th {
  background: rgba(10,15,28,0.6);
  color: #8899AA;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(55,75,100,0.3);
}

.pf-breakdown-table td {
  padding: 12px 16px;
  color: #C8D8E8;
  border-bottom: 1px solid rgba(55,75,100,0.12);
}

.pf-breakdown-table tbody tr:last-child td { border-bottom: none; }
.pf-breakdown-table tbody tr:hover td { background: rgba(55,75,100,0.08); }

.pf-td-green {
  color: #10B981;
  font-weight: 700;
}

.pf-td-blue {
  color: #93C5FD;
  font-weight: 600;
}

.pf-td-muted {
  color: #5A7090;
  font-size: 13px;
}

/* Contribution split cards */
.pf-split-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 4px;
}

@media (max-width: 520px) {
  .pf-split-cards { grid-template-columns: 1fr; }
}

.pf-split-card {
  background: rgba(10,15,28,0.5);
  border-radius: 12px;
  padding: 18px 20px;
  border: 1px solid rgba(55,75,100,0.2);
}

.pf-split-card-green { border-color: rgba(16,185,129,0.25); }
.pf-split-card-blue  { border-color: rgba(59,130,246,0.25); }
.pf-split-card-amber { border-color: rgba(245,158,11,0.25); }
.pf-split-card-purple{ border-color: rgba(139,92,246,0.25); }

.pf-split-pct {
  font-family: 'DM Sans', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #10B981;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 6px;
}

.pf-split-card-blue  .pf-split-pct  { color: #93C5FD; }
.pf-split-card-amber .pf-split-pct  { color: #FCD34D; }
.pf-split-card-purple .pf-split-pct { color: #C4B5FD; }

.pf-split-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.pf-split-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #5A7090;
  line-height: 1.5;
}

/* ── RELATED GRID (2-col: tools + quick facts) ── */
.pf-related-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 20px 20px;
}

.pf-related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 680px) {
  .pf-related-grid { grid-template-columns: 1fr; }
}

.pf-related-block {
  background: #111B2E;
  border: 1px solid rgba(55,75,100,0.3);
  border-radius: 16px;
  overflow: hidden;
}

.pf-related-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  background: rgba(16,185,129,0.1);
  border-bottom: 1px solid rgba(16,185,129,0.2);
}

.pf-related-icon { font-size: 16px; }

.pf-related-tools {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}

.pf-rtool-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  text-decoration: none;
  border-bottom: 1px solid rgba(55,75,100,0.12);
  transition: background 0.2s;
}

.pf-rtool-item:last-child { border-bottom: none; }
.pf-rtool-item:hover { background: rgba(16,185,129,0.05); }
.pf-rtool-item:hover .pf-rtool-arrow { color: #10B981; transform: translateX(3px); }

.pf-rtool-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.pf-rtool-text { flex: 1; min-width: 0; }

.pf-rtool-text strong {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #C8D8E8;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-rtool-text small {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #5A7090;
  line-height: 1.5;
}

.pf-rtool-arrow {
  font-size: 14px;
  color: #374B64;
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
}

.pf-rtool-viewall { background: rgba(16,185,129,0.04); }
.pf-rtool-viewall .pf-rtool-text strong { color: #10B981; }

/* ── QUICK FACTS ── */
.pf-facts-list {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}

.pf-fact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(55,75,100,0.12);
  transition: background 0.2s;
}

.pf-fact-item:last-child { border-bottom: none; }
.pf-fact-item:hover { background: rgba(55,75,100,0.08); }

.pf-fact-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  line-height: 1;
}

.pf-fact-body { flex: 1; }

.pf-fact-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #C8D8E8;
  margin-bottom: 3px;
  line-height: 1.3;
}

.pf-fact-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #5A7090;
  line-height: 1.65;
}

/* ── FAQ ── */
.pf-faq-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px 20px;
}

.pf-faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pf-faq-item {
  background: #111B2E;
  border: 1px solid rgba(55,75,100,0.3);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.pf-faq-item:hover { border-color: rgba(16,185,129,0.3); }
.pf-faq-item.pf-faq-open { border-color: rgba(16,185,129,0.4); }

.pf-faq-q {
  width: 100%;
  background: transparent;
  border: none;
  padding: 18px 20px;
  color: #FFFFFF;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  line-height: 1.4;
}

.pf-faq-q::after {
  content: '+';
  font-size: 22px;
  color: #10B981;
  flex-shrink: 0;
  font-weight: 400;
  transition: transform 0.3s;
  line-height: 1;
}

.pf-faq-item.pf-faq-open .pf-faq-q::after { transform: rotate(45deg); }

.pf-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #8899AA;
  line-height: 1.7;
}

.pf-faq-item.pf-faq-open .pf-faq-a { padding: 0 20px 18px; }

/* ── CTA ── */
.pf-cta-section {
  text-align: center;
  padding: 60px 20px 80px;
  background: linear-gradient(180deg, transparent 0%, rgba(16,185,129,0.03) 100%);
}

.pf-cta-title {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 12px;
}

.pf-cta-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #8899AA;
  max-width: 420px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.pf-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #10B981;
  color: #FFFFFF !important;
  padding: 14px 32px;
  border-radius: 12px;
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.25s;
}

.pf-cta-btn:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16,185,129,0.25);
  color: #FFFFFF !important;
}

/* ── PRINT ── */
@media print {
  .pf-calculate-btn { display: none !important; }
  #pf-calculator .pf-result { display: block !important; }
}
