/* ============================================================
   MASTER THEME - GRAM PANCHAYAT MANDVI BU.
   Professional & Attractive Design System
   Colour: Deep Maroon/Dark Brown + Gold Accent
   ============================================================ */

/* ─── ROOT TOKENS ─────────────────────────────────────────── */
:root {
  --brand-dark:   #7b0d1e;    /* Deep Maroon */
  --brand-darker: #55091a;
  --brand-accent: #c9a84c;    /* Gold */
  --brand-light:  #f5f0e8;    /* Warm Cream */
  --white:        #ffffff;
  --text-dark:    #2c1810;
  --text-muted:   #7a6a5a;
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:    0 6px 20px rgba(0,0,0,0.12);
  --shadow-lg:    0 10px 40px rgba(0,0,0,0.15);
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    22px;
  --transition:   0.3s ease;
}

/* ─── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #faf8f5;
  color: var(--text-dark);
  line-height: 1.6;
  /* removed overflow-x: hidden to fix sticky */
}

.site-wrapper {   display: flex; flex-direction: column; min-height: 100vh; }

/* ─── HEADER ──────────────────────────────────────────────── */
/* IMPORTANT: sticky keeps header in flow so it never overlaps content */
.main-header {
  position: relative !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  width: 100%;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  min-height: 90px;
}

.brand-section { display: flex; align-items: center; gap: 16px; }

.logo-container { flex-shrink: 0; }
.logo-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.brand-text { display: flex; flex-direction: column; gap: 3px; }

.village-name {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.1;
  letter-spacing: -0.3px;
}

.lgd-code {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.3px;
}

.header-controls { display: flex; align-items: center; gap: 16px; }
.seal-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--brand-accent);
}

.lang-selector select {
  border: 2px solid var(--brand-dark);
  border-radius: 8px;
  padding: 6px 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand-dark);
  cursor: pointer;
  background: #fff;
  outline: none;
}

/* ─── NAVBAR ──────────────────────────────────────────────── */
.navbar,
.main-header .navbar,
nav.navbar {
  background: var(--brand-dark) !important;
  width: 100%;
  position: relative; /* needed for mobile dropdown */
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links li a, .nav-item {
  display: block;
  color: rgba(255,255,255,0.9) !important;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 14px 22px;
  text-decoration: none;
  transition: all var(--transition);
  border-bottom: 3px solid transparent;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.nav-links li a:hover, .nav-item:hover {
  color: #fff !important;
  background: rgba(255,255,255,0.15);
  border-bottom-color: var(--brand-accent);
}

.nav-links li a.active, .nav-item.active,
.nav-links li a.selected, .nav-item.selected {
  color: var(--brand-accent) !important;
  border-bottom-color: var(--brand-accent);
  background: rgba(255,255,255,0.1);
}

/* ─── MAIN CONTENT ─────────────────────────────────────────── */
.main-container {
  flex: 1;
  min-height: 60vh;
}

.content-wrapper {
  width: 100%;
}

/* ─── HERO SECTION ──────────────────────────────────────────── */
.hero-wrapper {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* removed overflow: hidden to fix sticky */
  background: linear-gradient(135deg, var(--brand-darker) 0%, #a0112a 50%, #c9272a 100%);
  clip-path: polygon(0 0, 100% 0, 100% 85%, 50% 100%, 0 85%);
  padding: 60px 20px 100px;
  margin-bottom: 0;
}

.hero-slider-bg {
  position: absolute;
  inset: 0;
  /* removed overflow: hidden to fix sticky */
  z-index: 0;
}

.hero-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slide-img.active { opacity: 0.35; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(90,10,20,0.88) 0%, rgba(160,17,42,0.75) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 760px;
  color: #fff;
}

.hero-content h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
  text-shadow: 0 3px 10px rgba(0,0,0,0.4);
}

.hero-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--brand-accent);
  margin-bottom: 18px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 28px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-hero-primary {
  background: var(--brand-accent);
  color: var(--brand-darker);
  border: none;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 4px 15px rgba(201,168,76,0.35);
}

.btn-hero-primary:hover {
  background: #fff;
  color: var(--brand-dark);
  transform: translateY(-2px);
}

.btn-hero-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Poppins', sans-serif;
}

.btn-hero-secondary:hover {
  background: rgba(255,255,255,0.2);
  border-color: #fff;
  transform: translateY(-2px);
}

/* ─── STATS SECTION ─────────────────────────────────────────── */
.stats-overlap-wrapper {
  background: var(--white);
  padding: 0 20px;
  margin: 0;
}

.stats-grid-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  padding: 30px 0;
}

.stat-card-new {
  flex: 1 1 180px;
  background: #fff;
  border: 1px solid #f0e8d8;
  border-radius: var(--radius-md);
  padding: 22px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.stat-card-new:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-accent);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-dark), #a0112a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin: 0 auto 12px;
}

.stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── GENERIC GP SECTIONS ───────────────────────────────────── */
.gp-section {
  padding: 50px 30px;
  max-width: 1300px;
  margin: 0 auto;
}

.gp-section-alt {
  background: #fdf9f4;
}

.section-title-block {
  text-align: center;
  margin-bottom: 36px;
}

.section-title-block h2 {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 10px;
}

.section-underline {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand-accent));
  border-radius: 2px;
  margin: 0 auto 12px;
}

.section-title-block p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 550px;
  margin: 0 auto;
}

/* ─── ADMINISTRATIVE BODY (MINISTERS) ───────────────────────── */
.ministers-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 22px;
  padding: 10px 10px 20px;
  overflow-x: auto;
  justify-content: flex-start;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-accent) #f0ece8;
}

.ministers-row::-webkit-scrollbar { height: 6px; }
.ministers-row::-webkit-scrollbar-track { background: #f0ece8; border-radius: 3px; }
.ministers-row::-webkit-scrollbar-thumb { background: var(--brand-accent); border-radius: 3px; }

.minister-card {
  flex: 0 0 130px;
  text-align: center;
  cursor: default;
  transition: transform var(--transition);
}

.minister-card:hover { transform: translateY(-4px); }

.minister-img-wrapper {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  /* removed overflow: hidden to fix sticky */
  margin: 0 auto 10px;
  background: #eee;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.minister-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.minister-info {
  padding: 0 5px;
}

.minister-role-top {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--brand-dark);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.minister-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ─── GP MEMBERS GRID ─────────────────────────────────────── */
.gp-members-preview-grid, .members-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

@media (max-width: 1024px) {
  .gp-members-preview-grid, .members-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .gp-members-preview-grid, .members-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.member-card-new, .member-list-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 22px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid #f0e8d8;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.member-card-new:hover, .member-list-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-accent);
}

.member-avatar, .member-list-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  /* removed overflow: hidden to fix sticky */
  margin: 0 auto 14px;
  border: 3px solid var(--brand-accent);
  background: #eee;
}

.member-avatar img, .member-list-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-card-name, .member-list-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-dark);
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin-bottom: 5px;
  line-height: 1.3;
}

.member-card-role, .member-list-role {
  font-size: 0.8rem;
  color: var(--brand-dark);
  font-weight: 600;
  background: rgba(123,13,30,0.08);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
  display: inline-block;
}

.member-card-phone, .member-list-phone {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ─── GALLERY GRID ──────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 1024px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .gallery-grid { grid-template-columns: 1fr 1fr; } }

.gallery-card {
  border-radius: var(--radius-md);
  /* removed overflow: hidden to fix sticky */
  position: relative;
  background: #111;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  aspect-ratio: 4/3;
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
  display: block;
}

.gallery-card:hover img { transform: scale(1.07); }

.gallery-card-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff;
  padding: 30px 12px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-card:hover .gallery-card-caption { opacity: 1; }

/* ─── CERTIFICATES GRID ──────────────────────────────────────── */
.certificates-grid, #self-declaration-container {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

@media (max-width: 1024px) { .certificates-grid, #self-declaration-container { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .certificates-grid, #self-declaration-container { grid-template-columns: 1fr 1fr; } }

.cert-card {
  background: var(--white);
  border: 1px solid #f0e8d8;
  border-radius: var(--radius-md);
  padding: 24px 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  cursor: pointer;
}

.cert-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-accent);
}

.cert-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-dark), #c9272a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto 16px;
}

.cert-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 8px;
}

.cert-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ─── CONTACT / MEMBERS GRID ────────────────────────────────── */
.contact-ref-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

@media (max-width: 1024px) { .contact-ref-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .contact-ref-grid { grid-template-columns: 1fr 1fr; } }

.contact-card {
  background: var(--white);
  border: 1px solid #f0e8d8;
  border-radius: var(--radius-md);
  padding: 22px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-accent);
}

/* ─── SCHEMES / ALERTS SECTION ───────────────────────────────── */
.schemes-alerts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

@media (max-width: 768px) { .schemes-alerts-grid { grid-template-columns: 1fr; } }

.scheme-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid #f0e8d8;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  transition: all var(--transition);
}

.scheme-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.scheme-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.scheme-info h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 3px;
}

.scheme-info p { font-size: 0.82rem; color: var(--text-muted); }

/* ─── INNER PAGES ──────────────────────────────────────────── */
.inner-page-spacer { height: 0; }

.main-content-grid {
  max-width: 1300px;
  margin: 0 auto;
  padding: 30px 24px;
}

.max-w-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-heading {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 10px;
}

.center-text { text-align: center; }

.heading-underline {
  width: 55px;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand-accent));
  border-radius: 2px;
  margin: 0 auto 24px;
}

.scheme-detail-box {
  background: var(--white);
  border: 1px solid #f0e8d8;
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

/* ─── TABLE STYLING ──────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  border-radius: 10px;
  /* removed overflow: hidden to fix sticky */
  box-shadow: 0 0 0 1px #e0d4c8;
}

table th, table td {
  border: 1px solid #e0d4c8;
  padding: 12px 16px;
  text-align: left;
  font-size: 0.9rem;
}

table th {
  background: var(--brand-dark);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

table tr:nth-child(even) { background: #fdf9f4; }
table tr:nth-child(odd) { background: #fff; }

table tr:hover td { background: #fdf4e8; }

/* ─── VIEW ALL BTN ─────────────────────────────────────────── */
.view-all-btn-wrap {
  text-align: center;
  margin-top: 28px;
}

.btn-view-all {
  background: var(--brand-dark);
  color: var(--white);
  border: none;
  padding: 13px 36px;
  border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 15px rgba(123,13,30,0.25);
}

.btn-view-all:hover {
  background: var(--brand-accent);
  color: var(--brand-darker);
  transform: translateY(-2px);
}

/* ─── FOOTER ──────────────────────────────────────────────── */
.main-footer {
  background: var(--brand-darker);
  color: rgba(255,255,255,0.85);
  padding: 50px 30px 25px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
}

@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }

.main-footer h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-accent);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.main-footer p { font-size: 0.87rem; line-height: 1.7; }

.footer-links { list-style: none; }
.footer-links li {
  font-size: 0.87rem;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.footer-bottom {
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  max-width: 1200px;
  margin: 0 auto;
}

/* ─── ALERTS / NOTICES ───────────────────────────────────────── */
.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid #f0e8d8;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.alert-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ─── MOBILE NAV ──────────────────────────────────────────── */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.mobile-nav-toggle .bar {
  width: 26px;
  height: 3px;
  background: var(--brand-dark);
  border-radius: 3px;
  transition: var(--transition);
  display: block;
}

@media (max-width: 768px) {
  .mobile-nav-toggle { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
  }
  .navbar.active .nav-links, .navbar.open .nav-links { display: flex; }
  .village-name { font-size: 1.2rem; }
  .logo-img { width: 55px; height: 55px; }
  .hero-content h1 { font-size: 2rem; }
}

/* ─── MISC HELPERS ──────────────────────────────────────────── */
.detail-list { padding-left: 20px; }
.detail-list li { margin-bottom: 8px; color: var(--text-dark); }

.numbered-list { counter-reset: item; list-style-type: decimal; }

.reference-box {
  background: #f0f6ff;
  border-left: 4px solid var(--brand-dark);
  padding: 20px;
  border-radius: 4px;
  margin-bottom: 30px;
}

/* ─── SELF DECLARATION / DECLARATIONS ─────────────────────── */
.declaration-list {
  list-style: none;
  padding: 0;
}
.declaration-list li {
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid #f0e8d8;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all var(--transition);
}
.declaration-list li:hover {
  border-color: var(--brand-accent);
  background: #fffdf6;
}

/* ─── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gp-section, .stat-card-new, .minister-card,
.member-card-new, .member-list-card, .gallery-card,
.cert-card, .contact-card {
  animation: fadeInUp 0.5s ease both;
}

/* ─── MEMBER GRID ALIAS ─────────────────────────────────── */
/* member-grid is used by MEMBERS_CONTENT page */
.member-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 20px;
}

@media (max-width: 1024px) { .member-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .member-grid { grid-template-columns: 1fr 1fr; } }

/* Card style for member-grid items */
.member-grid > div {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 22px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid #f0e8d8;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.member-grid > div:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-accent);
}

/* ─── GALLERY TABS ───────────────────────────────────────── */
.gallery-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 28px;
}

.gallery-tab-btn {
  padding: 8px 22px;
  border: 2px solid #e0d4c8;
  border-radius: 50px;
  background: var(--white);
  color: var(--text-dark);
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.gallery-tab-btn:hover {
  border-color: var(--brand-dark);
  color: var(--brand-dark);
}

.gallery-tab-btn.active {
  background: var(--brand-dark);
  color: #fff;
  border-color: var(--brand-dark);
}

/* ─── GALLERY LIGHTBOX ───────────────────────────────────── */
.gallery-lightbox {
  display: none;
  position: relative !important;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox.active { display: flex; }

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.close-lightbox {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  transition: color var(--transition);
}

.close-lightbox:hover { color: var(--brand-accent); }

/* ─── HERO SLIDER ────────────────────────────────────────── */
.h-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.h-slide.active { opacity: 0.35; }

/* ─── SECTION HEADER ALIAS ───────────────────────────────── */
.section-header { text-align: center; margin-bottom: 28px; }
.section-title  { font-size: 1.5rem; font-weight: 700; color: var(--brand-dark); margin-bottom: 16px; }

/* ─── UTILITY CLASSES ────────────────────────────────────── */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ─── HERO SLIDER FIX (contain, no crop) ─────────────────── */
.hero-wrapper {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* removed overflow: hidden to fix sticky */
  background: linear-gradient(135deg, #55091a 0%, #7b0d1e 50%, #a0112a 100%);
  clip-path: polygon(0 0, 100% 0, 100% 88%, 50% 100%, 0 88%);
  padding: 60px 20px 100px;
}

.hero-slider-bg {
  position: absolute;
  inset: 0;
  /* removed overflow: hidden to fix sticky */
  z-index: 0;
}

/* Use object-fit: contain so images are not cropped */
.h-slide,
.hero-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.h-slide.active,
.hero-slide-img.active { opacity: 0.4; }

/* ─── CONTACT PAGE STYLES ────────────────────────────────── */
.contact-page-box {
  background: #ffffff;
  border: 1px solid #e8ddd0;
  border-radius: 16px;
  padding: 28px 30px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.contact-box-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 20px;
}

.contact-intro {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* 3-column grid for contact cards (matches reference image) */
.contact-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .contact-cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .contact-cards-grid { grid-template-columns: 1fr 1fr; }
}

.contact-person-card {
  background: #ffffff;
  border: 1.5px solid #e8ddd0;
  border-radius: 14px;
  padding: 22px 16px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.contact-person-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(123,13,30,0.1);
  border-color: var(--brand-accent);
}

.contact-card-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.contact-card-role {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--brand-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  line-height: 1.3;
}

.contact-card-divider {
  width: 100%;
  height: 1px;
  background: #e8ddd0;
  margin: 10px 0 14px;
}

.contact-card-info {
  text-align: left;
}

.contact-info-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 0.85rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.contact-info-label {
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
}

.contact-info-value {
  color: var(--text-muted);
  word-break: break-word;
}

/* Office address pill */
.office-address-pill {
  background: #fdf4e8;
  border: 1px solid #e8ddd0;
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 0.95rem;
  color: var(--text-dark);
}

/* Emergency grid */
.emergency-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 4px;
}

@media (max-width: 700px) {
  .emergency-grid { grid-template-columns: repeat(2, 1fr); }
}

.emergency-card {
  background: #fdf4e8;
  border: 1px solid #e8ddd0;
  border-radius: 12px;
  padding: 18px 12px;
  text-align: center;
  transition: all 0.3s ease;
}

.emergency-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  border-color: var(--brand-accent);
}

.em-emoji { font-size: 2rem; margin-bottom: 8px; }

.em-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.em-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1;
}

/* ─── CERTIFICATES PAGE - 4-COLUMN CARD GRID ─────────────── */
.modern-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

@media (max-width: 1024px) { .modern-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .modern-grid-4 { grid-template-columns: 1fr 1fr; } }

.glass-card {
  background: #ffffff;
  border: 1px solid #f0e8d8;
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(123,13,30,0.12);
  border-color: var(--brand-accent);
}

.card-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-dark), #a0112a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 16px;
}

.glass-card h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand-dark);
  line-height: 1.4;
  margin-bottom: 14px;
  flex: 1;
}

.declaration-download-btn {
  background: var(--brand-dark);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: auto;
}

.declaration-download-btn:hover {
  background: var(--brand-accent);
  color: var(--brand-darker);
}

/* ─── MOBILE RESPONSIVE FIXES ────────────────────────────── */
@media (max-width: 768px) {

  /* Header - all inline one row, compact */
  .header-content {
    padding: 10px 14px;
    min-height: 64px;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .brand-section {
    gap: 8px;
    flex: 1;
    min-width: 0;
  }

  .logo-img {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
  }

  .brand-text {
    gap: 1px;
    min-width: 0;
  }

  .village-name {
    font-size: 0.88rem;
    white-space: nowrap;
    /* removed overflow: hidden to fix sticky */
    text-overflow: ellipsis;
  }

  .lgd-code {
    font-size: 0.65rem;
    white-space: nowrap;
    /* removed overflow: hidden to fix sticky */
    text-overflow: ellipsis;
  }

  .header-controls {
    flex-shrink: 0;
    gap: 8px;
  }

  .seal-img {
    width: 36px;
    height: 36px;
  }

  .lang-selector select {
    font-size: 0.75rem;
    padding: 4px 8px;
    max-width: 80px;
  }

  .mobile-nav-toggle { display: flex; }

  /* Nav - vertical dropdown on mobile */
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: var(--brand-dark);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  }

  .navbar.active .nav-links,
  .navbar.open .nav-links {
    display: flex;
  }

  .nav-links li a, .nav-item {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    border-bottom-width: 1px !important;
    border-bottom-style: solid !important;
    border-left: none;
    border-right: none;
  }

  /* Hero mobile */
  .hero-content h1 { font-size: 1.8rem; }
  .hero-wrapper {
    clip-path: polygon(0 0, 100% 0, 100% 92%, 50% 100%, 0 92%);
    padding: 40px 16px 80px;
    min-height: 300px;
  }

  /* Stats mobile */
  .stats-grid-row {
    gap: 12px;
  }

  .stat-card-new {
    flex: 1 1 130px;
    padding: 16px 12px;
  }

  /* Ministers mobile - scrollable row */
  .ministers-row {
    gap: 14px;
    padding: 10px 5px 15px;
  }

  .minister-card { flex: 0 0 100px; }
  .minister-img-wrapper { width: 80px; height: 80px; }

  /* Members grid mobile */
  .gp-members-preview-grid,
  .members-grid,
  .member-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  /* Gallery mobile */
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

  /* Certificates mobile */
  .modern-grid-4 { grid-template-columns: 1fr 1fr; gap: 14px; }

  /* Contact cards mobile */
  .contact-cards-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .emergency-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

  /* Footer mobile */
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }

  /* Schemes mobile */
  .schemes-alerts-grid { grid-template-columns: 1fr; }

  /* Table mobile scroll */
  .scheme-detail-box, .main-content-grid > div > section {
    overflow-x: auto;
  }

  /* GP section padding */
  .gp-section { padding: 30px 16px; }
  .max-w-container { padding: 0; }

  /* Contact page box mobile */
  .contact-page-box { padding: 18px 14px; }
}

@media (max-width: 400px) {
  .village-name { font-size: 0.78rem; }
  .lgd-code { display: none; } /* Hide on very small screens */
  .gp-members-preview-grid,
  .members-grid,
  .member-grid,
  .gallery-grid,
  .modern-grid-4,
  .contact-cards-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── HERO SLIDER COMPREHENSIVE FIX ─────────────────────── */
.hero-wrapper {
  position: relative;
  /* removed overflow: hidden to fix sticky */
  min-height: 420px;
  background: linear-gradient(135deg, #4a0a12 0%, #7b0d1e 50%, #9e1224 100%);
  clip-path: polygon(0 0, 100% 0, 100% 88%, 50% 100%, 0 88%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 110px;
}

@media (max-width: 768px) {
  .hero-wrapper {
    min-height: 320px;
    padding: 40px 16px 80px;
    clip-path: polygon(0 0, 100% 0, 100% 92%, 50% 100%, 0 92%);
  }
}

/* Slider container */
.hero-slider-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Slide images - no cropping, full cover */
.h-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
}

.h-slide.active { opacity: 0.28; }

/* Dark overlay above images for text contrast */
.hero-slider-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(74, 10, 18, 0.3) 0%,
    rgba(123, 13, 30, 0.2) 50%,
    rgba(74, 10, 18, 0.4) 100%
  );
  z-index: 1;
}

/* Hero content always above slider */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
}

/* ─── SCHEME ITEMS - CLICKABLE ───────────────────────────── */
.scheme-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #f0e8d8;
  border-radius: 10px;
  margin-bottom: 12px;
  background: #fff;
  transition: all 0.3s ease;
}

.scheme-item:hover {
  border-color: var(--brand-accent);
  box-shadow: 0 4px 16px rgba(123,13,30,0.1);
  transform: translateX(4px);
}

.scheme-item .fa-chevron-right {
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.scheme-item:hover .fa-chevron-right {
  transform: translateX(4px);
  color: var(--brand-dark) !important;
}

/* ─── HEADER STICKY GUARANTEE ────────────────────────────── */
/* Override ALL other CSS files - sticky header never hides content */
.main-header,
header.main-header,
#main-header {
  position: relative !important;
  top: 0 !important;
  z-index: 1000 !important;
}

/* Remove any body padding-top that compensated for old fixed header */
body {
  padding-top: 0 !important;
}

/* ─── GP MEMBER CARD FIX (12 MEMBERS) ───────────────────── */
/* Ensure home page GP members preview shows correctly */
.gp-members-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 900px) { .gp-members-preview-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px)  { .gp-members-preview-grid { grid-template-columns: 1fr 1fr; } }

/* ─── MEMBERS INNER PAGE (12 MEMBERS 4-COL) ─────────────── */
.members-grid,
.member-grid,
#members-list-page {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

@media (max-width: 1024px) {
  .members-grid, .member-grid, #members-list-page { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .members-grid, .member-grid, #members-list-page { grid-template-columns: 1fr 1fr; }
}

/* ─── ALERT NEWS SECTION IMPROVEMENTS ───────────────────── */
.alert-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alert-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #f0e8d8;
  border-radius: 10px;
  align-items: flex-start;
}

/* ─── MOBILE: HEADER ONE-ROW INLINE ─────────────────────── */
@media (max-width: 600px) {
  .header-content {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    padding: 8px 12px !important;
    min-height: 58px !important;
    gap: 8px !important;
  }

  .brand-section {
    flex: 1 !important;
    min-width: 0 !important;
    gap: 8px !important;
    align-items: center !important;
  }

  .logo-img {
    width: 40px !important;
    height: 40px !important;
    flex-shrink: 0 !important;
  }

  .brand-text {
    min-width: 0 !important;
    flex: 1 !important;
  }

  .village-name {
    font-size: 0.82rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
  }

  .lgd-code, .lgd-info {
    font-size: 0.62rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }

  .header-controls {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .seal-img {
    width: 32px !important;
    height: 32px !important;
  }

  .lang-selector select {
    font-size: 0.7rem !important;
    padding: 3px 6px !important;
    max-width: 72px !important;
  }
}
