/* =====================================================================
   Rudaghara Digital Village Portal — Custom Styles
   ===================================================================== */

:root {
  --brand-green: #C1622D;
  --brand-green-dark: #9B4A1F;
  --brand-gold: #D9A441;
  --brand-terracotta: #9B3D22;
  --ink: #4A3324;
  --muted: #7A6A5D;
  --bg-soft: #FBF3E7;
  --danger: #c0392b;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-soft: 0 4px 16px rgba(139,74,31,.08);
  --shadow-soft-hover: 0 10px 26px rgba(139,74,31,.14);
  --surface: #fff;
  --border-soft: #F0DCC8;
  --footer-bg: #4A3324;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Hind Siliguri', 'Poppins', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg-soft);
  padding-bottom: 62px; /* space for mobile quickbar */
  overflow-x: hidden;
  max-width: 100vw;
}

img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6, .brand-text strong {
  font-family: 'Hind Siliguri', 'Poppins', system-ui, sans-serif;
  font-weight: 700;
}

a { text-decoration: none; }

.skip-link {
  position: absolute; top: -40px; left: 0; background: var(--brand-green);
  color: #fff; padding: 8px 16px; z-index: 2000;
}
.skip-link:focus { top: 0; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  z-index: 1030;
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 28px rgba(139,74,31,.16); }

/* Thin utility strip above the main nav (desktop only, >=992px): search +
   dark mode + login/register, kept visually secondary (small, muted) so the
   main nav row below reads as the primary, uncluttered navigation. */
.topbar { background: var(--bg-soft); border-bottom: 1px solid var(--border-soft); }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: .3rem; padding-bottom: .3rem; }
.topbar-tagline { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .search-form { margin: 0 .75rem 0 0; }
.topbar .search-form .form-control { height: 34px; font-size: .85rem; }
.topbar .search-form .btn { padding: .25rem .65rem; }
.topbar .account-links .theme-toggle-btn { width: 32px; height: 32px; font-size: .85rem; }
.topbar .account-links .btn-sm { padding: .3rem .7rem; font-size: .8rem; }

/* Theme toggle + login/register inside the mobile hamburger drawer (the
   topbar above is hidden below lg, so these need a fallback home there). */
.mobile-nav-utility { border-top: 1px solid var(--border-soft); margin-top: .75rem; padding-top: .75rem; }

.navbar-brand { display: flex; align-items: center; gap: 10px; }
.site-logo-frame {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; flex: 0 0 auto;
  border-radius: 10px; overflow: hidden;
  background: var(--surface, #fff); border: 1px solid var(--border-soft, #e5e0d5);
}
.site-logo-frame img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.brand-icon { font-size: 1.8rem; color: var(--brand-green); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { color: var(--brand-green-dark); font-size: 1.15rem; }
.brand-text small { color: var(--muted); font-size: .7rem; letter-spacing: .04em; }

.navbar-nav .nav-link { color: var(--ink); font-weight: 500; padding: .6rem .9rem; position: relative; }
.navbar-nav .nav-link:hover, .navbar-nav .nav-link:focus { color: var(--brand-green); }
.navbar-nav .nav-link.active { color: var(--brand-green-dark); font-weight: 700; }
.navbar-nav .nav-link.active::after {
  content: ''; position: absolute; left: .9rem; right: .9rem; bottom: .3rem; height: 3px;
  border-radius: 3px; background: linear-gradient(90deg, var(--brand-gold), var(--brand-terracotta));
}
@media (max-width: 991px) { .navbar-nav .nav-link.active::after { display: none; } }
.navbar-nav .nav-link i.fa-solid { width: 1.1em; text-align: center; margin-right: .15rem; opacity: .85; }
.navbar-nav .dropdown-toggle::after { transition: transform .2s ease; vertical-align: .1em; }
.navbar-nav .dropdown-toggle.show::after { transform: rotate(-180deg); }

/* ---------- Nav dropdown panels: rounded, soft-shadow, tinted-icon items,
   with a light fade+drop-in open animation (desktop); icon alignment is
   shared with the mobile collapsed menu so icons line up there too. ---------- */
.navbar-nav .dropdown-item {
  display: flex; align-items: center; gap: .55rem; transition: background .15s ease, color .15s ease;
}
@media (min-width: 992px) {
  .navbar-nav .dropdown-menu {
    border: none; border-radius: 14px; padding: .5rem;
    box-shadow: 0 14px 34px rgba(139,74,31,.16);
    animation: navDropdownIn .16s ease;
  }
  @keyframes navDropdownIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .navbar-nav .dropdown-item { border-radius: 9px; padding: .5rem .7rem; }
  .navbar-nav .dropdown-item:hover, .navbar-nav .dropdown-item:focus {
    background: var(--bg-soft); color: var(--brand-green-dark);
  }
  .navbar-nav .dropdown-item.active { background: var(--bg-soft); color: var(--brand-green-dark); font-weight: 600; }
}
.navbar-nav .dropdown-item-icon {
  flex: none; width: 1.7em; height: 1.7em; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(193,98,45,.12); color: var(--brand-green); font-size: .8em;
}

.search-form { margin: 0 1rem; }
.search-form .form-control { border-radius: 20px 0 0 20px; border-right: none; }
.search-form .btn { border: 1px solid #ced4da; border-left: none; border-radius: 0; background: var(--surface); }
.search-form .btn:last-child { border-radius: 0 20px 20px 0; }
.search-form .form-control:focus { box-shadow: 0 0 0 3px rgba(193,98,45,.15); border-color: var(--brand-green); z-index: 3; }
.voice-search-btn.is-listening i { color: #dc3545; animation: voiceListenPulse 1s ease-in-out infinite; }
@keyframes voiceListenPulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

.btn-primary {
  background: linear-gradient(135deg, var(--brand-green), var(--brand-terracotta));
  border-color: var(--brand-green);
  box-shadow: 0 4px 14px rgba(193,98,45,.25);
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, var(--brand-green-dark), var(--brand-terracotta));
  border-color: var(--brand-green-dark);
  box-shadow: 0 8px 22px rgba(193,98,45,.32);
  transform: translateY(-2px);
}
.btn-outline-primary { color: var(--brand-green); border-color: var(--brand-green); }
.btn-outline-primary:hover { background-color: var(--brand-green); border-color: var(--brand-green); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(193,98,45,.2); }

/* ---------- Hero (warm & organic) ---------- */
.hero {
  background:
    radial-gradient(1100px 550px at 12% -15%, rgba(217,164,65,.4), transparent 60%),
    radial-gradient(900px 520px at 105% 115%, rgba(139,66,27,.45), transparent 55%),
    linear-gradient(135deg, #8B421B, #C1622D 55%, #D9A441);
  color: #fff;
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  position: relative;
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.9rem); margin-bottom: 1rem; font-weight: 800; letter-spacing: -.01em; }
.hero p.lead { font-size: 1.1rem; opacity: .95; max-width: 720px; margin: 0 auto 2rem; }
.hero .btn { margin: .25rem; border-radius: 30px; padding: .7rem 1.5rem; font-weight: 600; transition: transform .2s ease, box-shadow .2s ease; }
.hero .btn:hover { transform: translateY(-3px); }
.hero .btn-light { background: #FBF3E7; color: #9B4A1F; box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.hero .btn-light:hover { box-shadow: 0 12px 26px rgba(0,0,0,.25); }
.hero .btn-outline-light { border-color: rgba(255,255,255,.7); }
.hero .btn-outline-light:hover { background: rgba(255,255,255,.14); border-color: #fff; }

/* ---------- Section wrapper ---------- */
.section { padding: 3.2rem 0; }
.section-title { font-size: 1.6rem; margin-bottom: .3rem; color: var(--brand-green-dark); font-weight: 800; }
.section-title::before {
  content: ''; display: block; width: 44px; height: 4px; margin-bottom: .55rem; border-radius: 4px;
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-terracotta));
}
.section-subtitle { color: var(--muted); margin-bottom: 2rem; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1.5rem; flex-wrap: wrap; gap: .5rem; }
.section-head .view-all { color: var(--brand-green); font-weight: 600; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease;
  height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft-hover); }

/* গ্রামসমূহ (village) কার্ড — সাধারণ কার্ডের চেয়ে একটু আলাদা দেখাতে বাঁ পাশে
   একটা রঙিন accent বর্ডার, যাতে পাতার হালকা creamy background-এর সাথে
   মিশে না যায় এবং অন্য তালিকা থেকে আলাদাভাবে চেনা যায়। */
.village-card { border-left: 4px solid var(--brand-gold); }

/* "ব্লগ পোস্ট" স্টাইলের কন্টেন্ট বক্স — নোটিশ/ইভেন্ট/সংবাদ/বিস্তারিত বিবরণের
   টেক্সট যাতে পাতার background-এর সাথে মিশে না গিয়ে একটা স্পষ্ট বক্সের
   ভেতরে দেখা যায়। */
.rich-content-display, .news-content {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow-soft);
}

.service-card { text-align: center; padding: 1.8rem 1rem; }

/* Standalone circular avatar/icon placeholder — used wherever a photo is
   optional (blood donors, doctors, professionals, businesses, education,
   featured people). Sized via inline width/height or the size modifiers
   below; defaults to the service-card size when none is given. */
.icon-wrap {
  width: 62px; height: 62px;
  border-radius: 58% 42% 55% 45% / 48% 55% 45% 52%;
  background: rgba(193,98,45,.12); color: var(--brand-green);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin: 0 auto 1rem; flex-shrink: 0;
  transition: transform .2s ease, border-radius .2s ease, background-color .2s ease;
}
.icon-wrap:hover { transform: scale(1.06); border-radius: 45% 55% 42% 58% / 55% 48% 52% 45%; }
.icon-wrap.icon-wrap-sm { width: 60px; height: 60px; font-size: 1.3rem; margin-bottom: 0; }
.icon-wrap.icon-wrap-lg { width: 72px; height: 72px; font-size: 1.9rem; }

/* Color variants for quick-service icons on the homepage — warm & organic palette */
.icon-wrap.icon-wrap-red    { background: rgba(181,69,31,.14);  color: #B5451F; }
.icon-wrap.icon-wrap-blue   { background: rgba(139,94,52,.14);  color: #8B5E34; }
.icon-wrap.icon-wrap-purple { background: rgba(139,90,107,.14); color: #8B5A6B; }
.icon-wrap.icon-wrap-orange { background: rgba(217,164,65,.18); color: #B8780F; }
.icon-wrap.icon-wrap-teal   { background: rgba(107,138,90,.16); color: #5C7A4C; }
.icon-wrap.icon-wrap-danger { background: rgba(155,61,34,.16);  color: #9B3D22; }
.service-card:hover .icon-wrap.icon-wrap-red    { background: rgba(181,69,31,.24); }
.service-card:hover .icon-wrap.icon-wrap-blue   { background: rgba(139,94,52,.24); }
.service-card:hover .icon-wrap.icon-wrap-purple { background: rgba(139,90,107,.24); }
.service-card:hover .icon-wrap.icon-wrap-orange { background: rgba(217,164,65,.28); }
.service-card:hover .icon-wrap.icon-wrap-teal   { background: rgba(107,138,90,.26); }
.service-card:hover .icon-wrap.icon-wrap-danger { background: rgba(155,61,34,.26); }

/* Organic blob shape for homepage quick-service icons (softer than a plain circle) */
.service-card .icon-wrap {
  border-radius: 62% 38% 55% 45% / 48% 42% 58% 52%;
  transition: transform .25s ease, border-radius .25s ease, background-color .2s ease;
}
.service-card:hover .icon-wrap { border-radius: 42% 58% 38% 62% / 58% 45% 55% 42%; transform: scale(1.08) rotate(3deg); }
.service-card { border-radius: 22px; }

/* ---------- Hero decorations (static/no-carousel hero) — organic blobs ---------- */
.hero-pattern { position: relative; overflow: hidden; padding-bottom: 5.5rem; }
.hero-dots {
  position: absolute; inset: 0; opacity: .18; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.9) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35);
  border-radius: 30px; padding: .4rem 1rem; font-size: .8rem; font-weight: 600;
  margin-bottom: 1.2rem; backdrop-filter: blur(3px);
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
}
.hero-glow-text { text-shadow: 0 4px 24px rgba(0,0,0,.18); }
.hero-highlight { position: relative; white-space: nowrap; }
.hero-highlight::after {
  content: ''; position: absolute; left: 2px; right: 2px; bottom: -.06em; height: .16em;
  background: linear-gradient(90deg, var(--brand-gold), rgba(255,255,255,.9));
  border-radius: 4px; opacity: .65;
}
.hero-shape { position: absolute; opacity: .18; background: #FBF3E7; pointer-events: none; }
.hero-shape-1 { width: 340px; height: 320px; top: -130px; right: -90px; border-radius: 42% 58% 65% 35% / 55% 45% 55% 45%; }
.hero-shape-2 { width: 240px; height: 220px; bottom: -110px; left: -70px; border-radius: 58% 42% 35% 65% / 45% 55% 45% 55%; }
.hero-shape-3 { width: 130px; height: 130px; top: 20%; left: 6%; opacity: .12; border-radius: 38% 62% 55% 45% / 60% 40% 60% 40%; }
.hero-shape-4 { width: 90px; height: 90px; top: 14%; right: 20%; opacity: .16; background: var(--brand-gold); border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) {
  .hero-shape-1, .hero-shape-2, .hero-shape-4 { animation: heroFloat 10s ease-in-out infinite; }
  .hero-shape-2 { animation-delay: -3.5s; animation-duration: 12s; }
  .hero-shape-4 { animation-delay: -6s; animation-duration: 8s; }
  @keyframes heroFloat { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(6px, -14px); } }
}
.hero-wave { position: absolute; left: 0; bottom: 0; width: 100%; height: 70px; display: block; }
.hero-btn-group {
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: .5rem;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  border-radius: 40px; padding: .5rem; margin-top: .5rem;
}
.hero-btn-group .btn { margin: 0; }

/* ---------- Contribute & Earn homepage banner (two-column, reward chips) ---------- */
/* ---------- Homepage location selector ---------- */
.location-selector-section { padding-top: 3.2rem; padding-bottom: 3.2rem; }
.location-selector-card {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-start; gap: 1.3rem; flex-wrap: wrap;
  background: linear-gradient(155deg, var(--surface) 60%, rgba(193,98,45,.05));
  border: 1px solid var(--border-soft); border-radius: 24px;
  padding: 1.7rem 1.9rem; margin: 0;
  box-shadow: 0 10px 28px rgba(139,74,31,.1);
  transition: box-shadow .2s ease, transform .2s ease;
}
.location-selector-card:hover { box-shadow: 0 14px 34px rgba(139,74,31,.14); transform: translateY(-2px); }
.location-selector-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-green), var(--brand-terracotta));
}
.location-selector-glow {
  position: absolute; top: -60px; right: -60px; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(217,164,65,.16), rgba(217,164,65,0) 70%);
  pointer-events: none;
}
.location-selector-icon {
  width: 58px; height: 58px; border-radius: 50% 45% 55% 50% / 50% 55% 45% 50%;
  background: linear-gradient(135deg, rgba(193,98,45,.16), rgba(217,164,65,.16)); color: #C1622D;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(193,98,45,.15);
}
.location-selector-body { flex: 1; min-width: 240px; }
.location-selector-eyebrow {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  color: var(--brand-green); text-transform: uppercase; margin-bottom: .25rem;
}
.location-selector-body h2 { font-size: 1.1rem; font-weight: 800; margin-bottom: .2rem; color: #9B4A1F; }
.location-selector-body p { font-size: .85rem; color: var(--muted); margin-bottom: .9rem; }
.location-selector-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.location-selector-row .form-select {
  flex: 1; min-width: 150px; border-color: var(--border-soft);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.location-selector-row .form-select:focus { border-color: var(--brand-green); box-shadow: 0 0 0 3px rgba(193,98,45,.12); }
.location-selector-btn {
  background: linear-gradient(135deg, var(--brand-green), var(--brand-terracotta)); color: #fff; border: none; border-radius: 10px;
  padding: .5rem 1.2rem; font-weight: 600; white-space: nowrap;
  transition: background-color .15s ease, transform .15s ease;
}
.location-selector-btn i { transition: transform .15s ease; }
.location-selector-btn:hover:not(:disabled) { background: linear-gradient(135deg, var(--brand-green-dark), var(--brand-terracotta)); color: #fff; }
.location-selector-btn:hover:not(:disabled) i { transform: translateX(3px); }
.location-selector-btn:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 575.98px) {
  .location-selector-card { padding: 1.4rem 1.3rem; gap: 1rem; }
  .location-selector-glow { display: none; }
}

/* ---------- Community feed: card polish + upvote/downvote pair ---------- */
.complaint-card { transition: box-shadow .15s ease, transform .15s ease; }
.complaint-card:hover { box-shadow: 0 10px 24px rgba(139,74,31,.1); transform: translateY(-2px); }
.vote-group {
  display: inline-flex; align-items: stretch; border: 1px solid var(--border-soft); border-radius: 20px;
  overflow: hidden; background: var(--bg-soft);
}
.vote-btn {
  background: transparent; border: none; color: var(--muted); font-weight: 600; font-size: .8rem;
  padding: .3rem .7rem; transition: background-color .15s ease, color .15s ease, transform .1s ease;
}
.vote-btn:first-child { border-right: 1px solid var(--border-soft); }
.vote-btn:hover:not(:disabled) { background: rgba(193,98,45,.1); }
.vote-btn:active:not(:disabled) { transform: scale(.94); }
.vote-btn:disabled { cursor: default; }
.vote-btn i { margin-right: .2rem; }
.vote-btn.vote-up.is-active { background: var(--brand-green); color: #fff; }
.vote-btn.vote-down.is-active { background: var(--brand-terracotta); color: #fff; }

/* ---------- Community feed page (Facebook-style stream) ---------- */
.feed-stream { display: flex; flex-direction: column; gap: 1rem; }
.feed-card {
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: 18px;
  padding: 1.1rem 1.3rem; box-shadow: 0 3px 12px rgba(139,74,31,.06);
  transition: box-shadow .15s ease;
}
.feed-card:hover { box-shadow: 0 8px 22px rgba(139,74,31,.1); }
.feed-card-head { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; }
.feed-type-badge {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700;
  padding: .25rem .6rem; border-radius: 20px; background: var(--bg-soft); color: var(--muted);
}
.feed-type-danger { background: rgba(220,53,69,.1); color: #b02a37; }
.feed-type-success { background: rgba(25,135,84,.1); color: #157347; }
.feed-type-primary { background: rgba(13,110,253,.1); color: #0a58ca; }
.feed-type-warning { background: rgba(255,193,7,.15); color: #997404; }
.feed-card-title { margin-bottom: .3rem; }
.feed-card-excerpt { font-size: .88rem; color: var(--muted); margin-bottom: .6rem; }
.feed-card-image { width: 100%; max-height: 280px; object-fit: cover; border-radius: 12px; margin-bottom: .7rem; display: block; }
.feed-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.feed-filter-chips .btn i { margin-right: .25rem; }

/* Compact feed-card variant used to embed a filtered slice of the feed on
   another page (e.g. the service-request stream on citizen-services.php). */
.feed-card-compact { padding: .9rem 1.1rem; }
.feed-card-compact .feed-card-excerpt { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }

.contribute-banner {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, #9B4A1F, #C1622D 55%, #D9A441 130%);
  color: #FBF3E7; border-radius: 28px; padding: 2.2rem;
  margin: 1rem 0 2rem; box-shadow: 0 10px 28px rgba(155,74,31,.3);
}
.contribute-banner-coins {
  position: absolute; top: -10px; right: 20px; display: flex; gap: 1.5rem;
  font-size: 2.6rem; color: rgba(255,255,255,.12); pointer-events: none; transform: rotate(-8deg);
}
.contribute-banner-coins i:nth-child(2) { font-size: 3.6rem; margin-top: 1.2rem; }
.contribute-banner-coins i:nth-child(3) { font-size: 2rem; margin-top: -.5rem; }
.contribute-banner-main {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.contribute-banner-left { flex: 1; min-width: 240px; }
.contribute-banner-tag {
  display: inline-block; background: rgba(255,255,255,.22); border-radius: 30px;
  padding: .25rem .8rem; font-size: .72rem; font-weight: 700; letter-spacing: .03em;
  margin-bottom: .7rem;
}
.contribute-banner-left h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: .5rem; }
.contribute-banner-left p { margin-bottom: 1.1rem; opacity: .92; max-width: 420px; }
.contribute-banner-btn {
  background: #FBF3E7; color: #9B4A1F; border-radius: 30px; font-weight: 700;
  padding: .6rem 1.4rem; border: none; transition: transform .15s ease, box-shadow .15s ease;
}
.contribute-banner-btn:hover { background: #fff; color: #7A2F1A; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.contribute-banner-right { display: flex; flex-direction: column; gap: .6rem; flex-shrink: 0; }
.reward-chip {
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28);
  border-radius: 14px; padding: .5rem 1.1rem; display: flex; align-items: center; gap: .7rem;
  min-width: 200px;
}
.reward-chip-amount { font-size: 1.15rem; font-weight: 800; color: #FBE7B6; }
.reward-chip-label { font-size: .85rem; opacity: .95; }
@media (max-width: 767px) {
  .contribute-banner-main { flex-direction: column; align-items: stretch; }
  .contribute-banner-right { flex-direction: row; flex-wrap: wrap; }
  .reward-chip { min-width: 0; flex: 1; }
}

/* ---------- Stat icons ---------- */
.stat-icon { display: block; font-size: 1.3rem; opacity: .8; margin-bottom: .4rem; }

.service-card h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.service-card p { color: var(--muted); font-size: .9rem; margin-bottom: 0; }

/* ---------- Stats ---------- */
.stats-section { background: linear-gradient(120deg, #6B3416, #9B4A1F); color: #fff; padding: 2.6rem 0; }
.stat-item { text-align: center; padding: .6rem; }
.stat-item .num { font-size: 2.2rem; font-weight: 800; color: #F3C877; }
.stat-item .label { font-size: .85rem; opacity: .9; }

/* ---------- Notices ---------- */
.notice-item {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: 1rem 1.1rem; border-radius: 16px; background: var(--surface);
  border-left: 5px solid var(--brand-green); margin-bottom: .7rem;
  box-shadow: 0 2px 10px rgba(139,74,31,.05);
  transition: transform .15s ease, box-shadow .15s ease;
}
.notice-item:hover { transform: translateX(3px); box-shadow: 0 4px 14px rgba(139,74,31,.1); }
.notice-item.priority-emergency { border-left-color: var(--danger); background: #FBECE6; }
.notice-item.priority-important { border-left-color: var(--brand-gold); }
.notice-item .badge-date { font-size: .75rem; color: var(--muted); white-space: nowrap; }

/* ---------- Emergency ---------- */
.emergency-section { background: #F6E3D8; padding: 3rem 0; }
.emergency-card {
  background: var(--surface); border-radius: 20px 8px 20px 8px; padding: 1.2rem;
  text-align: center; border: 1px solid var(--border-soft);
  transition: transform .2s ease, border-radius .2s ease, box-shadow .2s ease;
}
.emergency-card:hover { transform: translateY(-3px); border-radius: 8px 20px 8px 20px; box-shadow: 0 8px 20px rgba(139,74,31,.12); }
.emergency-card .call-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  background: #9B3D22; color: #fff; border-radius: 30px;
  padding: .5rem 1.2rem; font-weight: 700; margin-top: .6rem;
  transition: background-color .15s ease, transform .15s ease;
}
.emergency-card .call-btn:hover { background: #7A2F1A; color: #fff; transform: translateY(-1px); }

/* ---------- Directory listing cards (doctors, businesses, professionals,
   blood donors, healthcare, etc.) — shared polish so every directory feels
   like one consistent, professional product instead of ad-hoc pages. ---------- */
.dir-card { position: relative; display: flex; flex-direction: column; overflow: hidden; }
.dir-card__head { display: flex; align-items: flex-start; gap: .85rem; margin-bottom: .6rem; }
.dir-card__head .icon-wrap,
.dir-card__head > img { margin: 0; flex-shrink: 0; }
.dir-card__body { flex: 1 1 auto; min-width: 0; }
.dir-card__title {
  font-size: 1rem; font-weight: 700; line-height: 1.35; margin: 0 0 .15rem;
  display: flex; align-items: center; flex-wrap: wrap; gap: .3rem;
}
.dir-card__title .fa-circle-check { font-size: .82em; color: #2E7D32; }
.dir-card__category { color: var(--muted); font-size: .82rem; }
.dir-card__meta {
  display: flex; align-items: flex-start; gap: .4rem; color: var(--muted);
  font-size: .82rem; margin-bottom: .3rem; line-height: 1.4;
}
.dir-card__meta i { margin-top: .2rem; flex-shrink: 0; color: var(--brand-green); opacity: .8; }
.dir-card__desc { font-size: .84rem; color: var(--muted); margin: .3rem 0 .5rem; }
.dir-card__actions { display: flex; gap: .5rem; margin-top: auto; padding-top: .65rem; }
.dir-card__actions > * { flex: 1 1 0; }

/* Featured badge: a clean corner ribbon instead of a badge crammed into
   the title text, so long names never collide with it. */
.dir-card__featured {
  position: absolute; top: .7rem; right: -.35rem; z-index: 1;
  display: inline-flex; align-items: center; gap: .3rem;
  background: linear-gradient(120deg, var(--brand-gold), #C98A1F); color: #fff;
  font-size: .68rem; font-weight: 700; letter-spacing: .02em;
  padding: .28rem .7rem .28rem .6rem; border-radius: 30px 0 0 30px;
  box-shadow: 0 3px 8px rgba(184,120,15,.35);
}

/* Real button styling for the "call" link — previously only styled inside
   .emergency-card, so every directory card's call link rendered as a bare
   underlined link. This gives it a proper pill-button look everywhere. */
.call-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: rgba(37,99,235,.08); color: #2159c9; border: 1px solid rgba(37,99,235,.25);
  border-radius: 30px; padding: .45rem 1rem; font-weight: 700; font-size: .85rem;
  text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.call-btn:hover { background: #2159c9; color: #fff; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(33,89,201,.25); }

/* ---------- Gallery preview ---------- */
.gallery-thumb { border-radius: 16px; overflow: hidden; aspect-ratio: 1/1; display: block; box-shadow: 0 3px 10px rgba(139,74,31,.08); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-thumb:hover img { transform: scale(1.08); }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: #cfd8d3; padding: 3rem 0 1.5rem; margin-top: 2rem; border-top: 4px solid; border-image: linear-gradient(90deg, var(--brand-terracotta), var(--brand-gold)) 1; }
.site-footer h5, .site-footer h6 { color: #fff; }
.site-footer .footer-about { font-size: .9rem; opacity: .85; }
.footer-links { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: #cfd8d3; }
.footer-links a:hover { color: var(--brand-gold); }
.footer-social a { color: #fff; font-size: 1.3rem; margin-right: .8rem; }
.footer-bottom { font-size: .82rem; opacity: .8; }
.footer-legal a { color: #cfd8d3; margin-left: 1rem; }

/* ---------- Mobile quick-action bar ---------- */
.mobile-quickbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1040;
  background: var(--surface); border-top: 1px solid var(--border-soft);
  display: flex; justify-content: space-around;
  box-shadow: 0 -2px 10px rgba(0,0,0,.08);
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-quickbar a {
  flex: 1; text-align: center; padding: .55rem 0; color: var(--muted); font-size: .68rem;
  transition: color .15s ease, transform .1s ease;
}
.mobile-quickbar a i { display: block; font-size: 1.15rem; margin-bottom: 2px; }
.mobile-quickbar a.quickbar-emergency { color: var(--danger); font-weight: 700; }
.mobile-quickbar a:active { transform: scale(.94); }

/* ---------- Lightbox ---------- */
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center;
  z-index: 3000; padding: 2rem; cursor: zoom-out;
  animation: lightbox-fade .15s ease;
}
.lightbox-overlay img {
  max-width: 100%; max-height: 100%; border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5); cursor: default;
}
.lightbox-overlay .lightbox-close {
  position: absolute; top: 16px; right: 20px; color: #fff; font-size: 1.8rem;
  background: none; border: none; line-height: 1; opacity: .85;
}
.lightbox-overlay .lightbox-close:hover { opacity: 1; }
@keyframes lightbox-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Reviews (business_reviews) ---------- */
.star-display { color: #f2a63f; letter-spacing: .1em; }
.star-display-sm { font-size: .8rem; }
.review-list { display: flex; flex-direction: column; gap: .9rem; max-height: 360px; overflow-y: auto; }
.review-item { border-bottom: 1px solid var(--border-soft, #eee); padding-bottom: .8rem; }
.review-item:last-child { border-bottom: none; padding-bottom: 0; }

/* CSS-only star picker: radios are written 5..1 in the DOM and displayed
   reversed so the leftmost star is "1" -- ~ then highlights a star and
   everything visually before it (i.e. its own label plus the lower-value
   radios that follow it in the DOM). No JS required. */
.star-rating { display: inline-flex; flex-direction: row-reverse; gap: .2rem; }
.star-rating input { position: absolute; opacity: 0; width: 0; height: 0; }
.star-rating label {
  cursor: pointer; font-size: 1.6rem; color: var(--border-soft, #ddd);
  transition: color .1s ease; margin: 0;
}
.star-rating input:checked ~ label,
.star-rating input:hover ~ label,
.star-rating label:hover ~ label {
  color: #f2a63f;
}
.star-rating input:focus-visible ~ label { outline: 2px solid var(--brand-green); outline-offset: 2px; border-radius: 3px; }

/* ---------- Rich text editor content areas ---------- */
.rich-editor { background: var(--surface); border-radius: 0 0 8px 8px; }
.ql-toolbar.ql-snow { border-radius: 8px 8px 0 0; }
.news-content, .rich-content-display { line-height: 1.8; }
.news-content p, .rich-content-display p { margin-bottom: 1rem; }
.news-content > *:last-child, .rich-content-display > *:last-child { margin-bottom: 0; }

/* ---------- Hero carousel ---------- */
.hero-carousel .carousel-item { height: 420px; }
.hero-carousel .carousel-item img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.55); }
.hero-carousel .carousel-caption { bottom: 50%; transform: translateY(50%); }
.hero-carousel .carousel-caption h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); }
.hero-carousel .carousel-indicators [data-bs-target] { background-color: #fff; }

/* ---------- Locate-me button ---------- */
.locate-btn { white-space: nowrap; }

/* ---------- Image placeholder (when no photo uploaded yet) ---------- */
.img-placeholder {
  background: linear-gradient(135deg, #F3E4CE, #EAD5B8);
  display: flex; align-items: center; justify-content: center;
  color: #B8865E; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.img-placeholder i { font-size: 1.8rem; opacity: .6; }

/* ---------- Scroll-reveal animation ---------- */
.reveal-on-scroll { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll { opacity: 1; transform: none; transition: none; }
}

/* ---------- General hover polish ---------- */
.btn { transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
.btn:active { transform: translateY(1px); }
.service-card .icon-wrap { transition: transform .2s ease, background-color .2s ease; }
.service-card:hover .icon-wrap { transform: scale(1.08); background: rgba(193,98,45,.22); }
.form-card { background: var(--surface); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-soft); }

/* ---------- Breadcrumbs ---------- */
.breadcrumb-bar { background: linear-gradient(120deg, #FBF3E7, #F6E3D8); padding: .9rem 0; border-bottom: 1px solid #F0DCC8; }
.breadcrumb-bar .breadcrumb { margin-bottom: 0; font-size: .85rem; }
.breadcrumb-bar .breadcrumb-item.active { color: var(--brand-green-dark); font-weight: 600; }
.breadcrumb-bar .breadcrumb-item a { color: var(--muted); }
.breadcrumb-bar .breadcrumb-item a:hover { color: var(--brand-green); }

/* Mega dropdown: used for nav items with many children (e.g. ডিরেক্টরি) so a
   long flat list becomes a tidy multi-column panel instead of a narrow,
   awkwardly tall single-column dropdown. Desktop only -- on mobile the nav
   collapses and dropdowns already go position:static (single column), which
   is the right behavior there. */
@media (min-width: 992px) {
  .navbar-nav .dropdown-menu.mega-dropdown {
    column-count: 3;
    column-gap: .25rem;
    width: 640px;
    max-width: 80vw;
    padding: .6rem;
  }
  .navbar-nav .dropdown-menu.mega-dropdown .dropdown-item {
    break-inside: avoid;
    border-radius: 8px;
    white-space: normal;
  }
  .navbar-nav .dropdown-menu.mega-dropdown .dropdown-item:hover,
  .navbar-nav .dropdown-menu.mega-dropdown .dropdown-item:focus {
    background: var(--bg-soft);
  }
}

@media (max-width: 991px) {
  .search-form { margin: .8rem 0; }
  .account-links { margin-top: .5rem; }
  .navbar-collapse { max-height: 80vh; overflow-y: auto; padding-top: .5rem; }
  .navbar-nav .nav-link { border-bottom: 1px solid #f0f2f0; padding: .75rem .5rem; }
  .navbar-nav .dropdown-menu {
    position: static !important; float: none; border: none; box-shadow: none;
    background: #f8faf8; margin: 0 0 0 1rem; transform: none !important;
  }
  .navbar-nav .dropdown-item { padding: .55rem 1rem; }
}

@media (max-width: 575px) {
  .container { padding-left: 1.1rem; padding-right: 1.1rem; }
  /* .section itself already has left/right:0 via its base "padding: 3.2rem 0"
     shorthand, so it never needed listing here — and listing it was actively
     harmful: every page pairs .section with .container as one element
     (class="section container"), and this rule, coming after .container's
     padding rule above with equal specificity, was winning the cascade and
     zeroing out .container's mobile gutter — pushing all page content flush
     to the screen edge on phones. Fixed by dropping .section from this list. */
  .hero, .stats-section, .emergency-section { padding-left: 0; padding-right: 0; }
  .hero h1 { font-size: 1.5rem; }
  .hero .btn { display: block; width: 100%; margin: .3rem 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .card { margin-bottom: .25rem; }
}

/* =====================================================================
   Global polish additions
   ===================================================================== */
.view-all { color: #B8780F; font-weight: 600; }
.view-all:hover { color: var(--brand-green-dark); }

.badge.text-bg-light { background-color: #F3E4CE !important; color: #6B3416 !important; }

::selection { background: rgba(193,98,45,.25); color: var(--ink); }

a:focus-visible, button:focus-visible, .btn:focus-visible,
.form-control:focus-visible, .form-select:focus-visible {
  outline: 3px solid rgba(193,98,45,.35); outline-offset: 2px;
}

/* ---------- Empty / "no results" states (shared convention across listing pages) ---------- */
p.text-muted.text-center.py-5 {
  background: var(--surface) !important; border-radius: var(--radius-lg); border: 1px dashed var(--border-soft);
  padding: 2.6rem 1.5rem !important; color: var(--muted) !important;
}
p.text-muted.text-center.py-5::before {
  content: '\f002';
  font-family: 'Font Awesome 6 Free'; font-weight: 900;
  display: block; font-size: 2rem; color: #E0C4A6; margin-bottom: .7rem;
}

/* =====================================================================
   Dark mode — toggled via html[data-bs-theme="dark"]. Bootstrap 5.3's
   built-in color-mode attribute automatically re-themes every stock
   Bootstrap component (.card, .dropdown-menu, .modal, .form-control,
   .table, .alert, .badge, .navbar, etc.), so this block only needs to
   cover this site's own custom classes and hardcoded colors.
   ===================================================================== */
html[data-bs-theme="dark"] {
  --ink: #EDE6DD;
  --muted: #B3A594;
  --bg-soft: #171310;
  --surface: #241D17;
  --border-soft: #3A2F24;
  --shadow-soft: 0 4px 16px rgba(0,0,0,.35);
  --shadow-soft-hover: 0 10px 30px rgba(0,0,0,.5);
  color-scheme: dark;
}
html[data-bs-theme="dark"] body { background: var(--bg-soft); }
html[data-bs-theme="dark"] .site-header.is-scrolled { box-shadow: 0 10px 28px rgba(0,0,0,.45); }
html[data-bs-theme="dark"] .breadcrumb-bar { background: linear-gradient(120deg, #201911, #241a10); border-bottom-color: var(--border-soft); }
html[data-bs-theme="dark"] .emergency-section { background: #241a10; }
html[data-bs-theme="dark"] .notice-item.priority-emergency { background: rgba(155,61,34,.2); }
html[data-bs-theme="dark"] .navbar-nav .nav-link { border-bottom-color: var(--border-soft); }
html[data-bs-theme="dark"] .navbar-nav .dropdown-menu { background: var(--surface); }
html[data-bs-theme="dark"] .img-placeholder { background: linear-gradient(135deg, #2b2015, #201911); color: #C99A6E; }
html[data-bs-theme="dark"] .badge.text-bg-light { background-color: #3A2F24 !important; color: #E9D9BE !important; }
html[data-bs-theme="dark"] ::selection { background: rgba(217,164,65,.3); color: #fff; }
html[data-bs-theme="dark"] .lightbox-overlay { background: rgba(0,0,0,.94); }
html[data-bs-theme="dark"] .icon-wrap { filter: saturate(1.15) brightness(1.08); }

/* Theme toggle button (in the header account-links area) */
.theme-toggle-btn {
  background: none; border: 1px solid var(--border-soft); border-radius: 50%;
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 1rem; margin-right: .6rem; flex-shrink: 0;
  transition: color .15s ease, border-color .15s ease, transform .15s ease;
}
.theme-toggle-btn:hover { color: var(--brand-green); border-color: var(--brand-green); transform: rotate(15deg); }
.theme-toggle-btn .fa-sun { display: none; }
html[data-bs-theme="dark"] .theme-toggle-btn .fa-sun { display: inline; }
html[data-bs-theme="dark"] .theme-toggle-btn .fa-moon { display: none; }

/* ===== দুর্যোগ সতর্কতা ব্যানার (Disaster Alert Banner) ===== */
.disaster-alert-banner {
  padding: 0.6rem 0;
  font-size: 0.92rem;
  color: #fff;
}
.disaster-alert-banner .container { flex-wrap: wrap; }
.disaster-alert-banner .btn-close { filter: invert(1) grayscale(100%) brightness(200%); opacity: .85; }
.disaster-alert-banner .btn-close:hover { opacity: 1; }
.disaster-alert-critical { background: #b02a1f; }
.disaster-alert-warning { background: #b5720f; }
.disaster-alert-info { background: #2f6f8f; }

/* ===== জরুরি সেবা: নিকটবর্তী (GPS Nearby) ===== */
.emergency-card { position: relative; }
.emergency-card .distance-badge {
  display: inline-block;
  font-size: 0.75rem;
  background: var(--bg-soft);
  color: var(--brand-terracotta);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  margin-bottom: 0.35rem;
}
.emergency-card.is-nearest { border: 2px solid var(--brand-gold); }
#nearbyLocateBtn.is-active { background: var(--brand-green); color: #fff; border-color: var(--brand-green); }
