:root {
  --primary: #005C55;
  --primary-dark: #004540;
  --primary-light: #00877C;
  --primary-container: #E6F4F2;
  --secondary: #0851D5;
  --secondary-container: #E8F0FE;
  --emergency: #D92D20;
  --emergency-container: #FEE4E2;
  --emergency-glow: rgba(217, 45, 32, 0.28);
  --success: #10B981;
  --warning: #F59E0B;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --text-main: #0F172A;
  --text-sub: #475467;
  --text-muted: #64748B;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 8px -1px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 36px -6px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 24px rgba(0, 92, 85, 0.25);
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  --glass-bg: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(255, 255, 255, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  font-family: 'Inter', 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .container {
    padding: 0 20px;
  }
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  transition: all 0.25s ease;
}

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

@media (min-width: 768px) {
  .nav-inner {
    height: 70px;
  }
}

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

.brand-emblem {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #005C55 0%, #00877C 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 92, 85, 0.28);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.brand:active .brand-emblem {
  transform: scale(0.92);
}

.brand-title {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.4px;
  line-height: 1.1;
}

@media (min-width: 640px) {
  .brand-title {
    font-size: 20px;
  }
}

.brand-subtitle {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1px;
}

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

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  text-decoration: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--primary);
  background: var(--primary-container);
}

.nav-link.active {
  color: #FFFFFF;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 92, 85, 0.3);
}

.nav-link.emergency-link {
  color: var(--emergency);
  background: var(--emergency-container);
}

.nav-link.emergency-link:hover,
.nav-link.emergency-link.active {
  background: var(--emergency);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(217, 45, 32, 0.35);
}

.lang-btn {
  padding: 6px 13px;
  border-radius: var(--radius-full);
  background: var(--primary-container);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(0, 92, 85, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 92, 85, 0.25);
}

.lang-btn:active {
  transform: scale(0.94);
}

.db-alert-bar {
  background: #FEF2F2;
  border-bottom: 1px solid #FEE2E2;
  color: #991B1B;
  padding: 10px 0;
  font-size: 13px;
}

.db-alert-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  background: linear-gradient(145deg, #003733 0%, #005C55 45%, #014640 100%);
  color: #FFFFFF;
  padding: 34px 0 40px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
}

@media (min-width: 768px) {
  .hero {
    padding: 50px 0 58px 0;
    border-bottom-left-radius: 36px;
    border-bottom-right-radius: 36px;
  }
}

/* Ambient glow accents */
.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  height: 220px;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.22) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: 10%;
  width: 260px;
  height: 180px;
  background: radial-gradient(circle, rgba(8, 81, 213, 0.2) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 1;
}

.hero > .container {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 5px 13px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5EEAD4;
  box-shadow: 0 0 10px #5EEAD4;
  animation: pulseLight 2s infinite ease-in-out;
}

@keyframes pulseLight {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.7; box-shadow: 0 0 14px #5EEAD4; }
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.6px;
  margin-bottom: 8px;
  line-height: 1.22;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 36px;
  }
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 46px;
  }
}

.hero-sub {
  font-size: 13.5px;
  color: #CCFBF1;
  margin-bottom: 22px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
  padding: 0 4px;
}

@media (min-width: 768px) {
  .hero-sub {
    font-size: 15.5px;
    margin-bottom: 28px;
  }
}

.hero-search-box {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-full);
  padding: 5px 6px 5px 16px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, 0.4);
  transition: all 0.25s ease;
}

.hero-search-box:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28), 0 0 0 4px rgba(94, 234, 212, 0.35);
  border-color: #5EEAD4;
}

.hero-search-box input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--text-main);
  padding: 8px 8px;
  font-family: inherit;
  background: transparent;
}

@media (min-width: 640px) {
  .hero-search-box input {
    font-size: 15px;
    padding: 9px 10px;
  }
}

.hero-search-btn {
  background: linear-gradient(135deg, #005C55 0%, #007A70 100%);
  color: #FFFFFF;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 92, 85, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 92, 85, 0.4);
}

.hero-search-btn:active {
  transform: scale(0.94);
}

.metrics-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 620px;
  margin: 22px auto 0 auto;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .metrics-bar {
    gap: 12px;
    margin-top: 28px;
  }
}

.metric-card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  padding: 9px 6px;
  min-width: 0;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

@media (min-width: 640px) {
  .metric-card {
    padding: 12px 10px;
  }
}

.metric-card:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.metric-num {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: -0.3px;
  line-height: 1.1;
}

@media (min-width: 640px) {
  .metric-num {
    font-size: 22px;
  }
}

.metric-label {
  font-size: 10.5px;
  color: #CCFBF1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  font-weight: 500;
}

/* ==========================================================================
   Main Content Layout & Grids
   ========================================================================== */
.main-wrapper {
  padding: 20px 0 80px 0;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .main-wrapper {
    padding: 32px 0 80px 0;
  }
}

.tab-section {
  display: none;
  width: 100%;
  box-sizing: border-box;
}

.tab-section.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

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

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.section-heading-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
}

.section-action-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.grid-services-6 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 28px;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .grid-services-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 36px;
  }
}

@media (min-width: 1024px) {
  .grid-services-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* ==========================================================================
   Directory Filter Controls & Horizontal Category Ribbon
   ========================================================================== */
.dir-filter-row {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

@media (min-width: 640px) {
  .dir-filter-row {
    gap: 12px;
    margin-bottom: 14px;
  }
}

.dir-search-box {
  margin: 0;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
  flex: 1;
  min-width: 0;
}

.dir-custom-dropdown {
  position: relative;
  user-select: none;
  flex-shrink: 0;
  z-index: 60;
}

.dir-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0 12px;
  height: 44px;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .dir-dropdown-btn {
    padding: 0 16px;
    height: 48px;
    font-size: 13px;
    gap: 8px;
  }
}

.dir-dropdown-btn:hover {
  border-color: var(--primary);
  background: #FAFDFA;
}

.dir-custom-dropdown.open .dir-dropdown-btn {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 92, 85, 0.16);
  background: #FFFFFF;
}

.dir-filter-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.dir-dropdown-label {
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 95px;
}

@media (min-width: 640px) {
  .dir-dropdown-label {
    max-width: 150px;
  }
}

.dir-dropdown-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dir-custom-dropdown.open .dir-dropdown-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

/* Floating Glasspop Menu */
.dir-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 270px;
  max-width: calc(100vw - 32px);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 48px -8px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(0, 92, 85, 0.06);
  padding: 6px;
  z-index: 90;
  max-height: 340px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s ease;
}

.dir-custom-dropdown.open .dir-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.dir-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  box-sizing: border-box;
}

.dir-menu-item:hover {
  background: var(--border-light);
  transform: translateX(3px);
}

.dir-menu-item.active {
  background: var(--primary-container);
  color: var(--primary);
  font-weight: 800;
}

.dir-menu-icon-box {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dir-menu-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dir-menu-check {
  color: var(--primary);
  margin-left: auto;
  flex-shrink: 0;
}

/* Category Ribbon: Horizontal swipeable pills on mobile (1 compact row), Grid on desktop */
.dir-cat-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px 2px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.dir-cat-container::-webkit-scrollbar {
  display: none;
}

/* Mobile Pill Styling inside Directory Container */
.dir-cat-container .cat-box {
  flex: 0 0 auto;
  flex-direction: row;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  min-height: 42px;
  align-items: center;
  box-shadow: var(--shadow-xs);
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dir-cat-container .cat-box:active {
  transform: scale(0.92);
}

.dir-cat-container .cat-box.active {
  border: 1.5px solid var(--primary);
  background: linear-gradient(180deg, var(--primary-container) 0%, #FFFFFF 100%);
  box-shadow: 0 3px 12px rgba(0, 92, 85, 0.2);
}

.dir-cat-container .cat-icon-box {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  margin-bottom: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dir-cat-container .cat-title {
  font-size: 12.5px;
  font-weight: 700;
  width: auto;
  max-width: none;
  white-space: nowrap;
  letter-spacing: -0.1px;
}

@media (min-width: 768px) {
  .dir-cat-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
    overflow-x: visible;
    padding: 0;
    scroll-snap-type: none;
  }

  .dir-cat-container .cat-box {
    flex-direction: column;
    padding: 14px 10px;
    border-radius: var(--radius-md);
    min-height: auto;
  }

  .dir-cat-container .cat-icon-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
  }
}

@media (min-width: 1024px) {
  .dir-cat-container {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.grid-directory-12 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .grid-directory-12 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
  }
}

@media (min-width: 1024px) {
  .grid-directory-12 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.grid-cards-3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .grid-cards-3 {
    gap: 16px;
  }
}

@media (min-width: 768px) {
  .grid-cards-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid-cards-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ==========================================================================
   Category Selector Cards (Mobile-App Style)
   ========================================================================== */
.cat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 0;
  box-sizing: border-box;
  user-select: none;
  position: relative;
  overflow: hidden;
}

@media (min-width: 640px) {
  .cat-box {
    padding: 15px 10px;
    box-shadow: var(--shadow-sm);
  }
}

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

.cat-box:active {
  transform: scale(0.93);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.cat-box.active {
  border: 2px solid var(--primary);
  background: linear-gradient(180deg, var(--primary-container) 0%, #FFFFFF 100%);
  box-shadow: 0 4px 14px rgba(0, 92, 85, 0.15);
}

.cat-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 7px;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

@media (min-width: 640px) {
  .cat-icon-box {
    width: 46px;
    height: 46px;
    margin-bottom: 9px;
  }
}

.cat-box:hover .cat-icon-box {
  transform: scale(1.08);
}

.cat-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

@media (min-width: 640px) {
  .cat-title {
    font-size: 12.5px;
  }
}

.cat-box.active .cat-title {
  color: var(--primary);
  font-weight: 800;
}

/* ==========================================================================
   Business & Service Cards (App Aesthetic)
   ========================================================================== */
.listing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

@media (min-width: 640px) {
  .listing-card {
    padding: 18px;
  }
}

.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 92, 85, 0.35);
}

.listing-card:active {
  transform: scale(0.985);
}

.card-body-top {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.card-thumb {
  width: 62px;
  height: 62px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--border-light);
  flex-shrink: 0;
}

.card-meta {
  flex: 1;
  min-width: 0;
  margin-left: 14px;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
  min-width: 0;
  width: 100%;
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  letter-spacing: -0.3px;
}

.card-category-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.card-location {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 6px;
  min-width: 0;
  width: 100%;
}

.card-location i {
  flex-shrink: 0;
  margin-top: 2px;
}

.card-location span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11.5px;
  margin-bottom: 6px;
  min-width: 0;
  width: 100%;
  color: var(--text-muted);
}

.badge-rating {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  color: #B45309;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(180, 83, 9, 0.15);
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.btn-call {
  flex: 1;
  min-width: 0;
  background: linear-gradient(135deg, #005C55 0%, #007A70 100%);
  color: #FFFFFF;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 92, 85, 0.25);
  transition: all 0.2s ease;
}

.btn-call:hover {
  background: linear-gradient(135deg, #004540 0%, #005C55 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 92, 85, 0.35);
}

.btn-call:active {
  transform: scale(0.95);
}

.btn-directions {
  flex: 1;
  min-width: 0;
  background: var(--secondary-container);
  color: var(--secondary);
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(8, 81, 213, 0.12);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.btn-directions:hover {
  background: #DCE8FD;
  transform: translateY(-1px);
}

.btn-directions:active {
  transform: scale(0.95);
}

/* ==========================================================================
   Transport Cards & Chips
   ========================================================================== */
.route-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  min-width: 0;
  width: 100%;
}

.route-pill {
  background: var(--primary-container);
  color: var(--primary);
  font-weight: 800;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
  border: 1px solid rgba(0, 92, 85, 0.12);
}

.route-endpoints {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.3;
}

.departure-pill {
  background: #F1F5F9;
  color: #334155;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  margin-right: 4px;
  display: inline-block;
  margin-top: 4px;
  border: 1px solid var(--border);
}

.chips-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.chips-bar::-webkit-scrollbar {
  display: none;
}

.chip-item {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
  user-select: none;
}

.chip-item:active {
  transform: scale(0.94);
}

.chip-item.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(0, 92, 85, 0.28);
}

/* ==========================================================================
   Detail Modal (Bottom Sheet on Mobile)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}

@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }
}

.modal-backdrop.open {
  display: flex;
  opacity: 1;
}

.modal-box {
  background: #FFFFFF;
  border-radius: 26px 26px 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px 20px 30px 20px;
  position: relative;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  animation: slideUpModal 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
  .modal-box {
    border-radius: var(--radius-lg);
    padding: 28px;
    max-height: 85vh;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  }
}

@keyframes slideUpModal {
  from {
    transform: translateY(100%);
    opacity: 0.6;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Sheet pull indicator on mobile */
.modal-box::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 5px;
  border-radius: 99px;
  background: #E2E8F0;
  display: block;
}

@media (min-width: 640px) {
  .modal-box::before {
    display: none;
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #F1F5F9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  background: #E2E8F0;
  color: #0F172A;
  transform: scale(1.08);
}

/* ==========================================================================
   Footer & Mobile Floating Navigation Dock
   ========================================================================== */
.footer {
  background: #0B1320;
  color: #94A3B8;
  padding: 22px 0 calc(90px + env(safe-area-inset-bottom, 16px)) 0;
  border-top: 1px solid #1E293B;
  font-size: 12.5px;
}

@media (min-width: 768px) {
  .footer {
    padding: 22px 0;
  }
}

.footer-bottom {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  font-size: 12.5px;
  color: #94A3B8;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    gap: 12px;
  }
}

.developed-by-link {
  color: #5EEAD4;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.developed-by-link:hover {
  color: #99F6E4;
  text-decoration: underline;
}

/* High-End Mobile Floating Dock */
.mobile-nav {
  position: fixed;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  left: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 28px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 8px;
  z-index: 45;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.05);
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none;
  }
}

.mob-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: #64748B;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  flex: 1;
  max-width: 84px;
}

.mob-btn:active {
  transform: scale(0.88);
}

.mob-btn i {
  transition: transform 0.2s ease;
}

.mob-btn.active {
  color: var(--primary);
  background: var(--primary-container);
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 92, 85, 0.15);
}

.mob-btn.active i {
  transform: scale(1.12);
}

.mob-btn.emergency {
  color: #991B1B;
}

.mob-btn.emergency.active {
  color: #FFFFFF;
  background: linear-gradient(135deg, #D92D20 0%, #EF4444 100%);
  box-shadow: 0 4px 14px rgba(217, 45, 32, 0.35);
  animation: pulseEmergency 2s infinite ease-in-out;
}

@keyframes pulseEmergency {
  0%, 100% { box-shadow: 0 4px 14px rgba(217, 45, 32, 0.35); }
  50% { box-shadow: 0 4px 22px rgba(217, 45, 32, 0.6); }
}

/* ==========================================================================
   Sponsor Ads & Dismissible Cards
   ========================================================================== */
.sponsor-ad-wrapper {
  position: relative;
  transition: opacity 0.28s ease, transform 0.28s ease, max-height 0.35s ease, margin 0.35s ease, padding 0.35s ease;
  max-height: 500px;
  opacity: 1;
  transform-origin: top center;
}

.sponsor-ad-wrapper.dismissed {
  opacity: 0 !important;
  max-height: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  border-width: 0 !important;
  transform: scaleY(0);
}

.ad-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 25;
  font-size: 13px;
  font-family: inherit;
  line-height: 1;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ad-close-btn svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  pointer-events: none;
  flex-shrink: 0;
}

.ad-close-btn:hover {
  background: #D92D20;
  border-color: #EF4444;
  transform: scale(1.12);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(217, 45, 32, 0.45);
}

.ad-close-btn:active {
  transform: scale(0.92);
}

.ad-close-btn:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}

.ad-badge {
  position: absolute;
  top: 8px;
  left: 10px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 5;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   Top Announcement Sponsor Bar
   ========================================================================== */
.sponsor-top-bar {
  background: linear-gradient(135deg, #005C55 0%, #004540 100%);
  color: #FFFFFF;
  padding: 8px 16px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 60;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sponsor-top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 10px;
  min-height: 24px;
}

.sponsor-top-bar .ad-close-btn-topbar {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  box-shadow: none;
}

.sponsor-top-bar .ad-close-btn-topbar svg {
  width: 11px;
  height: 11px;
}

.sponsor-top-bar .ad-close-btn-topbar:hover {
  background: #D92D20;
  border-color: #EF4444;
  transform: translateY(-50%) scale(1.15);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(217, 45, 32, 0.45);
}

.sponsor-top-bar .ad-close-btn-topbar:active {
  transform: translateY(-50%) scale(0.92);
}

.sponsor-top-bar-link {
  color: #FFFFFF;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  transition: opacity 0.2s ease;
}

.sponsor-top-bar-link:hover {
  text-decoration: underline;
  opacity: 0.95;
}

.ad-badge-inline {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Desktop Side Gutter Skyscraper Ads (Left & Right)
   ========================================================================== */
.sponsor-gutter {
  display: none;
  position: fixed;
  top: 90px;
  width: 140px;
  max-width: 140px;
  z-index: 40;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border);
  background: #FFFFFF;
}

.sponsor-gutter img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

@media (min-width: 1480px) {
  .sponsor-gutter {
    display: block;
  }
  .sponsor-gutter-left {
    left: calc((100vw - 1160px) / 2 - 156px);
  }
  .sponsor-gutter-right {
    right: calc((100vw - 1160px) / 2 - 156px);
  }
}


