/* ==========================================================================
   ApnaMutualFund.com - Master Shared Design System (CSS)
   SEBI / AMFI Registered MFD Platform Theme
   Colors: Deep Navy (#003366), India Saffron (#FF6B35), Emerald (#10843F)
   Background: Clean Crisp White (#FFFFFF) & Pure Neutrals
   ========================================================================== */

:root {
  --primary: #003366;           /* Deep Trust Navy */
  --primary-dark: #002244;
  --primary-light: #EBF3FA;
  --saffron: #FF6B35;           /* Indian Saffron Accent */
  --saffron-hover: #E55A25;
  --emerald: #10843F;           /* Growth Green */
  --emerald-light: #EAF7EE;
  --gold: #D4AF37;
  
  --bg-white: #FFFFFF;
  --bg-light: #F8FAFC;
  --bg-subtle: #F1F5F9;
  --border: #E2E8F0;
  --border-light: #EDF2F7;
  
  --text-main: #0F172A;
  --text-muted: #475569;        /* Optimized for WCAG AA 4.5:1 Contrast */
  --text-light: #64748B;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.09);
  --shadow-hover: 0 14px 36px rgba(0,51,102,0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

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

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-white);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- MASTER NAVBAR (CLEAN SINGLE LINE) --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #FFFFFF;
  border-bottom: 1.5px solid var(--border-light);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--saffron), #FF8C42);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(255,107,53,0.25);
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.4px;
  line-height: 1.1;
}

.brand-title span {
  color: var(--saffron);
}

.brand-tag {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(0, 64, 128, 0.05);
}

.nav-link.active {
  color: var(--primary);
  background: rgba(0, 64, 128, 0.08);
  font-weight: 700;
}

.nav-dropdown-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-dropdown-wrap > .nav-link {
  cursor: pointer;
  user-select: none;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 31, 63, 0.14);
  min-width: 280px;
  padding: 8px;
  z-index: 1001;

  /* Smooth transition with safety grace delay so it never vanishes abruptly */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  transition-delay: 0.12s; /* 120ms safety window when moving mouse */
}

/* Invisible hover bridge to eliminate any dead gap */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
  background: transparent;
}

/* Hover, Active/Click, and Keyboard Focus States */
.nav-dropdown-wrap:hover .nav-dropdown,
.nav-dropdown-wrap.open .nav-dropdown,
.nav-dropdown-wrap:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s; /* Opens instantly */
}

.nav-dropdown-wrap.open > .nav-link,
.nav-dropdown-wrap:hover > .nav-link {
  color: var(--primary);
  background: rgba(0, 64, 128, 0.05);
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.dropdown-link:hover {
  background: var(--primary-light);
  color: var(--primary);
  transform: translateX(3px);
}

.nav-dropdown.dropdown-mega {
  min-width: 620px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mega-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mega-col-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  padding: 4px 10px 8px;
  border-bottom: 1.5px solid var(--border-light);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 960px) {
  .nav-dropdown.dropdown-mega {
    min-width: 300px;
    grid-template-columns: 1fr;
    max-height: 75vh;
    overflow-y: auto;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lang-dropdown-btn {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-dropdown-btn:hover, .lang-dropdown-btn:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 64, 128, 0.1);
  outline: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--saffron);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(255,107,53,0.25);
}

.btn-primary:hover {
  background: var(--saffron-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--primary);
  color: #FFFFFF;
}

.btn-secondary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #FFFFFF;
}

.btn-lg {
  padding: 12px 26px;
  font-size: 15px;
  border-radius: var(--radius-lg);
}

/* --- BREADCRUMBS --- */
.breadcrumb {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* --- SECTION TYPOGRAPHY --- */
.section { padding: 60px 0; }
.section-alt { background: var(--bg-light); }

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-title {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.2;
  margin-bottom: 14px;
}

.section-title span { color: var(--saffron); }

.section-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- MODERN CARDS --- */
.card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255,107,53,0.3);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-main);
  background: #FFFFFF;
}

.form-range {
  width: 100%;
  accent-color: var(--saffron);
  cursor: pointer;
}

/* --- DATA & COMPARISON TABLES --- */
.table-custom {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 13.5px;
  background: #FFFFFF;
  margin: 16px 0;
  font-family: inherit;
}

.table-custom th {
  background: #0A2540;
  color: #FFFFFF;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 13.5px;
  text-align: left;
  border-bottom: 2px solid #002244;
}

.table-custom td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  line-height: 1.6;
  vertical-align: middle;
}

.table-custom tbody tr:last-child td {
  border-bottom: none;
}

.table-custom tbody tr:nth-child(even) {
  background: #F8FAFC;
}

.table-custom tbody tr:hover {
  background: #F1F5F9;
}

/* --- FLOATING WHATSAPP --- */
.sticky-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
}

.btn-float-wa {
  width: 52px;
  height: 52px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
  text-decoration: none;
  transition: transform 0.2s;
}

.btn-float-wa:hover { transform: scale(1.08); }

/* --- FOOTER --- */
.footer {
  background: #0B132B;
  color: #94A3B8;
  padding: 60px 0 24px;
  font-size: 13.5px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 36px;
  margin-bottom: 40px;
}

.footer-heading {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 14px;
}

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

.footer-links a {
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--saffron); }

.footer-bottom {
  border-top: 1px solid #1E293B;
  padding-top: 20px;
  font-size: 12px;
  line-height: 1.7;
}

.compliance-badge-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.comp-badge {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #E2E8F0;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
}

/* --- INTERACTIVE CALCULATOR GRID & PANELS --- */
.calc-box {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 31, 63, 0.06);
  overflow: hidden;
  margin-bottom: 32px;
}

.calc-input-panel {
  padding: 36px 32px;
  border-right: 1px solid var(--border);
  background: #FFFFFF;
}

.calc-result-panel {
  padding: 36px 32px;
  background: linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.slider-row {
  margin-bottom: 24px;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.slider-val-badge {
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 14px;
  border: 1px solid rgba(0, 64, 128, 0.15);
}

@media (max-width: 960px) {
  .calc-box {
    grid-template-columns: 1fr;
  }
  .calc-input-panel {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 24px 20px;
  }
  .calc-result-panel {
    padding: 24px 20px;
  }
}

/* --- INTERACTIVE SLIDERS & CHART MODULE --- */
.range-slider {
  width: 100%;
  height: 7px;
  border-radius: 99px;
  background: #E2E8F0;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
  margin: 12px 0 6px 0;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--saffron);
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
  cursor: pointer;
  transition: transform 0.15s;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.calc-preset-btn {
  background: #F1F5F9;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.calc-preset-btn:hover, .calc-preset-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.chart-card-wrapper {
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

/* Fund Type Pills */
.fund-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-equity { background: #ECFDF5; color: #059669; }
.badge-debt { background: #EFF6FF; color: #2563EB; }
.badge-hybrid { background: #FEF3C7; color: #D97706; }
.badge-elss { background: #F3E8FF; color: #7E22CE; }

/* Doubt Buster Cards */
.myth-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.myth-card:hover {
  border-color: var(--saffron);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.myth-label {
  display: inline-block;
  background: #FEE2E2;
  color: #DC2626;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fact-label {
  display: inline-block;
  background: #DCFCE7;
  color: #16A34A;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Mobile Navigation Toggle Button */
.nav-toggle {
  display: none;
  background: #F8FAFC;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
  color: var(--primary);
  font-size: 18px;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
}

.nav-toggle:hover, .nav-toggle:focus {
  background: var(--primary-light);
  border-color: var(--primary);
}

/* Indian DPDP Act Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: -250px;
  left: 0;
  right: 0;
  background: #0B132B;
  color: #FFFFFF;
  border-top: 2px solid var(--saffron);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.45);
  z-index: 99999;
  padding: 18px 24px;
  transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 13.5px;
}

.cookie-banner.visible {
  bottom: 0;
}

.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner-content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 280px;
}

.cookie-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 107, 53, 0.15);
  color: var(--saffron);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.cookie-banner-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.cookie-banner-title span {
  color: var(--saffron);
}

.cookie-banner-text {
  font-size: 12.5px;
  color: #94A3B8;
  line-height: 1.6;
  margin: 0;
}

.cookie-banner-text a {
  color: #F8FAFC;
  text-decoration: underline;
  font-weight: 600;
}

.cookie-banner-text a:hover {
  color: var(--saffron);
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-cookie-accept {
  background: var(--saffron);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-cookie-accept:hover {
  background: #E05318;
  transform: translateY(-1px);
}

.btn-cookie-essential {
  background: transparent;
  color: #CBD5E1;
  border: 1px solid #475569;
  border-radius: 8px;
  padding: 10px 18px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-cookie-essential:hover {
  border-color: #94A3B8;
  color: #FFFFFF;
}

/* Tablet & Mobile Media Queries */
@media (max-width: 1024px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FFFFFF;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px 24px;
    border-bottom: 3px solid var(--primary);
    box-shadow: 0 16px 36px rgba(0, 31, 63, 0.18);
    gap: 8px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1000;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border-radius: var(--radius-sm);
    justify-content: space-between;
  }

  .nav-dropdown-wrap {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    width: 100%;
  }

  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border: 1px solid var(--border-light);
    background: #F8FAFC;
    border-radius: var(--radius-sm);
    margin: 6px 0 10px 10px;
    padding: 8px;
    display: none;
  }

  .nav-dropdown-wrap.open .nav-dropdown {
    display: block;
  }

  .dropdown-mega {
    display: flex;
    flex-direction: column;
    min-width: unset;
    width: 100%;
    grid-template-columns: 1fr;
  }

  .dropdown-link {
    padding: 11px 14px;
    font-size: 14px;
    min-height: 44px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .navbar-inner {
    padding: 10px 16px;
    gap: 8px;
  }

  .brand-title {
    font-size: 17px;
  }

  .brand-tag {
    font-size: 8px;
  }

  .nav-actions {
    gap: 6px;
  }

  .lang-dropdown-btn {
    padding: 6px 8px;
    font-size: 12px;
  }

  .nav-actions .btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .cookie-banner {
    padding: 16px 18px;
  }

  .cookie-banner-actions {
    width: 100%;
    justify-content: stretch;
  }

  .btn-cookie-accept, .btn-cookie-essential {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
}



