/* ═══════════════════════════════════════════════════════════
   IFSC FIND – Main Stylesheet
   Site: www.ifscfind.com
   Colors: Primary #0d6efd | Success #198754
═══════════════════════════════════════════════════════════ */

:root {
  --primary:    #0d6efd;
  --success:    #198754;
  --info:       #0dcaf0;
  --warning:    #ffc107;
  --danger:     #dc3545;
  --dark:       #212529;
  --muted:      #6c757d;
  --light:      #f8f9fa;
  --white:      #ffffff;
  --shadow-sm:  0 .125rem .25rem rgba(0,0,0,.075);
  --shadow:     0 .5rem 1rem rgba(0,0,0,.1);
  --shadow-lg:  0 1rem 3rem rgba(0,0,0,.12);
  --radius:     .75rem;
  --radius-lg:  1rem;
  --font-main:  'Inter', system-ui, sans-serif;
  --font-head:  'Poppins', 'Inter', sans-serif;
  --transition: .2s ease-in-out;
}

/* ── Dark Mode ────────────────────────────────────────────── */
[data-bs-theme="dark"] {
  --bs-body-bg:    #0f1117;
  --bs-body-color: #e4e6ea;
  --bs-card-bg:    #1a1d23;
  --bs-border-color: #2d3038;
  color-scheme: dark;
}
[data-bs-theme="dark"] .bg-light     { background: #1a1d23 !important; }
[data-bs-theme="dark"] .hero-section { background: linear-gradient(135deg, #0f1117 0%, #1a2640 100%); }
[data-bs-theme="dark"] .top-bar,
[data-bs-theme="dark"] .site-header  { background: #1a1d23 !important; }

/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); }
.fw-500  { font-weight: 500 !important; }
.fw-600  { font-weight: 600 !important; }
.fw-700  { font-weight: 700 !important; }
.fw-800  { font-weight: 800 !important; }
.fs-small { font-size: 0.8rem; }
.w-35 { width: 35%; }

/* ── Top Bar ──────────────────────────────────────────────── */
.top-bar {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.82rem;
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  z-index: 1030;
  background: #fff;
  border-bottom: 2px solid var(--primary);
}

.brand-icon {
  width: 40px; height: 40px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; line-height: 1.1; }
.brand-sub  { font-size: 0.65rem; color: var(--muted); line-height: 1; }

.navbar .nav-link {
  font-weight: 500;
  font-size: 0.9rem;
  color: #444 !important;
  padding: .65rem .75rem !important;
  border-radius: .5rem;
  transition: var(--transition);
}
.navbar .nav-link:hover { color: var(--primary) !important; background: rgba(13,110,253,.06); }
.dropdown-item { font-size: 0.87rem; padding: .5rem 1rem; border-radius: .4rem; }
.dropdown-item:hover { color: var(--primary); }

/* Nav search mini */
.nav-search-mini { width: 220px; }
.nav-search-mini .form-control { font-size: 0.85rem; border-color: #dee2e6; }
.nav-search-mini .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,110,253,.12); }

/* ── Skip Link ────────────────────────────────────────────── */
.skip-link { position: absolute; top: -40px; left: 0; background: var(--primary); color: #fff; padding: .5rem 1rem; z-index: 9999; }
.skip-link:focus { top: 0; }

/* ── Hero Section ─────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, #ebf3ff 0%, #f0f7ff 40%, #e8f5e9 100%);
  padding: 4rem 0 5rem;
  min-height: 580px;
  display: flex; align-items: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(13,110,253,.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-pattern {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='dots' x='0' y='0' width='20' height='20' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='2' cy='2' r='1' fill='%230d6efd' opacity='.07'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23dots)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-family: var(--font-head);
  color: #1a2640;
  line-height: 1.2;
}
.text-gradient {
  background: linear-gradient(135deg, var(--primary), #0099ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle { font-size: 1.05rem; color: #555; }

/* Search Card */
.hero-search-box { max-width: 720px; }
.search-card { border-radius: 1.25rem !important; }

/* Search tabs */
.search-tabs .btn-group {
  border: 1px solid #dee2e6;
  background: #f8f9fa;
  padding: 3px;
  border-radius: .6rem;
}
.search-tabs .btn-check:checked + label {
  background: var(--primary); color: #fff; box-shadow: var(--shadow-sm);
}
.search-tabs label { border: 0 !important; border-radius: .45rem !important; font-size: .82rem; padding: .4rem .6rem; }

/* Input Group */
.input-group-lg .form-control {
  border-color: #dee2e6;
  font-size: 1rem;
}
.input-group-lg .form-control:focus {
  border-color: var(--primary);
  box-shadow: none;
}
.input-group-lg .input-group-text {
  border-color: #dee2e6;
  background: #fff;
}
.btn-search {
  background: var(--primary);
  border-color: var(--primary);
  font-size: 1rem;
}

/* Search Suggestions */
.search-suggestions, .search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: .75rem;
  max-height: 340px;
  overflow-y: auto;
  z-index: 1050;
  display: none;
}
.search-suggestions.active { display: block; }
.suggestion-item {
  padding: .65rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background var(--transition);
}
.suggestion-item:last-child { border-bottom: 0; }
.suggestion-item:hover, .suggestion-item.active { background: #f0f4ff; }
.suggestion-ifsc { font-weight: 700; color: var(--primary); font-size: .9rem; }
.suggestion-bank { font-size: .8rem; color: var(--dark); }
.suggestion-city { font-size: .75rem; color: var(--muted); }

/* Stats pills */
.stat-pill {
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(13,110,253,.15);
  border-radius: 100px;
  padding: .45rem 1.1rem;
  font-size: .88rem;
  color: #444;
  display: inline-flex;
  align-items: center;
  backdrop-filter: blur(4px);
}

/* ── How Steps ────────────────────────────────────────────── */
.how-step { border-radius: .75rem; }
.how-number {
  width: 40px; height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
}

/* ── Section Headers ──────────────────────────────────────── */
.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1a2640;
  font-family: var(--font-head);
}

/* ── Bank Cards ───────────────────────────────────────────── */
.bank-card {
  transition: all var(--transition);
}
.bank-logo-wrap { height: 50px; display: flex; align-items: center; justify-content: center; }
.bank-logo { max-width: 48px; max-height: 48px; object-fit: contain; }
.bank-logo-placeholder {
  width: 48px; height: 48px;
  background: rgba(13,110,253,.08);
  border-radius: .5rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.bank-name { font-size: 0.78rem; line-height: 1.3; }
.bank-branches { font-size: 0.65rem; }

/* ── Hover Lift ───────────────────────────────────────────── */
.hover-lift {
  transition: transform var(--transition), box-shadow var(--transition);
}
.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow) !important;
}

/* ── Feature Cards ────────────────────────────────────────── */
.feature-card { background: #fff; transition: all var(--transition); }
.feature-card:hover { box-shadow: var(--shadow) !important; }
.feature-icon { transition: transform var(--transition); }
.feature-card:hover .feature-icon { transform: scale(1.1); }

/* ── IFSC Detail Page ────────────────────────────────────── */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #0056d6 100%);
}
.ifsc-table th { background: #f8f9fa; font-size: .87rem; }
.ifsc-table td { font-size: .9rem; }
.ifsc-badge { font-family: 'Courier New', monospace; letter-spacing: .05em; }
.ifsc-decoder > div { border-radius: .5rem; overflow: hidden; font-family: monospace; font-size: 1rem; }
.ifsc-part { min-width: 0; }

.ai-answer-box .bg-gradient-info-subtle { background: rgba(13,202,240,.07); }

/* Transfer cards */
.transfer-card { transition: var(--transition); }
.transfer-card:hover { transform: translateY(-2px); }

/* ── Tool Cards ───────────────────────────────────────────── */
.tool-card { transition: all var(--transition); }

/* ── Footer ───────────────────────────────────────────────── */
.footer-heading {
  font-size: .72rem;
  letter-spacing: .08em;
  color: #adb5bd;
}
.footer-links { margin: 0; }
.footer-links li { margin-bottom: .45rem; }
.footer-links a {
  color: #adb5bd;
  text-decoration: none;
  font-size: .87rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: #fff; }
.hover-primary:hover { color: var(--primary) !important; }

/* ── Back to Top ──────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px; height: 44px;
  z-index: 1000;
  opacity: .9;
  transition: all var(--transition);
}
.back-to-top:hover { transform: translateY(-3px); opacity: 1; }

/* ── Cookie Consent ───────────────────────────────────────── */
.cookie-consent {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #1a2640;
  color: #fff;
  padding: 1rem;
  z-index: 1099;
  border-top: 3px solid var(--primary);
}

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb { font-size: .84rem; margin: 0; }
.breadcrumb-item a { color: var(--primary); text-decoration: none; }
.breadcrumb-item.active { color: var(--muted); }

/* ── Skeleton Loading ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-anim 1.5s infinite;
  border-radius: .4rem;
}
@keyframes skeleton-anim { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Print Styles ─────────────────────────────────────────── */
@media print {
  .site-header, footer, .back-to-top, .cookie-consent,
  .btn-search, .nav-search-mini, #voiceSearchBtn { display: none !important; }
  .ifsc-hero { box-shadow: none !important; border: 1px solid #ddd !important; }
  body { font-size: 12pt; }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 767px) {
  .hero-section { padding: 2.5rem 0 3rem; min-height: auto; }
  .hero-title { font-size: 1.7rem; }
  .search-tabs label { font-size: .72rem; padding: .3rem .4rem; }
  .stat-pill { font-size: .78rem; padding: .35rem .75rem; }
  .section-title { font-size: 1.3rem; }
  .ifsc-table th, .ifsc-table td { font-size: .82rem; padding: .5rem; }
  .w-35 { width: 40%; }
}

/* ── Accessibility Focus ──────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ── Transitions for dark mode ────────────────────────────── */
body, .card, .site-header, .navbar, .accordion-item {
  transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}
