/* ==========================================================================
   MAG Finserv - design system
   Gold-loan NBFC · Maharashtra & Karnataka
   Palette + typeface per MAG Finserv brand guidelines (Poppins; #45C7F4,
   #27AAE1, #3D4C8F, #504D50). night-* and ink-* are shade/tint ramps
   derived from the brand's #504D50 neutral; blue-300/blue-050 are tints
   derived from the brand's #45C7F4 accent - the guide defines only 4 hexes.
   Fonts: Poppins · Google Fonts CDN
   ========================================================================== */

:root {
  /* Brand palette */
  --night-900: #454245;
  --night-800: #504d50;
  --night-700: #615d61;
  --night-600: #716c71;
  --blue-600: #3d4c8f;
  --blue-500: #27aae1;
  --blue-400: #45c7f4;
  --blue-300: #85daf8;
  --blue-050: #e6f7fd;
  --ivory-050: #faf7f1;
  --ivory-100: #f3eee3;
  --ink-800: #504d50;
  --ink-600: #5b585b;
  --ink-400: #757175;
  --line: #e6decd;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(8, 19, 31, .08);
  --shadow-md: 0 10px 30px rgba(8, 19, 31, .12);
  --shadow-lg: 0 24px 60px rgba(8, 19, 31, .18);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --space-9: 96px;
  --font-display: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --container: 1160px;
  /* Height of the sticky .site-header. Anchored sections subtract it via
     scroll-margin-top so an in-page jump doesn't land under the header. */
  --header-h: 76px;
  --gradient-blue: linear-gradient(135deg, var(--blue-300) 0%, var(--blue-400) 55%, var(--blue-500) 100%);
  --gradient-light: linear-gradient(160deg, #fffdf7 0%, var(--blue-050) 100%);
  --gradient-emi: linear-gradient(160deg, var(--blue-050) 0%, var(--blue-300) 100%);
  --danger-050: #fbeaea;
  --danger-300: #e3a9a9;
  --danger-600: #a33333;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink-800);
  background: var(--white);
  line-height: 1.62;
  font-size: 16px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-500); }
ul, ol { padding-left: 1.25rem; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--night-800);
  line-height: 1.18;
  font-weight: 600;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
h4 { font-size: 1.05rem; }
p { color: var(--ink-600); }
::selection { background: var(--blue-300); color: var(--night-900); }

/* ---------- Layout ---------- */
.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.section { padding-block: clamp(56px, 8vw, 96px); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }
.section--ivory { background: var(--ivory-050); }
.section--blue { background: var(--gradient-blue); }
.grid { display: grid; gap: var(--space-6); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: repeat(2, 1fr); }
.center { text-align: center; }
.mt-1 { margin-top: var(--space-4); } .mt-2 { margin-top: var(--space-6); }
.mb-1 { margin-bottom: var(--space-4); } .mb-2 { margin-bottom: var(--space-6); }

/* ---------- Typography helpers ---------- */
.display { font-family: var(--font-display); }
.lead { font-size: 1.12rem; color: var(--ink-600); }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue-600);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--gradient-blue); border-radius: 2px; }
.eyebrow--center::after { content: ""; width: 26px; height: 2px; background: var(--gradient-blue); border-radius: 2px; }
.section-head { max-width: 640px; margin-bottom: var(--space-7); }
.section-head.center { margin-inline: auto; }
.section-head h2 { margin-top: var(--space-3); }
.section-head p { margin-top: var(--space-3); }
.section--night { background: var(--gradient-light); border-block: 1px solid var(--line); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill); border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; line-height: 1; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--blue { background: var(--gradient-blue); color: var(--night-900); box-shadow: var(--shadow-md); }
.btn--blue:hover { box-shadow: var(--shadow-lg); color: var(--night-900); }
.btn--outline { border-color: rgba(80,77,80,.2); color: var(--night-800); background: transparent; }
.btn--outline:hover { border-color: var(--blue-500); color: var(--blue-600); }
.btn--night { background: var(--night-800); color: var(--white); box-shadow: var(--shadow-md); }
.btn--night:hover { background: var(--night-700); color: var(--white); }
.btn--sm { min-height: 40px; padding: var(--space-2) var(--space-4); font-size: .87rem; }
.btn--block { width: 100%; }

/* ---------- Top bar / header ---------- */
.topbar {
  background: var(--ivory-100); color: var(--ink-600);
  border-bottom: 1px solid var(--line);
  font-size: .82rem; padding: var(--space-2) 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.topbar a { color: var(--ink-800); }
.topbar a:hover { color: var(--blue-600); }
.topbar__contact { display: flex; gap: var(--space-5); align-items: center; }
.topbar__contact span { display: inline-flex; align-items: center; gap: 6px; }
.topbar__social { display: flex; gap: var(--space-3); }
.topbar__social a { opacity: .75; }
.topbar__social a:hover { opacity: 1; }
.topbar svg { width: 14px; height: 14px; fill: var(--blue-600); }

/* backdrop-filter lives on ::before, not .site-header itself, because it
   establishes a new containing block for position:fixed descendants --
   the Bootstrap offcanvas nested inside .navbar (required for the
   navbar-expand-xl responsive collapse to work) would otherwise anchor to
   .site-header's box instead of the viewport. */
.site-header {
  position: sticky; top: 0; z-index: 60;
  border-bottom: 1px solid var(--line);
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: box-shadow .25s ease, background-color .25s ease;
}
/* .scrolled is toggled by main.js once the page scrolls past the top; without
   this rule the sticky header has no shadow and reads as a flat white patch
   pasted over whatever content scrolls underneath it. */
.site-header.scrolled::before {
  background: rgba(255,255,255,.97);
  box-shadow: var(--shadow-md);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: var(--space-3); }
.brand img { height: 34px; width: auto; }
.navbar-brand img { height: 34px; width: auto; }
/* ---------- Hero ---------- */
.hero {
  background: var(--gradient-light);
  color: var(--ink-800);
  padding-block: clamp(56px, 9vw, 110px);
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: ""; position: absolute; width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(circle, rgba(39,170,225,.32) 0%, transparent 65%);
  top: -180px; right: -140px; pointer-events: none; z-index: 1;
}
.hero::after {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(39,170,225,.18) 0%, transparent 70%);
  bottom: -160px; left: -120px; pointer-events: none; z-index: 1;
}
.hero .container { position: relative; z-index: 2; }
.hero h1 { margin-top: var(--space-4); }
.hero h1 em { font-style: normal; background: var(--gradient-blue); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { color: var(--ink-600); max-width: 560px; margin-top: var(--space-4); }
.hero__cta { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-top: var(--space-6); }
.hero__stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5);
  margin-top: clamp(40px, 6vw, 64px);
  padding: var(--space-5) var(--space-6);
  background: rgba(250, 247, 241, .92);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
/* Full-bleed backdrop: the photo sits behind the text as a single hero
   image, not as a separate card stacked underneath the copy. The overlay
   gradient keeps the left-aligned text readable while letting the photo
   show through on the right, fading to a flat tint on narrow screens where
   there's no room for a two-column feel. */
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
/* Carousel: images stack on top of each other and crossfade via opacity,
   so no layout shift happens when the active slide changes. */
.hero__media.hero-carousel img {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1.2s ease;
}
.hero__media.hero-carousel img.is-active { opacity: 1; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(250,247,241,.9);
}

/* Page hero (inner pages) */
.page-hero {
  background: var(--gradient-light); color: var(--ink-800);
  padding-block: clamp(44px, 7vw, 84px); position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.page-hero::after {
  content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(39,170,225,.28) 0%, transparent 70%);
  top: -120px; right: -80px;
}
.page-hero h1 { margin-top: var(--space-2); }
.page-hero p { color: var(--ink-600); max-width: 620px; margin-top: var(--space-3); }
.breadcrumb { display: flex; gap: var(--space-2); align-items: center; font-size: .82rem; color: var(--ink-400); flex-wrap: wrap; position: relative; z-index: 2; }
.breadcrumb a { color: var(--blue-600); }

/* ---------- Stat blocks ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
.stat-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: var(--space-5); box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient-blue); }
.stat-card__icon {
  width: 44px; height: 44px; border-radius: var(--radius-pill);
  background: rgba(39,170,225,.14); border: 1px solid rgba(39,170,225,.3);
  display: inline-flex; align-items: center; justify-content: center;
}
.stat-card__icon svg { width: 22px; height: 22px; stroke: var(--blue-600); }
.stat-card__value { font-family: var(--font-display); font-size: clamp(1.7rem, 3.5vw, 2.35rem); font-weight: 700; color: var(--night-800); margin-top: var(--space-3); }
.stat-card__label { color: var(--ink-400); font-size: .88rem; margin-top: 2px; }

/* ---------- Cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: var(--space-6); box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
  position: relative;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card h3 { margin-top: var(--space-4); }
.card p { margin-top: var(--space-2); font-size: .95rem; }
.card--link { text-decoration: none; color: inherit; display: block; }
.card--link:hover h3 { color: var(--blue-600); }
.card__icon {
  width: 54px; height: 54px; border-radius: var(--radius-sm);
  background: var(--ivory-050); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
}
.card__icon svg { width: 26px; height: 26px; stroke: var(--blue-600); }
.card--dark { background: var(--white); border-color: var(--blue-300); }
.card--dark .card__icon { background: rgba(39,170,225,.14); border-color: rgba(39,170,225,.3); }

/* Feature ticks */
.feature-list { list-style: none; padding: 0; display: grid; gap: var(--space-3); }
.feature-list li {
  display: flex; gap: var(--space-3); align-items: flex-start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: var(--space-4); box-shadow: var(--shadow-sm);
}
.feature-list li svg { flex: none; width: 20px; height: 20px; stroke: var(--blue-500); margin-top: 2px; }
.feature-list--inline li { display: inline-flex; align-items: center; padding: var(--space-3) var(--space-4); }
.feature-list li span { color: var(--ink-600); font-size: .95rem; }

/* ---------- Numbers timeline (About history) ---------- */
.timeline { position: relative; padding-left: var(--space-6); list-style: none; max-width: 720px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-bottom: var(--space-6); }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1 * var(--space-6) + 2px); top: 6px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--gradient-blue);
  box-shadow: 0 0 0 4px var(--ivory-100);
}
.timeline__year { font-family: var(--font-display); color: var(--blue-600); font-weight: 700; font-size: 1.05rem; }
.timeline p { margin-top: 4px; font-size: .95rem; }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
/* A team grid holding a single person: centre the lone card rather than
   stranding it in the left-hand column of an otherwise empty row. */
.team-grid--solo { grid-template-columns: minmax(0, 1fr); justify-content: center; }
.team-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.team-card img { width: 100%; height: 300px; object-fit: cover; object-position: top; }
.team-card__body { padding: var(--space-4) var(--space-5) var(--space-5); }
.team-card h3 { font-size: 1.15rem; }
.team-card .team-card__role { color: var(--blue-600); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
.team-card p { font-size: .9rem; margin-top: var(--space-3); }
.team-card__link { font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; margin-top: var(--space-3); }

/* ---------- Testimonials ---------- */
.testimonial-grid { display: grid; gap: var(--space-5); }
.testimonial {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: var(--space-6); box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.testimonial .quote { font-family: var(--font-display); font-size: 1.1rem; line-height: 1.5; color: var(--ink-800); flex: 1; }
.testimonial .quote::before { content: "“"; color: var(--blue-400); font-size: 2.2rem; line-height: 0; display: block; height: 1.4rem; font-family: Georgia, serif; }
.testimonial .author { margin-top: var(--space-5); display: flex; align-items: center; gap: var(--space-3); }
.testimonial .author__avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--gradient-blue); color: var(--night-900); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-display); }
.testimonial .author__name { font-weight: 700; color: var(--night-800); font-size: .95rem; }
.testimonial .author__meta { color: var(--ink-400); font-size: .83rem; }

/* ---------- Partners (auto-scrolling marquee) ----------
   Two identical tracks sit side by side inside an overflow:hidden strip;
   animating the wrapper exactly -100% of one track's width loops seamlessly
   from the second track back into the first. Hover pauses the scroll and
   magnifies the hovered logo; every other logo stays greyed out via the
   img's own default (unhovered) state. */
.partner-wall {
  display: flex; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.partner-wall__track {
  display: flex; align-items: center; flex: none;
  gap: var(--space-7); padding-inline: calc(var(--space-7) / 2);
  animation: partner-scroll 36s linear infinite;
}
.partner-wall:hover .partner-wall__track { animation-play-state: paused; }
.partner-wall img {
  flex: none; height: 88px; width: 200px;
  object-fit: contain; padding: var(--space-2);
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: transform .25s ease, box-shadow .25s ease;
}
.partner-wall img:hover { transform: scale(1.08); box-shadow: var(--shadow-sm); }
@media (max-width: 575.98px) {
  .partner-wall img { height: 68px; width: 160px; }
}
@keyframes partner-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ---------- CTA band ---------- */
.cta-band { background: var(--gradient-light); border-block: 1px solid var(--line); position: relative; overflow: hidden; }
.cta-band::before {
  content: ""; position: absolute; width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(39,170,225,.3) 0%, transparent 70%);
  bottom: -200px; right: -100px;
}
.cta-band .container { position: relative; z-index: 2; display: grid; gap: var(--space-6); align-items: center; }
.cta-band h2 { color: var(--night-800); }
.cta-band p { color: var(--ink-600); margin-top: var(--space-3); max-width: 520px; }
.cta-band .eyebrow { color: var(--blue-600); }
.cta-band__actions { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.cta-band__actions .btn--ghost { border: 1px solid rgba(80,77,80,.25); color: var(--night-800); background: none; }
.cta-band__actions .btn--ghost:hover { border-color: var(--blue-500); color: var(--blue-600); }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--space-6); box-shadow: var(--shadow-md); max-width: 560px;
}
.form-grid { display: grid; gap: var(--space-4); }
.form-row { display: grid; gap: var(--space-3); }
.form-row--2 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-row--2 { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-weight: 600; font-size: .85rem; color: var(--night-800); margin-bottom: var(--space-2); }
.field input, .field select, .field textarea {
  width: 100%; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; color: var(--ink-800); background: var(--white);
  min-height: 48px; transition: border-color .18s, box-shadow .18s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(39,170,225,.18);
}
.form-note { font-size: .8rem; color: var(--ink-400); margin-top: var(--space-3); }
/* Colors come from the Bootstrap .alert/.alert-success/.alert-danger classes
   main.js adds alongside .show -- this only owns the display toggle + fit. */
.form-success { display: none; margin-top: var(--space-4); font-size: .92rem; }
.form-success.show { display: block; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Accordion (FAQ) ---------- */
.accordion { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.accordion__item + .accordion__item { border-top: 1px solid var(--line); }
.accordion__head {
  width: 100%; background: var(--white); border: 0; cursor: pointer; text-align: left;
  padding: var(--space-4) var(--space-5); display: flex; justify-content: space-between;
  align-items: center; gap: var(--space-4); font: inherit; font-weight: 600; color: var(--night-800);
}
.accordion__head::after {
  content: "+"; font-size: 1.4rem; color: var(--blue-500); flex: none; line-height: 1; transition: transform .2s;
}
.accordion__item.open .accordion__head::after { transform: rotate(45deg); }
.accordion__body { display: none; padding: 0 var(--space-5) var(--space-5); font-size: .95rem; }
.accordion__item.open .accordion__body { display: block; }
.accordion__body ul { margin-top: var(--space-2); }

/* ---------- EMI calculator ---------- */
.emi-wrap { display: grid; gap: var(--space-6); }
.emi-inputs { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-md); }
.emi-results { background: var(--gradient-emi); border: 1px solid var(--blue-300); border-radius: var(--radius-lg); padding: var(--space-6); color: var(--night-900); display: flex; flex-direction: column; justify-content: center; }
.emi-results h3 { color: var(--night-900); }
.emi-results .emi-amount { font-family: var(--font-display); font-size: clamp(2rem, 4.5vw, 2.8rem); font-weight: 700; margin: var(--space-4) 0 var(--space-5); }
.emi-results dl { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin: 0; }
.emi-results dt { color: rgba(8,19,31,.62); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.emi-results dd { font-weight: 700; font-size: 1.05rem; margin: 2px 0 0; }
.range-field { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--space-4); }
.range-field output { font-family: var(--font-display); font-weight: 700; color: var(--blue-600); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: var(--line); outline: none; margin: var(--space-3) 0; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--gradient-blue); border: 3px solid var(--white); box-shadow: var(--shadow-sm); cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--white);
  background: var(--gradient-blue); box-shadow: var(--shadow-sm); cursor: pointer;
}

/* ---------- Branch finder ---------- */
.branch-search {
  display: flex; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-6);
  align-items: center;
}
.branch-search input {
  flex: 1 1 280px; min-height: 48px; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line); border-radius: var(--radius-pill); font: inherit;
}
.branch-search input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(39,170,225,.18); }
.branch-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
.branch-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: var(--space-5); box-shadow: var(--shadow-sm);
}
.branch-card h3 { font-size: 1.1rem; display: flex; align-items: center; gap: var(--space-2); }
.branch-card h3 svg { width: 18px; height: 18px; stroke: var(--blue-500); flex: none; }
.branch-card address { font-style: normal; color: var(--ink-600); font-size: .9rem; margin-top: var(--space-2); }
.branch-card a { font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; margin-top: var(--space-3); }
.branch-count { font-size: .88rem; color: var(--ink-400); margin-bottom: var(--space-4); }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-6); }
.blog-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
}
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.blog-card__body { padding: var(--space-5); display: flex; flex-direction: column; flex: 1; }
.blog-card__meta { display: flex; gap: var(--space-3); font-size: .79rem; color: var(--ink-400); align-items: center; }
.blog-card__tag { color: var(--blue-600); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }
.blog-card h3 { font-size: 1.18rem; margin-top: var(--space-3); }
.blog-card h3 a { color: var(--night-800); }
.blog-card h3 a:hover { color: var(--blue-600); }
.blog-card p { font-size: .92rem; margin-top: var(--space-2); }
.blog-card .more { margin-top: auto; padding-top: var(--space-4); font-weight: 600; font-size: .88rem; }
.blog-filter { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-6); }
.chip {
  border: 1px solid var(--line); background: var(--white); color: var(--ink-600);
  border-radius: var(--radius-pill); padding: var(--space-2) var(--space-4);
  font-size: .85rem; font-weight: 600; cursor: pointer; min-height: 40px;
  transition: .18s;
}
.chip:hover { border-color: var(--blue-500); color: var(--blue-600); }
.chip.active { background: var(--night-800); border-color: var(--night-800); color: var(--white); }

/* Article page */
.article { max-width: 760px; margin-inline: auto; padding-block: clamp(40px, 6vw, 72px); }
.article__meta { display: flex; gap: var(--space-4); font-size: .84rem; color: var(--ink-400); margin-top: var(--space-4); flex-wrap: wrap; }
.article__meta a { color: var(--blue-600); font-weight: 700; }
.article h1 { margin-top: var(--space-3); }
.article h2 { margin-top: var(--space-7); font-size: clamp(1.35rem, 3vw, 1.75rem); }
.article h3 { margin-top: var(--space-6); }
.article p, .article li { margin-top: var(--space-4); color: var(--ink-600); font-size: 1.02rem; }
.article ul, .article ol { margin-top: var(--space-3); }
.article blockquote {
  border-left: 3px solid var(--blue-500); background: var(--ivory-050);
  padding: var(--space-4) var(--space-5); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: var(--space-6); font-family: var(--font-display); font-size: 1.06rem; color: var(--night-800);
}
.article .toc {
  background: var(--ivory-050); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: var(--space-5); margin-top: var(--space-6); font-size: .95rem;
}
.article .toc h3 { margin: 0 0 var(--space-3); font-size: 1rem; }
.article .toc a { display: block; padding: var(--space-1) 0; color: var(--ink-600); }
.article .toc a:hover { color: var(--blue-600); }
.article table { width: 100%; border-collapse: collapse; margin-top: var(--space-6); font-size: .92rem; }
.article th, .article td { border: 1px solid var(--line); padding: var(--space-3); text-align: left; }
.article th { background: var(--ivory-050); font-weight: 700; color: var(--night-800); }
.article .btn { margin-top: var(--space-5); }
.article-end {
  margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: var(--space-5); align-items: center; justify-content: space-between;
}
.related { border-top: 1px solid var(--line); margin-top: var(--space-8); padding-top: var(--space-8); }

/* ---------- Pricing / tables on product pages ---------- */
.info-table { width: 100%; border-collapse: collapse; font-size: .93rem; background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.info-table th, .info-table td { padding: var(--space-3) var(--space-5); border-bottom: 1px solid var(--line); text-align: left; }
.info-table th { background: var(--night-800); color: var(--white); font-weight: 600; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; }
.info-table tr:last-child td { border-bottom: 0; }
.info-table tr:nth-child(even) td { background: var(--ivory-050); }

/* ---------- Investor relations docs ---------- */
.doc-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
.doc-card {
  display: flex; align-items: center; gap: var(--space-4);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5); box-shadow: var(--shadow-sm);
  transition: .2s; color: var(--ink-800); font-weight: 600; font-size: .95rem;
}
.doc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--blue-500); color: var(--blue-600); }
.doc-card img { width: 36px; height: 36px; object-fit: contain; flex: none; }
.doc-card .doc-card__ext { margin-left: auto; color: var(--ink-400); font-size: .75rem; font-weight: 500; }
/* Category cards at the top of the page jump to these sections; offset the
   anchor by the sticky header plus one step of breathing room. */
.doc-section { scroll-margin-top: calc(var(--header-h) + var(--space-5)); }
.doc-subhead {
  font-size: 1.05rem; color: var(--night-800);
  margin-top: var(--space-6); margin-bottom: var(--space-4);
}
.doc-subhead:first-of-type { margin-top: 0; }
/* Two per row on a phone, so these need a tighter box than a general .card;
   the blurb is hidden below `sm` to keep all four categories reachable
   without a long scroll (the heading alone already names the category). */
.doc-category { padding: var(--space-5); }
.doc-category h3 { font-size: 1.05rem; }
.doc-category p { display: none; color: var(--ink-600); font-size: .88rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ivory-050); color: var(--ink-600); border-top: 1px solid var(--line); padding-top: var(--space-8); position: relative; }
.site-footer a { color: var(--ink-600); }
.site-footer a:hover { color: var(--blue-600); }
.footer-grid { display: grid; gap: var(--space-7); grid-template-columns: 1fr; padding-bottom: var(--space-7); }
.footer-brand img { height: 30px; width: auto; }
.footer-brand p { color: var(--ink-400); font-size: .9rem; margin-top: var(--space-4); max-width: 340px; }
.footer-contact { margin-top: var(--space-5); display: grid; gap: var(--space-3); font-size: .9rem; }
.footer-contact a { display: inline-flex; align-items: center; gap: 8px; }
.footer-contact svg { width: 15px; height: 15px; fill: var(--blue-600); }
.footer-col h4 { color: var(--night-800); font-size: .95rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: var(--space-4); }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: var(--space-3); font-size: .92rem; }
.footer-bottom {
  border-top: 1px solid var(--line); padding-block: var(--space-5);
  display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between;
  font-size: .82rem; color: var(--ink-400);
}
.footer-bottom .disclaimers p { color: var(--ink-400); font-size: .75rem; margin-top: var(--space-2); }

/* ---------- Apply modal ---------- */
.modal .form-success { margin-top: 0; }

/* ---------- FAB / WhatsApp ---------- */
.fab {
  position: fixed; right: var(--space-4); bottom: var(--space-5); z-index: 50;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--gradient-blue); box-shadow: var(--shadow-lg);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}
.fab:hover { transform: scale(1.08); }
.fab svg { width: 26px; height: 26px; fill: var(--night-900); }

/* ---------- Back to top + misc ---------- */
.backtop {
  position: fixed; right: var(--space-4); bottom: var(--space-9); z-index: 45;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--white); box-shadow: var(--shadow-md); cursor: pointer;
  opacity: 0; pointer-events: none; transition: .25s;
}
.backtop.show { opacity: 1; pointer-events: auto; }
.backtop svg { width: 18px; height: 18px; stroke: var(--night-800); margin: 0 auto; }
code, .muted { color: var(--ink-400); }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: var(--space-8) 0; }

/* ---------- Responsive ---------- */
@media (min-width: 576px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .branch-grid { grid-template-columns: repeat(2, 1fr); }
  .bottom-cta .container { grid-template-columns: auto 1fr; justify-content: space-between; }
  .doc-category p { display: block; }
}
@media (min-width: 768px) {
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  .doc-grid { grid-template-columns: repeat(2, 1fr); }
  .emi-wrap { grid-template-columns: 1.1fr .9fr; }
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  /* Match the width a card gets in the three-column grid above, so the
     solo card reads as part of the same system. */
  .team-grid--solo { grid-template-columns: minmax(0, calc((var(--container) - var(--space-5) * 2) / 3)); }
  .stats-wrap { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .hero__media::after {
    background: linear-gradient(100deg, var(--ivory-050) 0%, var(--ivory-050) 30%, rgba(250,247,241,.88) 45%, rgba(250,247,241,.4) 65%, rgba(250,247,241,.12) 100%);
  }
}
@media (min-width: 992px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .hero__stats { grid-template-columns: repeat(4, 1fr); }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .testimonial-grid { grid-template-columns: repeat(3, 1fr); }
  .cta-band .container { grid-template-columns: 1.2fr .8fr; }
  .branch-grid { grid-template-columns: repeat(3, 1fr); }
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; }
}
/* Full inline nav only fits once the header has ~1300px to work with;
   below that, keep the hamburger drawer nav (already responsive) instead
   of letting nav links wrap onto a second, misaligned line. */
@media (min-width: 1320px) {
  .nav { display: block; }
  .nav-toggle { display: none; }
  .header-cta { display: inline-flex; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
/* ---------- Language switching (multi-language site) ---------- */
/* Poppins has no Devanagari/Kannada glyphs; swap the font stacks for
   the translated languages so Indic text renders with proper scripts. */
html[lang="mr"] { --font-display: "Noto Sans Devanagari", "Poppins", "Segoe UI", system-ui, sans-serif; --font-body: "Noto Sans Devanagari", "Poppins", "Segoe UI", system-ui, sans-serif; }
html[lang="hi"] { --font-display: "Noto Sans Devanagari", "Poppins", "Segoe UI", system-ui, sans-serif; --font-body: "Noto Sans Devanagari", "Poppins", "Segoe UI", system-ui, sans-serif; }
html[lang="kn"] { --font-display: "Noto Sans Kannada", "Poppins", "Segoe UI", system-ui, sans-serif; --font-body: "Noto Sans Kannada", "Poppins", "Segoe UI", system-ui, sans-serif; }
html[lang="mr"] body, html[lang="hi"] body, html[lang="kn"] body { letter-spacing: 0; }

/* Language dropdown in the navbar */
.lang-switch .btn--ghost { font-size: .85rem; padding: .35rem .7rem; }
.lang-switch .btn--ghost i.bi { margin-right: .35rem; }
.lang-switch .dropdown-menu { min-width: 9.5rem; }
