/* ============================================================
   Om Sai Sansthaan — Master Stylesheet
   Brand: trust, dignity, royal blue + golden yellow
   ============================================================ */

:root {
  /* Primary brand = royal blue (replaces former orange role).
     Variable names kept for backward compatibility across the site. */
  --mf-orange:      #1E5BA8;   /* royal blue (primary) */
  --mf-orange-dk:   #14437D;   /* deep navy blue */
  --mf-orange-sf:   #E3EDF9;   /* soft blue tint */
  --mf-yellow:      #FFC845;   /* bright golden yellow (accent) */
  --mf-yellow-dk:   #E0A41B;
  --mf-red:         #C8102E;
  --mf-blue:        #1E5BA8;
  --mf-blue-dk:     #14437D;
  --mf-green:       #2E8B57;
  --mf-cream:       #F2F6FB;   /* soft blue-tint backdrop */
  --mf-cream-2:     #F8FBFE;
  --mf-ink:         #16243A;   /* deep navy ink */
  --mf-grey:        #6B7B95;
  --mf-line:        #D6E0EE;
  --mf-shadow-sm:   0 4px 14px rgba(20,67,125,.08);
  --mf-shadow-md:   0 10px 28px rgba(20,67,125,.12);
  --mf-shadow-lg:   0 22px 48px rgba(30,91,168,.20);
  --mf-radius:      12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--mf-ink);
  background: #fff;
  line-height: 1.65;
  font-size: clamp(13.5px, 1.4vw, 14.5px);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(1.65rem, 5vw, 3rem); }
h2 { font-size: clamp(1.25rem, 4vw, 2.1rem); }
h3 { font-size: clamp(1.05rem, 2.6vw, 1.4rem); }
h4 { font-size: clamp(0.95rem, 2.2vw, 1.2rem); }
h5 { font-size: clamp(0.9rem, 1.8vw, 1.1rem); }
h6 { font-size: clamp(0.82rem, 1.4vw, 0.92rem); }

.lead { font-size: clamp(0.95rem, 2.1vw, 1.12rem); line-height: 1.6; }
.display-1 { font-size: clamp(2.5rem, 8vw, 5rem); }
.display-4 { font-size: clamp(1.75rem, 5vw, 3rem); }
.display-5 { font-size: clamp(1.5rem, 4.4vw, 2.6rem); }
.display-6 { font-size: clamp(1.3rem, 3.5vw, 2.2rem); }

a { color: var(--mf-orange); text-decoration: none; transition: color .2s; }
a:hover { color: var(--mf-orange-dk); }
img { max-width: 100%; height: auto; }

.page-fade { animation: fadeIn .35s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== Buttons =====
   Primary action = blue (.btn-primary, .btn-outline-primary)
   Donate CTA    = vibrant yellow (.btn-donate) — pops against blue site
*/
.btn-donate {
  background: var(--mf-yellow);
  color: var(--mf-blue-dk);
  font-weight: 700;
  border-radius: 30px;
  padding: 8px 20px;
  border: 0;
  transition: all .25s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-donate:hover, .btn-donate:focus {
  background: var(--mf-yellow-dk);
  color: var(--mf-blue-dk);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255,200,69,.55);
}
.btn-primary { background: var(--mf-orange); border-color: var(--mf-orange); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--mf-orange-dk); border-color: var(--mf-orange-dk); color: #fff; }
.btn-outline-primary { color: var(--mf-orange); border-color: var(--mf-orange); }
.btn-outline-primary:hover { background: var(--mf-orange); border-color: var(--mf-orange); color: #fff; }

/* ===== Utility top bar ===== */
.utility-bar {
  background: var(--mf-blue);
  color: #fff;
  padding: 8px 0;
  font-size: 13px;
}
.utility-bar a { color: #fff; }
.utility-bar a:hover { color: var(--mf-yellow); }
.utility-bar i { margin-right: 4px; }

/* ===== Main navbar ===== */
.main-navbar {
  background: #fff;
  box-shadow: var(--mf-shadow-sm);
  padding: 5px 0;
  transition: padding .2s, box-shadow .2s;
}
.main-navbar.scrolled {
  padding: 5px 0;
  box-shadow: var(--mf-shadow-md);
}
.navbar-brand .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--mf-orange-dk);
}
.brand-tagline {
  font-size: 11px;
  color: var(--mf-grey);
  letter-spacing: .03em;
}
.main-navbar .nav-link {
  color: var(--mf-ink);
  font-weight: 500;
  padding: 8px 14px !important;
  position: relative;
}
.main-navbar .nav-link:hover,
.main-navbar .nav-link.active { color: var(--mf-orange); }
.main-navbar .nav-link.active::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px; background: var(--mf-orange);
}
.dropdown-menu { border: 0; box-shadow: var(--mf-shadow-md); border-radius: 8px; padding: 6px; }
.dropdown-item { padding: 8px 14px; border-radius: 6px; font-size: 14px; }
.dropdown-item:hover { background: var(--mf-cream); color: var(--mf-orange); }

.nav-donate-mobile { font-size: 13px; padding: 6px 14px; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 78vh;
  background: linear-gradient(135deg, var(--mf-cream) 0%, #DCE8F7 100%);
  padding: 80px 0;
  overflow: hidden;
}
.hero-slim {
  min-height: 38vh;
  background: linear-gradient(135deg, var(--mf-orange), var(--mf-orange-dk));
  color: #fff;
  padding: 60px 0;
  display: flex;
  align-items: center;
}
.hero-slim h1 { color: #fff; }
.hero-slim .lead { color: rgba(255,255,255,.92); }
.breadcrumb { background: transparent; }
.breadcrumb a { color: rgba(255,255,255,.85); }
.breadcrumb-item.active { color: #fff; }

/* ===== Section utilities ===== */
.section { padding: 80px 0; }
.section-sm { padding: 50px 0; }
.section-cream { background: var(--mf-cream); }
.section-dark { background: var(--mf-ink); color: #fff; }

.eyebrow {
  display: inline-block;
  color: var(--mf-orange);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: 8px;
}
.section-heading {
  position: relative;
  margin-bottom: 12px;
}
.section-heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--mf-orange);
  margin-top: 12px;
  border-radius: 3px;
}
.text-center .section-heading::after { margin-left: auto; margin-right: auto; }

/* ===== Focus area cards ===== */
.focus-card {
  display: block;
  background: #fff;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius);
  padding: 26px 22px;
  height: 100%;
  transition: all .3s;
  color: var(--mf-ink);
}
.focus-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--mf-shadow-lg);
  border-color: var(--mf-orange);
  color: var(--mf-ink);
}
.focus-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 14px;
}
.focus-link {
  color: var(--mf-orange);
  font-weight: 600;
  font-size: 14px;
}

/* ===== Campaign cards ===== */
.campaign-card {
  background: #fff;
  border-radius: var(--mf-radius);
  overflow: hidden;
  box-shadow: var(--mf-shadow-sm);
  transition: all .3s;
  display: flex;
  flex-direction: column;
}
.campaign-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--mf-shadow-lg);
}
.campaign-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--mf-cream), var(--mf-orange-sf));
}
.campaign-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.campaign-card:hover .campaign-image img { transform: scale(1.05); }
.campaign-emoji {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}
.campaign-badge {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 11px;
}
.campaign-category {
  position: absolute;
  bottom: 12px; left: 12px;
  background: rgba(255,255,255,.95);
  color: var(--mf-orange-dk);
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
}
.campaign-body { flex: 1; display: flex; flex-direction: column; }
.campaign-title { color: var(--mf-ink); margin-bottom: 8px; }
.campaign-summary { flex: 1; }
.campaign-progress .progress { height: 8px; background: var(--mf-cream); border-radius: 4px; }

/* ===== Trustee cards ===== */
.trustee-card {
  background: #fff;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius);
  padding: 28px 20px;
  transition: all .3s;
}
.trustee-card:hover { transform: translateY(-4px); box-shadow: var(--mf-shadow-md); }
.trustee-avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
}
.trustee-role { font-weight: 600; color: var(--mf-orange); }
.trustee-bio { color: var(--mf-grey); }

/* ===== Stats / counter band ===== */
.stat-band {
  background: linear-gradient(135deg, var(--mf-orange), var(--mf-orange-dk));
  color: #fff;
  padding: 60px 0;
  text-align: center;
}
.stat-num {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  line-height: 1;
}
.stat-label { font-size: 14px; opacity: .9; margin-top: 6px; }

/* ===== CTA bands ===== */
.cta-band {
  background: linear-gradient(135deg, var(--mf-blue), var(--mf-blue-dk));
  color: #fff;
  padding: 70px 0;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band .btn-donate { background: var(--mf-yellow); color: var(--mf-ink); }
.cta-band .btn-donate:hover { background: #fff; }

/* ===== Newsletter band ===== */
.newsletter-band {
  background: linear-gradient(135deg, var(--mf-orange) 0%, var(--mf-orange-dk) 100%);
  color: #fff;
}
.newsletter-band h3 { color: #fff; }

/* ===== Footer ===== */
.site-footer {
  background: #1A1410;
  color: #D1C7B8;
}
.footer-heading {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 18px;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #D1C7B8; font-size: 14px; }
.footer-links a:hover { color: var(--mf-orange); }
.footer-contact { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.footer-contact li { margin-bottom: 10px; padding-left: 24px; position: relative; line-height: 1.5; }
.footer-contact li i { position: absolute; left: 0; top: 4px; color: var(--mf-orange); }
.footer-contact a { color: #D1C7B8; }
.footer-contact a:hover { color: var(--mf-orange); }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  margin-right: 6px;
  transition: all .2s;
}
.footer-social a:hover { background: var(--mf-orange); transform: translateY(-2px); }
.footer-divider { border-color: rgba(255,255,255,.1); }

/* Legal-links row */
.footer-legal-links {
  list-style: none;
  padding: 0;
  margin: 0 0 6px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  font-size: 13px;
}
.footer-legal-links li { display: inline-flex; align-items: center; }
.footer-legal-links li:not(:last-child)::after {
  content: '·';
  margin-left: 18px;
  color: rgba(255,255,255,.35);
}
.footer-legal-links a {
  color: #D1D8E5;
  text-decoration: none;
  transition: color .2s;
}
.footer-legal-links a:hover { color: var(--mf-yellow); }
@media (max-width: 575.98px) {
  .footer-legal-links { font-size: 12px; gap: 4px 10px; }
  .footer-legal-links li:not(:last-child)::after { margin-left: 10px; }
}

/* ===== Sticky donate FAB ===== */
.donate-fab {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--mf-orange);
  color: #fff;
  padding: 12px 22px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(30,91,168,.45);
  z-index: 99;
  animation: fabPulse 2.4s infinite;
}
.donate-fab:hover { background: var(--mf-orange-dk); color: #fff; transform: scale(1.05); }
@keyframes fabPulse {
  0%, 100% { box-shadow: 0 12px 28px rgba(30,91,168,.45); }
  50%      { box-shadow: 0 12px 28px rgba(30,91,168,.45), 0 0 0 12px rgba(30,91,168,.12); }
}
@media (max-width: 575.98px) {
  .donate-fab {
    left: 16px; right: 16px; bottom: 16px;
    justify-content: center;
    padding: 14px;
    border-radius: 12px;
  }
  .fab-label { font-size: 15px; }
}

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  bottom: 90px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--mf-blue);
  color: #fff;
  border: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 98;
  box-shadow: var(--mf-shadow-md);
  transition: all .3s;
}
.back-to-top.visible { display: flex; }
.back-to-top:hover { background: var(--mf-blue-dk); transform: translateY(-3px); }
@media (max-width: 575.98px) { .back-to-top { bottom: 80px; right: 16px; } }

/* ===== Donor wall, gallery, etc utilities ===== */
.gallery-item {
  position: relative;
  border-radius: var(--mf-radius);
  overflow: hidden;
  cursor: pointer;
  height: 240px;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.gallery-item:hover img { transform: scale(1.06); }

.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px; background: var(--mf-line);
}
.timeline-item { position: relative; margin-bottom: 30px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--mf-orange);
  box-shadow: 0 0 0 4px rgba(30,91,168,.18);
}

.credential-card {
  background: #fff;
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius);
  padding: 24px;
  text-align: center;
  height: 100%;
  transition: all .3s;
}
.credential-card:hover { transform: translateY(-4px); box-shadow: var(--mf-shadow-md); }
.credential-card i { font-size: 32px; color: var(--mf-orange); }

/* ============================================================
   Responsive — mobile-first font scaling + spacing
   ============================================================ */

/* Tablet (≤991px) */
@media (max-width: 991.98px) {
  .hero { min-height: 56vh; padding: 50px 0; }
  .hero-slim { min-height: auto; padding: 50px 0; }
  .section { padding: 50px 0; }
  .section-sm { padding: 32px 0; }
  .stat-band, .cta-band { padding: 50px 0; }

  .brand-name { font-size: 15px; }
  .brand-tagline { font-size: 10px; }

  /* Trustees */
  .trustee-avatar { width: 76px; height: 76px; font-size: 22px; }

  /* Stat numbers slightly smaller */
  .stat-num { font-size: clamp(1.6rem, 5.5vw, 2.3rem); }
  .stat-label { font-size: 12px; }

  /* Footer columns */
  .site-footer { padding-top: 40px; padding-bottom: 18px; }
  .footer-heading { margin-bottom: 12px; font-size: 12px; }
  .footer-links a, .footer-contact { font-size: 12.5px; }
}

/* Mobile (≤575px) */
@media (max-width: 575.98px) {
  body { font-size: 13.5px; line-height: 1.6; }

  /* Tighter section spacing */
  .section { padding: 40px 0; }
  .section-sm { padding: 24px 0; }
  .hero, .hero-slim { padding: 40px 0; }
  .stat-band, .cta-band { padding: 40px 0; }

  /* Hero swiper text — keep readable */
  .hero h1 { font-size: clamp(1.5rem, 7vw, 2.1rem); }
  .hero .lead { font-size: 13.5px; }

  /* Hero slide buttons */
  .hero .btn-lg, .hero-slim .btn-lg { padding: 7px 16px; font-size: 13px; }

  /* Section headings underline closer */
  .section-heading::after { width: 45px; height: 2px; margin-top: 8px; }
  .eyebrow { font-size: 10px; letter-spacing: .12em; }

  /* Cards */
  .focus-card { padding: 20px 16px; }
  .focus-icon { width: 48px; height: 48px; font-size: 20px; }
  .credential-card { padding: 18px 14px; }
  .credential-card i { font-size: 26px; }
  .trustee-card { padding: 20px 14px; }
  .campaign-card { font-size: 12.5px; }
  .campaign-image { height: 170px; }
  .campaign-emoji { font-size: 56px; }
  .campaign-title { font-size: 15px; }

  /* Buttons sized for thumb-tap */
  .btn-donate, .btn-primary, .btn-outline-primary { padding: 7px 14px; font-size: 13px; }
  .btn-lg { padding: 9px 20px !important; font-size: 14px !important; }

  /* Navbar — donate button + brand stay tight */
  .nav-donate-mobile { font-size: 11.5px; padding: 5px 11px; }
  .navbar-brand img { height: 38px; width: 38px; }
  .brand-name { font-size: 14px; }
  .brand-tagline { display: none; }

  /* Utility bar text + icons stay snug */
  .utility-bar { font-size: 11px; padding: 5px 0; }

  /* Pramukh feature cards (home page) */
  .pramukh-feature-img { height: 160px; }
  .pramukh-feature-body { padding: 18px 16px; }
  .pramukh-feature h3 { font-size: 15.5px; }

  /* Form labels + inputs */
  .form-label { font-size: 12.5px; margin-bottom: 4px; }
  .form-control, .form-select { font-size: 13px; }
  .form-control-lg, .form-select-lg { font-size: 14px; padding: 7px 11px; }

  /* Tabs (donate page) */
  .pay-tabs .nav-link { padding: 9px 12px; font-size: 11px; }
  .pay-tabs .nav-link i { font-size: 16px; }
  .pay-content { padding: 20px 14px; }

  /* Tables — make compact */
  .table { font-size: 12px; }

  /* Footer */
  .site-footer { font-size: 12px; }
  .footer-heading { font-size: 11.5px; }
  .footer-social a { width: 32px; height: 32px; }

  /* FAB / back-to-top sizes */
  .donate-fab { padding: 11px; font-size: 13px; }
  .back-to-top { width: 38px; height: 38px; }
}

/* Tiny phones (≤360px) */
@media (max-width: 360px) {
  body { font-size: 13px; }
  .hero h1 { font-size: 1.35rem; }
  .section-heading { font-size: 1.1rem; }
  .pramukh-feature-num { width: 38px; height: 38px; font-size: 16px; }
  .pay-tabs .nav-link span { display: none; }
}

/* ===== Navbar logo + 3-line brand name ===== */
/* Strict 5px top + 5px bottom — no extra vertical space anywhere */
.main-navbar .container { padding-top: 0; padding-bottom: 0; }
.navbar-brand.logo-with-name,
.navbar-brand.logo-only {
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 0;          /* kills inline-image baseline gap */
}
.navbar-brand.logo-with-name img,
.navbar-brand.logo-with-name picture img,
.navbar-brand.logo-only img,
.navbar-brand.logo-only picture img {
  display: block;          /* remove default inline whitespace */
  height: 56px !important;
  width: 56px !important;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  margin: 0;
  transition: transform .2s ease, box-shadow .2s ease;
}
.navbar-brand.logo-with-name:hover img,
.navbar-brand.logo-only:hover img { transform: scale(1.04); box-shadow: 0 6px 18px rgba(0,0,0,.10); }
.main-navbar.scrolled .navbar-brand img,
.main-navbar.scrolled .navbar-brand picture img { height: 52px !important; width: 52px !important; }

/* 3-line brand text — vertically centred, tight line gap */
.brand-text-3 {
  display: flex;
  flex-direction: column;
  justify-content: center;   /* tight stacking, no big gaps */
  gap: 2px;                  /* 50% smaller line gap */
  height: 56px;              /* matches logo */
  line-height: 1;
  font-family: 'Playfair Display', serif;
  color: var(--mf-blue-dk);
  letter-spacing: .01em;
}
.brand-line {
  display: block;
  white-space: nowrap;
  line-height: 1;
  margin: 0;
  padding: 0;
}
.brand-line-1 { font-size: 16px; font-weight: 800; color: var(--mf-blue-dk); }
.brand-line-2 { font-size: 14px; font-weight: 700; color: var(--mf-blue); }
.brand-line-3 { font-size: 13px; font-weight: 600; color: var(--mf-yellow-dk); letter-spacing: .03em; }

/* Match logo size when navbar is scrolled (52px) */
.main-navbar.scrolled .brand-text-3 { height: 52px; }
.main-navbar.scrolled .brand-line-1 { font-size: 15px; }
.main-navbar.scrolled .brand-line-2 { font-size: 13px; }
.main-navbar.scrolled .brand-line-3 { font-size: 12px; }

/* Tablet: shrink text slightly */
@media (max-width: 991.98px) {
  .brand-line-1 { font-size: 14px; }
  .brand-line-2 { font-size: 12px; }
  .brand-line-3 { font-size: 11px; }
}

/* Phone: hide brand text, show logo only — saves space next to hamburger */
@media (max-width: 575.98px) {
  .navbar-brand.logo-with-name img,
  .navbar-brand.logo-with-name picture img,
  .navbar-brand.logo-only img,
  .navbar-brand.logo-only picture img { height: 48px !important; width: 48px !important; }
  .brand-text-3 { display: none; }
}

/* Footer logo — bigger, centred on the brand column */
.footer-logo img,
.footer-logo picture img {
  height: 120px;
  width: 120px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 4px;
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
}

/* Admin login screen — logo only, centred */
.login-logo.logo-only-center { display: flex; justify-content: center; align-items: center; }
.login-logo.logo-only-center img { display: block; }

/* Admin sidebar brand — logo only */
.sidebar-brand.sidebar-brand-logo-only { display: flex; justify-content: center; padding: 18px 0; }
.sidebar-brand.sidebar-brand-logo-only img { border-radius: 50%; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.18); }

