/* =========================================================
   THEME SYSTEM — 3 selectable themes via body[data-theme]
   ========================================================= */
:root {
  --radius: 10px;
  --shadow: 0 2px 10px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Noto Sans', sans-serif;
  --header-h: 116px;
}

body, body[data-theme="classic-blue"] {
  --c-primary: #0b3d91;
  --c-primary-dark: #082a66;
  --c-accent: #ff9933;
  --c-success: #138808;
  --c-bg: #f7f9fc;
  --c-surface: #ffffff;
  --c-text: #1c2530;
  --c-text-muted: #5b6b7d;
  --c-border: #e3e8ef;
}
body[data-theme="green-earth"] {
  --c-primary: #1e5631;
  --c-primary-dark: #123a20;
  --c-accent: #d4af37;
  --c-success: #2e7d32;
  --c-bg: #f6f8f3;
  --c-surface: #ffffff;
  --c-text: #202a1f;
  --c-text-muted: #5c6b58;
  --c-border: #e1e8dc;
}
body[data-theme="saffron-royal"] {
  --c-primary: #8b1e2e;
  --c-primary-dark: #641420;
  --c-accent: #ff9933;
  --c-success: #138808;
  --c-bg: #fbf6f2;
  --c-surface: #ffffff;
  --c-text: #2a1c1c;
  --c-text-muted: #7a6058;
  --c-border: #efe0d8;
}
body.dark-mode {
  --c-bg: #10151c;
  --c-surface: #1a212b;
  --c-text: #e7ecf3;
  --c-text-muted: #a3afc0;
  --c-border: #2a3441;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); background: var(--c-bg); color: var(--c-text); transition: background 0.25s ease, color 0.25s ease; }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); margin: 0 0 0.5em; color: var(--c-text); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.hide-sm { display: inline; }
button { font-family: inherit; cursor: pointer; }

/* =========================================================
   UTILITY BAR + TRICOLOR STRIP
   ========================================================= */
.utility-bar { background: var(--c-primary-dark); color: #fff; font-size: 13px; }
.utility-inner { display: flex; justify-content: space-between; align-items: center; padding: 6px 20px; }
.utility-left { display: flex; gap: 18px; }
.utility-left span { display: inline-flex; align-items: center; gap: 5px; }
.utility-left i { width: 14px; height: 14px; }
.tricolor-strip { height: 4px; background: linear-gradient(90deg, #ff9933 33%, #ffffff 33% 66%, #138808 66%); }

/* =========================================================
   HEADER / NAV — spans full width at any zoom level
   ========================================================= */
.main-header { background: var(--c-surface); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 40; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 8px 32px; gap: 14px; flex-wrap: nowrap; width: 100%; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo { width: 100px; height: 100px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-heading); font-size: 19px; color: var(--c-primary); white-space: nowrap; }
.brand-text small { color: var(--c-text-muted); font-size: 12px; white-space: nowrap; }

.main-nav {
  display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center; flex-wrap: wrap;
}
/* BUG FIX: this container previously had `overflow-x: auto` (for horizontal
   scrolling on narrow desktop widths). Per the CSS overflow spec, when
   overflow-x is anything other than visible, overflow-y is implicitly forced
   to auto too — even though it was never set to a non-visible value here.
   That silently clipped the absolutely-positioned .dropdown-menu (which
   hangs below the nav bar via `top: 100%`), so the Panchayat/Transparency
   dropdowns rendered in the DOM but were invisible. Using `flex-wrap: wrap`
   instead lets nav items wrap onto a second line on narrower desktop widths
   rather than needing horizontal scroll, which avoids the clipping problem
   entirely at any screen width. */
.main-nav > a, .main-nav .dropdown > button {
  padding: 9px 9px; font-size: 13.5px; font-weight: 500; border-radius: 6px; background: none; border: none; color: var(--c-text);
  display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; flex-shrink: 0;
}
.main-nav > a:hover, .main-nav .dropdown > button:hover, .main-nav > a.active { background: var(--c-primary); color: #fff; }
.main-nav .dropdown { position: relative; }
.main-nav .dropdown-menu {
  position: absolute; top: 100%; left: 0; background: var(--c-surface); box-shadow: var(--shadow-lg);
  border-radius: 8px; padding: 6px; min-width: 200px; display: none; z-index: 50; border: 1px solid var(--c-border);
}
.main-nav .dropdown:hover .dropdown-menu, .main-nav .dropdown.open .dropdown-menu { display: block; }
.main-nav .dropdown-menu a { display: block; padding: 8px 12px; border-radius: 6px; font-size: 14px; }
.main-nav .dropdown-menu a:hover { background: var(--c-bg); }

.header-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.icon-btn {
  background: var(--c-bg); border: 1px solid var(--c-border); width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--c-text);
}
.icon-btn:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.icon-btn i { width: 18px; height: 18px; }
.lang-btn { border-radius: 19px; width: auto; padding: 0 12px; font-weight: 700; font-size: 12px; }
.menu-toggle { display: none; }

.search-panel { display: none; background: var(--c-surface); border-top: 1px solid var(--c-border); padding: 14px 0; }
.search-panel.open { display: block; }
.search-panel input { width: 100%; padding: 12px 16px; border-radius: 8px; border: 1px solid var(--c-border); font-size: 15px; background: var(--c-bg); color: var(--c-text); }
.search-results { margin-top: 10px; max-height: 320px; overflow-y: auto; }
.search-results a { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 6px; }
.search-results a:hover { background: var(--c-bg); }
.search-results .type-tag { font-size: 11px; color: var(--c-text-muted); }

.news-ticker { background: var(--c-accent); color: #1c2530; display: flex; align-items: center; overflow: hidden; }
.ticker-label { flex-shrink: 0; padding: 8px 14px; font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,0.1); }
.ticker-label i { width: 15px; height: 15px; }
.ticker-track { overflow: hidden; flex: 1; }
.ticker-content { display: inline-flex; white-space: nowrap; padding-left: 100%; animation: ticker 30s linear infinite; }
.ticker-content a { padding: 8px 30px; font-size: 13px; font-weight: 500; }
.ticker-content a.urgent { color: #b00020; font-weight: 700; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* =========================================================
   BREADCRUMB
   ========================================================= */
.breadcrumb { background: var(--c-surface); border-bottom: 1px solid var(--c-border); padding: 12px 0; font-size: 13px; color: var(--c-text-muted); }
.breadcrumb a { color: var(--c-primary); }
.breadcrumb .current { color: var(--c-text); }

/* =========================================================
   HOMEPAGE INTRO BAND — replaces the old text-over-image hero
   overlay. Heading/tagline/CTAs now live in their own full-width
   band, never covering the slider photos.
   ========================================================= */
.hero-intro { background: linear-gradient(120deg, var(--c-primary), var(--c-primary-dark)); padding: 44px 0; }
.hero-intro-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.hero-intro h1 { color: #fff; font-size: 30px; margin-bottom: 8px; }
.hero-intro p { color: rgba(255,255,255,0.9); font-size: 15px; margin: 0; }
.hero-intro .hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }

/* =========================================================
   HOME SLIDER
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  background: #111827;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  height: clamp(460px, 68vh, 780px);
  min-height: 520px;
  box-shadow: inset 0 -120px 140px rgba(0,0,0,0.28);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; }
.hero-slide.active { opacity: 1; }
.hero-fg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 1;
  filter: saturate(1.08) contrast(1.04) brightness(1.02);
}
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.34), transparent 38%, rgba(0,0,0,0.1)),
    linear-gradient(0deg, rgba(0,0,0,0.42), transparent 42%);
  pointer-events: none;
}
.hero-slide.active .hero-fg-img { animation: heroKenBurns 9s ease-out forwards; }
@keyframes heroKenBurns { from { transform: scale(1.02); } to { transform: scale(1.1); } }

.hero-caption {
  position: absolute;
  left: clamp(16px, 5vw, 70px);
  bottom: clamp(34px, 8vw, 78px);
  z-index: 4;
  max-width: min(680px, calc(100% - 32px));
  color: #fff;
  pointer-events: none;
}
.hero-caption span {
  display: inline-block;
  background: rgba(0,0,0,0.58);
  border-left: 4px solid var(--c-accent);
  padding: 10px 16px;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: clamp(18px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
}

.hero-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; z-index: 5; }
.hero-dots button { width: 8px; height: 8px; border-radius: 5px; background: rgba(120,120,120,0.4); border: none; transition: width 0.35s ease, background 0.35s ease; }
.hero-dots button.active { width: 26px; background: var(--c-primary); }

.hero-nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,0.85); color: var(--c-primary); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.25s ease, background 0.2s ease;
}
.hero:hover .hero-nav-btn { opacity: 1; }
.hero-nav-btn:hover { background: #fff; }
.hero-nav-btn svg { width: 20px; height: 20px; }
.hero-prev { left: 16px; }
.hero-next { right: 16px; }

.hero-progress-track { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(0,0,0,0.08); z-index: 5; }
.hero-progress { height: 100%; width: 0%; background: var(--c-accent); }
.hero-progress.animating { transition: width linear; }

.garbage-call-widget {
  position: absolute;
  right: clamp(16px, 3vw, 42px);
  bottom: clamp(32px, 5vw, 64px);
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(320px, calc(100% - 32px));
  padding: 10px 14px 10px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: var(--c-primary);
  box-shadow: 0 12px 30px rgba(0,0,0,0.24);
  border: 1px solid rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.garbage-call-widget:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(0,0,0,0.3); }
.garbage-call-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--c-success);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.garbage-call-icon svg { width: 21px; height: 21px; }
.garbage-call-text { display: grid; line-height: 1.15; }
.garbage-call-text strong { font-size: 13px; color: var(--c-primary); margin: 0; }
.garbage-call-text small { font-size: 12px; color: var(--c-text-muted); white-space: nowrap; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 11px 22px; border-radius: 8px; font-weight: 600; font-size: 14px; border: none; transition: transform 0.15s ease, filter 0.15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--c-accent); color: #1c2530; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.15); }
.btn-solid { background: var(--c-primary); color: #fff; }
.btn-solid:hover { background: var(--c-primary-dark); }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* =========================================================
   QUICK ACCESS GRID + STATS BAR
   ========================================================= */
.section { padding: 56px 0; }
.section-title { text-align: center; margin-bottom: 34px; }
.section-title h2 { font-size: 26px; }
.section-title p { color: var(--c-text-muted); max-width: 560px; margin: 8px auto 0; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.quick-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 22px 16px; text-align: center; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.quick-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.quick-card .icon-wrap { width: 52px; height: 52px; border-radius: 50%; background: var(--c-primary); color: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.quick-card span { font-weight: 600; font-size: 14px; }

.stats-bar { background: var(--c-primary); color: #fff; padding: 30px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.stats-grid .stat-num { font-size: 30px; font-weight: 700; font-family: var(--font-heading); }
.stats-grid .stat-label { opacity: 0.85; font-size: 13px; margin-top: 4px; }

/* =========================================================
   ABOUT SECTION
   ========================================================= */
.about-flex { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; }
.about-flex img { border-radius: var(--radius); box-shadow: var(--shadow-lg); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.about-text { color: var(--c-text); }
.about-text p { color: var(--c-text-muted); line-height: 1.7; }
.about-summary-clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* =========================================================
   CARDS: services / schemes / gallery / notices
   ========================================================= */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.svc-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 24px; transition: transform 0.2s ease, box-shadow 0.2s ease; display: flex; flex-direction: column; }
.svc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.svc-card .icon-wrap { width: 46px; height: 46px; border-radius: 10px; background: color-mix(in srgb, var(--c-primary) 12%, transparent); color: var(--c-primary); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.svc-card h3 { font-size: 17px; }
.svc-card p { color: var(--c-text-muted); font-size: 14px; line-height: 1.5; margin-bottom: 0; }
.svc-card .learn-link { color: var(--c-primary); font-weight: 600; font-size: 13px; }
.badge { display: inline-block; padding: 2px 8px; font-size: 11px; border-radius: 20px; font-weight: 700; }
.badge-scheme { background: color-mix(in srgb, var(--c-success) 15%, transparent); color: var(--c-success); }
.badge-new { background: #ff3b30; color: #fff; margin-left: 8px; }
.badge-urgent { background: #b00020; color: #fff; }

.svc-detail-toggle { display: none; }
.svc-detail-label { cursor: pointer; display: inline-block; margin-top: 10px; }
.svc-detail-panel { display: none; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--c-border); font-size: 13px; color: var(--c-text-muted); line-height: 1.6; }
.svc-detail-toggle:checked ~ .svc-detail-panel { display: block; }
.svc-detail-toggle:checked ~ .svc-detail-label { color: var(--c-text-muted); }
.svc-detail-row { margin-bottom: 8px; }
.svc-detail-row ul { margin: 4px 0 0; padding-left: 18px; }
.svc-detail-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; }

.sarpanch-message { background: var(--c-surface); border-radius: var(--radius); padding: 40px; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; box-shadow: var(--shadow); }
.sarpanch-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid var(--c-accent); }
.sarpanch-message blockquote { font-size: 17px; font-style: italic; color: var(--c-text); margin: 0 0 10px; line-height: 1.6; }
.sarpanch-message strong { color: var(--c-primary); }

.notices-list { display: flex; flex-direction: column; gap: 10px; }
.notice-item { display: flex; justify-content: space-between; align-items: center; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 8px; padding: 14px 18px; gap: 10px; flex-wrap: wrap; }
.notice-item .notice-title { font-weight: 600; }
.notice-item .notice-date { font-size: 12px; color: var(--c-text-muted); white-space: nowrap; }

.office-info-card { background: var(--c-surface); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.office-info-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.office-info-card li { display: flex; gap: 10px; align-items: flex-start; color: var(--c-text-muted); font-size: 14px; }
.office-info-card i { color: var(--c-primary); flex-shrink: 0; }
.office-info-card a { color: var(--c-primary); font-weight: 600; }

.gallery-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.gallery-strip img, .gallery-grid img { border-radius: 8px; aspect-ratio: 1; object-fit: cover; width: 100%; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-card { background: var(--c-surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--c-border); }
.gallery-card .cap { padding: 12px 14px; }
.gallery-card .cap h4 { font-size: 14px; margin-bottom: 4px; }
.gallery-card .cap p { font-size: 12px; color: var(--c-text-muted); margin: 0; }

.eservices-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.eservice-link { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 10px; padding: 18px; text-align: center; font-weight: 600; font-size: 14px; transition: border-color 0.2s ease, color 0.2s ease; }
.eservice-link:hover { border-color: var(--c-primary); color: var(--c-primary); }

.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); height: 380px; }
.map-embed iframe, .map-embed #leafletMap { width: 100%; height: 100%; border: 0; }

/* =========================================================
   GENERIC INNER-PAGE CONTENT
   ========================================================= */
.page-header { background: var(--c-primary); color: #fff; padding: 40px 0; }
.page-header h1 { color: #fff; font-size: 28px; }
.people-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.person-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 20px; text-align: center; }
.person-card img, .person-card .avatar-blank { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; border: 3px solid var(--c-border); }
.person-card .avatar-blank { background: var(--c-bg); }
.person-card h4 { font-size: 15px; margin-bottom: 2px; }
.person-card .role { color: var(--c-primary); font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.person-card .contact { font-size: 12px; color: var(--c-text-muted); }
.sarpanch-tag { position: relative; }
.sarpanch-tag::before { content: '★ SARPANCH'; display: block; font-size: 10px; font-weight: 800; color: var(--c-accent); margin-bottom: 6px; letter-spacing: 0.5px; }

.doc-table { width: 100%; border-collapse: collapse; background: var(--c-surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.doc-table th, .doc-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--c-border); font-size: 14px; }
.doc-table th { background: var(--c-bg); color: var(--c-text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.doc-table tr:last-child td { border-bottom: none; }
.download-link { color: var(--c-primary); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

.committee-block { margin-bottom: 30px; }
.committee-block h3 { color: var(--c-primary); border-bottom: 2px solid var(--c-border); padding-bottom: 8px; margin-bottom: 14px; }

.meeting-item { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.meeting-item h4 { margin-bottom: 4px; }
.meeting-item .date { color: var(--c-text-muted); font-size: 13px; margin-bottom: 8px; }

.form-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 30px; margin-bottom: 24px; }
.form-card h3 { margin-bottom: 4px; }
.form-card .sub { color: var(--c-text-muted); font-size: 14px; margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { font-size: 13px; font-weight: 600; margin-bottom: 6px; display: block; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; padding: 11px 13px; border-radius: 8px; border: 1px solid var(--c-border); font-size: 14px; background: var(--c-bg); color: var(--c-text); font-family: inherit; }
.form-grid textarea { min-height: 100px; resize: vertical; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: color-mix(in srgb, var(--c-success) 15%, transparent); color: var(--c-success); }
.star-rating { display: flex; gap: 4px; font-size: 26px; }
.star-rating input { display: none; }
.star-rating label { cursor: pointer; color: var(--c-border); }
.star-rating input:checked ~ label, .star-rating label:hover, .star-rating label:hover ~ label { color: var(--c-accent); }

.tab-buttons { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.tab-btn { padding: 10px 18px; border-radius: 20px; border: 1px solid var(--c-border); background: var(--c-surface); font-weight: 600; font-size: 13px; }
.tab-btn.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.emergency-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.emergency-list li { display: flex; justify-content: space-between; background: var(--c-surface); border: 1px solid var(--c-border); padding: 12px 16px; border-radius: 8px; }
.emergency-list .num { font-weight: 700; color: var(--c-primary); }
.emergency-list .num a { color: inherit; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--c-primary-dark); color: rgba(255,255,255,0.85); margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding: 46px 20px 30px; }
.footer-brand { color: #fff; margin-bottom: 10px; }
.footer-col h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.footer-col a, .footer-col p { display: block; font-size: 13px; margin-bottom: 10px; color: rgba(255,255,255,0.75); }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-col a[href^="tel:"] { display: inline; }
.social-links { display: flex; gap: 10px; margin-top: 12px; }
.social-links a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; }
.social-links i { width: 16px; height: 16px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding: 16px 0; text-align: center; font-size: 12px; }

/* =========================================================
   404 / MESSAGE PAGE
   ========================================================= */
.message-page { text-align: center; padding: 100px 20px; }
.message-page h1 { font-size: 60px; color: var(--c-primary); }

/* =========================================================
   SCROLL REVEAL + BACK TO TOP
   ========================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in-view { opacity: 1; transform: none; }
.reveal.js-fallback-visible { opacity: 1; transform: none; }

.back-to-top {
  position: fixed; bottom: 26px; right: 26px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--c-primary); color: #fff; border: none; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease; z-index: 45; cursor: pointer;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: none; }
.back-to-top:hover { background: var(--c-primary-dark); }
.back-to-top svg { width: 20px; height: 20px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid, .gallery-grid, .people-grid { grid-template-columns: repeat(2, 1fr); }
  .about-flex, .contact-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-strip { grid-template-columns: repeat(3, 1fr); }
  .eservices-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .sarpanch-message { grid-template-columns: 1fr; text-align: center; }
  .sarpanch-photo { margin: 0 auto; }
  .hero-intro-inner { flex-direction: column; text-align: center; align-items: center; }
}
@media (max-width: 1000px) {
  .hide-sm { display: none; }
  .main-nav { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: var(--c-surface);
    flex-direction: column; align-items: stretch; padding: 16px; transform: translateX(-100%); transition: transform 0.25s ease; overflow-y: auto; z-index: 39; }
  .main-nav.open { transform: translateX(0); }
  .main-nav .dropdown-menu { position: static; box-shadow: none; display: none; border: none; padding-left: 12px; }
  .main-nav .dropdown.open .dropdown-menu { display: block; }
  .menu-toggle { display: flex; }
  .quick-grid, .card-grid, .gallery-grid, .people-grid, .gallery-strip, .eservices-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { height: min(420px, 66vw); min-height: 300px; }
  .brand-logo { width: 68px; height: 68px; }
}
@media (max-width: 480px) {
  .quick-grid, .card-grid, .gallery-grid, .people-grid, .gallery-strip, .eservices-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-intro h1 { font-size: 24px; }
  .hero { height: 300px; min-height: 260px; }
  .hero-caption { left: 12px; right: 12px; bottom: 42px; max-width: none; }
  .hero-caption span { width: 100%; font-size: 17px; padding: 9px 12px; }
  .garbage-call-widget { right: 12px; bottom: 84px; padding: 8px; }
  .garbage-call-text { display: none; }
  .garbage-call-icon { width: 40px; height: 40px; }
  .page-header h1 { font-size: 22px; }
  .section { padding: 40px 0; }
}
