/* ==========================================================================
   Niphad Nagar Panchayat Official Portal - Style System (Vanilla CSS)
   Colors: Govt Navy Blue (#0B3954), Kesari / Gold (#FF9933), Agro Green (#2E7D32)
   ========================================================================== */

:root {
  /* Color Palette */
  --primary-navy: #0B3954;
  --primary-navy-dark: #061e2d;
  --primary-navy-light: #164e72;
  --accent-gold: #FF9933;
  --accent-gold-hover: #e67e00;
  --accent-green: #2E7D32;
  --accent-green-light: #e8f5e9;
  --accent-red: #d32f2f;
  
  /* Neutrals */
  --bg-body: #ffffff;
  --bg-light: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --border-subtle: #cbd5e1;

  /* Typography (Matched with jcmcjalna.org) */
  --font-base: 'Noto Sans Devanagari', 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Poppins', 'Noto Sans Devanagari', sans-serif;
  --font-mono: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Shadows & Radius */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 15px 30px rgba(11, 57, 84, 0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Dynamic font scaling */
  --font-scale: 100%;
}

/* Dark / High-Contrast Mode */
[data-theme="dark"] {
  --bg-body: #0a0f1d;
  --bg-light: #131b2e;
  --bg-card: #182238;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border-color: #2a3754;
  --border-subtle: #334155;
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  min-width: 0;
}

button {
  font-family: inherit;
  font-size: inherit;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

html {
  font-size: var(--font-scale);
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-base);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-body);
  transition: background-color 0.3s ease, color 0.3s ease;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

a {
  color: var(--primary-navy-light);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--accent-gold-hover);
}

img, svg {
  vertical-align: middle;
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
  box-sizing: border-box;
}

/* ==========================================================================
   Top Utility & Accessibility Bar
   ========================================================================== */
.top-utility-bar {
  background-color: #072133;
  color: #cbd5e1;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 0;
}

.top-bar-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.govt-badge {
  font-weight: 600;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 5px;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #94a3b8;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.font-sizer {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.font-sizer button {
  background: transparent;
  border: none;
  color: #ffffff;
  padding: 2px 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.font-sizer button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.utility-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.lang-switch-box {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.lang-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 4px;
}

.lang-btn.active {
  color: #fbbf24;
  text-decoration: underline;
}

.lang-divider {
  color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Brand Header & Emblem
   ========================================================================== */
.brand-header {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  border-bottom: 2px solid var(--accent-gold);
  padding: 1.25rem 0;
}

[data-theme="dark"] .brand-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.brand-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.brand-logo-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.emblem-wrapper {
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.12));
}

.official-logo-img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: var(--radius-full);
  background: #ffffff;
  padding: 2px;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 4px 10px rgba(11, 57, 84, 0.15);
  transition: transform 0.3s ease;
}

.official-logo-img:hover {
  transform: scale(1.05);
}

.portal-main-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary-navy);
  line-height: 1.2;
}

[data-theme="dark"] .portal-main-title {
  color: #f8fafc;
}

.portal-sub-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-gold-hover);
  margin-top: 2px;
}

.portal-tagline {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.brand-right-section {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand-quick-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.state-seal-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background: #ffffff;
  border-radius: var(--radius-full);
  border: 2px solid var(--accent-gold);
  box-shadow: 0 4px 10px rgba(11, 57, 84, 0.12);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.state-seal-wrapper:hover {
  transform: scale(1.06);
}

.state-seal-img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  display: block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.95rem;
}

.btn-primary {
  background-color: var(--primary-navy);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-navy-light);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--primary-navy);
  color: var(--primary-navy);
}

[data-theme="dark"] .btn-outline {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.btn-outline:hover {
  background-color: var(--primary-navy);
  color: #ffffff;
}

.btn-gold {
  background: linear-gradient(135deg, #FF9933 0%, #e67e00 100%);
  color: #ffffff;
  font-weight: 700;
}

.btn-gold:hover {
  background: linear-gradient(135deg, #e67e00 0%, #c46800 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 126, 0, 0.35);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-download {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  font-weight: 700;
}

.btn-download:hover {
  background-color: #b91c1c;
  color: #ffffff;
}

/* ==========================================================================
   Main Navbar Navigation
   ========================================================================== */
.main-navbar {
  background-color: var(--primary-navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

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

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
}

.nav-links > li {
  position: relative;
}

.nav-links > li > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f1f5f9;
  font-weight: 600;
  padding: 0.95rem 1rem;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}

.dd-icon {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.has-dropdown:hover .dd-icon {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  min-width: 220px;
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  list-style: none;
  display: none;
  border-top: 3px solid var(--accent-gold);
  z-index: 110;
}

[data-theme="dark"] .dropdown-menu {
  background-color: #1e293b;
}

.dropdown-menu li a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border-color);
}

.dropdown-menu li a:hover {
  background-color: #f1f5f9;
  color: var(--primary-navy);
  padding-left: 1.25rem;
}

[data-theme="dark"] .dropdown-menu li a:hover {
  background-color: #334155;
  color: var(--accent-gold);
}

.has-dropdown:hover .dropdown-menu {
  display: block;
}

.nav-search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  padding: 2px 8px;
}

.nav-search input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  padding: 4px 8px;
  font-size: 0.85rem;
  width: 140px;
  transition: width 0.3s ease;
}

.nav-search input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.nav-search input:focus {
  width: 180px;
}

.nav-search button {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.4rem;
  padding: 0.5rem;
  cursor: pointer;
}

/* ==========================================================================
   Ticker Bar
   ========================================================================== */
.ticker-bar {
  background-color: #fff7ed;
  border-bottom: 1px solid #ffedd5;
  padding: 8px 0;
  font-size: 0.9rem;
}

[data-theme="dark"] .ticker-bar {
  background-color: #1c1917;
  border-color: #292524;
}

.ticker-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ticker-label {
  background-color: #ea580c;
  color: #ffffff;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  white-space: nowrap;
}

.ticker-content {
  overflow: hidden;
  white-space: nowrap;
}

.ticker-content p {
  display: inline-block;
  font-weight: 500;
  color: #9a3412;
  animation: tickerSlide 22s linear infinite;
}

[data-theme="dark"] .ticker-content p {
  color: #fdba74;
}

@keyframes tickerSlide {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, #0B3954 0%, #061e2d 100%);
  color: #ffffff;
  padding: 3.5rem 0 4rem;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 153, 51, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(46, 125, 50, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fbbf24;
  margin-bottom: 1.25rem;
}

.hero-heading {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.1rem;
  color: #e2e8f0;
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-btn-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.stats-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 0.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
}

.stat-label {
  font-size: 0.8rem;
  color: #cbd5e1;
}

.stat-alert-box {
  margin-top: 1.25rem;
  background: rgba(46, 125, 50, 0.2);
  border: 1px solid rgba(74, 222, 128, 0.3);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: #bbf7d0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   Sections Common Design
   ========================================================================== */
.section-container {
  padding: 4.5rem 0;
}

.bg-light {
  background-color: var(--bg-light);
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 3rem;
}

.section-badge {
  display: inline-block;
  background-color: rgba(11, 57, 84, 0.08);
  color: var(--primary-navy);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .section-badge {
  background-color: rgba(255, 153, 51, 0.15);
  color: var(--accent-gold);
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-navy);
  line-height: 1.3;
}

[data-theme="dark"] .section-title {
  color: #ffffff;
}

.title-divider {
  width: 60px;
  height: 4px;
  background: var(--accent-gold);
  margin: 0.75rem auto 1rem;
  border-radius: var(--radius-full);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ==========================================================================
   Services Grid
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
}

.service-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-gold);
}

.service-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}

.icon-blue { background: #e0f2fe; color: #0284c7; }
.icon-cyan { background: #ecfeff; color: #0891b2; }
.icon-green { background: #dcfce7; color: #16a34a; }
.icon-orange { background: #ffedd5; color: #ea580c; }
.icon-purple { background: #f3e8ff; color: #9333ea; }
.icon-red { background: #fee2e2; color: #dc2626; }

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.service-link {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-navy);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}

[data-theme="dark"] .service-link {
  color: var(--accent-gold);
}

.service-card:hover .service-link {
  gap: 10px;
}

.highlight-card {
  border-color: rgba(220, 38, 38, 0.4);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(254, 226, 226, 0.15) 100%);
}

/* ==========================================================================
   Leadership Grid
   ========================================================================== */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.75rem;
  max-width: 900px;
  margin: 0 auto;
}

.leader-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease;
}

.leader-card:hover {
  transform: translateY(-4px);
}

.leader-avatar {
  width: 90px;
  height: 90px;
  margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, #0B3954 0%, #164e72 100%);
  color: #ffffff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  border: 3px solid var(--accent-gold);
}

.avatar-officer {
  background: linear-gradient(135deg, #2E7D32 0%, #166534 100%);
}

.leader-role {
  display: inline-block;
  background: #f1f5f9;
  color: var(--primary-navy);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .leader-role {
  background: #334155;
  color: #cbd5e1;
}

.leader-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.leader-quote {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.leader-contact {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

/* ==========================================================================
   About Section & Heritage
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.about-para {
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.feature-bullets {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.f-bullet {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.f-bullet i {
  color: var(--accent-green);
  font-size: 1.2rem;
  margin-top: 4px;
}

.heritage-gallery-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.heritage-photo-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border-color);
  aspect-ratio: 16 / 9;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.heritage-photo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-gold);
}

.heritage-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.heritage-photo-card:hover .heritage-img {
  transform: scale(1.05);
}

.heritage-photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(6, 30, 45, 0.95) 0%, rgba(6, 30, 45, 0.6) 60%, transparent 100%);
  color: #ffffff;
}

.heritage-photo-overlay h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: #ffffff;
}

.heritage-photo-overlay p {
  font-size: 0.85rem;
  color: #cbd5e1;
}

/* ==========================================================================
   Tourism & Attractions Gallery Grid
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.75rem;
}

.gallery-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-gold);
}

.gallery-img-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #0B3954;
}

.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-img-wrap img {
  transform: scale(1.08);
}

.img-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(11, 57, 84, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tag-green { background: rgba(22, 101, 52, 0.9); }
.tag-purple { background: rgba(126, 34, 206, 0.9); }
.tag-blue { background: rgba(3, 105, 161, 0.9); }

.gallery-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.gallery-card-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.gallery-card-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.gallery-meta {
  font-size: 0.85rem;
  color: var(--accent-gold-hover);
  font-weight: 600;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.heritage-item h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.heritage-item p {
  font-size: 0.9rem;
  color: #cbd5e1;
}

/* ==========================================================================
   Tabs & Notice Board
   ========================================================================== */
.tabs-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.tabs-header {
  display: flex;
  background-color: #f1f5f9;
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .tabs-header {
  background-color: #1e293b;
}

.tab-btn {
  flex: 1;
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
}

.tab-btn:hover {
  color: var(--primary-navy);
}

.tab-btn.active {
  background-color: var(--bg-card);
  color: var(--primary-navy);
  border-bottom-color: var(--accent-gold);
}

[data-theme="dark"] .tab-btn.active {
  color: var(--accent-gold);
}

.tab-content {
  display: none;
  padding: 1.75rem;
}

.tab-content.active {
  display: block;
}

.table-responsive {
  overflow-x: auto;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.portal-table th, 
.portal-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.portal-table th {
  background-color: #f8fafc;
  color: var(--primary-navy);
  font-weight: 700;
}

[data-theme="dark"] .portal-table th {
  background-color: #1e293b;
  color: #f1f5f9;
}

.portal-table tr:hover {
  background-color: #f8fafc;
}

[data-theme="dark"] .portal-table tr:hover {
  background-color: #1a2336;
}

.notice-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.notice-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--primary-navy);
  color: #ffffff;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  min-width: 75px;
}

.notice-date .day { font-size: 1.2rem; font-weight: 800; line-height: 1; }
.notice-date .month { font-size: 0.75rem; }

.notice-info h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.notice-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state i {
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   Ward & Prabhag Section
   ========================================================================== */
.ward-search-box {
  max-width: 500px;
  margin: 0 auto 2.5rem;
}

.ward-search-input {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.6rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.ward-search-input i {
  color: var(--accent-gold);
  font-size: 1.1rem;
}

.ward-search-input input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-main);
}

.wards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.ward-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.ward-card:hover {
  border-color: var(--primary-navy);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.ward-num-badge {
  display: inline-block;
  background: var(--primary-navy);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.ward-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.ward-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.ward-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--accent-green);
  font-weight: 600;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.contact-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.c-icon {
  width: 55px;
  height: 55px;
  margin: 0 auto 1rem;
  background: rgba(11, 57, 84, 0.08);
  color: var(--primary-navy);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

[data-theme="dark"] .c-icon {
  background: rgba(255, 153, 51, 0.15);
  color: var(--accent-gold);
}

.contact-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.contact-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.portal-footer {
  background-color: #061e2d;
  color: #cbd5e1;
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 3.5rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.footer-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: var(--radius-full);
  background: #ffffff;
  padding: 2px;
  border: 2px solid var(--accent-gold);
}

.footer-col p {
  font-size: 0.95rem;
  color: #94a3b8;
  margin-bottom: 1.25rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-links a {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: all 0.2s;
}

.social-links a:hover {
  background: var(--accent-gold);
  color: #ffffff;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 2px;
  background: var(--accent-gold);
}

.footer-menu {
  list-style: none;
}

.footer-menu li {
  margin-bottom: 0.65rem;
}

.footer-menu li a {
  color: #94a3b8;
  font-size: 0.95rem;
}

.footer-menu li a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.emergency-pills {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.em-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.em-pill strong {
  color: #f87171;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 0;
  font-size: 0.85rem;
  color: #64748b;
}

.footer-bottom-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-credit-row {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.developer-credit {
  color: #94a3b8;
  font-size: 0.85rem;
  text-align: center;
  margin: 0;
}

.developer-credit a {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.developer-credit a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ==========================================================================
   Modals & Forms
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-backdrop.open {
  display: flex;
  animation: fadeIn 0.25s ease-out;
}

.modal-box {
  background-color: var(--bg-card);
  width: 100%;
  max-width: 550px;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  background-color: var(--primary-navy);
  color: #ffffff;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.close-modal {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 1.75rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  background-color: var(--bg-light);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-navy-light);
  background-color: #ffffff;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.col-half {
  flex: 1;
}

.bill-result-box {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.result-details p {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.total-pay {
  border-top: 1px dashed var(--border-color);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

.amount-tag {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent-green);
}

.alert-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

/* ==========================================================================
   UPI & BharatQR Payment Scanner Styling
   ========================================================================== */
.scanner-modal-box {
  max-width: 480px;
}

.payment-modal-header {
  background: linear-gradient(135deg, #0B3954 0%, #061e2d 100%);
  border-bottom: 2px solid var(--accent-gold);
}

.header-left-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-left-title i {
  font-size: 1.8rem;
  color: var(--accent-gold);
}

.sub-m-title {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
}

.payment-summary-strip {
  background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .payment-summary-strip {
  background: #1e293b;
  border-color: #334155;
}

.pay-for-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pay-amount-box {
  display: flex;
  align-items: baseline;
  color: var(--accent-green);
  font-weight: 800;
  font-size: 1.5rem;
}

.curr-symbol {
  font-size: 1.1rem;
  margin-right: 2px;
}

.qr-scanner-visual-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.25rem;
}

.scanner-frame {
  position: relative;
  padding: 14px;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

/* Four Corner Target Accents */
.scanner-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--accent-gold);
  border-style: solid;
  pointer-events: none;
}

.scanner-corner.top-left { top: 6px; left: 6px; border-width: 3px 0 0 3px; }
.scanner-corner.top-right { top: 6px; right: 6px; border-width: 3px 3px 0 0; }
.scanner-corner.bottom-left { bottom: 6px; left: 6px; border-width: 0 0 3px 3px; }
.scanner-corner.bottom-right { bottom: 6px; right: 6px; border-width: 0 3px 3px 0; }

/* Animated Laser Scan Line */
.scanning-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ff7700, #ffea00, #ff7700, transparent);
  box-shadow: 0 0 10px 2px rgba(255, 119, 0, 0.8);
  animation: laserScan 2.2s ease-in-out infinite alternate;
  z-index: 10;
}

@keyframes laserScan {
  0% { top: 10px; opacity: 0.8; }
  50% { opacity: 1; }
  100% { top: calc(100% - 14px); opacity: 0.8; }
}

.upi-qr-svg {
  display: block;
}

.scan-instruction {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 600;
}

.upi-apps-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.app-badge {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
}

[data-theme="dark"] .app-badge {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

.app-badge i {
  color: #0284c7;
}

.upi-id-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px dashed var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
}

[data-theme="dark"] .upi-id-box {
  background: #1e293b;
}

.upi-label {
  color: var(--text-muted);
}

.upi-id-box code {
  color: var(--primary-navy);
  font-weight: 700;
}

[data-theme="dark"] .upi-id-box code {
  color: var(--accent-gold);
}

.copy-upi-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.copy-upi-btn:hover {
  color: var(--primary-navy);
  background: #e2e8f0;
}

.pay-confirm-btn {
  padding: 0.85rem;
  font-size: 1rem;
}

/* Payment Success Receipt Card */
.payment-success-card {
  text-align: center;
  padding: 0.5rem 0;
  animation: fadeIn 0.3s ease;
}

.receipt-success-icon {
  width: 65px;
  height: 65px;
  margin: 0 auto 0.75rem;
  background: #dcfce7;
  color: #16a34a;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.receipt-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.receipt-bill-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: left;
  margin-bottom: 1.5rem;
}

[data-theme="dark"] .receipt-bill-card {
  background: #1e293b;
  border-color: #334155;
}

.r-row {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.9rem;
}

[data-theme="dark"] .r-row {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.r-row:last-child {
  border-bottom: none;
}

.rec-amount {
  color: var(--accent-green);
  font-size: 1.15rem;
}

.badge-success {
  background: #dcfce7;
  color: #15803d;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.75rem;
}

.receipt-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

/* ==========================================================================
   New Mandatory Sections Styling (RTI, Budget, Grievance, Downloads, Map)
   ========================================================================== */
.service-card-meta {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.service-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

[data-theme="dark"] .service-card-meta span {
  background: rgba(255, 255, 255, 0.08);
}

.officers-directory-box, .transparency-works-box {
  margin-top: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.sub-sec-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-theme="dark"] .sub-sec-heading {
  color: var(--accent-gold);
}

.budget-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.budget-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.25s ease;
}

.budget-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-gold);
}

.budget-card .b-icon {
  width: 45px;
  height: 45px;
  border-radius: var(--radius-md);
  background: #e0f2fe;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.budget-card .icon-g { background: #dcfce7; color: #16a34a; }
.budget-card .icon-o { background: #ffedd5; color: #ea580c; }

.budget-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.budget-card .b-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 0.25rem;
}

[data-theme="dark"] .budget-card .b-val {
  color: #38bdf8;
}

.budget-card .b-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-status.progress {
  background: #fef3c7;
  color: #b45309;
}

.badge-status.completed {
  background: #dcfce7;
  color: #15803d;
}

/* RTI Section */
.rti-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
}

.rti-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.rti-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-theme="dark"] .rti-card h3 {
  color: var(--accent-gold);
}

.rti-box {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
}

.badge-role {
  display: inline-block;
  background: var(--primary-navy);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.role-appellate {
  background: var(--accent-gold-hover);
}

.rti-fees-strip {
  display: flex;
  justify-content: space-between;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: #1e40af;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rti-actions-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.manuals-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.manuals-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.manuals-list li a {
  color: var(--primary-navy);
  font-weight: 700;
}

/* Grievance Grid & Tracking */
.grievance-system-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 2rem;
}

.grievance-form-card, .grievance-track-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.grievance-form-card h3, .grievance-track-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.track-status-result {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.status-step-flow {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 1.5rem;
}

.status-step-flow::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 20px;
  right: 20px;
  height: 3px;
  background: var(--border-color);
  z-index: 1;
}

.step-point {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  position: relative;
  z-index: 2;
}

.step-point i {
  width: 32px;
  height: 32px;
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-point.completed i {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

.step-point.in-progress i {
  background: #ea580c;
  border-color: #ea580c;
  color: #ffffff;
}

.status-info-text p {
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

/* Downloads Grid */
.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.download-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.download-item-card .d-icon {
  font-size: 2rem;
  color: #dc2626;
}

.download-item-card .d-body {
  flex-grow: 1;
}

.download-item-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.download-item-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Location Map Box */
.location-map-wrap {
  margin-top: 2rem;
  background: #0B3954;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  color: #ffffff;
}

.map-info-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.map-info-banner h4 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Note: Comprehensive Mobile & Tablet Responsive Media Queries are consolidated at the end of this stylesheet */

/* ==========================================================================
   DOWNLOAD MANAGER & REALTIME DOWNLOADING FEEDBACK
   ========================================================================== */
.download-manager-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 400px;
  max-width: calc(100vw - 32px);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(11, 57, 84, 0.18);
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(11, 57, 84, 0.22), 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 99999;
  font-family: var(--font-base);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, box-shadow 0.3s ease;
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}

.download-manager-widget.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.download-manager-widget.minimized .dm-body {
  display: none;
}

.download-manager-widget.minimized {
  width: 280px;
  border-radius: 12px;
}

/* Widget Header */
.dm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--primary-navy), var(--primary-navy-light));
  color: #ffffff;
  border-top-left-radius: 17px;
  border-top-right-radius: 17px;
}

.dm-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 700;
}

.dm-icon-pulse {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: var(--accent-gold);
  animation: dmPulse 1.8s infinite ease-in-out;
}

@keyframes dmPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 153, 51, 0.4);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(255, 153, 51, 0);
  }
}

.dm-count-badge {
  background: var(--accent-gold);
  color: #000;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}

.dm-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dm-btn-icon {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.2s, transform 0.15s;
}

.dm-btn-icon:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

/* Widget Body */
.dm-body {
  max-height: 380px;
  overflow-y: auto;
  padding: 12px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Individual Download Item */
.dm-item {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  animation: dmSlideIn 0.3s ease-out;
}

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

.dm-item.complete {
  border-color: rgba(46, 125, 50, 0.35);
  background: rgba(232, 245, 233, 0.4);
}

.dm-item-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.dm-file-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  background: #fee2e2;
  color: #dc2626;
  position: relative;
}

.dm-file-icon.completed-icon {
  background: #dcfce7;
  color: #16a34a;
}

.dm-file-icon .spinner-ring {
  position: absolute;
  inset: -3px;
  border: 2px solid transparent;
  border-top-color: var(--accent-gold);
  border-right-color: var(--accent-gold);
  border-radius: 50%;
  animation: dmSpin 0.9s linear infinite;
}

@keyframes dmSpin {
  100% {
    transform: rotate(360deg);
  }
}

.dm-info {
  flex: 1;
  min-width: 0;
}

.dm-file-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.dm-file-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Progress bar */
.dm-progress-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  margin: 10px 0 6px 0;
  overflow: hidden;
  position: relative;
}

.dm-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-gold), #ffb74d, var(--accent-green));
  background-size: 200% 100%;
  transition: width 0.15s ease-out;
  position: relative;
  animation: dmShimmer 2s linear infinite;
}

@keyframes dmShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.dm-item.complete .dm-progress-fill {
  background: linear-gradient(90deg, #22c55e, #16a34a);
  animation: none;
}

/* Status row */
.dm-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dm-status-text {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.dm-status-text.complete-text {
  color: #16a34a;
}

.dm-status-meta {
  font-weight: 700;
  color: var(--primary-navy);
}

/* Action Buttons */
.dm-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
}

.dm-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dm-btn-primary {
  background: var(--primary-navy);
  color: #ffffff;
}

.dm-btn-primary:hover {
  background: var(--primary-navy-light);
  transform: translateY(-1px);
}

.dm-btn-success {
  background: #16a34a;
  color: #ffffff;
}

.dm-btn-success:hover {
  background: #15803d;
  transform: translateY(-1px);
}

.dm-btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.dm-btn-secondary:hover {
  background: #e2e8f0;
}

.dm-btn-remove {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.dm-btn-remove:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
}

/* Minimized Floating Pill Indicator */
.dm-pill-floating {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99998;
  background: linear-gradient(135deg, var(--primary-navy), var(--primary-navy-light));
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(11, 57, 84, 0.35);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: 2px solid var(--accent-gold);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
  font-weight: 700;
  font-size: 0.9rem;
}

.dm-pill-floating:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 30px rgba(11, 57, 84, 0.45);
}

/* Document Preview Modal */
.doc-preview-sheet {
  background: #ffffff;
  color: #1e293b;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  padding: 24px;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.03);
  position: relative;
  max-height: 70vh;
  overflow-y: auto;
  font-family: var(--font-base);
}

.doc-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 3.5rem;
  font-weight: 900;
  color: rgba(11, 57, 84, 0.04);
  pointer-events: none;
  white-space: nowrap;
  text-align: center;
  z-index: 1;
}

.doc-header-official {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--primary-navy);
  padding-bottom: 14px;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.doc-emblem-wrap {
  width: 60px;
  height: 60px;
}

.doc-emblem-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.doc-header-text {
  text-align: center;
  flex: 1;
}

.doc-header-text h3 {
  font-size: 1.25rem;
  color: var(--primary-navy);
  margin-bottom: 2px;
  font-weight: 800;
}

.doc-header-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.doc-meta-bar {
  display: flex;
  justify-content: space-between;
  background: #f1f5f9;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.doc-content-body {
  font-size: 0.92rem;
  line-height: 1.6;
  position: relative;
  z-index: 2;
  margin-bottom: 20px;
}

.doc-table-view {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.doc-table-view th, .doc-table-view td {
  border: 1px solid #cbd5e1;
  padding: 8px 10px;
  font-size: 0.85rem;
  text-align: left;
}

.doc-table-view th {
  background: #f8fafc;
  color: var(--primary-navy);
}

.doc-footer-sign {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  position: relative;
  z-index: 2;
}

.doc-digital-sign-box {
  border: 1px dashed #16a34a;
  background: #f0fdf4;
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: #15803d;
}

.doc-sign-stamp {
  text-align: right;
  font-size: 0.85rem;
}

.doc-sign-stamp .stamp-title {
  font-weight: 700;
  color: var(--primary-navy);
}

/* Dark mode adjustment for download manager */
[data-theme="dark"] .download-manager-widget {
  background: rgba(24, 34, 56, 0.98);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .dm-body {
  background: #131b2e;
}

[data-theme="dark"] .dm-item {
  background: #182238;
  border-color: #2a3754;
}

[data-theme="dark"] .dm-file-title {
  color: #f1f5f9;
}

[data-theme="dark"] .dm-progress-track {
  background: #2a3754;
}

[data-theme="dark"] .dm-status-meta {
  color: var(--accent-gold);
}

[data-theme="dark"] .dm-btn-secondary {
  background: #182238;
  border-color: #2a3754;
  color: #f1f5f9;
}

[data-theme="dark"] .dm-btn-secondary:hover {
  background: #2a3754;
}

[data-theme="dark"] .doc-preview-sheet {
  background: #182238;
  color: #f1f5f9;
  border-color: #2a3754;
}

[data-theme="dark"] .doc-header-official {
  border-bottom-color: var(--accent-gold);
}

[data-theme="dark"] .doc-header-text h3 {
  color: var(--accent-gold);
}

[data-theme="dark"] .doc-meta-bar {
  background: #131b2e;
}

[data-theme="dark"] .doc-table-view th {
  background: #131b2e;
  color: var(--accent-gold);
}

[data-theme="dark"] .doc-table-view th, [data-theme="dark"] .doc-table-view td {
  border-color: #2a3754;
}

[data-theme="dark"] .doc-digital-sign-box {
  background: rgba(22, 163, 74, 0.15);
  border-color: #22c55e;
  color: #4ade80;
}

[data-theme="dark"] .doc-sign-stamp .stamp-title {
  color: var(--accent-gold);
}

/* ==========================================================================
   RTI (RIGHT TO INFORMATION) SECTION ALIGNMENT & STYLING (CENTER-ALIGNED)
   ========================================================================== */
.rti-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 24px;
  align-items: stretch;
  justify-content: center;
  max-width: 1140px;
  margin: 0 auto;
}

.rti-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.rti-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(11, 57, 84, 0.25);
}

.rti-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.rti-header-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-navy), var(--primary-navy-light));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(11, 57, 84, 0.2);
}

.rti-header-icon.icon-gold {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-hover));
  color: #000;
  box-shadow: 0 4px 10px rgba(255, 153, 51, 0.3);
}

.rti-card-header h3 {
  font-size: 1.18rem;
  color: var(--primary-navy);
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.35;
  text-align: center;
}

.rti-header-sub {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
  text-align: center;
}

/* Officer Profile Cards */
.rti-officer-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.rti-officer-card {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px 20px;
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rti-officer-card.pio-card {
  border-top: 4px solid var(--primary-navy);
  border-left: 1px solid var(--border-color);
}

.rti-officer-card.appellate-card {
  border-top: 4px solid var(--accent-gold);
  border-left: 1px solid var(--border-color);
}

.rti-officer-card:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.officer-top-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.badge-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: #e0f2fe;
  color: #0369a1;
}

.badge-role.role-appellate {
  background: #fef3c7;
  color: #b45309;
}

.officer-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.05);
  padding: 3px 8px;
  border-radius: 6px;
}

.officer-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  text-align: center;
}

.officer-addr {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.4;
  text-align: center;
}

.officer-addr i {
  color: var(--primary-navy);
  font-size: 0.85rem;
}

.officer-contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-navy);
  background: #ffffff;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.contact-chip i {
  color: var(--accent-gold);
}

.contact-chip:hover {
  background: var(--primary-navy);
  color: #ffffff;
  border-color: var(--primary-navy);
}

.contact-chip:hover i {
  color: #ffffff;
}

/* Fees Box */
.rti-fees-box {
  background: linear-gradient(135deg, rgba(11, 57, 84, 0.04), rgba(255, 153, 51, 0.06));
  border: 1px dashed rgba(11, 57, 84, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
  text-align: center;
}

.fee-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--text-main);
  text-align: left;
}

.fee-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-navy);
  font-size: 0.95rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.fee-note {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Actions Row */
.rti-actions-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.rti-actions-row .btn {
  flex: 1;
  min-width: min(100%, 140px);
  text-align: center;
  justify-content: center;
  padding: 11px 18px;
  font-size: 0.88rem;
}

/* Section 4(1)(b) Manuals List */
.manuals-wrapper {
  margin-bottom: 18px;
}

.manuals-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.manual-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: all 0.2s ease;
  gap: 12px;
}

.manual-item:hover {
  background: #ffffff;
  border-color: var(--primary-navy-light);
  transform: translateX(4px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.manual-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.manual-num {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.78rem;
  background: var(--primary-navy);
  color: #ffffff;
  padding: 3px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}

.manual-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
  white-space: normal;
}

.manual-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid var(--primary-navy);
  background: #ffffff;
  color: var(--primary-navy);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.manual-download-btn:hover {
  background: var(--primary-navy);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(11, 57, 84, 0.2);
}

.manuals-footer-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(46, 125, 50, 0.08);
  border: 1px solid rgba(46, 125, 50, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
}

/* Dark mode overrides for RTI section */
[data-theme="dark"] .rti-card {
  background: var(--bg-card);
  border-color: #2a3754;
}

[data-theme="dark"] .rti-card-header h3 {
  color: var(--accent-gold);
}

[data-theme="dark"] .rti-officer-card {
  background: #131b2e;
  border-color: #2a3754;
}

[data-theme="dark"] .rti-officer-card:hover {
  background: #182238;
}

[data-theme="dark"] .officer-name {
  color: #f1f5f9;
}

[data-theme="dark"] .contact-chip {
  background: #182238;
  border-color: #2a3754;
  color: #f1f5f9;
}

[data-theme="dark"] .contact-chip:hover {
  background: var(--accent-gold);
  color: #000000;
  border-color: var(--accent-gold);
}

[data-theme="dark"] .rti-fees-box {
  background: rgba(255, 255, 255, 0.03);
  border-color: #2a3754;
}

[data-theme="dark"] .fee-icon {
  background: #182238;
  color: var(--accent-gold);
}

[data-theme="dark"] .manual-item {
  background: #131b2e;
  border-color: #2a3754;
}

[data-theme="dark"] .manual-item:hover {
  background: #182238;
  border-color: var(--accent-gold);
}

[data-theme="dark"] .manual-title {
  color: #f1f5f9;
}

[data-theme="dark"] .manual-download-btn {
  background: #182238;
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

[data-theme="dark"] .manual-download-btn:hover {
  background: var(--accent-gold);
  color: #000000;
}

[data-theme="dark"] .manuals-footer-note {
  background: rgba(74, 222, 128, 0.1);
  border-color: rgba(74, 222, 128, 0.25);
  color: #cbd5e1;
}


/* ==========================================================================
   DOWNLOADS CENTER - PROFESSIONAL CARD DESIGN
   ========================================================================== */
.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 20px;
  align-items: stretch;
}

.download-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 4px 14px rgba(11, 57, 84, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--primary-navy);
}

.download-item-card:nth-child(2) {
  border-top-color: #0284c7;
}

.download-item-card:nth-child(3) {
  border-top-color: var(--accent-gold);
}

.download-item-card:nth-child(4) {
  border-top-color: var(--accent-green);
}

.download-item-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(11, 57, 84, 0.14);
  border-color: rgba(11, 57, 84, 0.25);
}

/* Card Top Badges */
.d-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.d-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.d-cat-badge.badge-civil {
  background: #fee2e2;
  color: #dc2626;
}

.d-cat-badge.badge-water {
  background: #e0f2fe;
  color: #0284c7;
}

.d-cat-badge.badge-tax {
  background: #fef3c7;
  color: #b45309;
}

.d-cat-badge.badge-rti {
  background: #dcfce7;
  color: #166534;
}

.d-size-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.04);
  padding: 3px 8px;
  border-radius: 6px;
}

/* Card Main Area */
.d-card-main {
  text-align: center;
  margin-bottom: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.d-icon-circle {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  margin: 0 auto 16px auto;
  box-shadow: 0 6px 14px rgba(220, 38, 38, 0.15);
  transition: transform 0.25s ease;
}

.d-icon-circle.icon-blue {
  background: #e0f2fe;
  color: #0284c7;
  box-shadow: 0 6px 14px rgba(2, 132, 199, 0.15);
}

.d-icon-circle.icon-gold {
  background: #fef3c7;
  color: #d97706;
  box-shadow: 0 6px 14px rgba(217, 119, 6, 0.15);
}

.d-icon-circle.icon-green {
  background: #dcfce7;
  color: #16a34a;
  box-shadow: 0 6px 14px rgba(22, 163, 74, 0.15);
}

.download-item-card:hover .d-icon-circle {
  transform: scale(1.1) rotate(-3deg);
}

.d-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 8px;
  line-height: 1.35;
  text-align: center;
}

.d-card-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
  text-align: center;
}

/* Download Button */
.btn-download-card {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-navy), var(--primary-navy-light));
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 10px rgba(11, 57, 84, 0.15);
}

.btn-download-card:hover {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-hover));
  color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 153, 51, 0.3);
}

/* Dark mode for download cards */
[data-theme="dark"] .download-item-card {
  background: var(--bg-card);
  border-color: #2a3754;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .d-card-title {
  color: #f1f5f9;
}

[data-theme="dark"] .d-size-badge {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}

[data-theme="dark"] .d-icon-circle {
  background: rgba(220, 38, 38, 0.2);
}

[data-theme="dark"] .d-icon-circle.icon-blue {
  background: rgba(2, 132, 199, 0.2);
}

[data-theme="dark"] .d-icon-circle.icon-gold {
  background: rgba(217, 119, 6, 0.2);
}

[data-theme="dark"] .d-icon-circle.icon-green {
  background: rgba(22, 163, 74, 0.2);
}

/* ==========================================================================
   MOBILE & RESPONSIVE DESIGN SYSTEM (ALL SCREEN SIZES)
   ========================================================================== */

/* 1. Global Touch & Viewport Utilities */
html {
  scroll-padding-top: 65px;
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  width: 100%;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* Touch friendly minimum tap target */
button, a, input, select, textarea, .lang-btn, .tab-btn {
  touch-action: manipulation;
}

/* Mobile Bottom Quick Action Bar */
.mobile-bottom-bar {
  display: none;
}

.m-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #cbd5e1;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
}

.m-pay-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), #e67e00);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -20px;
  box-shadow: 0 4px 14px rgba(255, 153, 51, 0.45);
  border: 3px solid var(--primary-navy);
  font-size: 1.15rem;
}

/* Floating Back To Top Button */
.btn-scroll-top {
  position: fixed;
  bottom: 82px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-navy), var(--primary-navy-light));
  color: #ffffff;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 6px 18px rgba(11, 57, 84, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.7) translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.25s;
}

.btn-scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
}

.btn-scroll-top:hover, .btn-scroll-top:active {
  background: var(--accent-gold);
  color: #000000;
  transform: translateY(-3px) scale(1.06);
}

[data-theme="dark"] .btn-scroll-top {
  background: #1e293b;
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* Table Swipe Hint Banner */
.table-scroll-hint {
  display: none;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  margin-bottom: 6px;
  font-weight: 600;
}

.table-scroll-hint i {
  color: var(--accent-gold-hover);
  margin-left: 3px;
}

/* ==========================================================================
   BREAKPOINT: TABLET & DESKTOP (max-width: 1100px)
   ========================================================================== */
@media (max-width: 1100px) {
  .container {
    padding: 0 1.25rem;
  }
  .nav-links > li > a {
    padding: 0.85rem 0.65rem;
    font-size: 0.88rem;
    gap: 4px;
  }
  .portal-main-title {
    font-size: 1.6rem;
  }
  .hero-heading {
    font-size: 2.1rem;
  }
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 2rem;
  }
}

/* ==========================================================================
   BREAKPOINT: TABLETS (768px - 1023px)
   ========================================================================== */
@media (max-width: 1023px) {
  /* Layout adjustments */
  .hero-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-text-area {
    margin: 0 auto;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-btn-row {
    justify-content: center;
  }

  .hero-stats-card {
    max-width: 580px;
    margin: 0 auto;
    width: 100%;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .heritage-gallery-card {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
  }

  .rti-grid {
    grid-template-columns: 1fr;
    max-width: 650px;
  }

  .rti-fees-box {
    grid-template-columns: 1fr;
  }

  .grievance-system-grid {
    grid-template-columns: 1fr;
    max-width: 650px;
    margin: 0 auto;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  /* Navigation: Enable Mobile Hamburger Navigation */
  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.25s ease;
  }

  .mobile-menu-toggle.active {
    background: var(--accent-gold);
    color: #000000;
    border-color: var(--accent-gold);
  }

  .nav-flex {
    position: relative;
    padding: 8px 0;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #072133;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 3px solid var(--accent-gold);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1000;
  }

  .nav-links.open {
    max-height: calc(85vh - 60px);
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
    padding: 10px 0 16px 0;
  }

  .nav-links > li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-links > li > a {
    width: 100%;
    padding: 13px 20px;
    font-size: 1rem;
    color: #f1f5f9;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .nav-links > li > a:hover,
  .nav-links > li > a.active {
    background-color: rgba(255, 153, 51, 0.15);
    color: var(--accent-gold);
  }

  /* Accordion Dropdown on Mobile */
  .dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    background-color: rgba(0, 0, 0, 0.35);
    border-top: none;
    border-left: 3px solid var(--accent-gold);
    border-radius: 0;
    margin: 0;
    padding: 4px 0 6px 14px;
    min-width: 100%;
  }

  [data-theme="dark"] .dropdown-menu {
    background-color: rgba(0, 0, 0, 0.45);
  }

  .has-dropdown.dropdown-open .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease;
  }

  .has-dropdown.dropdown-open > a .dd-icon {
    transform: rotate(180deg);
  }

  .dropdown-menu li a {
    padding: 10px 16px;
    font-size: 0.92rem;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .dropdown-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding-left: 20px;
  }

  .nav-search {
    width: auto;
    margin-left: auto;
  }

  .nav-search input {
    width: 120px;
  }

  .nav-search input:focus {
    width: 150px;
  }
}

/* ==========================================================================
   BREAKPOINT: MOBILE PHONES (320px - 767px)
   ========================================================================== */
@media (max-width: 767px) {
  body {
    padding-bottom: 74px; /* Space for Mobile Bottom Bar */
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 14px;
    box-sizing: border-box;
  }

  .section-container {
    padding: 2.75rem 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .section-header {
    margin-bottom: 2rem;
    padding: 0 8px;
  }

  .section-title {
    font-size: 1.55rem;
  }

  .section-subtitle {
    font-size: 0.92rem;
  }

  /* 1. Top Utility Bar Mobile Optimization */
  .top-utility-bar {
    font-size: 0.78rem;
    padding: 6px 0;
    width: 100%;
    overflow-x: hidden;
  }

  .top-bar-flex {
    flex-direction: column;
    gap: 6px;
    text-align: center;
    width: 100%;
  }

  .top-left {
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    width: 100%;
  }

  .top-right {
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .contact-pill {
    font-size: 0.75rem;
  }

  /* 2. Brand Header Mobile Layout */
  .brand-header {
    padding: 1rem 0 1.25rem;
    width: 100%;
    overflow-x: hidden;
  }

  .brand-flex {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
    width: 100%;
  }

  .brand-logo-group {
    flex-direction: column;
    gap: 0.85rem;
    align-items: center;
    width: 100%;
  }

  .official-logo-img {
    width: 65px;
    height: 65px;
  }

  .portal-main-title {
    font-size: 1.45rem;
    line-height: 1.25;
    word-break: break-word;
  }

  .portal-sub-title {
    font-size: 0.9rem;
  }

  .portal-tagline {
    font-size: 0.8rem;
    max-width: 100%;
    margin: 4px auto 0;
    line-height: 1.4;
  }

  .brand-right-section {
    flex-direction: column-reverse;
    gap: 1rem;
    width: 100%;
    align-items: center;
  }

  .brand-quick-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .brand-quick-actions .btn {
    width: 100%;
    padding: 0.7rem 0.85rem;
    font-size: 0.88rem;
    justify-content: center;
  }

  .state-seal-wrapper {
    display: none; /* Reduce mobile clutter */
  }

  /* 3. Ticker Bar */
  .ticker-bar {
    width: 100%;
    overflow-x: hidden;
  }

  .ticker-container {
    gap: 6px;
    width: 100%;
  }

  .ticker-label {
    font-size: 0.72rem;
    padding: 2px 6px;
    flex-shrink: 0;
  }

  /* 4. Hero Section */
  .hero-section {
    padding: 2.25rem 0 2.5rem;
    width: 100%;
    overflow-x: hidden;
  }

  .hero-heading {
    font-size: 1.55rem;
    line-height: 1.3;
    word-break: break-word;
  }

  .hero-description {
    font-size: 0.92rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
  }

  .hero-btn-row {
    width: 100%;
    flex-direction: column;
    gap: 0.65rem;
  }

  .hero-btn-row .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
  }

  .hero-stats-card {
    padding: 1.15rem 0.85rem;
    width: 100%;
    max-width: 100%;
  }

  .stats-card-title {
    font-size: 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .stat-item {
    padding: 0.65rem 0.4rem;
  }

  .stat-num {
    font-size: 1.25rem;
  }

  .stat-label {
    font-size: 0.72rem;
  }

  .stat-alert-box {
    font-size: 0.75rem;
    padding: 0.6rem;
    line-height: 1.35;
  }

  /* 5. Services Grid */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
    width: 100%;
  }

  .service-card {
    padding: 1.25rem 1rem;
    width: 100%;
  }

  /* 6. Leadership Grid */
  .leadership-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    width: 100%;
  }

  .leader-card {
    padding: 1.25rem 1rem;
    width: 100%;
  }

  /* 7. Tabs & Notice Board */
  .tabs-wrapper {
    width: 100%;
  }

  .tabs-header {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    display: flex;
    width: 100%;
  }

  .tab-btn {
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    flex-shrink: 0;
  }

  .tab-content {
    padding: 1rem 0.75rem;
    width: 100%;
  }

  .table-scroll-hint {
    display: block;
  }

  .table-responsive {
    -webkit-overflow-scrolling: touch;
    margin-bottom: 0.5rem;
    width: 100%;
    overflow-x: auto;
  }

  .portal-table th, 
  .portal-table td {
    padding: 0.65rem 0.75rem;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .notice-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem;
    width: 100%;
  }

  .notice-date {
    flex-direction: row;
    gap: 8px;
    min-width: auto;
    padding: 3px 8px;
  }

  .notice-date .day {
    font-size: 0.95rem;
  }

  /* 8. Wards Prabhag Section */
  .wards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
  }

  .ward-search-box {
    width: 100%;
    margin-bottom: 1.75rem;
  }

  /* 9. RTI Section Mobile */
  .rti-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    width: 100%;
  }

  .rti-card {
    padding: 1.15rem 0.85rem;
    width: 100%;
  }

  .rti-officer-card {
    padding: 12px 10px;
    width: 100%;
  }

  .officer-contacts {
    flex-direction: column;
    width: 100%;
    gap: 6px;
  }

  .contact-chip {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .rti-fees-box {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .fee-item {
    font-size: 0.82rem;
  }

  .rti-actions-row {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .rti-actions-row .btn {
    width: 100%;
    min-width: 100%;
  }

  .manual-item {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    width: 100%;
  }

  .manual-download-btn {
    width: 100%;
    justify-content: center;
  }

  /* 10. Grievance Redressal Flow */
  .grievance-system-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    width: 100%;
  }

  .grievance-form-card, 
  .grievance-track-card {
    padding: 1.15rem 0.85rem;
    width: 100%;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .status-step-flow {
    display: flex;
    justify-content: space-between;
    gap: 2px;
    width: 100%;
  }

  .status-step-flow::before {
    top: 12px;
    left: 8px;
    right: 8px;
  }

  .step-point {
    font-size: 0.65rem;
  }

  .step-point i {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
  }

  /* 11. Downloads Center Grid */
  .downloads-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
  }

  .download-item-card {
    padding: 1.15rem 0.85rem;
    width: 100%;
  }

  /* 12. Contact Cards */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
  }

  .contact-card {
    padding: 1.25rem 1rem;
    width: 100%;
  }

  /* 13. Location Map Banner */
  .location-map-wrap {
    padding: 1rem;
    width: 100%;
  }

  .map-info-banner {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
    width: 100%;
  }

  .map-info-banner .btn {
    width: 100%;
    justify-content: center;
  }

  /* 14. Footer Mobile */
  .portal-footer {
    padding: 2.5rem 0 1.25rem;
    width: 100%;
    overflow-x: hidden;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    text-align: center;
    width: 100%;
  }

  .footer-logo {
    justify-content: center;
  }

  .social-links {
    justify-content: center;
  }

  .footer-col h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-bottom-flex {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    width: 100%;
  }

  /* 15. Modals & Dialogs on Mobile */
  .modal-backdrop {
    padding: 0.5rem;
    align-items: flex-end;
  }

  .modal-box {
    max-height: 92vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    width: 100% !important;
    max-width: 100% !important;
  }

  .modal-header {
    padding: 0.85rem 1rem;
  }

  .modal-header h3 {
    font-size: 1rem;
  }

  .modal-body {
    padding: 1rem 0.85rem;
  }

  /* Prevent iPhone Safari auto-zoom on input focus */
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px !important;
  }

  .scanner-frame {
    max-width: 200px;
    margin: 0 auto;
  }

  .upi-apps-row {
    gap: 4px;
  }

  .app-badge {
    font-size: 0.7rem;
    padding: 2px 5px;
  }

  .receipt-actions {
    flex-direction: column;
    gap: 8px;
  }

  .receipt-actions .btn {
    width: 100%;
  }

  .doc-preview-sheet {
    padding: 12px;
  }

  .doc-header-official {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  .doc-meta-bar {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }

  .doc-footer-sign {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
  }

  .doc-sign-stamp {
    text-align: center;
  }

  /* 16. Realtime Download Manager Mobile Floating Bottom Sheet */
  .download-manager-widget {
    left: 10px;
    right: 10px;
    width: calc(100% - 20px) !important;
    bottom: 70px;
    max-width: calc(100vw - 20px);
    border-radius: 14px;
  }

  .download-manager-widget.minimized {
    width: calc(100% - 20px) !important;
  }

  .dm-pill-floating {
    bottom: 74px;
    right: 10px;
    font-size: 0.78rem;
    padding: 7px 12px;
  }

  /* 17. Mobile Bottom Navigation Bar Styling */
  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(11, 57, 84, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 153, 51, 0.4);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  [data-theme="dark"] .mobile-bottom-bar {
    background: rgba(10, 15, 29, 0.96);
    border-top-color: rgba(255, 153, 51, 0.3);
  }

  .m-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #cbd5e1;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .m-bottom-nav-item i {
    font-size: 1.15rem;
    transition: transform 0.2s ease;
  }

  .m-bottom-nav-item:hover,
  .m-bottom-nav-item.active {
    color: var(--accent-gold);
  }

  .m-bottom-nav-item:hover i,
  .m-bottom-nav-item.active i {
    transform: translateY(-2px);
  }

  /* Elevated Center QR Pay Button */
  .m-bottom-nav-item.m-pay-highlight {
    position: relative;
    color: var(--accent-gold);
  }

  .m-pay-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-gold), #e67e00);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -20px;
    box-shadow: 0 4px 14px rgba(255, 153, 51, 0.45);
    border: 3px solid var(--primary-navy);
    font-size: 1.15rem;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  [data-theme="dark"] .m-pay-circle {
    border-color: #0a0f1d;
  }

  .m-pay-highlight:active .m-pay-circle,
  .m-pay-highlight:hover .m-pay-circle {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 153, 51, 0.6);
  }
}

/* ==========================================================================
   BREAKPOINT: EXTRA SMALL PHONES (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
  .container {
    padding: 0 10px !important;
  }

  .portal-main-title {
    font-size: 1.25rem;
  }

  .portal-sub-title {
    font-size: 0.82rem;
  }

  .hero-heading {
    font-size: 1.35rem;
  }

  .hero-pill {
    font-size: 0.72rem;
    padding: 3px 8px;
  }

  .section-title {
    font-size: 1.35rem;
  }

  .btn {
    font-size: 0.85rem;
    padding: 0.6rem 0.85rem;
  }

  .btn-gold {
    padding: 0.65rem 0.85rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .stat-num {
    font-size: 1.15rem;
  }

  .stat-label {
    font-size: 0.68rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .budget-summary-grid {
    grid-template-columns: 1fr;
  }

  .btn-scroll-top {
    bottom: 72px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
}

/* ==========================================================================
   PRINT MEDIA QUERY OPTIMIZATION
   ========================================================================== */
@media print {
  .top-utility-bar,
  .main-navbar,
  .mobile-bottom-bar,
  .btn-scroll-top,
  .download-manager-widget,
  .dm-pill-floating,
  .brand-quick-actions {
    display: none !important;
  }
  
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12pt;
  }
}
