/* =====================================================================
 * Indian School Finder — Master Stylesheet
 * Mobile-first. Works down to 320px.
 * =====================================================================
 *
 * Sections:
 *   1.  Base & variables
 *   2.  Utilities
 *   3.  Top bar
 *   4.  Site header (non-sticky)
 *   5.  Hero (animated) + search
 *   6.  Section heading pattern
 *   7.  Why Choose Us
 *   8.  Our Features
 *   9.  School cards (v2 - grid)
 *   10. FAQ
 *   11. Newsletter
 *   12. Footer
 *   13. Chat widget
 *   14. School DETAILS page (About / Timings / Fee / Facilities / Related)
 *   15. Buttons & pagination tweaks
 *   16. Animations & keyframes
 *   17. Responsive breakpoints
 * ===================================================================== */

/* ---------- 1. Base & variables ---------- */
:root {
  --brand-primary: #1e3c72;
  --brand-primary-2: #2a5298;
  --brand-accent: #f59e0b;
  --brand-success: #16a34a;
  --brand-danger: #dc2626;
  --brand-text: #1f2937;
  --brand-muted: #6b7280;
  --brand-bg: #f6f8fb;
  --brand-card: #ffffff;
  --brand-border: #e6e9ef;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, .06);
  --shadow-md: 0 8px 22px rgba(15, 23, 42, .08);
  --shadow-lg: 0 20px 45px rgba(15, 23, 42, .14);
  --radius-sm: .5rem;
  --radius: 1rem;
  --radius-lg: 1.5rem;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--brand-bg);
  color: var(--brand-text);
  line-height: 1.6;
}

/* ---------- 2. Utilities ---------- */
.text-highlight {
  background: linear-gradient(120deg, #fbbf24 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section { padding: 3.5rem 0; }
@media (min-width: 768px) { .section { padding: 5rem 0; } }

/* ---------- 3. Top bar ---------- */
.topbar {
  background: #0f172a;
  color: #cbd5e1;
  border-bottom: 1px solid #1e293b;
}
.topbar-link {
  color: #cbd5e1;
  text-decoration: none;
  transition: color .15s ease;
}
.topbar-link:hover { color: #fbbf24; }

/* ---------- 4. Site header (non-sticky) ---------- */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--brand-border);
  box-shadow: var(--shadow-sm);
}
.site-header .navbar-brand { text-decoration: none; }
.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-2));
  color: #fff;
  font-size: 1.35rem;
  box-shadow: 0 6px 16px rgba(30, 60, 114, .25);
}
.brand-title {
  font-weight: 700;
  color: var(--brand-primary);
  line-height: 1.1;
  font-size: 1.1rem;
}
.brand-tagline {
  font-size: .72rem;
  color: var(--brand-muted);
  letter-spacing: .02em;
}
.site-header .nav-link {
  color: var(--brand-text);
  font-weight: 500;
  padding: .5rem .9rem !important;
  border-radius: .5rem;
  transition: background .15s ease, color .15s ease;
}
.site-header .nav-link:hover {
  color: var(--brand-primary);
  background: #eef2ff;
}

/* ---------- 5. Hero (animated) + search ---------- */
.hero {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: #fff;
  padding: 2.5rem 1rem;
  border-radius: 0 0 1.5rem 1.5rem;
}

.hero-animated {
  position: relative;
  overflow: hidden;
  padding: 4rem 1rem 5rem;
  background:
    radial-gradient(circle at 15% 20%, rgba(245, 158, 11, .18), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(59, 130, 246, .25), transparent 50%),
    linear-gradient(135deg, #0f2557 0%, #1e3c72 45%, #2a5298 100%);
}

.hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: .25;
}
.shape-1 {
  width: 260px; height: 260px; top: -80px; left: -60px;
  background: radial-gradient(circle, #fbbf24, transparent 70%);
  animation: float1 14s ease-in-out infinite;
}
.shape-2 {
  width: 220px; height: 220px; bottom: -60px; right: -40px;
  background: radial-gradient(circle, #60a5fa, transparent 70%);
  animation: float2 18s ease-in-out infinite;
}
.shape-3 {
  width: 160px; height: 160px; top: 40%; right: 8%;
  background: radial-gradient(circle, #a78bfa, transparent 70%);
  animation: float3 20s ease-in-out infinite;
}
.shape-4 {
  width: 120px; height: 120px; bottom: 20%; left: 12%;
  background: radial-gradient(circle, #f472b6, transparent 70%);
  animation: float1 16s ease-in-out infinite reverse;
}

.hero-content { position: relative; z-index: 2; }

.hero-badge {
  display: inline-block;
  padding: .4rem .9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
  font-size: .82rem;
  letter-spacing: .02em;
  margin-bottom: 1rem;
  backdrop-filter: blur(6px);
}

.hero-title {
  font-weight: 800;
  font-size: clamp(1.7rem, 5vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .2);
}

.hero-subtitle {
  max-width: 720px;
  margin: 0 auto 2rem;
  color: rgba(255, 255, 255, .85);
  font-size: clamp(.95rem, 2vw, 1.1rem);
}

.hero h1 { font-weight: 700; font-size: clamp(1.4rem, 4vw, 2.4rem); }

.search-card {
  background: #fff;
  color: #222;
  border-radius: 1rem;
  padding: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  box-shadow: 0 20px 45px rgba(0, 0, 0, .25);
}
.search-card .form-control,
.search-card .form-select {
  border-radius: .6rem;
}

/* Hero stats */
.hero-stats { margin-top: 2rem; }
.stat-item {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 1rem;
  padding: 1rem .5rem;
  backdrop-filter: blur(6px);
  transition: transform .25s ease, background .25s ease;
}
.stat-item:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, .16);
}
.stat-num {
  font-weight: 800;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: #fbbf24;
  line-height: 1.1;
}
.stat-label {
  font-size: .78rem;
  color: rgba(255, 255, 255, .85);
  margin-top: .25rem;
  letter-spacing: .02em;
}

/* ---------- 6. Section heading pattern ---------- */
.section-head { margin-bottom: 3rem; }
.section-kicker {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-accent);
  background: rgba(245, 158, 11, .12);
  padding: .35rem .9rem;
  border-radius: 999px;
  margin-bottom: .85rem;
}
.section-title {
  font-weight: 800;
  font-size: clamp(1.4rem, 3.4vw, 2.2rem);
  color: var(--brand-primary);
  margin-bottom: .75rem;
  line-height: 1.2;
}
.section-subtitle {
  color: var(--brand-muted);
  max-width: 720px;
  margin: 0 auto;
  font-size: clamp(.92rem, 1.6vw, 1.02rem);
}

/* ---------- 7. Why Choose Us ---------- */
.why-choose-us { background: #ffffff; }
.feature-box {
  background: #ffffff;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.feature-box:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}
.feature-icon-1 { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.feature-icon-2 { background: linear-gradient(135deg, #10b981, #047857); }
.feature-icon-3 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.feature-icon-4 { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.feature-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: .5rem;
  color: var(--brand-primary);
}
.feature-text {
  font-size: .92rem;
  color: var(--brand-muted);
  margin-bottom: 0;
}

/* ---------- 8. Our Features ---------- */
.our-features { background: linear-gradient(180deg, #eef2ff 0%, #f6f8fb 100%); }
.feature-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 1px solid var(--brand-border);
  transition: transform .3s ease, box-shadow .3s ease;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.feature-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  border-radius: 14px;
  background: #eef2ff;
  color: var(--brand-primary);
  font-size: 1.35rem;
  margin-bottom: 1rem;
}
.feature-card h5 {
  font-weight: 700;
  color: var(--brand-primary);
  font-size: 1.08rem;
  margin-bottom: .5rem;
}
.feature-card p {
  color: var(--brand-muted);
  font-size: .92rem;
  margin-bottom: 0;
}

/* ---------- 9. School cards (v2) ---------- */
.results-section { background: var(--brand-bg); }

.school-card-v2 {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  position: relative;
}
.school-card-v2:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.school-card-v2::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand-primary), var(--brand-accent));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .35s ease;
}
.school-card-v2:hover::after { transform: scaleY(1); }

.school-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .5rem;
  padding: 1.1rem 1.25rem .25rem;
}
.badge-board {
  background: #eaf2ff;
  color: #1e40af;
  font-weight: 600;
  padding: .3rem .7rem;
  border-radius: 999px;
  font-size: .75rem;
  letter-spacing: .02em;
}
.badge-verified {
  background: #e6f7ec;
  color: #166534;
  font-weight: 600;
  padding: .3rem .7rem;
  border-radius: 999px;
  font-size: .75rem;
}

.school-card-body {
  padding: .75rem 1.25rem 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.school-card-title {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  margin-bottom: .5rem;
  color: var(--brand-primary);
}
.school-card-location {
  color: var(--brand-muted);
  font-size: .88rem;
  margin-bottom: .75rem;
}
.school-card-location i { color: var(--brand-accent); margin-right: .35rem; }

.school-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .85rem;
}
.meta-item {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: #f3f4f6;
  color: #374151;
  border-radius: .5rem;
  padding: .3rem .65rem;
  font-size: .78rem;
  font-weight: 500;
}
.meta-item i { color: var(--brand-primary); }

.school-card-facilities {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .85rem;
}
.facility-chip {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  padding: .18rem .6rem;
  font-size: .72rem;
  font-weight: 500;
}
.facility-chip-more {
  background: #f3f4f6;
  color: var(--brand-muted);
  border-color: #e5e7eb;
}

.school-card-fee {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: .75rem;
  border-top: 1px dashed var(--brand-border);
  margin-top: auto;
}
.fee-label {
  font-size: .78rem;
  color: var(--brand-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.fee-value {
  font-weight: 700;
  color: var(--brand-success);
  font-size: .95rem;
}
.fee-dash { color: var(--brand-muted); margin: 0 .15rem; }

.school-card-footer {
  padding: 0 1.25rem 1.25rem;
}
.school-card-btn {
  border-radius: .6rem;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease;
}
.school-card-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(30, 60, 114, .3);
}

/* Legacy card support (kept for backward-compat) */
.school-card {
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  transition: .2s;
  background: #fff;
  height: 100%;
}
.school-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.school-card .card-title { font-size: 1.05rem; font-weight: 600; line-height: 1.3; }

/* ---------- Browse-by-city chips (used on homepage + city pages) ---------- */
.browse-cities-section { background: #ffffff; }
.city-related-chip {
  display: flex;
  align-items: center;
  gap: .85rem;
  background: #ffffff;
  border: 1px solid var(--brand-border, #e6e9ef);
  border-radius: .85rem;
  padding: .9rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  height: 100%;
}
.city-related-chip:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  border-color: var(--brand-accent, #f59e0b);
}
.city-related-chip > i {
  font-size: 1.5rem;
  color: var(--brand-primary, #1e3c72);
  flex-shrink: 0;
}
.city-related-name {
  font-weight: 700;
  color: var(--brand-primary, #1e3c72);
  font-size: .95rem;
  line-height: 1.2;
}
.city-related-count {
  font-size: .78rem;
  color: var(--brand-muted, #6b7280);
  margin-top: 2px;
}

/* ---------- 10. FAQ ---------- */
.faq-section { background: #ffffff; }
.faq-accordion .accordion-item {
  border: 1px solid var(--brand-border);
  border-radius: var(--radius) !important;
  margin-bottom: .75rem;
  overflow: hidden;
  transition: box-shadow .25s ease;
}
.faq-accordion .accordion-item:hover { box-shadow: var(--shadow-sm); }
.faq-accordion .accordion-button {
  font-weight: 600;
  color: var(--brand-primary);
  background: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .85rem;
  box-shadow: none !important;
}
.faq-accordion .accordion-button:not(.collapsed) {
  background: #eef2ff;
  color: var(--brand-primary);
}
.faq-accordion .accordion-button:focus {
  box-shadow: 0 0 0 .2rem rgba(30, 60, 114, .15) !important;
  border-color: transparent;
}
.faq-accordion .accordion-body {
  color: var(--brand-muted);
  font-size: .94rem;
  line-height: 1.7;
  padding: 1rem 1.25rem 1.25rem;
}
.faq-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-2));
  color: #fff;
  border-radius: 50%;
  font-size: .82rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- 11. Newsletter ---------- */
.newsletter-section { background: var(--brand-bg); }
.newsletter-box {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.75rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.newsletter-box::before {
  content: "";
  position: absolute;
  inset: -50% -20% auto auto;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(245, 158, 11, .25), transparent 70%);
  pointer-events: none;
}
.newsletter-title {
  font-weight: 800;
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  margin-bottom: .75rem;
  position: relative;
}
.newsletter-subtitle {
  color: rgba(255, 255, 255, .82);
  font-size: .95rem;
  position: relative;
}
.newsletter-form { position: relative; }
.newsletter-form .input-group-text {
  background: #fff;
  border-right: 0;
  color: var(--brand-primary);
}
.newsletter-form .form-control {
  border-left: 0;
  border-right: 0;
  box-shadow: none !important;
}
.newsletter-form .form-control:focus {
  border-color: #dee2e6;
  background: #fff;
}
.newsletter-note {
  display: inline-block;
  margin-top: .65rem;
  color: rgba(255, 255, 255, .7);
  font-size: .8rem;
}

/* ---------- 12. Footer ---------- */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  margin-top: 0;
}
.footer-brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: .85rem;
  display: flex;
  align-items: center;
}
.footer-brand i { color: var(--brand-accent); }
.footer-about {
  color: #94a3b8;
  font-size: .9rem;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}
.footer-social {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: #1e293b;
  color: #cbd5e1;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease, color .2s ease;
}
.footer-social a:hover {
  background: var(--brand-accent);
  color: #fff;
  transform: translateY(-3px);
}

.footer-heading {
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 1rem;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li { margin-bottom: .55rem; }
.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: .9rem;
  transition: color .15s ease, padding-left .15s ease;
}
.footer-links a:hover {
  color: var(--brand-accent);
  padding-left: 4px;
}

.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-contact li {
  color: #94a3b8;
  font-size: .9rem;
  margin-bottom: .65rem;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  line-height: 1.55;
}
.footer-contact i {
  color: var(--brand-accent);
  margin-top: 3px;
  flex-shrink: 0;
}
.footer-contact a {
  color: #cbd5e1;
  text-decoration: none;
}
.footer-contact a:hover { color: var(--brand-accent); }

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 1.25rem 0;
  color: #94a3b8;
}
.footer-bottom a {
  color: #94a3b8;
  text-decoration: none;
  transition: color .15s ease;
}
.footer-bottom a:hover { color: var(--brand-accent); }

/* ---------- 13. Chat widget ---------- */
.chat-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px; height: 60px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-2));
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(30, 60, 114, .4);
  z-index: 1050;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s ease, box-shadow .25s ease;
  animation: pulseFab 2.5s ease-in-out infinite;
}
.chat-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 32px rgba(30, 60, 114, .5);
  animation-play-state: paused;
}
.chat-fab.active { animation: none; }
.chat-fab-badge {
  position: absolute;
  top: -3px; right: -3px;
  background: var(--brand-danger);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.chat-panel {
  position: fixed;
  bottom: 92px;
  right: 20px;
  width: min(360px, calc(100vw - 40px));
  max-height: min(520px, calc(100vh - 120px));
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  z-index: 1049;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(.96);
  transition: opacity .25s ease, transform .25s ease;
  overflow: hidden;
}
.chat-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.chat-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 1.15rem;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-2));
  color: #fff;
}
.chat-panel-title {
  font-weight: 700;
  font-size: 1rem;
}
.chat-panel-sub {
  font-size: .78rem;
  opacity: .85;
}
.chat-panel-close {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  padding: .15rem .35rem;
  border-radius: .35rem;
  transition: background .15s ease;
}
.chat-panel-close:hover { background: rgba(255, 255, 255, .15); }

.chat-panel-body {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  min-height: 220px;
}
.chat-message {
  display: flex;
  gap: .5rem;
  align-items: flex-end;
  max-width: 90%;
}
.chat-message-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  font-size: .8rem;
  flex-shrink: 0;
}
.chat-message-user .chat-avatar { background: var(--brand-accent); }
.chat-bubble {
  background: #fff;
  border-radius: 1rem;
  padding: .6rem .9rem;
  font-size: .88rem;
  line-height: 1.5;
  color: var(--brand-text);
  box-shadow: var(--shadow-sm);
}
.chat-message-user .chat-bubble {
  background: #dbeafe;
  color: #1e3a8a;
}

.chat-quick-actions {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-top: .25rem;
}
.chat-quick-btn {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: .6rem;
  padding: .5rem .75rem;
  text-align: left;
  font-size: .82rem;
  color: var(--brand-primary);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.chat-quick-btn:hover {
  background: #eef2ff;
  border-color: var(--brand-primary);
}

.chat-panel-input {
  display: flex;
  gap: .5rem;
  padding: .75rem;
  border-top: 1px solid var(--brand-border);
  background: #fff;
}
.chat-panel-input .form-control {
  border-radius: .6rem;
  font-size: .9rem;
}
.chat-panel-input .btn {
  border-radius: .6rem;
  padding: .4rem .85rem;
}

/* ---------- 14. School DETAILS page ---------- */

/* Card base (used on detail page) */
.card {
  border-radius: var(--radius);
  border: 1px solid var(--brand-border);
}
.card.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.card .card-body h5 {
  color: var(--brand-primary);
  font-size: 1.05rem;
}

/* About section text */
.card .card-body > p.mb-0.text-secondary {
  font-size: .95rem;
  line-height: 1.75;
}

/* School Timings card */
.card .bg-light.rounded {
  border-radius: var(--radius-sm) !important;
  transition: background .2s ease;
}
.card .bg-light.rounded:hover { background: #eef2ff !important; }

/* Fee structure - summary boxes */
.card .border.rounded.p-3 {
  border-radius: var(--radius-sm) !important;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card .border.rounded.p-3:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: var(--brand-primary) !important;
}

/* Fee table */
.card .table {
  font-size: .88rem;
  margin-bottom: 0;
}
.card .table thead th {
  background: #f8fafc;
  color: var(--brand-primary);
  font-weight: 700;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--brand-border);
}
.card .table tbody tr {
  transition: background .15s ease;
}
.card .table tbody tr:hover { background: #f8fafc; }

/* Detailed facilities grid on school-details */
.card .d-flex.gap-3.p-3.border.rounded {
  border-radius: var(--radius-sm) !important;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
  background: #fff;
}
.card .d-flex.gap-3.p-3.border.rounded:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: var(--brand-primary) !important;
  background: #f8fafc;
}
.card .d-flex.gap-3.p-3.border.rounded .text-success i {
  color: var(--brand-success) !important;
}

/* Contact sidebar */
.card .card-body .small i.text-muted {
  color: var(--brand-primary) !important;
  opacity: .75;
}

/* Claim button card */
.card.border-warning {
  border-color: var(--brand-accent) !important;
  border-width: 2px !important;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
}

/* Related schools cards */
.mt-5 h5 .text-primary {
  color: var(--brand-primary) !important;
}
.mt-5 .school-card {
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.mt-5 .school-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

/* Badges on detail hero */
.badge.bg-light.text-primary,
.badge.bg-light.text-dark {
  padding: .4rem .8rem;
  font-size: .78rem;
  border-radius: 999px;
  font-weight: 600;
}

/* ---------- 15. Buttons & pagination tweaks ---------- */
.btn { border-radius: .6rem; transition: transform .15s ease, box-shadow .15s ease; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(30, 60, 114, .25); }
.btn-warning:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(245, 158, 11, .35); }

.pagination .page-link {
  border-radius: .5rem;
  margin: 0 2px;
  border: 1px solid var(--brand-border);
  color: var(--brand-primary);
  font-weight: 500;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.pagination .page-link:hover {
  background: #eef2ff;
  color: var(--brand-primary);
  transform: translateY(-2px);
}
.pagination .page-item.active .page-link {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}
.pagination .page-item.disabled .page-link { opacity: .5; }

/* ---------- 16. Animations ---------- */
@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.06); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 25px) scale(1.08); }
}
@keyframes float3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-20px, -40px) rotate(15deg); }
}
@keyframes pulseFab {
  0%, 100% { box-shadow: 0 10px 25px rgba(30, 60, 114, .4); }
  50% { box-shadow: 0 10px 25px rgba(30, 60, 114, .4), 0 0 0 12px rgba(30, 60, 114, .12); }
}

/* Subtle fade-in for hero content on load */
.hero-content > * {
  animation: fadeUp .8s ease both;
}
.hero-content > *:nth-child(2) { animation-delay: .1s; }
.hero-content > *:nth-child(3) { animation-delay: .2s; }
.hero-content > *:nth-child(4) { animation-delay: .3s; }
.hero-content > *:nth-child(5) { animation-delay: .4s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 17. Responsive breakpoints ---------- */
@media (max-width: 767.98px) {
  .section { padding: 2.5rem 0; }
  .hero-animated { padding: 2.5rem 1rem 3rem; }
  .hero-badge { font-size: .75rem; }
  .newsletter-box { padding: 1.75rem 1.25rem; }
  .footer-social { justify-content: flex-start; }
  .chat-panel { right: 12px; left: 12px; width: auto; bottom: 84px; }
  .chat-fab { width: 54px; height: 54px; font-size: 1.35rem; bottom: 16px; right: 16px; }
}

@media (max-width: 575.98px) {
  .school-card-v2 { border-radius: .85rem; }
  .school-card-title { font-size: 1rem; }
  .fee-value { font-size: .88rem; }
  .stat-item { padding: .75rem .35rem; }
  .stat-label { font-size: .68rem; }
}

@media (max-width: 400px) {
  .hero { padding: 1.5rem .75rem; }
  .hero .search-card { padding: .75rem; }
  .hero-animated { padding: 2rem .75rem 2.5rem; }
  .search-card { padding: .75rem; }
  .brand-text { display: none; }
  .brand-icon { width: 40px; height: 40px; font-size: 1.15rem; }
  .chat-panel { bottom: 78px; }
}

/* ---------- 18. Print ---------- */
@media print {
  .topbar, .site-header, .chat-fab, .chat-panel, .site-footer, .newsletter-section { display: none !important; }
  body { background: #fff; }
}


/* =====================================================================
 * School Detail — Location Map
 * ===================================================================== */

.school-map-wrapper {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--brand-border, #e6e9ef);
  background: #f8fafc;
  position: relative;
}

.school-map {
  width: 100%;
  height: 340px;
  display: block;
  background: #eef2f7;
  /* subtle placeholder look */
  background-image:
    linear-gradient(45deg, #e5e9f0 25%, transparent 25%),
    linear-gradient(-45deg, #e5e9f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e9f0 75%),
    linear-gradient(-45deg, transparent 75%, #e5e9f0 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  z-index: 1;
}
.school-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Address block below the map */
.school-map-address {
  background: #f8fafc;
  border-radius: .65rem;
  padding: .85rem 1rem;
  border: 1px solid var(--brand-border, #e6e9ef);
}

/* Directions buttons */
.school-map-wrapper + .school-map-address + .d-flex .btn {
  border-radius: .55rem;
  font-weight: 500;
}

/* Mobile: shorter map */
@media (max-width: 575.98px) {
  .school-map { height: 260px; }
}
@media (max-width: 400px) {
  .school-map { height: 220px; }
}

/* =====================================================================
 * AdSense Containers — Prevent layout shift (CLS)
 * ===================================================================== */
.ad-container {
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: .85rem;
  padding: 1rem;
  overflow: hidden;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
}

.ad-container ins.adsbygoogle {
  display: block !important;
  margin: 0 auto;
}

.ad-container:empty::before {
  content: "Advertisement";
  font-size: .7rem;
  color: #94a3b8;
  letter-spacing: .1em;
  text-transform: uppercase;
}

@media (max-width: 575.98px) {
  .ad-container {
    min-height: 120px;
    padding: .75rem;
  }
}