/* ==========================================================================
   HISSABBHARAT — Indian Financial & Planning Calculators
   100/100 Core Web Vitals & Mobile-First Stylesheet
   Palette: Deep Navy (#0b132b), Royal Saffron (#ea580c), Emerald (#059669)
   ========================================================================== */

:root {
  --navy-950: #070c1c;
  --navy-900: #0b132b;
  --navy-800: #1c2541;
  --navy-700: #334155;
  --saffron-600: #ea580c;
  --saffron-500: #f97316;
  --saffron-100: #ffedd5;
  --saffron-50: #fff7ed;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-100: #d1fae5;
  --emerald-50: #ecfdf5;
  --sky-600: #0284c7;
  --sky-50: #f0f9ff;
  --bg-page: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Top RBI Benchmark Ticker */
.rbi-ticker {
  background: var(--navy-950);
  color: #cbd5e1;
  font-size: 0.78rem;
  padding: 0.45rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.rbi-ticker-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.ticker-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}
.ticker-item strong {
  color: #fb923c;
  font-weight: 700;
}
.ticker-item .emerald-txt {
  color: #34d399;
  font-weight: 700;
}

/* Main Header & Navigation */
.site-header {
  background: var(--navy-900);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--saffron-500);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #ffffff;
}
.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--saffron-500) 0%, var(--emerald-600) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  box-shadow: 0 3px 10px rgba(249, 115, 22, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-title {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.15;
}
.brand-title span {
  color: var(--saffron-500);
}
.brand-subtitle {
  font-size: 0.68rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.main-nav a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.48rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: all 0.18s ease;
}
.main-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}
.main-nav a.active {
  background: var(--saffron-600);
  color: #ffffff;
}

/* Breadcrumb & Quick-Switch Mesh Bar */
.mesh-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1.25rem;
}
.mesh-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.83rem;
  color: var(--text-muted);
  list-style: none;
}
.breadcrumb a {
  color: var(--sky-600);
  text-decoration: none;
  font-weight: 600;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb .sep {
  color: #cbd5e1;
}
.breadcrumb .current {
  color: var(--text-primary);
  font-weight: 700;
}

.quick-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.quick-switch-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-right: 0.2rem;
}
.qs-pill {
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--bg-page);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all 0.15s ease;
}
.qs-pill:hover, .qs-pill.active {
  background: var(--navy-900);
  color: #ffffff;
  border-color: var(--navy-900);
}

/* Hero Banner */
.hero {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: #ffffff;
  padding: 2.75rem 1.25rem 2.25rem;
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(249, 115, 22, 0.18);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.4);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.9rem;
}
.hero h1 {
  font-size: clamp(1.65rem, 3.2vw, 2.45rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.hero p {
  color: #cbd5e1;
  max-width: 760px;
  margin: 0 auto 1.4rem;
  font-size: 1rem;
}

/* Search Bar on Home Page */
.search-box-wrap {
  max-width: 600px;
  margin: 0 auto 1rem;
  position: relative;
}
.search-input {
  width: 100%;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-primary);
  font-size: 0.98rem;
  font-weight: 500;
  outline: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.search-input:focus {
  border-color: var(--saffron-500);
}

/* Container & Layout */
.container {
  max-width: 1240px;
  margin: 2rem auto;
  padding: 0 1.25rem;
}

/* Hub Cards Grid (index.html) */
.calc-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.75rem;
}
.hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  text-decoration: none;
  color: inherit;
}
.hub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--saffron-500);
}
.hub-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.9rem;
}
.hub-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
}
.hub-icon.saffron { background: var(--saffron-100); color: var(--saffron-600); }
.hub-icon.emerald { background: var(--emerald-100); color: var(--emerald-600); }
.hub-icon.sky { background: var(--sky-50); color: var(--sky-600); }

.hub-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: var(--bg-page);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.hub-card h2 {
  font-size: 1.22rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
  color: var(--navy-900);
}
.hub-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}
.hub-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--border);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--saffron-600);
}

/* Calculator Workspace Card */
.calc-workspace {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  margin-bottom: 2.25rem;
}
.workspace-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}
.workspace-header h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--navy-900);
}
.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.chip-btn {
  background: var(--bg-page);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip-btn:hover, .chip-btn.active {
  background: var(--saffron-600);
  color: #ffffff;
  border-color: var(--saffron-600);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 2.25rem;
  align-items: start;
}
@media (max-width: 900px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

/* Form Controls */
.control-group {
  margin-bottom: 1.35rem;
}
.control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}
.control-header label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}
.input-box {
  position: relative;
  display: flex;
  align-items: center;
}
.input-prefix, .input-suffix {
  position: absolute;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.92rem;
  pointer-events: none;
}
.input-prefix { left: 12px; }
.input-suffix { right: 12px; }

.num-input, .select-input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-900);
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s;
}
.num-input.has-prefix { padding-left: 2rem; }
.num-input.has-suffix { padding-right: 2.5rem; }
.num-input:focus, .select-input:focus {
  border-color: var(--saffron-500);
}
.range-slider {
  width: 100%;
  margin-top: 0.5rem;
  accent-color: var(--saffron-600);
  cursor: pointer;
}

/* Results Summary Panel */
.results-panel {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.6rem;
}
.primary-result-box {
  background: var(--navy-900);
  color: #ffffff;
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  border-left: 5px solid var(--saffron-500);
}
.primary-result-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  font-weight: 700;
}
.primary-result-value {
  font-size: 1.95rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 0.2rem;
}
.primary-result-sub {
  font-size: 0.82rem;
  color: #fdba74;
  margin-top: 0.2rem;
  font-weight: 600;
}

.metric-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.35rem;
}
.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px dashed #cbd5e1;
  font-size: 0.92rem;
}
.metric-row:last-child {
  border-bottom: none;
}
.metric-label {
  color: var(--text-secondary);
  font-weight: 600;
}
.metric-val {
  font-weight: 800;
  color: var(--navy-900);
}
.metric-val.emerald { color: var(--emerald-600); }
.metric-val.saffron { color: var(--saffron-600); }

/* SVG Donut Chart Box */
.chart-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.donut-svg {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}
.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.84rem;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

/* Tables (Bank Rates & Amortization Schedule) */
.data-table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2.25rem;
  box-shadow: var(--shadow-sm);
}
.data-table-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 0.4rem;
}
.data-table-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.15rem;
}
.table-responsive {
  overflow-x: auto;
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}
thead th {
  background: var(--navy-900);
  color: #ffffff;
  padding: 0.75rem 1rem;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 2;
}
tbody td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 500;
}
tbody tr:nth-child(even) {
  background: #f8fafc;
}
tbody tr:hover {
  background: var(--saffron-50);
}

/* Content & SEO Guides + FAQ */
.seo-guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2.25rem;
}
.seo-guide-card h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 0.85rem;
}
.seo-guide-card h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--navy-800);
  margin: 1.35rem 0 0.5rem;
}
.seo-guide-card p, .seo-guide-card li {
  font-size: 0.94rem;
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
}
.seo-guide-card ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}
.formula-box {
  background: var(--bg-page);
  border-left: 4px solid var(--saffron-500);
  padding: 0.95rem 1.2rem;
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy-900);
  margin: 0.9rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  background: #fcfcfd;
}
.faq-item h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.35rem;
}
.faq-item p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

/* Interlinked Directory Section (Present on EVERY page) */
.interlink-directory {
  background: linear-gradient(135deg, #0b132b 0%, #1c2541 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2.5rem;
}
.interlink-directory h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}
.interlink-directory p {
  color: #cbd5e1;
  font-size: 0.9rem;
  margin-bottom: 1.35rem;
}
.interlink-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.9rem;
}
.interlink-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.1rem;
  text-decoration: none;
  color: #ffffff;
  transition: all 0.16s ease;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.interlink-card:hover {
  background: rgba(249, 115, 22, 0.22);
  border-color: var(--saffron-500);
  transform: translateY(-2px);
}
.interlink-card strong {
  font-size: 0.95rem;
  color: #fdba74;
}
.interlink-card span {
  font-size: 0.8rem;
  color: #cbd5e1;
}

/* Footer */
.site-footer {
  background: var(--navy-950);
  color: #94a3b8;
  padding: 2.75rem 1.25rem 2rem;
  border-top: 3px solid var(--saffron-600);
  font-size: 0.86rem;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 {
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.footer-col a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col a:hover {
  color: var(--saffron-500);
}
.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 0.8rem;
}
