/* Shared theme for every client website. Colours come from --primary / --secondary set per site. */
:root {
  --primary: #1b7a43;
  --secondary: #f2a900;
  --primary-dark: color-mix(in srgb, var(--primary) 70%, #000);
  --primary-soft: color-mix(in srgb, var(--primary) 8%, #fff);
  --text: #1d2733;
  --muted: #5f6b7a;
  --line: #e4e8ec;
  --bg: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 140px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.section { padding: 72px 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--secondary); margin-bottom: 6px; }

.btn {
  display: inline-block; padding: 12px 24px; border-radius: 999px; border: 2px solid var(--secondary);
  background: var(--secondary); color: #fff; font-weight: 600; text-decoration: none; transition: transform .15s, filter .15s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ---------- 1. Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, .07); }
.site-header .header-inner { max-width: 1440px; display: flex; flex-wrap: wrap; align-items: center; column-gap: 20px; }
.brand { flex: 0 1 auto; display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); min-width: 0; padding: 10px 0; }
.brand img { height: 60px; width: auto; max-width: 160px; object-fit: contain; flex: none; }
.brand-initial {
  flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: #fff; font-weight: 800; font-size: 1.5rem; border: 3px solid var(--secondary);
}
.brand-name { display: block; font-size: 1.15rem; font-weight: 800; color: var(--primary); line-height: 1.2; max-width: 240px; }
.brand-tag { display: block; font-size: .78rem; color: var(--muted); line-height: 1.3; max-width: 240px; }

/* LOGO | PARTY + CANDIDATE | PARTY LOGO + CANDIDATE PHOTO | DATE + WEATHER
   One row of equal sections split by divider lines; each section stacks two items. */
.header-extras { flex: 1 1 auto; align-self: stretch; display: flex; padding: 12px 0; min-width: 0; }
.hx {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; text-align: center; padding: 0 20px; border-left: 2px solid var(--line);
}
.hx-main { line-height: 1.15; }
.hx-sub { font-size: .9rem; font-weight: 600; color: var(--muted); line-height: 1.25; }
.hx-party .hx-main {
  font-size: 1.7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); overflow-wrap: break-word; text-wrap: balance;
}
.hx-party .hx-sub { color: var(--text); font-size: 1rem; }
.hx-plogo img { width: auto; object-fit: contain; }
.hx-plogo .party-img { height: 54px; max-width: 180px; }
.hx-plogo .candidate-img { width: 58px; height: 58px; object-fit: cover; object-position: 50% 20%; border-radius: 50%; border: 3px solid var(--secondary); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.hx-plogo img:only-child { height: 64px; }
.hx-plogo .candidate-img:only-child { width: 64px; }
.hx-date .hx-main { font-size: 1.3rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hx-weather { white-space: nowrap; min-height: 1.25em; }

.nav-toggle { display: none; flex: none; margin-left: 12px; width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--primary-soft); cursor: pointer; padding: 11px; }
.nav-toggle span { display: block; height: 2px; background: var(--primary); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu sits in its own row directly under the logo */
.site-header { overflow-x: clip; }
.main-nav { flex: 0 0 100%; position: relative; isolation: isolate; background: var(--primary); }
/* stretch the menu colour across the full screen width */
.main-nav::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); background: var(--primary); z-index: -1; }
.menu, .submenu { list-style: none; margin: 0; padding: 0; }
.menu { display: flex; align-items: center; }
.menu > li { position: relative; display: flex; align-items: center; }
.menu > li > a {
  position: relative; display: block; padding: 15px 10px; color: #fff; text-decoration: none;
  font-size: .8rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; transition: background .15s;
}
.menu > li > a::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 6px; height: 3px; border-radius: 2px;
  background: var(--secondary); transform: scaleX(0); transition: transform .2s;
}
.menu > li:hover > a, .menu > li:focus-within > a { background: var(--primary-dark); }
.menu > li.has-sub:hover > .sub-toggle, .menu > li.has-sub:focus-within > .sub-toggle { background: var(--primary-dark); }
.menu > li:hover > a::after, .menu > li:focus-within > a::after { transform: scaleX(1); }
.menu > li.has-sub > a { padding-right: 2px; }
.menu > li.has-sub > a::after { right: 2px; }
.sub-toggle { background: none; border: 0; color: #fff; cursor: pointer; padding: 15px 8px 15px 2px; font-size: .75rem; }
.menu > li.menu-cta { margin-left: auto; }
.menu > li.menu-cta > a { padding: 8px 20px; border-radius: 999px; background: var(--secondary); color: #fff; }
.menu > li.menu-cta > a::after { display: none; }
.menu > li.menu-cta:hover > a, .menu > li.menu-cta:focus-within > a { background: #fff; color: var(--primary); }
.submenu {
  position: absolute; top: 100%; left: 0; min-width: 230px; background: #fff; border-radius: 0 0 10px 10px;
  box-shadow: var(--shadow); border-top: 3px solid var(--secondary); padding: 6px 0;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: .18s ease; z-index: 10;
}
.menu > li:hover > .submenu, .menu > li:focus-within > .submenu { opacity: 1; visibility: visible; transform: none; }
.submenu a { display: block; padding: 10px 18px; color: var(--text); text-decoration: none; font-size: .9rem; }
.submenu a:hover, .submenu a:focus { background: var(--primary-soft); color: var(--primary); }

@media (max-width: 1100px) and (min-width: 961px) {
  .menu > li > a { padding-left: 7px; padding-right: 7px; font-size: .74rem; }
  .menu > li > a::after { left: 7px; right: 7px; }
  .brand-name { font-size: 1.05rem; max-width: 200px; }
}

/* Smaller screens: menu collapses into the hamburger, opens below the header */
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-header .header-inner { min-height: 72px; flex-wrap: nowrap; }
  .brand img { height: 48px; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    background: var(--primary); max-height: calc(100vh - 72px); overflow-y: auto; box-shadow: var(--shadow);
  }
  .main-nav::before { display: none; }
  .main-nav.open { display: block; }
  .menu { flex-direction: column; align-items: stretch; }
  .menu > li { flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .12); }
  .menu > li > a { flex: 1; padding: 14px 16px; color: #fff; font-size: .9rem; }
  .menu > li > a::after { display: none; }
  .menu > li:hover > a, .menu > li:focus-within > a { color: #fff; background: var(--primary-dark); }
  .sub-toggle { padding: 14px 18px; font-size: 1rem; color: #fff; transition: transform .2s; }
  .menu > li.sub-open > .sub-toggle { transform: rotate(180deg); }
  .menu > li.menu-cta { margin: 0; padding: 14px 16px; }
  .menu > li.menu-cta > a { text-align: center; background: var(--secondary); padding: 12px; }
  .submenu {
    position: static; width: 100%; opacity: 1; visibility: visible; transform: none; display: none;
    box-shadow: none; border-radius: 0; border-top: 0; background: var(--primary-dark); padding: 0;
  }
  .menu > li:hover > .submenu, .menu > li:focus-within > .submenu { display: none; }
  .menu > li.sub-open > .submenu { display: block; }
  .submenu a { color: #fff; padding-left: 32px; }
  .submenu a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
}
@media (max-width: 1100px) { .hx { padding: 0 12px; } .hx-party .hx-main { font-size: 1.3rem; } .hx-date .hx-main { font-size: 1.1rem; } .hx-sub { font-size: .82rem; } }
@media (max-width: 960px) {
  .header-extras { padding: 10px 0; }
  .hx { padding: 0 10px; }
  .hx-party .hx-main { font-size: 1rem; }
  .hx-date .hx-main { font-size: .9rem; }
  .hx-sub { font-size: .75rem; }
  .hx-plogo .party-img, .hx-plogo img:only-child { height: 34px; }
  .hx-plogo .candidate-img { width: 34px; height: 34px; }
}
@media (max-width: 600px) { .hx-party, .hx-date { display: none; } .hx-plogo { flex: 0 0 auto; margin-left: auto; } }
@media (max-width: 420px) { .brand-tag { display: none; } .brand-name { font-size: 1rem; } }

/* ---------- 2. Banner slider ---------- */
.hero { position: relative; height: clamp(280px, 48vw, 580px); overflow: hidden; background: #111; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s; }
.hero-slide.active { opacity: 1; visibility: visible; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 6s ease; }
.hero-slide.active img { transform: scale(1); }
.hero-caption {
  position: absolute; inset: 0; display: flex; align-items: flex-end; padding-bottom: clamp(48px, 8vw, 96px);
  background: linear-gradient(to top, rgba(0, 0, 0, .65), rgba(0, 0, 0, .1) 60%, transparent);
  color: #fff;
}
.hero-caption h2 { font-size: clamp(1.6rem, 4vw, 3rem); max-width: 760px; text-shadow: 0 2px 12px rgba(0, 0, 0, .3); }
.hero-caption p { font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 620px; margin: 0 0 20px; opacity: .95; }
.hero-slide.active .hero-caption .container > * { animation: rise .8s ease both; }
.hero-slide.active .hero-caption .container > *:nth-child(2) { animation-delay: .12s; }
.hero-slide.active .hero-caption .container > *:nth-child(3) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .22); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer;
  backdrop-filter: blur(4px); transition: background .2s;
}
.hero-arrow:hover { background: var(--secondary); }
.hero-arrow.prev { left: 16px; }
.hero-arrow.next { right: 16px; }
.hero-dots { position: absolute; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 5; }
.hero-dots button { width: 10px; height: 10px; border-radius: 999px; border: 0; padding: 0; background: rgba(255, 255, 255, .55); cursor: pointer; transition: width .3s, background .3s; }
.hero-dots button.active { width: 28px; background: var(--secondary); }
@media (max-width: 600px) { .hero-arrow { display: none; } }

/* ---------- 3. About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.about-grid.no-image { grid-template-columns: 1fr; max-width: 820px; }
.about-media { position: relative; }
.about-media::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: var(--radius); background: var(--secondary); opacity: .25; }
.about-media img { position: relative; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.about-text h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); color: var(--primary); }
.about-text p { color: var(--muted); }
.about-text .btn { margin-top: 8px; }

/* Village statistics band */
.stats {
  position: relative; padding: 56px 0; color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
}
.stats::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .08;
  background-image: radial-gradient(#fff 1.2px, transparent 1.2px); background-size: 22px 22px;
}
.stats .container { position: relative; display: grid; gap: 20px; }
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.stat {
  display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(2px);
  transition: transform .2s, background .2s;
}
.stat:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .16); }
.stat-icon {
  flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: var(--secondary); color: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
}
.stat-body { min-width: 0; }
.stat-num { display: block; font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { display: block; margin-top: 4px; font-size: .82rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; opacity: .88; }
@media (max-width: 1000px) { .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .stats-row { gap: 12px; } .stats .container { gap: 12px; }
  .stat { flex-direction: column; text-align: center; gap: 10px; padding: 18px 10px; }
  .stat-icon { width: 48px; height: 48px; }
}

/* About Us page: Vision & Mission */
.vm { background: var(--primary-soft); }
.vm-head { text-align: center; margin-bottom: 36px; }
.vm-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); color: var(--primary); margin: 0; }
.vm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.vm-card {
  position: relative; background: #fff; border-radius: var(--radius); padding: 34px 32px 30px;
  box-shadow: var(--shadow); border-top: 5px solid var(--primary); overflow: hidden;
}
.vm-card.vm-mission { border-top-color: var(--secondary); }
.vm-card::after {
  content: ""; position: absolute; right: -40px; bottom: -40px; width: 160px; height: 160px; border-radius: 50%;
  background: var(--primary); opacity: .05;
}
.vm-icon {
  width: 62px; height: 62px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--primary); color: #fff; box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}
.vm-mission .vm-icon { background: var(--secondary); }
.vm-card h3 { font-size: 1.4rem; color: var(--primary); margin-bottom: 12px; }
.vm-card p { color: var(--muted); margin: 0 0 12px; }
/* Vision reads as a highlighted quote so the shorter card feels balanced */
.vm-vision { display: flex; flex-direction: column; }
.vm-vision::before {
  content: "\201C"; position: absolute; right: 26px; top: 6px; font: 700 9rem/1 Georgia, serif;
  color: var(--primary); opacity: .07; pointer-events: none;
}
.vm-vision p {
  position: relative; font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.7; font-style: italic; color: var(--text);
  padding-left: 18px; border-left: 4px solid var(--secondary);
}
.vm-vision p:last-of-type { margin-bottom: 24px; }
.vm-skyline { display: block; width: 100%; height: auto; max-height: 130px; margin-top: auto; }
.vm-skyline .sk-hill { fill: var(--primary); opacity: .08; }
.vm-skyline .sk-ink { fill: var(--primary); opacity: .22; }
.vm-skyline .sk-stroke { stroke: var(--primary); }
.vm-vision::after { display: none; }
.vm-list { list-style: none; margin: 0; padding: 0; }
.vm-list li { position: relative; padding-left: 32px; margin-bottom: 12px; color: var(--muted); }
.vm-list li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: .75rem; font-weight: 800; color: #fff; background: var(--secondary);
}
@media (max-width: 480px) { .vm-card { padding: 26px 20px 22px; } }

/* About Us page: Supporters */
.supporters-intro { max-width: 560px; margin: 10px auto 0; }
.supporter-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px; }
.supporter-grid > .supporter-card { flex: 0 1 calc((100% - 4 * 26px) / 5); min-width: 200px; }
.supporter-card {
  position: relative; text-align: center; background: #fff; border-radius: 18px; padding: 0 20px 24px;
  box-shadow: var(--shadow); overflow: hidden; transition: transform .25s, box-shadow .25s;
}
.supporter-card::before {
  content: ""; display: block; height: 78px; margin: 0 -20px;
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
}
.supporter-card::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--secondary);
  transform: scaleX(0); transition: transform .3s;
}
.supporter-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(16, 24, 40, .14); }
.supporter-card:hover::after { transform: scaleX(1); }
.supporter-photo {
  width: 124px; height: 124px; margin: -62px auto 14px; border-radius: 50%; overflow: hidden; position: relative;
  border: 5px solid #fff; box-shadow: 0 0 0 3px var(--secondary), 0 10px 22px rgba(0, 0, 0, .15); background: var(--primary-soft);
}
.supporter-photo img, .supporter-photo svg { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; transition: transform .4s; }
.supporter-card:hover .supporter-photo img { transform: scale(1.06); }
.supporter-photo .sp-bg { fill: var(--primary-soft); }
.supporter-photo .sp-fg { fill: var(--primary); opacity: .35; }
.supporter-card h3 { font-size: 1.08rem; margin: 0 0 4px; color: var(--text); }
.supporter-role {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--primary); background: var(--primary-soft); padding: 4px 12px; border-radius: 999px;
}
@media (max-width: 520px) {
  .supporter-grid { gap: 14px; }
  .supporter-grid > .supporter-card { flex-basis: calc((100% - 14px) / 2); min-width: 0; }
  .supporter-photo { width: 96px; height: 96px; margin-top: -48px; }
  .supporter-card::before { height: 60px; }
  .supporter-card { padding: 0 10px 18px; }
}

/* ---------- Our Panchayati page ---------- */
.hero-sub { margin: 8px 0 0; opacity: .9; }
.subnav { background: #fff; border-bottom: 1px solid var(--line); }
.subnav .container { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; padding-bottom: 12px; scrollbar-width: none; }
.subnav a {
  flex: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--text);
  text-decoration: none; font-weight: 600; font-size: .9rem; transition: .15s;
}
.subnav a span { display: inline-block; min-width: 22px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: .75rem; text-align: center; }
.subnav a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.subnav a:hover span { background: rgba(255, 255, 255, .2); color: #fff; }
.pv { scroll-margin-top: 200px; }
.pv-alt { background: var(--primary-soft); }
.pv-alt .supporter-card, .pv-alt .street-card, .pv-alt .staff-card, .pv-alt .booth-card { box-shadow: 0 6px 20px rgba(16, 24, 40, .07); }

/* 1. Villages gallery: first photo large, rest around it */
.village-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 210px; gap: 16px; }
.village-gallery > :first-child { grid-column: span 2; grid-row: span 2; }
/* fill the grid without holes for small counts */
.village-gallery.count-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.village-gallery.count-4 > :last-child { grid-column: span 2; }
.village-gallery.count-1 { grid-template-columns: 1fr; grid-auto-rows: 420px; }
.village-gallery.count-1 > :first-child { grid-column: auto; grid-row: auto; }
.village-gallery.count-2 { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 340px; }
.village-gallery.count-2 > :first-child { grid-column: auto; grid-row: auto; }
.village-tile { position: relative; display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #ccc; }
.village-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.village-tile:hover img { transform: scale(1.07); }
.village-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 14px; color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, .7), transparent);
}
.village-cap strong { display: block; font-size: 1.05rem; }
.village-cap small { display: block; opacity: .85; }
.village-gallery > :first-child .village-cap strong { font-size: 1.4rem; }
.village-zoom {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .9); color: var(--primary); font-weight: 700; opacity: 0; transform: scale(.8); transition: .2s;
}
.village-tile:hover .village-zoom, .village-tile:focus-visible .village-zoom { opacity: 1; transform: none; }
@media (max-width: 900px) {
  .village-gallery, .village-gallery.count-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 180px; }
  .village-gallery.count-2 { grid-auto-rows: 220px; }
}
@media (max-width: 520px) { .village-gallery, .village-gallery.count-2, .village-gallery.count-3 { grid-template-columns: 1fr; grid-auto-rows: 220px; } .village-gallery > :first-child, .village-gallery.count-4 > :last-child { grid-column: auto; grid-row: auto; } }

/* 2. Streets */
.street-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.street-card { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); transition: transform .2s; }
.street-card:hover { transform: translateY(-3px); }
.street-media {
  flex: none; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff;
}
.street-media img { width: 100%; height: 100%; object-fit: cover; }
.street-body { min-width: 0; }
.street-body h3 { font-size: 1rem; margin: 0 0 6px; }

/* 4. Field staff ID cards */
.staff-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.staff-card {
  flex: 0 1 240px; text-align: center; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line); padding-bottom: 18px; transition: transform .25s;
}
.staff-card:hover { transform: translateY(-5px); }
.staff-top { background: var(--primary); color: #fff; padding: 10px 12px 34px; }
.staff-top span { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .03em; }
.staff-top small { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; opacity: .8; }
.staff-photo {
  width: 104px; height: 120px; margin: -26px auto 12px; border-radius: 12px; overflow: hidden; background: var(--primary-soft);
  border: 4px solid #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .15);
}
.staff-photo img, .staff-photo svg { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
.staff-photo .sp-bg { fill: var(--primary-soft); } .staff-photo .sp-fg { fill: var(--primary); opacity: .35; }
.staff-card h3 { font-size: 1.05rem; margin: 0 0 2px; padding: 0 12px; }
.staff-role { margin: 0 0 12px; color: var(--muted); font-size: .88rem; padding: 0 12px; }
.staff-id {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 8px;
  background: var(--primary-soft); border: 1px dashed var(--primary);
}
.staff-id span { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.staff-id strong { font-family: ui-monospace, Consolas, monospace; color: var(--primary); letter-spacing: .05em; }

/* 5. Booths */
.booth-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.booth-card {
  display: flex; gap: 18px; align-items: center; background: #fff; border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); border-left: 5px solid var(--secondary);
}
.booth-no {
  flex: none; width: 86px; height: 86px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; line-height: 1.05;
}
.booth-no small { font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.booth-no strong { font-size: 1.6rem; }
.booth-info { min-width: 0; }
.booth-info h3 { font-size: 1.02rem; margin: 0 0 4px; }
.booth-info p { margin: 0 0 8px; color: var(--muted); font-size: .9rem; }
.booth-map { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; text-decoration: none; }
.booth-map:hover { text-decoration: underline; }
@media (max-width: 400px) { .booth-grid { grid-template-columns: 1fr; } .booth-no { width: 70px; height: 70px; } }

/* ---------- Photo Gallery page ---------- */
.programme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 26px; }
.programme-card { display: flex; flex-direction: column; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.programme-card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(16, 24, 40, .14); }
.programme-banner { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--primary-soft); }
.programme-banner img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.programme-card:hover .programme-banner img { transform: scale(1.06); }
.programme-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .35), transparent 55%); }
.programme-date-badge {
  position: absolute; top: 14px; left: 14px; z-index: 1; width: 58px; padding: 6px 0; border-radius: 12px; text-align: center;
  background: #fff; color: var(--primary); font-size: .72rem; font-weight: 700; text-transform: uppercase; line-height: 1.1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .2); border-bottom: 3px solid var(--secondary);
}
.programme-date-badge strong { display: block; font-size: 1.45rem; color: var(--text); }
.programme-body { padding: 18px 20px 20px; }
.programme-body h3 { font-size: 1.12rem; margin: 0 0 12px; }
.programme-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.programme-meta li {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-size: .82rem; font-weight: 600;
}
.programme-meta li.programme-staff { background: #fff; border: 1px dashed var(--primary); }
.programme-staff span { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.programme-staff strong { font-family: ui-monospace, Consolas, monospace; letter-spacing: .04em; }

.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.service-card { display: flex; flex-direction: column; background: #fff; border-radius: 16px; box-shadow: var(--shadow); transition: transform .25s; scroll-margin-top: 200px; }
.service-card:hover { transform: translateY(-5px); }
.service-card:target { outline: 3px solid var(--secondary); outline-offset: 3px; }
.service-pic { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 16px 16px 0 0; }
.service-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.service-card:hover .service-pic img { transform: scale(1.05); }
.service-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 16px; flex: 1; }
.service-body h3 { font-size: 1rem; margin: 0; }

.share { position: relative; flex: none; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--primary); background: #fff; color: var(--primary); font: inherit; font-size: .85rem; font-weight: 600; transition: .15s;
}
.share-btn:hover, .share-btn[aria-expanded="true"] { background: var(--primary); color: #fff; }
.share-menu {
  position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 20; min-width: 170px; padding: 6px; border-radius: 12px;
  background: #fff; box-shadow: 0 14px 34px rgba(16, 24, 40, .2); border: 1px solid var(--line);
}
.share-menu a, .share-menu button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; border: 0; background: none;
  color: var(--text); font: inherit; font-size: .9rem; text-decoration: none; cursor: pointer;
}
.share-menu a:hover, .share-menu button:hover { background: var(--primary-soft); color: var(--primary); }
.share-menu [data-share="whatsapp"]::before { content: "● "; color: #25d366; }
.share-menu [data-share="facebook"]::before { content: "● "; color: #1877f2; }
.share-menu [data-share="x"]::before { content: "● "; color: #000; }
.share-menu [data-share="copy"]::before { content: "● "; color: var(--secondary); }
@media (max-width: 400px) { .programme-grid { grid-template-columns: 1fr; } }

/* ---------- Notices & Announcements page ---------- */
.file-chip { flex: none; display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: .7rem; font-weight: 800; letter-spacing: .04em; color: #fff; background: #64748b; }
.file-chip.pdf { background: #dc2626; } .file-chip.doc { background: #2563eb; } .file-chip.xls { background: #16a34a; }
.file-chip.ppt { background: #ea580c; } .file-chip.img { background: #7c3aed; }

.doc-search { position: relative; max-width: 420px; margin: 0 auto 24px; }
.doc-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.doc-search input {
  width: 100%; padding: 12px 16px 12px 42px; border-radius: 999px; border: 1px solid var(--line); font: inherit;
  background: #fff; box-shadow: var(--shadow);
}
.doc-search input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

.doc-table { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.doc-row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) 160px 270px; align-items: center; gap: 16px;
  padding: 14px 22px; border-top: 1px solid var(--line); transition: background .15s;
}
.doc-row:not(.doc-head):hover { background: var(--primary-soft); }
.doc-row[hidden] { display: none; }
.doc-head { border-top: 0; background: var(--primary); color: #fff; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.doc-num { font-weight: 700; color: var(--muted); }
.doc-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.doc-name strong { font-weight: 600; }
.doc-date { color: var(--muted); font-size: .92rem; }
.doc-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.doc-actions small { color: var(--muted); font-size: .78rem; }
.doc-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  text-decoration: none; border: 1.5px solid var(--primary); color: var(--primary); background: #fff; transition: .15s;
}
.doc-btn:hover { background: var(--primary-soft); }
.doc-btn.solid { background: var(--primary); color: #fff; }
.doc-btn.solid:hover { background: var(--primary-dark); }
.doc-empty { padding: 20px 22px; margin: 0; }
@media (max-width: 860px) {
  .doc-head { display: none; }
  .doc-row { grid-template-columns: 1fr; gap: 8px; padding: 16px 18px; }
  .doc-row:first-of-type + .doc-row { border-top: 0; }
  .doc-num { display: none; }
  .doc-date::before { content: "📅 "; }
}

.np-list { display: grid; gap: 28px; }
.np-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 24px; scroll-margin-top: 200px; }
.np-card:target { outline: 3px solid var(--secondary); outline-offset: 4px; }
.np-head { display: flex; align-items: flex-start; gap: 18px; }
.np-date {
  flex: none; width: 72px; padding: 10px 0 8px; border-radius: 14px; text-align: center; line-height: 1.1;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; font-size: .78rem; font-weight: 700; text-transform: uppercase;
}
.np-date strong { display: block; font-size: 1.7rem; }
.np-date small { display: block; font-size: .68rem; opacity: .8; margin-top: 2px; }
.np-title { flex: 1; min-width: 0; }
.np-title h3 { font-size: 1.3rem; margin: 2px 0 10px; color: var(--primary); }
.np-agenda {
  margin: 18px 0 0; padding: 14px 18px; border-radius: 12px; background: var(--primary-soft); border-left: 4px solid var(--secondary);
}
.np-agenda span { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--secondary); margin-bottom: 4px; }
.np-agenda p { margin: 0; font-weight: 600; }
.share-menu.share-menu-down { bottom: auto; top: calc(100% + 8px); }

.np-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.np-photos.count-1 { grid-template-columns: minmax(0, 1fr); }
.np-photos.count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.np-photos.count-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.np-photo { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--primary-soft); }
.np-photos.count-1 .np-photo { aspect-ratio: 21 / 9; }
.np-photos.count-2 .np-photo { aspect-ratio: 16 / 9; }
.np-photo[hidden] { display: none; }
.np-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.np-photo:hover img { transform: scale(1.07); }
.np-more {
  position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .55);
  color: #fff; font-size: 1.8rem; font-weight: 800;
}
@media (max-width: 700px) {
  .np-card { padding: 18px; }
  .np-head { flex-wrap: wrap; }
  .np-head .share { order: 3; width: 100%; }
  .np-photos, .np-photos.count-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .np-date { width: 60px; } .np-date strong { font-size: 1.4rem; }
}

/* ---------- Search ID pages ---------- */
.subnav a.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.search-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.search-choice {
  display: flex; flex-direction: column; gap: 8px; padding: 26px 24px; border-radius: 18px; background: #fff;
  box-shadow: var(--shadow); text-decoration: none; color: var(--text); border-top: 4px solid var(--primary); transition: transform .2s, box-shadow .2s;
}
.search-choice:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(16, 24, 40, .14); border-top-color: var(--secondary); }
.search-choice-icon { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 6px; }
.search-choice strong { font-size: 1.2rem; color: var(--primary); }
.search-choice span:not(.search-choice-icon) { color: var(--muted); font-size: .92rem; }
.search-choice em { margin-top: auto; padding-top: 8px; font-style: normal; font-weight: 700; color: var(--secondary); }

.search-section { background: var(--primary-soft); min-height: 46vh; }
.search-box { max-width: 720px; margin: 0 auto; background: #fff; border-radius: 20px; padding: 26px 28px; box-shadow: var(--shadow); }
.search-box label { display: block; font-weight: 700; margin-bottom: 10px; }
.search-box small { display: block; margin-top: 10px; color: var(--muted); }
.search-input { display: flex; align-items: center; gap: 10px; border: 2px solid var(--line); border-radius: 14px; padding: 6px 6px 6px 16px; transition: border-color .15s; }
.search-input:focus-within { border-color: var(--primary); }
.search-input svg { flex: none; color: var(--muted); }
.search-input input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; padding: 10px 0; background: transparent; }
.search-input input::placeholder { text-transform: none; letter-spacing: 0; }
.search-input .btn { border-radius: 10px; padding: 12px 26px; }

.search-result { max-width: 860px; margin: 28px auto 0; background: #fff; border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; animation: rise .4s ease both; }
.not-found { display: flex; gap: 18px; align-items: center; padding: 24px 28px; border-left: 5px solid #dc2626; }
.not-found h2 { font-size: 1.15rem; margin: 0 0 4px; }
.not-found p { margin: 0; color: var(--muted); }
.nf-icon { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #fde8e8; color: #dc2626; font-size: 1.6rem; font-weight: 800; }

.pc-head {
  position: relative; display: flex; align-items: center; gap: 22px; padding: 26px 28px;
  background: linear-gradient(120deg, var(--primary), var(--primary-dark)); color: #fff;
}
.pc-head h2 { margin: 2px 0 4px; font-size: 1.6rem; }
.pc-kicker { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.pc-head .pc-kicker { color: #fff; }
.pc-role { margin: 0 0 8px; opacity: .9; }
.pc-photo, .pc-avatar { flex: none; width: 108px; height: 108px; border-radius: 50%; overflow: hidden; border: 4px solid #fff; box-shadow: 0 0 0 3px var(--secondary); background: var(--primary-soft); }
.pc-photo img, .pc-photo svg { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
.pc-photo .sp-bg { fill: var(--primary-soft); } .pc-photo .sp-fg { fill: var(--primary); opacity: .35; }
.pc-avatar { display: grid; place-items: center; font-size: 2.6rem; font-weight: 800; color: var(--primary); }
.pc-id { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 8px; background: rgba(255, 255, 255, .16); border: 1px dashed rgba(255, 255, 255, .6); }
.pc-id span { font-size: .7rem; font-weight: 700; letter-spacing: .1em; opacity: .85; }
.pc-id strong { font-family: ui-monospace, Consolas, monospace; letter-spacing: .06em; font-size: 1.05rem; }
.pc-verified { position: absolute; top: 16px; right: 18px; padding: 5px 12px; border-radius: 999px; background: var(--secondary); color: #fff; font-size: .78rem; font-weight: 700; }
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0; margin: 0; }
.pc-grid > div { padding: 16px 28px; border-bottom: 1px solid var(--line); }
.pc-grid dt { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pc-grid dd { margin: 4px 0 0; font-size: 1.05rem; font-weight: 600; }
.pc-booth { display: flex; gap: 18px; align-items: center; padding: 22px 28px; background: var(--primary-soft); }
.pc-booth h3 { margin: 2px 0 2px; font-size: 1.1rem; }
.pc-booth p { margin: 0 0 6px; color: var(--muted); }
.pc-booth .pc-kicker, .pc-programmes h3 span { color: var(--secondary); }
.pc-programmes { padding: 22px 28px 26px; }
.pc-programmes h3 { font-size: 1.05rem; margin: 0 0 14px; }
.pc-programmes h3 span { margin-left: 6px; }
.pc-programmes ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pc-programmes li { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; border: 1px solid var(--line); }
.pc-programmes li img { width: 72px; height: 52px; object-fit: cover; border-radius: 8px; flex: none; }
.pc-programmes li strong { display: block; font-size: .92rem; }
.pc-programmes li small { color: var(--muted); }
@media (max-width: 640px) {
  .search-box { padding: 20px 16px; }
  .search-input { flex-wrap: wrap; padding: 6px 6px 6px 12px; }
  .search-input .btn { width: 100%; }
  .pc-head { flex-direction: column; text-align: center; padding-top: 52px; }
  .pc-verified { left: 50%; right: auto; transform: translateX(-50%); white-space: nowrap; }
  .pc-grid > div, .pc-booth, .pc-programmes { padding-left: 18px; padding-right: 18px; }
}

/* ---------- Contact Us page ---------- */
.contact-section { background: var(--primary-soft); }
.contact-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 32px; }
.contact-card {
  display: flex; flex-direction: column; gap: 6px; padding: 24px 22px; border-radius: 18px; background: #fff;
  box-shadow: var(--shadow); color: var(--text); text-decoration: none; border-bottom: 4px solid transparent; transition: .2s; min-width: 0;
}
a.contact-card:hover { transform: translateY(-4px); border-bottom-color: var(--secondary); }
.cc-icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}
.cc-label { font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--secondary); }
.contact-card strong { font-size: 1.02rem; line-height: 1.4; }
.cc-break { overflow-wrap: anywhere; }
.contact-card em { margin-top: auto; padding-top: 6px; font-style: normal; font-weight: 600; font-size: .88rem; color: var(--primary); }
.contact-card em.cc-note { color: var(--muted); font-weight: 500; }

.contact-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 28px; align-items: stretch; }
.contact-map { position: relative; min-height: 460px; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); background: #dfe7e2; }
.contact-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.contact-map-link {
  position: absolute; left: 16px; bottom: 16px; padding: 9px 16px; border-radius: 999px; background: #fff; color: var(--primary);
  font-weight: 700; font-size: .88rem; text-decoration: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.contact-form-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 30px 32px; scroll-margin-top: 200px; }
.contact-form-card h2 { color: var(--primary); font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-bottom: 6px; }
.query-form { margin-top: 18px; }
.query-form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 14px; }
.query-form input, .query-form select, .query-form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  font: inherit; font-weight: 400; background: #fbfcfb; transition: border-color .15s, background .15s;
}
.query-form input:focus, .query-form select:focus, .query-form textarea:focus { outline: 0; border-color: var(--primary); background: #fff; }
.query-form textarea { resize: vertical; }
.qf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.qf-note { margin: 0 0 16px; color: var(--muted); font-size: .85rem; }
.qf-submit { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 700; padding: 13px 28px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-alert { padding: 14px 18px; border-radius: 12px; margin-top: 16px; }
.form-alert strong { display: block; }
.form-alert ul { margin: 6px 0 0; padding-left: 20px; }
.form-alert.ok { background: #e7f6ec; color: #135c2c; border: 1px solid #b6e2c3; }
.form-alert.err { background: #fdecec; color: #8b1c1c; border: 1px solid #f3bcbc; }
@media (max-width: 1000px) { .contact-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .contact-main { grid-template-columns: 1fr; } .contact-map { min-height: 340px; } }
@media (max-width: 520px) { .contact-cards { grid-template-columns: 1fr; } .qf-row { grid-template-columns: 1fr; } .contact-form-card { padding: 22px 18px; } }

/* ---------- Member portal: login ---------- */
.portal-login-wrap { padding: 64px 0; background: linear-gradient(135deg, var(--primary-soft), #fff 60%); }
.portal-login-card {
  display: grid; grid-template-columns: 1fr 1.1fr; max-width: 900px; margin: 0 auto; border-radius: 24px; overflow: hidden;
  background: #fff; box-shadow: 0 24px 60px rgba(16, 24, 40, .14);
}
.plc-side { padding: 40px 36px; color: #fff; background: linear-gradient(150deg, var(--primary), var(--primary-dark)); position: relative; overflow: hidden; }
.plc-side::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.plc-side .eyebrow { color: var(--secondary); }
.plc-side h1 { font-size: 2.2rem; margin: 4px 0 10px; }
.plc-ids { list-style: none; margin: 22px 0; padding: 0; display: grid; gap: 10px; }
.plc-ids li { display: flex; align-items: center; gap: 10px; }
.plc-ids code { min-width: 70px; text-align: center; padding: 4px 8px; border-radius: 8px; background: rgba(255, 255, 255, .18); font-weight: 700; color: #fff; }
.plc-note { font-size: .85rem; opacity: .85; margin: 12px 0 0; }
.plc-form { padding: 40px 36px; display: grid; gap: 16px; align-content: center; }
.plc-form .plc-note { color: var(--muted); opacity: 1; }
.plc-form label, .pd-form label { display: block; font-weight: 600; font-size: .9rem; }
.plc-form input, .pd-form input {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; font-weight: 400; background: #fbfcfb;
}
.plc-form input:focus, .pd-form input:focus { outline: 0; border-color: var(--primary); background: #fff; }
.plc-form input[name="login_id"] { text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.plc-form input[name="login_id"]::placeholder { text-transform: none; letter-spacing: 0; font-weight: 400; }
.plc-submit { width: 100%; border: 0; cursor: pointer; font: inherit; font-weight: 700; padding: 14px; }
.pw-field { position: relative; display: block; }
.pw-field input { padding-right: 46px; }
.pw-eye { position: absolute; right: 8px; top: calc(50% + 3px); transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.pw-eye:hover { background: var(--primary-soft); color: var(--primary); }
@media (max-width: 760px) { .portal-login-card { grid-template-columns: 1fr; } .plc-side, .plc-form { padding: 28px 22px; } }

/* ---------- Member portal: dashboard ---------- */
.pd-body { background: #f2f5f3; min-height: 100vh; display: flex; flex-direction: column; }
.pd-top { background: linear-gradient(120deg, var(--primary), var(--primary-dark)); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 4px 16px rgba(0, 0, 0, .12); }
.pd-top-inner { max-width: 1100px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pd-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.pd-brand img { height: 42px; width: auto; background: #fff; border-radius: 10px; padding: 3px; }
.pd-brand .brand-initial { width: 42px; height: 42px; font-size: 1.1rem; }
.pd-brand strong { display: block; font-size: 1rem; }
.pd-brand small { display: block; opacity: .8; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.pd-user { display: flex; align-items: center; gap: 10px; }
.pd-user-text strong { display: block; font-size: .9rem; }
.pd-user-text small { display: block; opacity: .85; font-size: .75rem; }
.pd-user form { margin: 0; }
.pd-logout { border: 1px solid rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .12); color: #fff; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.pd-logout:hover { background: #fff; color: var(--primary); }
.pd-avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 800; border: 2px solid #fff; box-shadow: 0 0 0 2px var(--secondary); }
.pd-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.pd-avatar.sm { width: 36px; height: 36px; font-size: .9rem; }
.pd-avatar.lg { width: 96px; height: 96px; font-size: 2.2rem; border-width: 4px; }
.pd-main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 26px 16px 48px; display: grid; gap: 22px; align-content: start; }
.pd-flash { margin: 0; }
.pd-hero { position: relative; display: flex; align-items: center; gap: 22px; padding: 26px 28px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); border-left: 6px solid var(--secondary); }
.pd-hero h1 { font-size: 1.6rem; margin: 2px 0 4px; color: var(--primary); }
.pd-hero p { margin: 0 0 10px; color: var(--muted); }
.pd-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--secondary); }
.pd-hero .pc-id { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.pd-site-link { position: absolute; top: 16px; right: 20px; font-size: .85rem; font-weight: 600; text-decoration: none; }
.pd-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pd-stats div { background: #fff; border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); }
.pd-stats strong { display: block; font-size: 2rem; color: var(--primary); line-height: 1.1; }
.pd-stats span { color: var(--muted); font-size: .85rem; font-weight: 600; }
.pd-card { background: #fff; border-radius: 20px; padding: 24px 26px; box-shadow: var(--shadow); scroll-margin-top: 90px; }
.pd-card h2 { font-size: 1.25rem; color: var(--primary); margin-bottom: 12px; }
.pd-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.pd-card-head h2 { margin: 0; }
.pd-count { display: inline-block; min-width: 26px; padding: 0 8px; margin-left: 6px; border-radius: 999px; background: var(--primary-soft); font-size: .9rem; text-align: center; }
.pd-note { margin: 0; padding: 12px 16px; border-radius: 12px; background: #fff; border: 1px dashed var(--primary); }
.pd-form { display: grid; gap: 14px; }
.pd-form .btn { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.pd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pd-narrow { max-width: 620px; }
.pd-check { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; }
.pd-check input { width: auto !important; margin: 0 !important; }
.fs-list { display: grid; gap: 12px; }
.fs-item { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; transition: background .2s; }
.fs-item.off { background: #fafafa; }
.fs-item.off .fs-text strong { color: var(--muted); }
.fs-main { display: flex; align-items: center; gap: 12px; }
.fs-text { flex: 1; min-width: 0; }
.fs-text strong { display: block; }
.fs-text span { color: var(--muted); font-size: .88rem; }
.fs-text code { font-weight: 700; color: var(--primary); }
.fs-toggle-form { margin: 0; }
.switch {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 0; cursor: pointer;
  background: #e5e7eb; color: #4b5563; font: inherit; font-size: .82rem; font-weight: 700; transition: background .2s;
}
.switch .knob { width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch.on { background: #16a34a; color: #fff; padding: 4px 4px 4px 12px; flex-direction: row-reverse; }
.fs-edit { margin-top: 10px; }
.fs-edit summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: .88rem; }
.fs-edit .pd-form { margin-top: 12px; }
.pd-programmes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pd-programmes li { display: flex; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.pd-programmes img { width: 80px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; }
.pd-programmes strong { display: block; font-size: .92rem; }
.pd-programmes small { color: var(--muted); }
.pd-foot { text-align: center; padding: 18px; font-size: .82rem; color: var(--muted); }
@media (max-width: 700px) {
  .pd-user-text { display: none; }
  .pd-hero { flex-direction: column; text-align: center; padding-top: 44px; }
  .pd-stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .pd-stats div { padding: 12px; } .pd-stats strong { font-size: 1.5rem; }
  .pd-row { grid-template-columns: 1fr; }
  .fs-main { flex-wrap: wrap; }
}

/* Lightbox (village photos) */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgba(10, 14, 20, .92); padding: 56px 16px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(1100px, 100%); text-align: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 160px); border-radius: 10px; margin: 0 auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox figcaption { color: #fff; margin-top: 12px; font-weight: 600; }
.lightbox button {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .15); color: #fff; font-size: 1.8rem; line-height: 1;
}
.lightbox button:hover { background: var(--secondary); }
.lightbox .lb-close { top: 14px; right: 14px; font-size: 1.5rem; }
.lightbox .lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 14px; top: 50%; transform: translateY(-50%); }

/* About Us page: picture left, full text right */
.about-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.about-page.no-image { grid-template-columns: 1fr; }
.about-page .about-media { position: sticky; top: 170px; }
.about-page-title { font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--primary); }
.about-page .prose p { color: var(--muted); }
.about-page .btn { margin-top: 8px; }
@media (max-width: 860px) { .about-page { grid-template-columns: 1fr; gap: 36px; } .about-page .about-media { position: static; } }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- 4. News slider ---------- */
.news { background: var(--primary-soft); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); color: var(--primary); margin: 0; }
.carousel-nav { display: flex; gap: 10px; }
.carousel-nav button {
  width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--primary); background: #fff; color: var(--primary);
  font-size: 1.6rem; line-height: 1; cursor: pointer; transition: .2s;
}
.carousel-nav button:hover { background: var(--primary); color: #fff; }

.news-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 20px) / 5); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 4px 24px; margin: 0 -4px;
  scrollbar-width: none;
}
.news-track::-webkit-scrollbar { display: none; }
.news-track > * { scroll-snap-align: start; }
.news .container { max-width: 1400px; }
@media (max-width: 1200px) { .news-track { grid-auto-columns: calc((100% - 3 * 20px) / 4); } }
@media (max-width: 960px) { .news-track { grid-auto-columns: calc((100% - 2 * 20px) / 3); } }
@media (max-width: 700px) { .news-track { grid-auto-columns: calc((100% - 20px) / 2); } }
@media (max-width: 440px) { .news-track { grid-auto-columns: 72%; gap: 14px; } }

/* Slider cards: newspaper clipping image, title, short summary */
.news-track .news-thumb { aspect-ratio: 4 / 5; background: #f4eedf; border-bottom: 1px solid var(--line); }
.news-track .news-body { padding: 14px 16px 18px; }
.news-track .news-body h3 { font-size: 1rem; line-height: 1.35; margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-track .news-body p { font-size: .86rem; line-height: 1.5; margin: 0; -webkit-line-clamp: 2; }

.news-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.news-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(16, 24, 40, .12); }
.news-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--primary-soft); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-card:hover .news-thumb img { transform: scale(1.05); }
.news-thumb-empty { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--primary), var(--secondary)); opacity: .5; }
.news-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.news-body time { font-size: .8rem; font-weight: 600; color: var(--secondary); text-transform: uppercase; letter-spacing: .05em; }
.news-body h3 { font-size: 1.1rem; margin: 6px 0 8px; }
.news-body h3 a { color: var(--text); text-decoration: none; }
.news-body h3 a:hover { color: var(--primary); }
.news-body p { color: var(--muted); font-size: .95rem; margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { margin-top: auto; font-weight: 600; text-decoration: none; font-size: .95rem; }
.news .center { margin-top: 12px; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }

/* ---------- Inner pages ---------- */
.page-hero { background: linear-gradient(120deg, var(--primary), var(--primary-dark)); color: #fff; padding: 48px 0; }
.page-hero h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); margin: 0; }
.page-hero time { opacity: .85; }
.crumb { color: #fff; opacity: .85; text-decoration: none; font-size: .9rem; display: inline-block; margin-bottom: 8px; }
.prose { max-width: 820px; }
.prose p { margin: 0 0 1.1em; }
.prose .lead { font-size: 1.15rem; color: var(--muted); }
.article-image { width: 100%; border-radius: var(--radius); margin-bottom: 24px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.side-list { background: var(--primary-soft); border-radius: var(--radius); padding: 20px; }
.side-list ul { list-style: none; margin: 0; padding: 0; }
.side-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.side-list li a { display: block; text-decoration: none; font-weight: 600; color: var(--text); }
.side-list li time { font-size: .8rem; color: var(--muted); }
@media (max-width: 860px) { .article-layout { grid-template-columns: 1fr; } }

/* ---------- 5. Footer ---------- */
.site-footer { background: color-mix(in srgb, var(--primary) 30%, #0d1117); color: rgba(255, 255, 255, .78); padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 1.1rem; margin-bottom: 10px; }
.footer-brand img { height: 44px; width: auto; background: #fff; border-radius: 8px; padding: 3px; }
.site-footer h4 { color: #fff; font-size: 1rem; position: relative; padding-bottom: 10px; margin-bottom: 14px; }
.site-footer h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 36px; height: 3px; background: var(--secondary); border-radius: 2px; }
.footer-links, .footer-contact { list-style: none; margin: 0; padding: 0; }
.footer-links li, .footer-contact li { margin-bottom: 8px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; overflow-wrap: anywhere; }
.footer-contact .ic { flex: none; width: 20px; text-align: center; color: var(--secondary); }
.site-footer a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.site-footer a:hover { color: var(--secondary); }
.footer-social-text { margin: 0 0 14px; font-size: .92rem; }
.social-icons { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.social-icons a {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); color: #fff;
  transition: background .2s, border-color .2s, transform .2s;
}
.site-footer .social-icons a:hover, .site-footer .social-icons a:focus-visible { color: #fff; transform: translateY(-3px); border-color: transparent; }
.social-icons a.social-facebook:hover, .social-icons a.social-facebook:focus-visible { background: #1877f2; }
.social-icons a.social-twitter:hover, .social-icons a.social-twitter:focus-visible { background: #000; }
.social-icons a.social-youtube:hover, .social-icons a.social-youtube:focus-visible { background: #ff0000; }
.social-icons a.social-instagram:hover, .social-icons a.social-instagram:focus-visible { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 18px 0; font-size: .875rem; text-align: center; }
.footer-bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.footer-bottom strong { color: var(--secondary); font-weight: 700; letter-spacing: .02em; }
@media (max-width: 700px) { .footer-bottom-inner { justify-content: center; flex-direction: column; align-items: center; } }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } .section { padding: 52px 0; } }

/* ---------- Plain pages (portal / suspended / 404) ---------- */
body.plain { min-height: 100vh; display: grid; place-items: center; background: #f4f6f8; padding: 16px; }
.plain-box { background: #fff; padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; max-width: 480px; }
.portal { width: 100%; max-width: 900px; }
.portal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 20px 0; }
.portal-card { display: flex; align-items: center; gap: 14px; background: #fff; padding: 18px; border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--text); border-left: 5px solid var(--primary); }
.portal-card img { width: 54px; height: 54px; object-fit: contain; }
.portal-card small { display: block; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.pd-idcard { display: inline-flex; margin: 10px 0 0 8px; vertical-align: middle; }
.fs-idcard { display: inline-block; margin: 8px 0 0; font-size: .85rem; font-weight: 600; color: var(--primary); }

/* ---------- Language: English / తెలుగు / हिन्दी ---------- */
html[lang="te"] body { font-family: "Noto Sans Telugu", system-ui, -apple-system, "Segoe UI", "Nirmala UI", Gautami, sans-serif; line-height: 1.75; }
html[lang="hi"] body { font-family: "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", "Nirmala UI", Mangal, sans-serif; line-height: 1.75; }
.menu > li.menu-lang { display: flex; align-items: center; margin-left: 10px; }
.menu:not(:has(.menu-cta)) > li.menu-lang { margin-left: auto; }
.lang-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .35); }
.menu .lang-switch a { padding: 4px 11px; border-radius: 999px; color: #fff; font-size: .82rem; font-weight: 600; line-height: 1.4; text-transform: none; letter-spacing: 0; white-space: nowrap; }
.menu .lang-switch a::after { display: none; }
.menu .lang-switch a:hover { background: rgba(255, 255, 255, .2); }
.menu .lang-switch a.on { background: #fff; color: var(--primary); }
.menu .lang-switch a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 960px) {
  .menu > li.menu-lang { margin: 0; padding: 12px 16px; justify-content: center; }
  .lang-switch { background: rgba(0, 0, 0, .12); }
  .menu .lang-switch a { padding: 8px 16px; font-size: .95rem; }
}
.menu .lang-switch a { text-decoration: none; }
/* Letter-spacing splits Telugu/Hindi letters apart; keep their natural spacing. */
html:is([lang="te"], [lang="hi"]) body * { letter-spacing: normal !important; }
