:root {
  --primary: #004b50;
  --primary-light: #006e75;
  --primary-dark: #002e32;
  --gold: #d4af37;
  --gold-hover: #c59f2c;
  --gold-light: #fffcf0;
  --dark: #0f1e21;
  --text: #2c3e42;
  --muted: #6e8489;
  --white: #ffffff;
  --bg: #f5faf9;
  --card: #ffffff;
  --danger: #d93829;
  --danger-light: #fff5f4;
  --success: #1b8a5a;
  --success-light: #e8f7f1;
  --shadow-sm: 0 4px 12px rgba(0, 75, 80, 0.04);
  --shadow-md: 0 12px 28px rgba(0, 75, 80, 0.08);
  --shadow-lg: 0 20px 48px rgba(0, 75, 80, 0.12);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Anek Bangla', sans-serif;
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 110, 117, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(0.5deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes float-badge-top {
  0% { transform: translateY(0px) translateX(0px); }
  50% { transform: translateY(-6px) translateX(-3px); }
  100% { transform: translateY(0px) translateX(0px); }
}

@keyframes float-badge-bottom {
  0% { transform: translateY(0px) translateX(0px); }
  50% { transform: translateY(-8px) translateX(3px); }
  100% { transform: translateY(0px) translateX(0px); }
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Topbar */
.topbar {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 12px 0;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.topbar-info {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.topbar-info span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0.9;
  transition: var(--transition);
}

.topbar-info span:hover {
  opacity: 1;
  color: var(--gold);
}

.topbar-social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.07);
  padding: 6px 14px;
  border-radius: 99px;
  font-weight: 600;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar-social:hover {
  background: var(--gold);
  color: var(--dark);
  transform: translateY(-1px);
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 75, 80, 0.06);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  user-select: none;
}

.brand-logo {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 8px 20px rgba(0, 75, 80, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.brand-logo::after {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  border-radius: calc(var(--radius-md) - 2px);
}

.brand-text {
  font-weight: 800;
  color: var(--primary);
  font-size: 19px;
  line-height: 1.2;
}

.brand-text small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  margin-top: 1px;
}

.menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

.menu a {
  font-weight: 700;
  color: var(--text);
  font-size: 16px;
  position: relative;
  padding: 6px 2px;
  transition: var(--transition);
}

.menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--gold);
  transition: var(--transition);
  border-radius: 2px;
}

.menu a:hover {
  color: var(--primary);
}

.menu a:hover::after {
  width: 100%;
}

.mobile-btn {
  display: none;
  border: 0;
  background: var(--primary);
  color: var(--white);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mobile-btn:hover {
  background: var(--primary-light);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-md);
  padding: 12px 24px;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  box-shadow: 0 8px 20px rgba(0, 75, 80, 0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 75, 80, 0.25);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #ecd272);
  color: var(--dark);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.15);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(212, 175, 55, 0.25);
  background: linear-gradient(135deg, #ecd272, var(--gold));
}

.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(0, 75, 80, 0.18);
  color: var(--primary);
}

.btn-outline:hover {
  background: rgba(0, 75, 80, 0.05);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(217, 56, 41, 0.1);
}

.btn-danger:hover {
  background: var(--danger);
  color: var(--white);
}

.btn-sm {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

/* Hero Section */
.hero {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 45px;
  align-items: center;
}

.hero-content {
  z-index: 2;
  animation: fadeIn 0.8s ease-out;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.12);
  color: #ab811f;
  border: 1px solid rgba(212, 175, 55, 0.22);
  padding: 8px 18px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.05);
}

.badge i {
  animation: pulse-glow 2s infinite;
  border-radius: 50%;
}

/* Modern Gradient Title */
.hero h1 {
  font-size: clamp(36px, 4.5vw, 54px);
  line-height: 1.25;
  background: linear-gradient(135deg, var(--primary) 20%, var(--primary-light) 60%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero .lead {
  font-size: 19px;
  color: var(--text);
  opacity: 0.88;
  margin-bottom: 35px;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
  margin-bottom: 45px;
}

/* Modern Glassmorphic Info Boxes */
.info-boxes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.info-box {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 75, 80, 0.04);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.info-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--gold), var(--primary-light));
  opacity: 0;
  transition: var(--transition);
}

.info-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.65);
}

.info-box:hover::before {
  opacity: 1;
}

.info-box i {
  color: var(--gold);
  font-size: 24px;
  margin-bottom: 4px;
}

.info-box strong {
  display: block;
  font-size: 24px;
  color: var(--primary);
  font-weight: 800;
  line-height: 1.1;
}

.info-box span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

/* Redesigned Hero Image Container with Asymmetrical Curved Shape and Floating elements */
.hero-image-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  animation: fadeIn 1.2s ease-out;
  width: 100%;
}

.hero-shape-1 {
  position: absolute;
  top: -12%;
  right: -10%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.18) 0%, transparent 70%);
  z-index: -2;
  border-radius: 50%;
  filter: blur(15px);
  pointer-events: none;
}

.hero-shape-2 {
  position: absolute;
  bottom: -15%;
  left: -8%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(0, 110, 117, 0.14) 0%, transparent 70%);
  z-index: -2;
  border-radius: 50%;
  filter: blur(15px);
  pointer-events: none;
}

.hero-image-bg-card {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--gold), var(--primary-light));
  border-radius: 65px 20px 65px 20px;
  opacity: 0.12;
  transform: rotate(-4deg);
  z-index: -1;
  transition: var(--transition);
  pointer-events: none;
}

.hero-card {
  background: var(--white);
  border-radius: 65px 20px 65px 20px; /* Asymmetric frame */
  padding: 10px;
  box-shadow: var(--shadow-lg);
  border: 1.5px solid rgba(0, 75, 80, 0.08);
  width: 100%;
  transition: var(--transition);
  z-index: 2;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 6s ease-in-out infinite;
}

.hero-card img {
  width: 100%;
  height: auto;
  border-radius: 55px 12px 55px 12px; /* Internal frame */
  object-fit: contain;
  transition: var(--transition);
}

.hero-image-wrap:hover .hero-image-bg-card {
  transform: rotate(-6deg) scale(1.03);
  opacity: 0.16;
}

.hero-image-wrap:hover .hero-card {
  border-color: rgba(212, 175, 55, 0.25);
  box-shadow: 0 35px 70px rgba(0, 75, 80, 0.18);
}

.hero-image-wrap:hover .hero-card img {
  transform: scale(1.03);
}

/* Floating Glassmorphic Badges */
.floating-badge {
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  padding: 10px 18px;
  border-radius: 99px;
  box-shadow: 0 10px 30px rgba(0, 75, 80, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
  z-index: 10;
  pointer-events: none;
}

.badge-top {
  top: 8%;
  left: -4%;
  animation: float-badge-top 4s ease-in-out infinite;
}

.badge-bottom {
  bottom: 10%;
  right: -4%;
  animation: float-badge-bottom 5s ease-in-out infinite;
}

.text-gold {
  color: var(--gold);
}

.text-success {
  color: var(--success);
}

/* Sections General */
section {
  padding: 70px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 35px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: 32px;
  color: var(--primary);
  font-weight: 800;
  position: relative;
  padding-bottom: 12px;
}

.section-head h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 2px;
}

.section-head p {
  color: var(--muted);
  max-width: 600px;
  font-size: 16px;
  margin-top: 8px;
}

/* Union Card */
.union-card {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 35px;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: var(--transition);
}

.union-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 25px 55px rgba(0, 75, 80, 0.25);
}

.union-card::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.union-card h3 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.union-card h3 i {
  color: var(--gold);
}

.union-card p {
  opacity: 0.85;
  font-size: 16px;
}

/* Toolbar & Search */
.toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 30px 0;
}

.search {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.search i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 16px;
  transition: var(--transition);
}

.search input, .form-control {
  width: 100%;
  height: 52px;
  border: 1.5px solid rgba(0, 75, 80, 0.1);
  border-radius: var(--radius-md);
  padding: 0 20px;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  background: var(--white);
  transition: var(--transition);
  color: var(--text);
  font-weight: 500;
}

.search input {
  padding-left: 50px;
}

.search input:focus, .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 75, 80, 0.08);
}

.search input:focus + i {
  color: var(--primary);
}

textarea.form-control {
  height: 140px;
  padding-top: 15px;
  resize: vertical;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e8489' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 18px;
  padding-right: 45px;
  cursor: pointer;
}

/* Villages Grid */
.village-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.village-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid rgba(0, 75, 80, 0.05);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.village-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  opacity: 0.8;
  transition: var(--transition);
}

.village-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 75, 80, 0.1);
}

.village-card:hover::before {
  opacity: 1;
  height: 5px;
}

.village-card h3 {
  font-size: 20px;
  color: var(--primary);
  font-weight: 800;
  margin-top: 8px;
}

.mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mini {
  background: #f5fcfc;
  border: 1px solid rgba(0, 75, 80, 0.03);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
  transition: var(--transition);
}

.mini span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  display: block;
  margin-bottom: 2px;
}

.mini strong {
  display: block;
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 800;
}

.village-card:hover .mini {
  background: #edf7f7;
}

.total-pill {
  position: absolute;
  top: 15px;
  right: 15px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  background: var(--gold-light);
  color: #926f0f;
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 99px;
  padding: 5px 12px;
  font-weight: 700;
  font-size: 13px;
}

/* Statistics row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 75, 80, 0.05);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-card i {
  width: 50px;
  height: 50px;
  background: #eefcfc;
  color: var(--primary);
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  font-size: 22px;
  margin-bottom: 16px;
  border: 1px solid rgba(0, 75, 80, 0.04);
}

.stat-card strong {
  font-size: 32px;
  color: var(--primary);
  display: block;
  font-weight: 800;
  line-height: 1.1;
}

.stat-card span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

/* Complaint section */
.complaint-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 30px;
  align-items: start;
}

.panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 75, 80, 0.05);
}

.panel h3 {
  font-size: 26px;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 12px;
}

.panel p {
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 15px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.full {
  grid-column: 1 / -1;
}

/* Hidable Admin box */
.admin-section-hidden {
  display: none;
}

.admin-section-hidden.visible {
  display: block !important;
  animation: fadeIn 0.6s ease-out;
}

.admin-box {
  display: none;
  margin-top: 30px;
}

.admin-box.active {
  display: block;
  animation: fadeIn 0.5s ease-out;
}

.table-wrap {
  overflow: auto;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 75, 80, 0.06);
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
  background: var(--white);
}

th, td {
  padding: 16px 20px;
  border-bottom: 1px solid #ebf2f2;
  text-align: left;
  white-space: nowrap;
}

th {
  background: #f3faf9;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 15px;
}

td {
  font-size: 15px;
  color: var(--text);
}

tr:last-child td {
  border-bottom: 0;
}

tr:hover td {
  background: #fafdff;
}

.actions {
  display: flex;
  gap: 8px;
}

/* Contact information */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.contact-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 75, 80, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--transition);
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 75, 80, 0.1);
}

.contact-card i {
  color: var(--gold);
  font-size: 26px;
  margin-bottom: 4px;
}

.contact-card strong {
  display: block;
  color: var(--primary);
  font-size: 20px;
  font-weight: 800;
}

.contact-card span {
  color: var(--muted);
  font-size: 15px;
  word-break: break-all;
  font-weight: 500;
}

/* Footer */
footer {
  background: var(--primary-dark);
  color: var(--white);
  padding: 30px 0;
  text-align: center;
  font-size: 15px;
  border-top: 1.5px solid rgba(255, 255, 255, 0.04);
}

footer .container {
  opacity: 0.8;
}

/* Modal styling */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 33, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-card {
  background: var(--white);
  width: min(500px, 100%);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: 0 25px 60px rgba(15, 30, 33, 0.25);
  border: 1px solid rgba(0, 75, 80, 0.08);
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal.active .modal-card {
  transform: translateY(0);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-head h3 {
  font-size: 26px;
  color: var(--primary);
  font-weight: 800;
}

.close {
  border: 0;
  background: #f0f6f6;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  color: var(--primary);
  display: grid;
  place-items: center;
  transition: var(--transition);
}

.close:hover {
  background: var(--primary);
  color: var(--white);
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.detail-stat {
  background: #f5faf9;
  border: 1px solid rgba(0, 75, 80, 0.04);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
}

.detail-stat strong {
  font-size: 24px;
  color: var(--primary);
  display: block;
  font-weight: 800;
}

.detail-stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

/* Toast System */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--primary);
  color: var(--white);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f0f5f5;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 75, 80, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 75, 80, 0.3);
}

/* Responsiveness adjustments */
@media(max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-image-wrap {
    order: -1;
    max-width: 500px;
    margin: 0 auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .complaint-wrap {
    grid-template-columns: 1fr;
  }
  .village-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
  .stats-row, .info-boxes, .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--white);
    display: none;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 15px 35px rgba(0, 75, 80, 0.08);
    border-bottom: 1px solid rgba(0, 75, 80, 0.06);
    gap: 15px;
    z-index: 99;
  }
  .menu.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
  }
  .menu a::after {
    display: none;
  }
  .mobile-btn {
    display: flex;
  }
  .badge-top {
    left: 0%;
  }
  .badge-bottom {
    right: 0%;
  }
}

@media(max-width: 576px) {
  .topbar-info {
    justify-content: center;
    width: 100%;
  }
  .topbar .container {
    justify-content: center;
  }
  .brand-text {
    font-size: 16px;
  }
  .hero h1 {
    font-size: 32px;
  }
  .hero .lead {
    font-size: 16px;
  }
  .village-grid, .stats-row, .info-boxes, .contact-grid, .form-grid, .detail-stats {
    grid-template-columns: 1fr;
  }
  .union-card {
    grid-template-columns: 1fr;
    padding: 24px;
    text-align: center;
    justify-items: center;
  }
  .section-head {
    text-align: center;
    justify-content: center;
  }
  .section-head h2::after {
    left: 50%;
    transform: translateX(-50%);
  }
  .modal-card {
    padding: 20px;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar .btn {
    width: 100%;
  }
}

/* Gallery Styles */
.gallery-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gallery-filters .btn {
  font-size: 14px;
  padding: 8px 18px;
}

.gallery-filters .btn.active-filter {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 75, 80, 0.15);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.gallery-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 75, 80, 0.05);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 75, 80, 0.1);
}

.gallery-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #000;
}

.gallery-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-card:hover .gallery-thumb-wrap img {
  transform: scale(1.05);
  opacity: 0.85;
}

.gallery-overlay-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 75, 80, 0.25);
  opacity: 0;
  transition: var(--transition);
  color: var(--white);
  font-size: 24px;
}

.gallery-card:hover .gallery-overlay-icon {
  opacity: 1;
}

.gallery-play-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--dark);
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
  z-index: 2;
  transition: var(--transition);
}

.gallery-card:hover .gallery-play-btn {
  transform: scale(1.1);
  background: var(--white);
}

.gallery-info {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gallery-info h4 {
  font-size: 17px;
  color: var(--primary);
  font-weight: 800;
  line-height: 1.35;
}

.gallery-info span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Lightbox Styling */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 33, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 5000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  color: var(--white);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: var(--danger);
  transform: rotate(90deg);
}

.lightbox-content {
  max-width: 900px;
  max-height: 75vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-content img, .lightbox-content video {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.lightbox-caption {
  color: var(--white);
  margin-top: 20px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  max-width: 600px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

@media(max-width: 768px) {
  .lightbox {
    padding: 20px;
  }
  .lightbox-close {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .lightbox-caption {
    font-size: 15px;
    margin-top: 15px;
  }
}
