/* ===== DESIGN TOKENS ===== */
:root {
  --primary: #b71c1c;
  --primary-dark: #7f0000;
  --primary-mid: #c62828;
  --primary-light: rgba(183, 28, 28, 0.08);
  --gold: #f9a825;
  --gold-dark: #f57f17;
  --gold-glow: rgba(249, 168, 37, 0.25);
  --white: #ffffff;
  --light: #fff8f8;
  --light-2: #fdeaea;
  --text: #1a1a1a;
  --text-muted: #666;
  --border: #e8e0e0;
  --card-bg: #ffffff;
  --body-bg: #faf5f5;
  --shadow: 0 4px 24px rgba(183, 28, 28, 0.06);
  --shadow-hover: 0 12px 40px rgba(183, 28, 28, 0.12);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --tr: 0.3s cubic-bezier(.4, 0, .2, 1);
  --tr-fast: 0.18s ease;
  --font-ta: 'Noto Sans Tamil', sans-serif;
  --font-en: 'Inter', 'Noto Sans Tamil', sans-serif;
}

[data-theme="dark"] {
  --primary: #ef5350;
  --primary-dark: #b71c1c;
  --primary-mid: #e53935;
  --primary-light: rgba(239, 83, 80, 0.1);
  --gold: #ffd54f;
  --gold-dark: #f9a825;
  --gold-glow: rgba(255, 213, 79, 0.2);
  --white: #1a1a2e;
  --light: #0f0f1a;
  --light-2: #1a1a2e;
  --text: #f0f0f0;
  --text-muted: #aaa;
  --border: #2a2a3e;
  --card-bg: #1a1a2e;
  --body-bg: #0f0f1a;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
}


/* ===== ACCESSIBILITY UTILITIES ===== */
.visually-hidden, .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-ta);
  background: var(--body-bg);
  color: var(--text);
  line-height: 1.7;
  transition: background var(--tr), color var(--tr);
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: color var(--tr-fast); }
img { max-width: 100%; height: auto; display: block; }

.container { width: 92%; max-width: 1200px; margin: 0 auto; }
.text-center { text-align: center; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.animate-in { animation: fadeInUp 0.6s ease-out both; }

/* ===== TOP BAR ===== */
.top-bar {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.9);
  font-size: 12.5px;
  padding: 8px 0;
  letter-spacing: 0.3px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.top-flex { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.top-bar .top-contact { display: flex; align-items: center; gap: 16px; }
.top-bar .top-contact span { display: flex; align-items: center; gap: 6px; }
.top-bar .top-contact i { font-size: 11px; opacity: 0.75; }

.top-right { display: flex; align-items: center; gap: 6px; }

.top-right a {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.8); font-size: 12px;
  transition: var(--tr-fast); background: rgba(255,255,255,0.06);
}
.top-right a:hover { background: var(--gold); color: #000; transform: scale(1.1); }

/* ===== LANGUAGE TOGGLE ===== */
.lang-toggle {
  display: inline-flex; align-items: center;
  background: rgba(255,255,255,0.08);
  border-radius: 20px; padding: 2px; margin-left: 10px;
  border: 1px solid rgba(255,255,255,0.1);
}

.lang-btn {
  background: none; border: none;
  color: rgba(255,255,255,0.6); font-size: 11px; font-weight: 600;
  padding: 4px 12px; border-radius: 18px;
  cursor: pointer; transition: var(--tr-fast);
  font-family: inherit; letter-spacing: 0.5px;
}
.lang-btn.active { background: var(--gold); color: #000; box-shadow: 0 2px 8px var(--gold-glow); }
.lang-btn:hover:not(.active) { color: #fff; }

/* ===== NAVBAR ===== */
.site-navbar {
  background: var(--primary); color: #fff; padding: 0;
  position: sticky; top: 0; z-index: 1000;
  transition: background var(--tr), box-shadow var(--tr);
}

.site-navbar.scrolled {
  background: rgba(183,28,28,0.97);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0,0,0,0.15);
}

[data-theme="dark"] .site-navbar { background: #1a1a2e; border-bottom: 1px solid var(--border); }
[data-theme="dark"] .site-navbar.scrolled { background: rgba(26,26,46,0.97); }

.nav-flex { display: flex; justify-content: space-between; align-items: center; height: 64px; }

.logo-box { display: flex; align-items: center; gap: 12px; transition: var(--tr-fast); flex-shrink: 0; }
.logo-box:hover { transform: translateY(-1px); }
.logo-box img {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid var(--gold); object-fit: cover;
  box-shadow: 0 2px 10px var(--gold-glow);
}

.site-title { font-size: 18px; font-weight: 700; color: #fff; white-space: nowrap; }

.nav-links { display: flex; align-items: center; gap: 6px; }

.nav-links a {
  font-weight: 500; font-size: 14px; position: relative;
  padding: 8px 14px; border-radius: var(--radius-xs);
  transition: var(--tr-fast); color: rgba(255,255,255,0.88);
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav-links a.active { color: var(--gold); font-weight: 600; }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: 2px;
  left: 50%; transform: translateX(-50%);
  width: 18px; height: 2.5px; background: var(--gold); border-radius: 2px;
}

.btn-gold {
  background: var(--gold) !important; color: #000 !important;
  font-weight: 700; padding: 8px 22px; border-radius: 30px;
  border: 2px solid transparent; transition: var(--tr);
  font-size: 13px; letter-spacing: 0.3px;
  box-shadow: 0 2px 12px var(--gold-glow);
}
.btn-gold:hover {
  background: transparent !important; color: var(--gold) !important;
  border-color: var(--gold); transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--gold-glow);
}

.dark-toggle {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
  color: #fff; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--tr-fast); font-size: 14px; flex-shrink: 0;
}
.dark-toggle:hover { background: rgba(255,255,255,0.18); transform: rotate(15deg); }

/* ===== MOBILE MENU ===== */
.menu-toggle {
  display: none; background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15); color: #fff;
  width: 40px; height: 40px; border-radius: var(--radius-xs);
  font-size: 18px; cursor: pointer;
  align-items: center; justify-content: center; transition: var(--tr-fast);
}
.menu-toggle:hover { background: rgba(255,255,255,0.2); }

.mobile-menu {
  display: none; background: var(--primary-dark);
  padding: 8px 0 12px; border-top: 1px solid rgba(255,255,255,0.06);
}
.mobile-menu.open { display: block; animation: slideDown 0.3s ease; }

.mobile-menu a {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 24px; color: rgba(255,255,255,0.85);
  font-size: 14.5px; font-weight: 500; transition: var(--tr-fast);
  border-radius: var(--radius-xs); margin: 2px 12px;
}
.mobile-menu a:hover, .mobile-menu a.active { background: rgba(255,255,255,0.08); color: var(--gold); }
.mobile-menu a i { width: 20px; text-align: center; font-size: 13px; opacity: 0.7; }

.mobile-lang-toggle {
  display: flex; gap: 8px; padding: 10px 24px; margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.06); padding-top: 14px;
}
.mobile-lang-toggle .lang-btn {
  flex: 1; text-align: center; padding: 8px;
  border-radius: var(--radius-xs); border: 1px solid rgba(255,255,255,0.12); font-size: 12px;
}

/* ===== LEADERS PAGE HERO ===== */
.leaders-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-mid) 100%);
  color: #fff; padding: 80px 0 110px; text-align: center;
  position: relative; overflow: hidden;
}
.leaders-hero::before {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 500px; height: 500px; border-radius: 50%;
  background: rgba(249,168,37,0.05); pointer-events: none;
}

.hero-content h1 { font-size: 2.4rem; font-weight: 700; margin-bottom: 12px; }
.hero-content p { font-size: 1.05rem; opacity: 0.85; max-width: 600px; margin: 0 auto 30px; }

/* SEARCH BOX */
.search-box-wrap {
  display: flex; gap: 12px; max-width: 680px; margin: 0 auto;
  background: rgba(255,255,255,0.1); padding: 6px;
  border-radius: 50px; backdrop-filter: blur(8px);
}
.search-input-group {
  flex: 1; display: flex; align-items: center;
  background: #fff; border-radius: 40px; padding: 0 18px; gap: 10px;
}
.search-input-group i { color: var(--text-muted); font-size: 14px; }
.search-input {
  border: none; outline: none; width: 100%; padding: 12px 0;
  font-size: 14px; font-family: inherit; background: transparent; color: var(--text);
}
.district-select {
  background: #fff; border: none; border-radius: 40px;
  padding: 0 18px; font-size: 14px; font-family: inherit;
  color: var(--text); cursor: pointer; min-width: 170px;
}
.district-select:focus { outline: none; }

/* FILTER PILLS */
.filter-pills-wrap {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 28px 0 20px; justify-content: center; margin-top: 20px;
}
.filter-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 50px;
  border: 1px solid var(--border); background: var(--card-bg);
  color: var(--text-muted); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: var(--tr); font-family: inherit;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.filter-btn.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(183,28,28,0.2);
}
.count-badge {
  background: rgba(255,255,255,0.2); padding: 2px 8px;
  border-radius: 12px; font-size: 11px; font-weight: 700;
}
.filter-btn:not(.active) .count-badge { background: var(--primary-light); color: var(--primary); }

/* LEADERS SECTION */
.leaders-section { padding: 20px 0 60px; }
.leaders-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px;
}

/* LEADER CARD */
.leader-card {
  background: var(--card-bg); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-card);
  transition: transform var(--tr), box-shadow var(--tr);
  display: flex; flex-direction: column; border: 1px solid var(--border);
}
.leader-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.card-avatar-area {
  height: 110px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex; align-items: flex-end; justify-content: center; position: relative;
}
.leader-card .avatar-circle {
  width: 85px; height: 85px; border-radius: 50%;
  border: 4px solid var(--card-bg); overflow: hidden;
  position: absolute; bottom: -38px; box-shadow: 0 4px 18px rgba(0,0,0,0.1);
}
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
.css-avatar {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary-mid), var(--gold));
  color: #fff; font-size: 28px; font-weight: 800; text-transform: uppercase;
}

.card-info {
  padding: 48px 22px 22px; text-align: center;
  flex-grow: 1; display: flex; flex-direction: column;
}
.leader-name { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 4px; line-height: 1.3; }
.leader-title {
  font-size: 12px; font-weight: 600; color: var(--primary);
  margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px;
}

.badge-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.card-badge {
  font-size: 10.5px; padding: 3px 10px; border-radius: 20px;
  font-weight: 600; display: inline-flex; align-items: center; gap: 4px;
}
.badge-level-state { background: rgba(183,28,28,0.08); color: var(--primary); }
.badge-level-district { background: rgba(249,168,37,0.1); color: var(--gold-dark); }
.badge-level-wing { background: rgba(103,58,183,0.08); color: #673ab7; }

[data-theme="dark"] .badge-level-state { background: rgba(239,83,80,0.12); }
[data-theme="dark"] .badge-level-district { background: rgba(255,213,79,0.12); }
[data-theme="dark"] .badge-level-wing { background: rgba(179,157,219,0.12); color: #b39ddb; }

.leader-details {
  margin-top: auto; border-top: 1px solid var(--border);
  padding-top: 14px; display: flex; flex-direction: column;
  gap: 8px; font-size: 13px; color: var(--text-muted); text-align: left;
}
.detail-item { display: flex; align-items: center; gap: 10px; }
.detail-item i { width: 16px; color: var(--primary); text-align: center; font-size: 12px; }

/* CARD ACTION BUTTONS */
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.action-btn {
  padding: 9px 10px; border-radius: var(--radius-xs);
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border); cursor: pointer;
  transition: var(--tr-fast); background: var(--light);
  color: var(--text); font-family: inherit;
}
.action-btn:hover { border-color: var(--primary); background: var(--primary-light); }

.action-btn.btn-call { background: rgba(46,125,50,0.06); border-color: rgba(46,125,50,0.15); color: #2e7d32; }
.action-btn.btn-call:hover { background: #2e7d32; color: #fff; }
.action-btn.btn-whatsapp { background: rgba(37,211,102,0.06); border-color: rgba(37,211,102,0.15); color: #25d366; }
.action-btn.btn-whatsapp:hover { background: #25d366; color: #fff; }

[data-theme="dark"] .action-btn.btn-call { background: rgba(129,199,132,0.08); color: #81c784; }
[data-theme="dark"] .action-btn.btn-call:hover { background: #81c784; color: #000; }
[data-theme="dark"] .action-btn.btn-whatsapp { background: rgba(165,214,167,0.08); color: #a5d6a7; }
[data-theme="dark"] .action-btn.btn-whatsapp:hover { background: #a5d6a7; color: #000; }

/* NO RESULTS */
.no-results { display: none; text-align: center; padding: 60px 20px; color: var(--text-muted); }
.no-results-icon { font-size: 3.5rem; margin-bottom: 16px; }
.no-results h3 { font-size: 1.3rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }

/* ===== FOOTER ===== */
.main-footer {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #2a0000 100%);
  color: #ffffff; padding: 60px 0 0;
  border-top: 4px solid var(--gold);
  position: relative; overflow: hidden;
}
.main-footer::before {
  content: ''; position: absolute; top: -80px; right: -80px;
  width: 280px; height: 280px; border-radius: 50%;
  background: rgba(249,168,37,0.04); pointer-events: none;
}
[data-theme="dark"] .main-footer { background: linear-gradient(135deg, #0a0a14 0%, #1a1a2e 100%); }

.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1.5fr; gap: 40px; }

.footer-brand h3 { font-size: 18px; font-weight: 700; color: #ffffff; margin: 14px 0 8px; }
.footer-brand p { font-size: 13px; color: rgba(255,255,255,0.65); line-height: 1.6; }

.footer-logo {
  width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--gold); object-fit: cover;
  box-shadow: 0 2px 10px var(--gold-glow);
}

.footer-social-row { display: flex; gap: 10px; margin-top: 14px; }
.footer-social-row a {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.8); font-size: 13px; transition: var(--tr-fast);
}
.footer-social-row a:hover {
  background: var(--gold); border-color: var(--gold);
  color: #000; transform: translateY(-3px);
  box-shadow: 0 4px 15px var(--gold-glow);
}

.footer-col h4 {
  font-size: 14px; font-weight: 700; margin-bottom: 18px;
  position: relative; padding-bottom: 10px;
  color: var(--gold); letter-spacing: 0.3px;
}
.footer-col h4::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 28px; height: 2px; background: var(--gold); border-radius: 2px;
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 10px; font-size: 13px; color: rgba(255,255,255,0.65); }
.footer-col ul li a { display: flex; align-items: center; gap: 8px; transition: var(--tr-fast); }
.footer-col ul li a:hover { color: var(--gold); padding-left: 4px; }
.footer-col ul li a i { font-size: 10px; opacity: 0.5; }

.footer-contact-item {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 12px; font-size: 13px;
  color: rgba(255,255,255,0.65); line-height: 1.5;
}
.footer-contact-item i { color: var(--gold); margin-top: 3px; font-size: 13px; flex-shrink: 0; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06); margin-top: 40px;
  padding: 16px 0; display: flex; justify-content: space-between;
  align-items: center; font-size: 12px; color: rgba(255,255,255,0.4);
}
.footer-bottom-links { display: flex; gap: 16px; }
.footer-bottom-links a:hover { color: var(--gold); }

/* ===== SCROLL TO TOP ===== */
.scroll-btn {
  position: fixed; bottom: 28px; right: 28px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none;
  display: none; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 15px rgba(183,28,28,0.3);
  transition: var(--tr); z-index: 999; font-size: 15px;
}
.scroll-btn.visible { display: flex; animation: fadeIn 0.3s ease; }
.scroll-btn:hover {
  background: var(--primary-dark); transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(183,28,28,0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .nav-links { display: none; }
  .top-bar .top-contact { font-size: 11px; gap: 10px; }
  .top-right a { width: 26px; height: 26px; font-size: 11px; }
  .hero-content h1 { font-size: 1.8rem; }
  .search-box-wrap { flex-direction: column; border-radius: var(--radius); margin-bottom: -70px; }
  .search-input-group { border-radius: var(--radius-sm); }
  .district-select { width: 100%; border-radius: var(--radius-sm); padding: 12px 18px; }
  .filter-pills-wrap { margin-top: 90px; }
  .leaders-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .site-title { font-size: 15px; }
}

@media (max-width: 480px) {
  .container { width: 94%; }
  .filter-pills-wrap { gap: 6px; }
  .filter-btn { font-size: 12px; padding: 8px 14px; }
  .top-bar .top-contact span:last-child { display: none; }
}
