/* ===========================================================
   TVK Madurai East — Constituency Management Portal
   Shared stylesheet for all pages
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Noto+Sans+Tamil:wght@500;600;700&display=swap');

:root {
  --maroon: #851221;
  --maroon-dark: #6a0d0d;
  --maroon-deep: #4f0808;
  --gold: #f3b836;
  --gold-dark: #d8951f;
  --gold-light: #ffd877;
  --cream: #f6f5f3;
  --cream-2: #fbeedd;
  --ink: #2b2b2b;
  --muted: #6e6e6e;
  --line: #ecdfce;
  --white: #ffffff;
  --green: #1f9d57;
  --blue: #2b6fb3;
  --orange: #e89327;
  --shadow: 0 10px 30px rgba(80, 20, 10, 0.08);
  --shadow-sm: 0 4px 14px rgba(80, 20, 10, 0.07);
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

.tamil { font-family: 'Noto Sans Tamil', 'Poppins', sans-serif; }

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container { width: min(1280px, 95%); margin: 0 auto; }

.section { padding: 56px 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.section-head h2 { font-size: 1.5rem; font-weight: 700; color: var(--maroon); position: relative; padding-bottom: 8px; }
.section-head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 52px; height: 3px; background: linear-gradient(90deg, var(--gold), var(--maroon)); border-radius: 3px; }
.view-all { color: var(--maroon); font-weight: 600; font-size: .85rem; }
.view-all:hover { color: var(--gold-dark); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 9px; font-weight: 600; font-size: .9rem; cursor: pointer; border: none; transition: .2s; }
.btn-gold { background: linear-gradient(90deg, var(--gold), var(--gold-dark)); color: #4a2c00; }
.btn-gold:hover { filter: brightness(1.05); transform: translateY(-2px); }
.btn-maroon { background: var(--maroon); color: #fff; }
.btn-maroon:hover { background: var(--maroon-dark); transform: translateY(-2px); }
.btn-outline { background: #fff; border: 1.5px solid var(--maroon); color: var(--maroon); }
.btn-outline:hover { background: var(--maroon); color: #fff; }

/* ===========================================================
   HEADER  — Two-row layout
   Row 1: slim identity top-bar (MLA name + constituency)
   Row 2: sticky nav bar (logo + nav links + CTA + lang toggle)
   =========================================================== */

/* ---- Top identity bar ---- */
.header-topbar {
  background: linear-gradient(90deg, var(--maroon-deep) 0%, var(--maroon) 100%);
  color: rgba(255,255,255,.88);
  font-size: .72rem;
  letter-spacing: .3px;
  border-bottom: 2px solid var(--gold);
}
.header-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 0;
  flex-wrap: wrap;
}
.header-topbar__name {
  font-weight: 700;
  color: var(--gold-light);
  font-size: .78rem;
}
.header-topbar__sep {
  opacity: .35;
  font-size: .65rem;
}
.header-topbar__role {
  font-weight: 400;
  opacity: .85;
}

/* ---- Main nav bar ---- */
.site-header {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 18px rgba(0,0,0,.06);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 12px 0;
  gap: 18px;
  position: relative;
}

/* ---- Brand (logo + short text) ---- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1.5px solid var(--gold);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name {
  font-weight: 800;
  font-size: .95rem;
  color: var(--maroon);
  letter-spacing: .2px;
}
.brand-sub {
  font-size: .62rem;
  color: var(--muted);
  letter-spacing: .4px;
  font-weight: 500;
}

/* ---- Navigation links ---- */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}
.main-nav a {
  padding: 8px 13px;
  font-size: .85rem;
  font-weight: 500;
  color: #555;
  border-radius: 7px;
  transition: color .2s, background .2s;
}
.main-nav a:hover {
  color: var(--maroon);
  background: rgba(133,18,33,.04);
}
.main-nav a.active {
  color: var(--maroon);
  font-weight: 600;
  position: relative;
}
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 2px;
  background: var(--gold-dark);
  border-radius: 2px;
}

/* ---- Register CTA ---- */
.btn-register {
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-dark) 100%);
  color: #fff !important;
  padding: 9px 18px !important;
  border-radius: 8px;
  font-weight: 600 !important;
  font-size: .82rem !important;
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: filter .2s, transform .15s;
  box-shadow: 0 2px 8px rgba(133,18,33,.18);
}
.btn-register:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* ---- Language toggle ---- */
.lang-toggle {
  border: 1.5px solid var(--gold);
  background: transparent;
  color: var(--gold-dark);
  font-weight: 700;
  font-size: .78rem;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  margin-left: 4px;
  transition: background .2s, color .2s;
}
.lang-toggle:hover {
  background: var(--gold);
  color: #3d2200;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-actions {
  display: none;
}
.nav-close {
  display: none;
}
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 10, 6, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
  z-index: 90;
}
body.menu-open .mobile-nav-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ---- Hamburger toggle ---- */
.nav-toggle {
  display: none;
  background: var(--maroon);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s;
}
.nav-toggle:hover {
  background: var(--maroon-dark);
}

/* ===========================================================
   HERO (home)
   =========================================================== */
.hero { background: linear-gradient(135deg, var(--maroon-deep), var(--maroon) 45%, var(--maroon-dark)); position: relative; overflow: hidden; color: #fff; border-bottom: 6px solid var(--gold); }
.hero-banner { position: relative; z-index: 2; width: 100%; height: auto; display: block; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; }
.hero::before { width: 480px; height: 480px; background: radial-gradient(circle, rgba(243,184,54,.25), transparent 70%); top: -160px; left: -120px; }
.hero::after { width: 520px; height: 520px; background: radial-gradient(circle, rgba(243,184,54,.18), transparent 70%); bottom: -200px; right: -160px; }
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1.4fr 1fr; align-items: center; gap: 20px; padding: 40px 0 28px; }
.hero-leader { display: flex; flex-direction: column; gap: 18px; align-items: center; }
.leader-portrait { width: 120px; height: 150px; border-radius: 12px; border: 3px solid var(--gold); background: linear-gradient(160deg,#caa56a,#7a4b1e); display: grid; place-items: center; color: #fff2d6; font-size: 2.4rem; box-shadow: var(--shadow); }
.hero-center { text-align: center; }
.hero-emblem { width: 88px; height: 88px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, var(--gold-light), var(--maroon) 70%); margin: 0 auto 12px; display: grid; place-items: center; border: 3px solid var(--gold); color: #fff; font-weight: 800; }
.hero-title { font-size: 1.9rem; font-weight: 800; letter-spacing: 1px; color: var(--gold-light); }
.hero-tag { font-size: .72rem; letter-spacing: 4px; color: #ffe7b3; margin-bottom: 14px; }
.hero-tamil { font-size: 1.7rem; font-weight: 700; line-height: 1.5; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.hero-pillars { display: flex; justify-content: center; gap: 22px; margin-top: 16px; flex-wrap: wrap; }
.hero-pillars span { font-size: .9rem; color: #ffe7b3; display: flex; align-items: center; gap: 6px; }
.hero-icons { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.hero-icons .ph-circle { width: 56px; height: 56px; border-radius: 10px; border: 2px solid var(--gold); background: linear-gradient(160deg,#b98c52,#5c3514); display: grid; place-items: center; font-size: 1.4rem; }
.hero-badges { position: relative; z-index: 2; display: flex; justify-content: center; flex-wrap: wrap; gap: 22px; padding: 12px 26px; margin: 16px auto 22px; width: fit-content; max-width: 92%; background: rgba(255,255,255,.08); border: 1px solid rgba(243,184,54,.35); border-radius: 40px; }
.hero-badges span { display: flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 500; color: #fff; }
.hero-badges .dot { color: var(--gold-light); font-size: 1.1rem; }

/* ===========================================================
   STAT CARDS
   =========================================================== */
.stats { margin-top: 0; padding-top: 44px; position: relative; z-index: 5; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 18px; border: 1px solid var(--line); }
.stat-ic { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1.5rem; flex-shrink: 0; }
.stat-ic.maroon { background: var(--maroon); }
.stat-ic.orange { background: var(--orange); }
.stat-ic.blue { background: var(--blue); }
.stat-ic.green { background: var(--green); }
.stat-label { font-size: .8rem; color: var(--muted); }
.stat-num { font-size: 1.8rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.stat-sub { font-size: .72rem; color: var(--muted); }

/* ===========================================================
   GENERIC PLACEHOLDER MEDIA
   =========================================================== */
.ph {  place-items: center; color: #ffe7b3; font-size: 1.8rem; position: relative; }
.ph[data-label]::after { content: attr(data-label); position: absolute; bottom: 8px; font-size: .68rem; color: #fff; letter-spacing: .5px; }
.ph.alt { background: linear-gradient(135deg, #2f6f4f, #1f4d36); }
.ph.alt2 { background: linear-gradient(135deg, #2b5f8f, #1c3f63); }
.ph.alt3 { background: linear-gradient(135deg, #8a5a1f, #5c3712); }

/* ===========================================================
   HOME: about + activities + news columns
   =========================================================== */
.home-grid { display: grid;   grid-template-columns: 1.2fr 1.2fr 0.9fr; gap: 26px; align-items: start;align-items:stretch; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.panel-title { font-size: 1.15rem; font-weight: 700; color: var(--maroon); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.panel-title .view-all { font-size: .78rem; }

/* About MLA */

.mla-content{
    display:flex;
    gap:18px;
    align-items:flex-start;
    margin-bottom:15px;
}

.mla-photo{
    width:140px;
    min-width:140px;
    height:220px;
    margin:0;
    border-radius:10px;
    overflow:hidden;
}

.mla-photo img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.mla-text{
    flex:1;
}

.mla-text p{
    font-size:.90rem;
    color:#555;
    line-height:1.9;
    margin-bottom:15px;
}

.mla-actions{
    display:flex;
    gap:12px;
    margin-top:auto;
}

.mla-actions .btn{
    flex:1;
    justify-content:center;
    padding:12px;
    font-size:.85rem;
}
@media(max-width:768px){

    .mla-content{
        flex-direction:column;
    }

    .mla-photo{
        width:100%;
        height:250px;
    }
}
/* Activities mini grid */
.act-mini { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.act-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; transition: .2s; }
.act-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.act-card .ph { height: 100px; font-size: 1.3rem; }
.act-card .ph img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.act-body { padding: 8px 10px 12px; }
.act-date { font-size: .65rem; color: var(--gold-dark); font-weight: 600; }
.act-name { font-size: .76rem; font-weight: 600; color: var(--ink); margin-top: 3px; line-height: 1.3; }
.act-foot { text-align: center; margin-top: 16px; }
.act-foot a { color: var(--maroon); font-weight: 600; font-size: .85rem; }

/* News list */
.news-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.news-item:last-child { border-bottom: none; }
.news-thumb { width: 60px; height: 60px; border-radius: 8px; flex-shrink: 0; font-size: 1rem; }

.news-thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
    border-radius: 8px;
}
.news-info { flex: 1; }
.news-title { font-size: .85rem; font-weight: 600; color: var(--ink); line-height: 1.3; }
.news-meta { font-size: .68rem; color: var(--muted); margin-top: 3px; }
.news-meta b { color: var(--maroon); font-weight: 600; }
.news-arrow { color: var(--gold-dark); font-weight: 700; }

/* ===========================================================
   HOME: wards + grievance
   =========================================================== */
.wards-grievance { display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; align-items: start; align-items:stretch; }
.ward-grid { display: grid;     grid-template-columns:repeat(4, 1fr); gap: 12px; }
.ward-card{
    border:1px solid var(--line);
    border-radius:10px;
    padding:6px;
    background:#fff;
    transition:.2s;
}

.ward-card:hover{
    border-color:var(--gold);
    box-shadow:var(--shadow-sm);
}

.ward-head{
    display:flex;
    align-items:flex-start;
    gap:12px;
}

.ward-head i{
    font-size:24px;
    color:#6b1b1b;
    margin-top:2px;
}

.ward-head h4{
    margin:0;
    font-size:.95rem;
    color:#333;
    font-weight:700;
}

.ward-head p{
    margin:4px 0 0;
    font-size:.75rem;
    color:#666;
}

.ph-line{
    display:flex;
    align-items:center;
    gap:8px;
    margin-top:12px;
    padding-left:36px;
    font-size:.82rem;
    color:#444;
}

.ph-line i{
    color:#6b1b1b;
    font-size:13px;
}
.ward-card:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.ward-card h4 { font-size: .92rem; color: var(--maroon); display: flex; align-items: center; gap: 6px; }
.ward-card p { font-size: .74rem; color: var(--muted); margin-top: 4px; }
.ward-card .ph-line { font-size: .74rem; color: #444; margin-top: 4px; display: flex; align-items: center; gap: 5px; }
.ward-foot { text-align: center; margin-top: 16px; }

/* Grievance panel */
.grievance { background: linear-gradient(150deg, var(--maroon), var(--maroon-deep)); color: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.grievance h3 { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; }
.grievance p.lead { font-size: .85rem; color: #ffd9d0; margin: 10px 0 18px; }
.grievance .g-actions { display: flex; flex-direction: column; gap: 10px; }
.grievance .btn-gold { justify-content: space-between; }
.g-dash { background: #fff; color: var(--ink); border-radius: 12px; margin-top: 20px; padding: 18px; }
.g-dash h4 { font-size: .95rem; color: var(--maroon); margin-bottom: 14px; }
.g-stats { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; text-align: center; }
.g-stat .gi { font-size: 1.1rem; }
.g-stat .gn { font-weight: 800; font-size: 1.05rem; }
.g-stat .gl { font-size: .62rem; color: var(--muted); }
.g-rate { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.rate-ring { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--maroon); background: conic-gradient(var(--green) 85%, #e7e7e7 0); }
.rate-ring span { width: 48px; height: 48px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: .85rem; }
.g-rate p { font-size: .78rem; color: #555; }

/* ===========================================================
   HOME: gallery strip
   =========================================================== */
.gallery-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.g-tile{
    position:relative;
    overflow:hidden;
    border-radius:12px;
}

.g-tile img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.g-tile span{
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    padding:12px;
    color:#fff;
    font-weight:600;
    font-size:14px;
    background:linear-gradient(to top, rgba(0,0,0,.7), transparent);
}
/* ===========================================================
   PAGE BANNER (inner pages)
   =========================================================== */
.page-banner { background: linear-gradient(135deg, var(--maroon-deep), var(--maroon)); color: #fff; border-bottom: 5px solid var(--gold); padding: 42px 0; position: relative; overflow: hidden; }
.page-banner::after { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(243,184,54,.22), transparent 70%); right: -120px; top: -120px; }
.page-banner h1 { font-size: 2rem; font-weight: 800; position: relative; z-index: 2; }
.crumbs { font-size: .82rem; color: #ffd9b0; margin-top: 6px; position: relative; z-index: 2; }
.crumbs a { color: #ffe7b3; }

/* ===========================================================
   ACTIVITIES PAGE
   =========================================================== */
   .activity-photo{
    height:100%;
    overflow:hidden;
}

.activity-photo img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-bar button { padding: 8px 18px; border-radius: 30px; border: 1.5px solid var(--line); background: #fff; font-weight: 500; font-size: .84rem; cursor: pointer; transition: .2s; color: #555; }
.filter-bar button.active, .filter-bar button:hover { background: var(--maroon); color: #fff; border-color: var(--maroon); }
.activity-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.activity-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: .2s; }
.activity-item:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.activity-item .ph { height: 300px; }
.ai-body { padding: 18px; }
.ai-tag { display: inline-block; background: var(--cream-2); color: var(--maroon); font-size: .68rem; font-weight: 600; padding: 4px 10px; border-radius: 20px; margin-bottom: 10px; }
.ai-date { font-size: .72rem; color: var(--gold-dark); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.ai-title { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin: 8px 0; }
.ai-desc { font-size: .82rem; color: #666; }
.ai-link { color: var(--maroon); font-weight: 600; font-size: .8rem; margin-top: 12px; display: inline-block; }

/* ===========================================================
   WARDS PAGE
   =========================================================== */
.search-wrap { display: flex; gap: 10px; margin-bottom: 28px; max-width: 460px; }
.search-wrap input { flex: 1; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 9px; font-family: inherit; font-size: .9rem; }
.search-wrap input:focus { outline: none; border-color: var(--gold); }
.wards-full { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.wfull-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--maroon); border-radius: 12px; padding: 18px; box-shadow: var(--shadow-sm); transition: .2s; display: flex; flex-direction: column; gap: 4px; }
.wfull-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-left-color: var(--gold-dark); }
.wfull-card .wnum { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, var(--maroon), var(--maroon-dark)); color: var(--gold-light); display: grid; place-items: center; font-weight: 800; font-size: 1rem; margin-bottom: 8px; border: 1.5px solid var(--gold); }
.wfull-card h3 { font-size: 1.02rem; color: var(--maroon); }
.wfull-card .officer { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.wfull-card .phone { font-size: .82rem; color: var(--maroon); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; background: var(--cream-2); padding: 6px 12px; border-radius: 7px; align-self: flex-start; }

/* ===========================================================
   PORTFOLIO PAGE
   =========================================================== */
   .ph-photo-box{
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: 10px;
}

.ph-photo-box img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pf-hero { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; }
.pf-photo{
    overflow:hidden;
    border-radius:12px;
}

.pf-photo img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.pf-photo { width: 100%; height: 360px; border-radius: 16px; border: 4px solid var(--gold); box-shadow: var(--shadow); font-size: 4rem; }
.pf-intro h1 { font-size: 2.2rem; color: var(--maroon); }
.pf-role { color: var(--gold-dark); font-weight: 600; font-size: 1rem; margin: 4px 0 16px; letter-spacing: .5px; }
.pf-intro p { color: #555; font-size: .95rem; margin-bottom: 12px; }
.pf-quick { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 18px; }
.pf-quick div { font-size: .85rem; }
.pf-quick b { display: block; color: var(--maroon); font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; }
.pf-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.pf-stat { background: linear-gradient(150deg, var(--maroon), var(--maroon-dark)); color: #fff; border-radius: var(--radius); padding: 26px; text-align: center; box-shadow: var(--shadow-sm); }
.pf-stat .n { font-size: 2.1rem; font-weight: 800; color: var(--gold-light); }
.pf-stat .l { font-size: .82rem; color: #ffd9d0; margin-top: 4px; }

.pf-block { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.pf-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.pf-card h3 { color: var(--maroon); font-size: 1.2rem; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.pf-list { list-style: none; }
.pf-list li { padding: 10px 0 10px 26px; position: relative; font-size: .9rem; color: #444; border-bottom: 1px dashed var(--line); }
.pf-list li:last-child { border-bottom: none; }
.pf-list li::before { content: "✦"; position: absolute; left: 0; color: var(--gold-dark); }

.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--gold); }
.tl-item { position: relative; padding-bottom: 22px; }
.tl-item::before { content: ""; position: absolute; left: -28px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--maroon); border: 3px solid var(--gold); }
.tl-year { font-weight: 700; color: var(--gold-dark); font-size: .85rem; }
.tl-text { font-size: .88rem; color: #444; }

.focus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.focus-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; text-align: center; box-shadow: var(--shadow-sm); transition: .2s; }
.focus-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.focus-ic { width: 60px; height: 60px; border-radius: 50%; background: var(--cream-2); display: grid; place-items: center; font-size: 1.6rem; margin: 0 auto 14px; }
.focus-card h4 { color: var(--maroon); font-size: 1rem; margin-bottom: 8px; }
.focus-card p { font-size: .82rem; color: #666; }

.vision-band { background: linear-gradient(135deg, var(--maroon-deep), var(--maroon)); color: #fff; border-radius: var(--radius); padding: 40px; text-align: center; border: 2px solid var(--gold); }
.vision-band h3 { color: var(--gold-light); font-size: 1.4rem; margin-bottom: 14px; }
.vision-band p { max-width: 760px; margin: 0 auto; color: #ffe7d6; font-size: 1rem; }

/* ===========================================================
   GALLERY PAGE
   =========================================================== */
.gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gal-item { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); position: relative; transition: .2s; }
.gal-item:hover { transform: scale(1.02); box-shadow: var(--shadow); }
.gal-item .ph { height: 220px; }
.gal-item .ph-photo-box { position: relative; width: 100%; height: 240px; overflow: hidden; }
.gal-item .ph-photo-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-cap { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.78)); color: #fff; padding: 32px 14px 12px; pointer-events: none; }
.gal-cap b { display: block; font-size: .92rem; line-height: 1.3; }
.gal-cap span { font-size: .72rem; color: #ffd9b0; }

/* ===========================================================
   CONTACT PAGE
   =========================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; margin-bottom: 18px; display: flex; gap: 16px; box-shadow: var(--shadow-sm); }
.info-card .ic { width: 52px; height: 52px; border-radius: 12px; background: var(--cream-2); display: grid; place-items: center; font-size: 1.4rem; flex-shrink: 0; }
.info-card h4 { color: var(--maroon); font-size: 1rem; }
.info-card p { font-size: .86rem; color: #555; }
.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.contact-form h3 { color: var(--maroon); margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .8rem; font-weight: 600; color: #444; margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 9px; font-family: inherit; font-size: .9rem; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); }
.map-ph { height: 260px; border-radius: var(--radius); margin-top: 24px; font-size: 2rem; }

/* ===========================================================
   FOOTER (identical on every page)
   =========================================================== */
 .pre-footer {
    background: #f6f5f3;
    padding: 20px;
    border-top: 1px solid #e5e7eb;
}

.footer-info-bar {
    display: flex;
    align-items: stretch;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.footer-item {
    flex: 1;
    padding: 20px;
    display: flex;
    gap: 14px;
    border-right: 1px solid #e5e7eb;
}

.footer-item:last-child {
    border-right: none;
}

.footer-brand {
    flex: 1.4;
}

.footer-logo {
    width: 70px;
    height: auto;
    object-fit: contain;
}

.footer-brand h4 {
    font-size: 22px;
    color: #6b0f0f;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.footer-brand p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.footer-icon {
    color: #6b0f0f;
    font-size: 22px;
    margin-top: 3px;
}

.footer-item h5 {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin-bottom: 10px;
}

.footer-item p {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin: 0;
}

.location-box {
    position: relative;
    width: 200px;
}

.location-box img {
    width: 100%;
    border-radius: 8px;
}

.view-location-btn{
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    
    background: #6b0f0f;
    color: #fff;
    text-decoration: none;
    
    padding: 8px 0;          /* remove horizontal padding effect */
    width: 85%;              /*  increased width */
    text-align: center;
    
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}
@media (max-width: 991px) {

    .footer-info-bar {
        flex-direction: column;
    }

    .footer-item {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .footer-item:last-child {
        border-bottom: none;
    }

    .footer-location .location-box {
        width: 100%;
        max-width: 220px;
    }
}

.footer { background: var(--maroon-deep); color: #f3dcc8; padding: 44px 0 0; }
.footer-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 28px; }
.foot-brand .fb-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.foot-brand .brand-logo { width: 44px; height: 44px; }
.foot-brand h4 { color: #fff; font-size: 1.1rem; }
.foot-brand .sub { font-size: .72rem; color: #d8b29c; }
.foot-brand p { font-size: .8rem; color: #d8b29c; }
.socials { display: flex; gap: 10px; margin-top: 14px; }
.socials a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; color: #fff; font-size: .85rem; transition: .2s; }
.socials a:hover { background: var(--gold); color: var(--maroon-deep); }
.foot-col h5 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.foot-col ul { list-style: none; }
.foot-col ul li { margin-bottom: 9px; }
.foot-col ul li a, .foot-col ul li { font-size: .82rem; color: #d8b29c; }
.foot-col ul li a:hover { color: var(--gold-light); }
.foot-contact p { font-size: .82rem; color: #d8b29c; margin-bottom: 9px; display: flex; gap: 8px; }
.subscribe { display: flex; margin-top: 12px; }
.subscribe input { flex: 1; padding: 10px 12px; border: none; border-radius: 7px 0 0 7px; font-family: inherit; font-size: .8rem; }
.subscribe button { background: linear-gradient(90deg, var(--gold), var(--gold-dark)); border: none; color: #4a2c00; font-weight: 600; padding: 0 18px; border-radius: 0 7px 7px 0; cursor: pointer; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding: 16px 0; display: flex; justify-content: space-between; font-size: .78rem; color: #c9a48f; }
.foot-bottom .powered b { color: var(--gold-light); }

/* ===========================================================
   RESPONSIVE
   =========================================================== */
/* ---- Tablet / small laptop ---- */
@media (max-width: 1000px) {
  .home-grid, .wards-grievance, .pf-hero, .pf-block, .contact-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .stat-card { padding: 18px; gap: 14px; }
  .activity-grid, .focus-grid, .gal-grid { grid-template-columns: 1fr 1fr; }
  .wards-full { grid-template-columns: 1fr 1fr 1fr; }
  .gallery-strip { grid-template-columns: repeat(3, 1fr); }
  .pf-stats { grid-template-columns: 1fr 1fr; }
  .pf-cols, .footer-cols { grid-template-columns: 1fr 1fr; }
  .pf-photo { height: 320px; max-width: 320px; margin: 0 auto; }
}

/* ---- Landscape phone / small tablet / tablet ---- */
@media (max-width: 1024px) {
  .header-inner { grid-template-columns: auto auto; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; margin-left: auto; }
  .header-actions { display: none; }
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 86vw);
    height: 100dvh;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 22px 20px 24px;
    gap: 16px;
    box-shadow: -12px 0 35px rgba(0,0,0,.16);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .22s ease, opacity .22s ease, visibility .22s ease;
    z-index: 160;
  }
  .main-nav.open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: auto;
    border: none;
    border-radius: 50%;
    background: rgba(133,18,33,.08);
    color: var(--maroon);
    cursor: pointer;
  }
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 6px;
  }
  .nav-links a {
    padding: 12px 14px;
    border-radius: 8px;
  }
  .nav-links a:hover { background: rgba(133,18,33,.05); }
  .nav-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }
  .nav-actions .btn-register,
  .nav-actions .lang-toggle {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }
  .btn-register { margin-left: 0; text-align: center; justify-content: center; }
  .lang-toggle { margin-left: 0; width: 100%; text-align: center; }
  .header-topbar__sep { display: none; }
  .header-topbar__inner { flex-direction: column; gap: 2px; text-align: center; padding: 5px 0; }
  .stats-grid { grid-template-columns: 1fr; }
  .act-mini, .activity-grid, .focus-grid, .gal-grid, .wards-full, .form-row { grid-template-columns: 1fr; }
  .gallery-strip { grid-template-columns: 1fr 1fr; }
  .pf-stats, .g-stats, .pf-cols, .footer-cols { grid-template-columns: 1fr 1fr; }
  .ward-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .foot-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .page-banner h1 { font-size: 1.6rem; }
  .pf-intro h1 { font-size: 1.7rem; }
  .hero-badges { gap: 14px; padding: 10px 18px; }
  .contact-form { order: -1; }
}

/* ---- Portrait phone ---- */
@media (max-width: 480px) {
  .section { padding: 40px 0; }
  .act-mini { grid-template-columns: 1fr; }
  .gallery-strip, .pf-stats, .g-stats, .pf-cols, .footer-cols { grid-template-columns: 1fr; }
  .hero-badges { flex-direction: column; align-items: center; border-radius: 18px; }
  .hero-badges span { font-size: .86rem; }
  .pf-quick { gap: 14px; }
  .brand-sub { display: none; }
  .brand-name { font-size: .9rem; }
  .nav-toggle { width: 38px; height: 38px; }
  .header-topbar { font-size: .65rem; }
  .header-topbar__name { font-size: .7rem; }
}


.icon-line{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.icon-line i{
  color: #0f0f0f;
  font-size: 14px;
}
@media (max-width: 768px) {
  .act-card .ph {
    height: 200px;   /*  increase here */
    font-size: 1.3rem;
  }
  .footer-item {
   
    display: block;
    
}
}

/* ===========================================================
   Admin DataTables / scrollbar styling (merged from style.css)
   =========================================================== */
/* Admin - form_response.php style */
        .w-full.overflow-x-auto.custom-scrollbar {
            padding-bottom: 12px;
            margin-top: 12px;
        }
        .custom-scrollbar::-webkit-scrollbar {
            margin-top: 100px !important;
            width: 5px;
            height: 5px;
        }
        .custom-scrollbar::-webkit-scrollbar-track {
             margin-top: 100px !important;
            background: transparent;
        }
        .custom-scrollbar::-webkit-scrollbar-thumb {
            
            background: #cbd5e1;
            border-radius: 4px;
        }
        .custom-scrollbar::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

        /* Custom DataTables styling to match our professional theme */
        .dataTables_wrapper {
            padding-top: 0.5rem;
        }
        .dataTables_wrapper .dataTables_length, 
        .dataTables_wrapper .dataTables_filter {
            margin-bottom: 1.25rem;
            font-size: 0.875rem;
            color: #475569;
        }
        .dataTables_wrapper .dataTables_filter input {
            border: 1px solid #e2e8f0 !important;
            border-radius: 0.75rem !important;
            padding: 0.5rem 1rem !important;
            outline: none !important;
            background-color: #f8fafc !important;
            margin-left: 0.5rem !important;
            transition: all 0.2s !important;
            width: 200px;
        }
        .dataTables_wrapper .dataTables_filter input:focus {
            border-color: #851221 !important;
            background-color: #fff !important;
            box-shadow: 0 0 0 4px rgba(133, 18, 33, 0.1) !important;
        }
        .dataTables_wrapper .dataTables_length select {
            border: 1px solid #e2e8f0 !important;
            border-radius: 0.5rem !important;
            padding: 0.375rem 1.5rem 0.375rem 0.75rem !important;
            outline: none !important;
            background-color: #f8fafc !important;
        }
        .dataTables_wrapper thead th {
            background-color: #f8fafc !important;
            color: #475569 !important;
            font-weight: 700 !important;
            text-transform: uppercase !important;
            font-size: 0.75rem !important;
            letter-spacing: 0.05em !important;
            border-bottom: 2px solid #e2e8f0 !important;
            padding: 12px 16px !important;
        }
        .dataTables_wrapper tbody td {
            padding: 12px 16px !important;
            border-bottom: 1px solid #f1f5f9 !important;
            font-size: 0.875rem !important;
            color: #334155 !important;
        }
        .dataTables_wrapper tbody tr:hover {
            background-color: #f8fafc !important;
        }
        .dataTables_wrapper .dataTables_paginate {
            padding-top: 1.25rem !important;
        }
        .dataTables_wrapper .dataTables_paginate .paginate_button {
            border: 1px solid #e2e8f0 !important;
            border-radius: 0.5rem !important;
            padding: 0.375rem 0.75rem !important;
            margin-left: 0.25rem !important;
            font-size: 0.875rem !important;
            font-weight: 500 !important;
            color: #475569 !important;
            background: #fff !important;
            transition: all 0.2s !important;
        }
        .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
            background: #f1f5f9 !important;
            color: #1e293b !important;
            border-color: #cbd5e1 !important;
        }
        .dataTables_wrapper .dataTables_paginate .paginate_button.current, 
        .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
            background: #851221 !important;
            color: #fff !important;
            border-color: #851221 !important;
        }
        .dt-buttons {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1.25rem;
            flex-wrap: wrap;
        }
        .dt-button {
            background: #f1f5f9 !important;
            color: #475569 !important;
            border: 1px solid #e2e8f0 !important;
            padding: 0.4rem 0.85rem !important;
            border-radius: 0.5rem !important;
            font-size: 0.75rem !important;
            font-weight: 600 !important;
            cursor: pointer !important;
            transition: all 0.2s !important;
            display: inline-flex !important;
            align-items: center !important;
            gap: 0.375rem !important;
        }
        .dt-button:hover {
            background: #e2e8f0 !important;
            color: #1e293b !important;
            border-color: #cbd5e1 !important;
        }
        .custom-scrollbar {
            margin-top: 15px;
        }

        /* Dynamic Language Toggle Styles */
        html:not([lang="ta"]) .lang-ta {
            display: none !important;
        }
        html[lang="ta"] .lang-en {
            display: none !important;
        }
