/* ==========================================================================
   Bharat Sewa Hub — Premium Glassmorphic Design System
   Supports: Dark Mode, Light Mode, Responsive Grid, Micro-animations
   ========================================================================== */

/* Light Theme Variables */
:root, [data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.75);
  --bg-glass-card: rgba(255, 255, 255, 0.85);
  --bg-glass-modal: rgba(255, 255, 255, 0.95);
  --border-color: rgba(226, 232, 240, 0.8);
  --border-highlight: rgba(99, 102, 241, 0.3);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: rgba(79, 70, 229, 0.08);
  --accent-saffron: #f97316;
  --accent-green: #10b981;
  --accent-blue: #3b82f6;

  --card-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
  --card-hover-shadow: 0 20px 35px -10px rgba(79, 70, 229, 0.12), 0 10px 15px -5px rgba(79, 70, 229, 0.08);
  --header-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  
  --strip-bg: #1e1b4b;
  --strip-text: #e0e7ff;

  --orb-opacity: 0.4;
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --bg-main: #090d16;
  --bg-surface: #111827;
  --bg-glass: rgba(17, 24, 39, 0.75);
  --bg-glass-card: rgba(17, 24, 39, 0.85);
  --bg-glass-modal: rgba(17, 24, 39, 0.96);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-highlight: rgba(129, 140, 248, 0.4);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.15);
  --accent-saffron: #fb923c;
  --accent-green: #34d399;
  --accent-blue: #60a5fa;

  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  --card-hover-shadow: 0 20px 35px -10px rgba(99, 102, 241, 0.25);
  --header-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);

  --strip-bg: #090721;
  --strip-text: #c7d2fe;

  --orb-opacity: 0.25;
}

/* Base Resets & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, .brand-title {
  font-family: 'Outfit', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

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

/* Ambient Animated Orbs */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: var(--orb-opacity);
  animation: orbFloat 20s infinite alternate ease-in-out;
}

.orb-1 {
  top: -10%;
  left: 15%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, #f97316 0%, rgba(249, 115, 22, 0) 70%);
}

.orb-2 {
  top: 40%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, #6366f1 0%, rgba(99, 102, 241, 0) 70%);
}

.orb-3 {
  bottom: -15%;
  left: -5%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, #10b981 0%, rgba(16, 185, 129, 0) 70%);
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.08); }
  100% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Top Emergency Helplines Strip */
.helplines-strip {
  background-color: var(--strip-bg);
  color: var(--strip-text);
  font-size: 0.825rem;
  padding: 0.4rem 0;
  position: relative;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
}

@media (max-width: 768px) {
  .helplines-strip {
    padding-top: max(env(safe-area-inset-top, 0px), 50px) !important;
  }
}

.helplines-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.helpline-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: #fb923c;
  white-space: nowrap;
}

.pulse-icon {
  width: 14px;
  height: 14px;
  animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

.helpline-items {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.helpline-item {
  color: var(--strip-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: opacity 0.2s ease;
}

.helpline-item:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.hl-num {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.8rem;
}

/* App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--header-shadow);
  transition: background-color 0.3s ease;
}

@media (max-width: 768px) {
  .app-header {
    padding-top: 20px !important;
    padding-bottom: 10px !important;
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  transition: all 0.2s ease;
}

.back-link:hover {
  color: var(--primary);
  border-color: var(--border-highlight);
  transform: translateX(-2px);
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-emblem {
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
  border-radius: 10px;
}

.logo-titles {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.brand-accent {
  background: linear-gradient(135deg, #f97316 0%, #6366f1 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 0.725rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Language Selector Dropdown */
.lang-selector-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0 0.6rem;
  transition: border-color 0.2s ease;
}

.lang-selector-wrapper:hover {
  border-color: var(--border-highlight);
}

.lang-icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
  pointer-events: none;
}

.lang-select {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1.6rem 0.5rem 0.4rem;
  cursor: pointer;
  outline: none;
}

.lang-selector-wrapper::after {
  content: '▾';
  position: absolute;
  right: 0.7rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--border-highlight);
  transform: scale(1.05);
}

[data-theme="light"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }

/* Main Content & Hero Section */
.main-content {
  position: relative;
  z-index: 1;
  padding-bottom: 4rem;
}

.hero-section {
  padding: 1.5rem 0 1rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  background: var(--primary-light);
  border: 1px solid var(--border-highlight);
  border-radius: 100px;
  color: var(--primary);
  font-size: 0.725rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hero-heading {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.gradient-text {
  background: linear-gradient(135deg, #4f46e5 0%, #a855f7 50%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  max-width: 620px;
  margin: 0 auto 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Glass Search Bar */
.search-container {
  max-width: 600px;
  margin: 0 auto 1.25rem;
}

.search-bar-glass {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-glass-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid var(--border-color);
  border-radius: 14px;
  padding: 0.25rem 0.85rem;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}

.search-bar-glass:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light), var(--card-hover-shadow);
}

.search-lens {
  width: 18px;
  height: 18px;
  color: var(--primary);
  margin-right: 0.6rem;
  flex-shrink: 0;
}

.search-bar-glass input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-primary);
  padding: 0.4rem 0;
}

.search-bar-glass input::placeholder {
  color: var(--text-muted);
}

.kbd-shortcut {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  margin-left: 0.5rem;
  pointer-events: none;
  flex-shrink: 0;
}

.clear-search-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem;
  display: flex;
  align-items: center;
  border-radius: 50%;
  transition: color 0.2s;
}

.clear-search-btn:hover {
  color: var(--text-primary);
}

/* Live Quick Stats */
.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.35rem 1rem;
  border-radius: 100px;
  font-size: 0.775rem;
  box-shadow: var(--card-shadow);
}

.stat-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
}

.stat-chip strong {
  color: var(--primary);
  font-size: 0.9rem;
}

.stat-divider {
  width: 1px;
  height: 14px;
  background: var(--border-color);
}

/* Category Filter Section */
.filter-section {
  margin-bottom: 1.5rem;
}

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

/* Category Custom Dropdown Component */
.category-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.category-dropdown-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 1rem;
  min-width: 210px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: all 0.2s ease;
  user-select: none;
}

.category-dropdown-btn:hover {
  border-color: var(--border-highlight);
  background: var(--bg-glass-card);
  box-shadow: var(--card-hover-shadow);
}

.cat-btn-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cat-btn-icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
}

.chevron-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.category-dropdown-wrapper.open .chevron-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.category-dropdown-wrapper.open .category-dropdown-btn {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.category-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 200;
  min-width: 240px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg-glass-modal);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 0.4rem;
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: thin;
}

.category-dropdown-wrapper.open .category-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.dropdown-item i {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.dropdown-item:hover {
  background: var(--primary-light);
  color: var(--text-primary);
}

.dropdown-item:hover i {
  color: var(--primary);
}

.dropdown-item.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
}

.dropdown-item.active i {
  color: #ffffff;
}

.fav-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.fav-filter-btn:hover {
  border-color: #f59e0b;
  color: #f59e0b;
}

.fav-filter-btn.active {
  background: #f59e0b;
  color: #ffffff;
  border-color: #f59e0b;
}

.fav-count-badge {
  background: rgba(0, 0, 0, 0.12);
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  font-size: 0.75rem;
}

.fav-filter-btn.active .fav-count-badge {
  background: rgba(255, 255, 255, 0.25);
}

/* Services Grid & Results Header */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.results-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.results-count {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

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

/* Service Card Component */
.service-card {
  background: var(--bg-glass-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--card-shadow);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-hover-shadow);
  border-color: var(--border-highlight);
}

.card-top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon-wrapper i {
  width: 26px;
  height: 26px;
}

.card-actions-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.badge-tag {
  font-size: 0.725rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-essential {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.badge-popular {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
}

.badge-utility {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.badge-new {
  background: rgba(236, 72, 153, 0.15);
  color: #ec4899;
}

.bookmark-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.bookmark-toggle-btn:hover {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.bookmark-toggle-btn.saved {
  color: #f59e0b;
  fill: #f59e0b;
}

.card-body {
  flex: 1;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.card-summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.card-helpline {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--primary);
  font-weight: 600;
}

.card-footer-btns {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-card-guide {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-card-guide:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-card-visit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.6rem 0.9rem;
  background: var(--primary);
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-card-visit:hover {
  background: var(--primary-hover);
  transform: translateX(2px);
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-glass-card);
  border: 1px dashed var(--border-color);
  border-radius: 20px;
}

.empty-icon {
  width: 56px;
  height: 56px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.empty-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-desc {
  color: var(--text-muted);
  max-width: 450px;
  margin: 0 auto 1.5rem;
}

/* Step-by-Step Interactive Modal */
.guide-modal {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 680px;
  width: 92vw;
  margin: auto;
  outline: none;
}

.guide-modal::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-dialog-content {
  background: var(--bg-glass-modal);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.modal-header-banner {
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--primary-light);
}

.modal-title-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.modal-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-icon-box i {
  width: 28px;
  height: 28px;
}

.modal-title-meta {
  flex: 1;
}

.modal-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.modal-badge-status {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-green);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.modal-badge-category {
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 100px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.modal-service-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}

.modal-close-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.modal-body-scroll {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  flex: 1;
}

.modal-desc-box {
  margin-bottom: 1.5rem;
  padding: 0.9rem 1.1rem;
  background: var(--bg-surface);
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.steps-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.steps-list {
  list-style: none;
  counter-reset: step-counter;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.step-item {
  counter-increment: step-counter;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: 14px;
}

.step-item::before {
  content: counter(step-counter);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-text {
  font-size: 0.925rem;
  color: var(--text-primary);
  line-height: 1.5;
}

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

.info-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.info-icon {
  width: 22px;
  height: 22px;
  color: var(--primary);
  flex-shrink: 0;
}

.info-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.info-value {
  display: block;
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 700;
}

.modal-footer-actions {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--border-highlight);
  background: var(--bg-surface);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--primary);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast-message {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.2rem;
  background: var(--strip-bg);
  color: #ffffff;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Footer */
.app-footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-glass);
  padding: 2rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

.footer-note {
  max-width: 540px;
  font-size: 0.8rem;
  margin-top: 0.4rem;
}

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

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}

.footer-link:hover {
  color: var(--primary);
}

.footer-script-btn {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.footer-script-btn:hover {
  text-decoration: underline;
}

.dot { color: var(--border-color); }

/* Responsive Adjustments & Mobile Center Alignment */
@media (max-width: 768px) {
  .hero-section {
    padding: 1.25rem 0 1rem;
    text-align: center;
    width: 100%;
  }
  .hero-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
  }
  .hero-heading {
    font-size: 1.5rem;
    text-align: center;
  }
  .hero-desc {
    font-size: 0.85rem;
    text-align: center;
    max-width: 100%;
  }
  .search-container {
    width: 100%;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
  }
  .hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.4rem 0.8rem;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    border-radius: 16px;
    padding: 0.45rem 0.75rem;
  }
  .stat-divider {
    display: none;
  }
  .stat-chip {
    font-size: 0.75rem;
  }
  .filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
  }
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
  }
  .service-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
  }
  .modal-info-grid {
    grid-template-columns: 1fr;
  }
  .modal-footer-actions {
    flex-direction: column;
  }
  .btn-primary, .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  .helplines-inner {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .header-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: auto;
    padding: 0.6rem 0;
    gap: 0.5rem;
    width: 100%;
  }
  .logo-group {
    gap: 0.45rem;
  }
  .logo-emblem img {
    width: 24px !important;
    height: 30px !important;
  }
  .brand-sub {
    display: none;
  }
  .brand-title {
    font-size: 1.12rem;
  }
  .header-actions {
    gap: 0.35rem;
  }
  .lang-selector-wrapper {
    padding: 0 0.35rem;
  }
  .lang-select {
    font-size: 0.78rem;
    padding: 0.35rem 1.3rem 0.35rem 0.2rem;
  }
  .theme-toggle-btn {
    width: 34px;
    height: 34px;
  }
  .helplines-strip {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }
  .helpline-badge {
    margin-bottom: 0.2rem;
    font-size: 0.78rem;
    justify-content: center;
    width: 100%;
  }
  .helpline-items {
    overflow-x: auto;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    gap: 0.75rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .helpline-items::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
  .helpline-item {
    font-size: 0.75rem;
    flex-shrink: 0;
  }
  .filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
  }
  .category-dropdown-wrapper {
    flex: 1;
    min-width: 0;
  }
  .category-dropdown-btn {
    width: 100%;
    min-width: 0;
    padding: 0.45rem 0.65rem;
    font-size: 0.8rem;
    gap: 0.35rem;
  }
  .fav-filter-btn {
    flex-shrink: 0;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
  }
  .results-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 1rem;
  }
  .results-title {
    font-size: 1.15rem;
  }
  .results-count {
    font-size: 0.8rem;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
  }
  .footer-note {
    text-align: center;
    margin-top: 0;
  }
  .footer-right {
    justify-content: center;
    width: 100%;
  }
}
