/**
 * @file esm-v2.css
 * @description Unified "San Marcos River Luxe" Design System for Everything San Marcos v2.0.
 *
 * Design Intent:
 * - Eliminates the visual fragmentation of V1 by providing a single, cohesive,
 *   high-contrast design language across all 12 pages.
 * - Palette inspired by San Marcos, TX: Springfed Emerald (#057A6D), River Teal (#008B9E),
 *   Cypress Midnight (#07161B), Sunlit Amber Gold (#D97706), and Hill Country Limestone (#F6F9F8).
 * - WCAG 2.1 AA compliant contrast ratios across light editorial surfaces and dark luxury hero/studio surfaces.
 *
 * Audit Trail:
 * - Created & unified for Everything San Marcos v2.0 (`everythingsanmo2`)
 */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700;9..144,800&family=JetBrains+Mono:wght@500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Core Brand Tokens (Set A) */
  --esm-river: #008b9e;
  --esm-river-bright: #00b4cc;
  --esm-river-deep: #062831;
  --esm-river-mid: #0e7488;
  --esm-river-light: #e0f5f3;
  --esm-spring-aqua: #12a594;
  --esm-emerald: #057a6d;
  --esm-emerald-light: #10b981;
  --esm-midnight: #07161b;
  --esm-midnight-elevated: #0d232b;
  --esm-gold: #d97706;
  --esm-gold-bright: #f59e0b;
  --esm-gold-soft: #fef3c7;
  --esm-amber-gold: #d97706;
  --esm-amber-deep: #b45309;
  --esm-coral: #e11d48;
  --esm-indigo: #4f46e5;

  /* Surface Tokens (Crisp Daylight + Limestone — Set A & Set B) */
  --esm-bg: #f5f8f7;
  --esm-bg-alt: #ebf1ef;
  --esm-limestone: #f5f8f7;
  --esm-limestone-dark: #e8efed;
  --esm-surface: #ffffff;
  --esm-surface-glass: rgba(255, 255, 255, 0.88);
  --esm-border: rgba(11, 41, 48, 0.11);
  --esm-border-strong: rgba(0, 139, 158, 0.28);

  /* Typography Colors (Set A & Set B) */
  --esm-text: #0b1f24;
  --esm-text-secondary: #2e4950;
  --esm-text-muted: #5a767e;
  --esm-text-inverse: #f4fbfa;
  --esm-ink: #0b1f24;
  --esm-ink-soft: #2e4950;
  --esm-ink-muted: #5a767e;

  /* Page-Specific Tokens (Set C: calendar, register, last-resort, marketing-services, blog, success) */
  --spring-teal: #008b9e;
  --spring-teal-deep: #064e5b;
  --spring-teal-glow: rgba(0, 139, 158, 0.12);
  --terracotta: #e85d2a;
  --amber-gold: #d97706;
  --bg-sandstone: #f4f7f6;
  --bg-limestone: #f5f8f7;
  --bg-primary: #f5f8f7;
  --border-stone: rgba(11, 41, 48, 0.11);
  --border-stone-strong: rgba(11, 41, 48, 0.20);
  --border-glass: rgba(11, 41, 48, 0.11);
  --border-glass-hover: rgba(0, 139, 158, 0.30);
  --text-primary: #0b1f24;
  --text-secondary: #2e4950;
  --text-muted: #5a767e;
  --color-teal: #008b9e;
  --color-blue: #0284c7;
  --color-pink: #e11d48;
  --color-midnight: #07161b;
  --accent-blue: #008b9e;
  --gradient-river-hero: linear-gradient(155deg, #06151a 0%, #09252e 52%, #08333a 100%);
  --transition-fast: 0.18s ease;

  /* Font Stacks */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', 'DM Serif Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radii & Shadows */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --radius-pill: 9999px;

  --shadow-xs: 0 2px 6px rgba(7, 22, 27, 0.04);
  --shadow-sm: 0 6px 18px rgba(7, 22, 27, 0.06), 0 1px 3px rgba(7, 22, 27, 0.04);
  --shadow-md: 0 14px 34px rgba(7, 22, 27, 0.09), 0 3px 8px rgba(7, 22, 27, 0.04);
  --shadow-lg: 0 24px 56px rgba(7, 22, 27, 0.14), 0 6px 16px rgba(7, 22, 27, 0.06);
  --esm-shadow-sm: var(--shadow-sm);
  --esm-shadow-md: var(--shadow-md);
  --esm-shadow-lg: var(--shadow-lg);
  --shadow-river: 0 14px 32px rgba(0, 139, 158, 0.24);
  --shadow-gold: 0 14px 34px rgba(217, 119, 6, 0.26);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Base & Accessibility ───────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--esm-bg);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(0, 180, 204, 0.07) 0%, transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(5, 122, 109, 0.06) 0%, transparent 40%);
  color: var(--esm-text);
  line-height: 1.6;
}

.skip-link {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  z-index: 9999;
}

.skip-link:focus-visible {
  left: 16px !important;
  top: 16px !important;
  width: auto !important;
  height: auto !important;
  padding: 10px 18px !important;
  border-radius: 10px !important;
  background: #07161b !important;
  color: #5efce8 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35) !important;
}

.esm-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 640px) {
  .esm-container {
    padding: 0 16px;
  }
}

/* ─── River Luxe Hero Banner (Shared Across All Pages) ───────────────────── */

.esm-hero,
.cal-hero,
.register-hero,
.services-hero,
.blog-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 20%, rgba(0, 180, 204, 0.26) 0%, transparent 45%),
    radial-gradient(circle at 82% 15%, rgba(16, 185, 129, 0.20) 0%, transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(245, 158, 11, 0.14) 0%, transparent 50%),
    linear-gradient(155deg, #06151a 0%, #09252e 52%, #08333a 100%) !important;
  color: #f4fbfa !important;
  padding: 58px 0 50px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
}

.esm-hero::after,
.cal-hero::after,
.register-hero::after,
.services-hero::after,
.blog-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.065) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 85%);
  pointer-events: none;
}

.esm-hero-inner,
.cal-hero > .esm-container,
.register-hero > .esm-container,
.services-hero > .esm-container,
.blog-hero > .esm-container {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.esm-hero-inner {
  text-align: center;
}

.esm-eyebrow,
.esm-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(0, 180, 204, 0.16);
  border: 1px solid rgba(94, 252, 232, 0.34);
  color: #7ef3e6 !important;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.esm-eyebrow-dot,
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
  animation: esmPulse 2.2s infinite;
  flex-shrink: 0;
}

@keyframes esmPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.75; }
}

.esm-hero-title,
.cal-hero-title,
.register-hero h1,
.services-hero h1,
.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.3vw, 3.55rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 auto 14px;
  color: #ffffff !important;
}

.esm-hero-title .accent,
.esm-hero-title em,
.cal-hero-title em,
.register-hero h1 em,
.services-hero h1 em,
.blog-hero h1 em {
  font-style: italic;
  background: linear-gradient(125deg, #5efce8 0%, #38bdf8 55%, #fcd34d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

.esm-hero-sub,
.cal-hero-sub,
.register-hero p,
.services-hero p,
.blog-hero p {
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  color: rgba(230, 246, 245, 0.85) !important;
  max-width: 680px;
  margin: 0 auto 26px;
  line-height: 1.62;
}

.cal-hero-sub {
  margin: 0;
}

.register-hero .hero-trust-chip {
  background: rgba(255, 255, 255, 0.09) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #e6f8f6 !important;
  backdrop-filter: blur(8px);
}

/* ─── Hero Stats Strip & Trust Badges ────────────────────────────────────── */

.esm-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 780px;
  margin: 28px auto 0;
}

@media (max-width: 680px) {
  .esm-stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.esm-stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.esm-stat-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(94, 252, 232, 0.36);
}

.esm-stat-pill .stat-val {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
  color: #5efce8;
  margin-bottom: 3px;
}

.esm-stat-pill .stat-lbl {
  font-size: 0.74rem;
  font-weight: 600;
  color: rgba(230, 246, 245, 0.80);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.esm-trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.esm-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2f5f3;
  font-size: 0.81rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.esm-trust-pill strong {
  color: #5efce8;
  font-weight: 800;
}

/* ─── Sticky Discovery Bar & Neighborhood Switcher ───────────────────────── */

.esm-discovery-bar {
  position: sticky;
  top: 68px;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--esm-border);
  padding: 14px 0;
  box-shadow: 0 6px 20px rgba(7, 22, 27, 0.05);
}

.esm-discovery-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.esm-discovery-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.esm-neighborhood-pills,
.esm-neighborhood-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.esm-neighborhood-scroll::-webkit-scrollbar {
  display: none;
}

.esm-hood-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--esm-border);
  background: var(--esm-bg);
  color: var(--esm-text-secondary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s var(--ease-out);
}

.esm-hood-btn:hover {
  border-color: var(--esm-river);
  color: var(--esm-river-deep);
  background: rgba(0, 139, 158, 0.08);
}

.esm-hood-btn.active {
  background: linear-gradient(135deg, var(--esm-river) 0%, var(--esm-emerald) 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(0, 139, 158, 0.25);
}

.esm-view-toggle,
.esm-view-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--esm-bg);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--esm-border);
  gap: 3px;
}

.esm-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--esm-text-secondary);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s var(--ease-out);
}

.esm-view-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.esm-view-btn.active {
  background: var(--esm-midnight);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
}

/* ─── Interactive Map Container & Split Layout ───────────────────────────── */

.esm-workspace,
.esm-directory-layout {
  display: block;
}

#listings-container {
  min-height: 680px;
}

.esm-workspace[data-view-mode="split"],
.esm-directory-layout--split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(380px, 0.85fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 1060px) {
  .esm-workspace[data-view-mode="split"],
  .esm-directory-layout--split {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .esm-workspace[data-view-mode="split"] .esm-map-panel,
  .esm-directory-layout--split .esm-map-panel {
    order: -1;
    position: static;
    top: auto;
  }
}

/* Mobile Quick-Jump Section Bar (<= 1060px) */
.esm-mobile-jumpbar {
  display: none;
}

@media (max-width: 1060px) {
  .esm-mobile-jumpbar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .esm-mobile-jumpbar::-webkit-scrollbar {
    display: none;
  }
  .esm-jump-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--esm-border-strong);
    color: var(--esm-river-deep);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: var(--shadow-xs);
    min-height: 38px;
  }
  .esm-jump-pill:active {
    background: var(--esm-river-light);
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }
  .esm-hero,
  .cal-hero,
  .register-hero,
  .services-hero,
  .blog-hero {
    padding: 32px 0 28px !important;
  }
  .esm-hero-title,
  .cal-hero-title,
  .register-hero h1,
  .services-hero h1,
  .blog-hero h1 {
    font-size: clamp(1.75rem, 7vw, 2.3rem) !important;
  }
  .esm-hero-sub {
    font-size: 0.94rem !important;
    margin-bottom: 18px !important;
  }
  .esm-stats-strip {
    gap: 8px;
    margin-top: 18px;
  }
  .esm-stat-pill {
    padding: 10px 8px;
    border-radius: 12px;
  }
  .esm-stat-pill .stat-val {
    font-size: 1.22rem;
  }
  .esm-stat-pill .stat-lbl {
    font-size: 0.66rem;
  }
  .esm-discovery-bar {
    position: static;
    padding: 10px 0;
  }
  .esm-discovery-inner {
    padding: 0 14px;
    gap: 10px;
  }
  .esm-map-canvas {
    height: 290px;
  }
  .esm-workspace[data-view-mode="map"] .esm-map-canvas,
  .esm-directory-layout--map .esm-map-canvas {
    height: 440px;
  }
  .esm-view-switcher,
  .esm-view-toggle {
    width: 100%;
    justify-content: space-between;
  }
  .esm-view-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 10px;
    font-size: 0.78rem;
  }
  .reg-search-wrap {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 12px !important;
    border-radius: 18px !important;
  }
  .reg-search-ico,
  .reg-search-divider {
    display: none !important;
  }
  .reg-search-wrap input,
  .reg-search-cat,
  .reg-search-btn {
    width: 100% !important;
    min-height: 44px;
  }
  #listings-container {
    min-height: 280px;
  }
}

/* ─── Dedicated Mobile UI & Scaling Across Major Devices (360px - 900px) ── */

@media (max-width: 900px) {
  .reg-filters-inner {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 10px !important;
  }
  .reg-chips-track {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .reg-chips-scroll {
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .reg-filters-inner > div {
    max-width: 100% !important;
    min-width: 0 !important;
    flex-wrap: wrap !important;
  }
  .listings-grid,
  .esm-directory-layout--split .listings-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .listing-card,
  .esm-card,
  .pkg-card,
  .sim-controls,
  .fb-mock-card,
  .lr-canvas-area,
  .lr-sidebar,
  .lr-panel,
  .lr-filter-bar,
  .biz-panel,
  .blog-post,
  .schedule-card,
  .schedule-side-card,
  .service-offer-card {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  .sim-grid,
  .packages-grid,
  .lr-grid,
  .biz-layout-grid,
  .schedule-layout,
  .blog-page-layout,
  .services-grid,
  .split-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .lr-wrap {
    padding: 18px 14px 3rem !important;
  }
  .lr-canvas-area,
  .lr-panel,
  .lr-filter-bar {
    padding: 16px !important;
  }
  .lr-cat-rail-track,
  .lr-cat-rail {
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .lr-wheel-scene {
    width: min(320px, 100%) !important;
  }
  .lr-pointer-wrap {
    right: -12px !important;
  }
  .biz-hero-top {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .biz-hero-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .esm-container,
  .esm-hero-inner,
  .esm-discovery-inner {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .esm-eyebrow,
  .esm-hero-eyebrow {
    font-size: 0.68rem;
    padding: 5px 12px;
    white-space: normal;
    text-align: center;
  }
  .esm-btn,
  .esm-btn-primary,
  .esm-btn-secondary,
  .esm-btn-outline,
  .esm-btn-gold,
  .esm-btn-ghost {
    white-space: normal;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.84rem;
  }
  .listing-card {
    padding: 15px !important;
    border-radius: 16px !important;
  }
  .warm-card-foot {
    flex-wrap: wrap;
    gap: 8px;
  }
  .spotlight-card {
    flex: 0 0 min(272px, 82vw) !important;
  }
  .esm-map-header {
    flex-wrap: wrap;
    padding: 10px 12px;
    font-size: 0.78rem;
  }
  .esm-footer {
    padding: 36px 0 24px !important;
    margin-top: 40px !important;
  }
  .esm-footer-grid {
    padding: 0 14px !important;
    gap: 24px !important;
  }
}

.esm-map-panel {
  display: none;
  background: var(--esm-surface);
  border: 1px solid var(--esm-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.esm-workspace[data-view-mode="split"] .esm-map-panel,
.esm-directory-layout--split .esm-map-panel {
  display: block;
  position: sticky;
  top: 142px;
}

.esm-workspace[data-view-mode="map"] .esm-map-panel,
.esm-directory-layout--map .esm-map-panel {
  display: block;
  margin-bottom: 24px;
}

.esm-workspace[data-view-mode="map"] .esm-listings-panel,
.esm-directory-layout--map .esm-listings-pane {
  display: none;
}

.esm-directory-layout--grid .esm-map-panel {
  display: none;
}

.esm-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(90deg, #07161b 0%, #0b2933 100%);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
}

.esm-map-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.85);
}

.esm-legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
}

.esm-legend-dot.boosted {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.esm-legend-dot.standard {
  background: #00b4cc;
}

.esm-map-canvas {
  width: 100%;
  height: 560px;
  background: #e5eef0;
  z-index: 1;
}

.esm-workspace[data-view-mode="map"] .esm-map-canvas,
.esm-directory-layout--map .esm-map-canvas {
  height: 650px;
}

/* Custom Leaflet Marker Pins */
.esm-pin-wrap,
.esm-pin-wrapper {
  background: transparent;
  border: none;
}

.esm-pin {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  background: linear-gradient(135deg, #008b9e 0%, #057a6d 100%);
  border: 2.5px solid #ffffff;
  box-shadow: 0 6px 16px rgba(7, 22, 27, 0.28);
  transition: transform 0.2s var(--ease-out);
}

.esm-pin:hover {
  transform: rotate(-45deg) scale(1.16);
}

.esm-pin-inner,
.esm-pin-emoji {
  transform: rotate(45deg);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
}

.esm-pin.is-boosted,
.esm-pin.esm-pin--boosted {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 2.5px solid #fef3c7;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.28), 0 8px 20px rgba(217, 119, 6, 0.45);
}

/* Leaflet Popup Styling */
.leaflet-popup-content-wrapper {
  border-radius: 16px !important;
  padding: 0 !important;
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(7, 22, 27, 0.22) !important;
  border: 1px solid rgba(0, 139, 158, 0.18);
}

.leaflet-popup-content {
  margin: 0 !important;
  width: 270px !important;
  font-family: var(--font-sans) !important;
}

.esm-popup-card {
  padding: 16px;
  background: #ffffff;
  color: var(--esm-text);
}

.esm-popup-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  margin-bottom: 6px;
}

.esm-popup-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--esm-text);
}

.esm-popup-meta {
  font-size: 0.78rem;
  color: var(--esm-text-secondary);
  margin-bottom: 10px;
}

.esm-popup-coupon {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(5, 122, 109, 0.08);
  border: 1px dashed rgba(5, 122, 109, 0.35);
  color: #065f46;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.esm-popup-actions {
  display: flex;
  gap: 8px;
}

.esm-popup-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s;
}

.esm-popup-btn.primary {
  background: var(--esm-midnight);
  color: #ffffff;
}

.esm-popup-btn.secondary {
  background: var(--esm-bg);
  color: var(--esm-text);
  border: 1px solid var(--esm-border);
}

/* ─── Universal Buttons, Cards & Badges ──────────────────────────────────── */

.esm-btn,
.esm-btn-primary,
.esm-btn-secondary,
.esm-btn-outline,
.esm-btn-gold,
.esm-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}

.esm-btn-primary {
  background: linear-gradient(135deg, var(--esm-river) 0%, var(--esm-emerald) 100%);
  color: #ffffff !important;
  box-shadow: var(--shadow-river);
}

.esm-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(0, 139, 158, 0.34);
}

.esm-btn-secondary {
  background: #ffffff;
  color: var(--esm-ink) !important;
  border-color: rgba(11, 41, 48, 0.18);
  box-shadow: var(--shadow-xs);
}

.esm-btn-secondary:hover {
  border-color: var(--esm-river);
  color: var(--esm-river-deep) !important;
  background: #f8fbfb;
  transform: translateY(-1px);
}

/* High-contrast glass secondary button when placed inside dark hero sections */
.esm-hero .esm-btn-secondary,
.cal-hero .esm-btn-secondary,
.register-hero .esm-btn-secondary,
.services-hero .esm-btn-secondary,
.blog-hero .esm-btn-secondary {
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
}

.esm-hero .esm-btn-secondary:hover,
.cal-hero .esm-btn-secondary:hover,
.register-hero .esm-btn-secondary:hover,
.services-hero .esm-btn-secondary:hover,
.blog-hero .esm-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.20);
  border-color: #5efce8;
  color: #ffffff !important;
}

.esm-btn-outline {
  background: transparent;
  color: var(--esm-river-mid) !important;
  border-color: rgba(14, 116, 136, 0.35);
}

.esm-btn-outline:hover {
  background: rgba(14, 116, 136, 0.08);
  border-color: var(--esm-river-mid);
}

.esm-btn-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff !important;
  box-shadow: var(--shadow-gold);
}

.esm-btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(217, 119, 6, 0.36);
}

.esm-btn-ghost {
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.24);
}

.esm-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

.esm-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(0, 139, 158, 0.10);
  border: 1px solid rgba(0, 139, 158, 0.24);
  color: var(--esm-river-deep);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.esm-card {
  background: var(--esm-surface);
  border: 1px solid var(--esm-border);
  border-radius: 20px;
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.esm-card:hover {
  box-shadow: var(--shadow-md);
}

/* ─── Universal Footer (Protected Against Legacy Overrides) ──────────────── */

footer.esm-footer,
body[data-layout="warm"] footer.esm-footer {
  background: linear-gradient(180deg, #07161b 0%, #040e12 100%) !important;
  color: rgba(244, 251, 250, 0.78) !important;
  padding: 56px 0 36px !important;
  margin-top: 72px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.09) !important;
}

.esm-footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
}

@media (max-width: 860px) {
  .esm-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 540px) {
  .esm-footer-grid {
    grid-template-columns: 1fr;
  }
}

.esm-footer-brand h3,
.esm-footer-logo {
  font-family: var(--font-display);
  font-size: 1.38rem;
  font-weight: 700;
  color: #ffffff !important;
  margin: 0 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.esm-footer-logo .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2bd9c4;
  display: inline-block;
  box-shadow: 0 0 8px #2bd9c4;
}

.esm-footer-brand p {
  font-size: 0.88rem;
  color: rgba(244, 251, 250, 0.70) !important;
  max-width: 340px;
  margin: 0 0 16px;
}

.esm-footer-col h4 {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #5efce8 !important;
  margin: 0 0 14px;
}

.esm-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.esm-footer-col a,
body[data-layout="warm"] footer.esm-footer a {
  color: rgba(244, 251, 250, 0.78) !important;
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s;
}

.esm-footer-col a:hover,
body[data-layout="warm"] footer.esm-footer a:hover {
  color: #5efce8 !important;
}

.esm-footer-bottom {
  max-width: 1280px;
  margin: 36px auto 0;
  padding: 20px 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: rgba(244, 251, 250, 0.58) !important;
}

/* ─── Live Preview Card on register.html & Input Normalization ───────────── */

.register-card .form-input,
.schedule-card .form-input {
  background: #f8fbfa !important;
  border: 1.5px solid rgba(11, 41, 48, 0.18) !important;
  color: #0b1f24 !important;
  border-radius: 12px !important;
  padding: 11px 14px !important;
  font-family: var(--font-sans) !important;
}

.register-card .form-input:focus,
.schedule-card .form-input:focus {
  background: #ffffff !important;
  border-color: var(--esm-river) !important;
  box-shadow: 0 0 0 3px rgba(0, 139, 158, 0.14) !important;
}

.registry-card {
  background: linear-gradient(160deg, #ffffff 0%, #f4faf9 100%);
  border: 1.5px solid rgba(0, 139, 158, 0.22);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.rc-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.rc-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--esm-river) 0%, var(--esm-emerald) 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rc-title-group {
  min-width: 0;
  flex: 1;
}

.rc-cat-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--esm-river-mid);
  margin-bottom: 2px;
}

.rc-name {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--esm-ink);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rc-location-row {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0, 139, 158, 0.07);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--esm-ink-soft);
}

.rc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--esm-border);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--esm-river-deep);
}

/* ============================================================================
   V2 DIRECTORY CARD ENHANCEMENTS & INTERACTIVE MAP SYNC STYLES
   ============================================================================ */
.listing-location-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--esm-ink-soft);
  margin-bottom: 0.65rem;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  background: rgba(14, 116, 136, 0.05);
  border: 1px solid rgba(14, 116, 136, 0.1);
}
.listing-card--boosted .listing-location-row {
  color: inherit;
  background: color-mix(in srgb, currentColor 8%, transparent);
  border-color: color-mix(in srgb, currentColor 22%, transparent);
}
.listing-location-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.listing-map-locate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--esm-river-mid);
  background: #ffffff;
  border: 1px solid rgba(14, 116, 136, 0.25);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.16s ease;
}
.listing-map-locate-btn:hover {
  background: var(--esm-river-mid);
  color: #ffffff;
  border-color: var(--esm-river-mid);
  transform: translateY(-1px);
}
.listing-card--boosted .listing-map-locate-btn {
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  border-color: color-mix(in srgb, currentColor 35%, transparent);
}
.listing-card--boosted .listing-map-locate-btn:hover {
  background: rgba(255, 255, 255, 0.32);
}

.listing-highlights-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
}
.listing-highlight-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  background: rgba(18, 165, 148, 0.09);
  color: var(--esm-river-deep);
  border: 1px solid rgba(18, 165, 148, 0.22);
}
.listing-card--boosted .listing-highlight-pill {
  color: inherit;
  background: color-mix(in srgb, currentColor 12%, transparent);
  border-color: color-mix(in srgb, currentColor 28%, transparent);
}

.warm-card-featured-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.3);
  margin-bottom: 0.65rem;
}

.warm-card-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}
.warm-card-profile-link {
  margin: 0 !important;
}
.warm-card-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.3);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.warm-card-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(217, 119, 6, 0.45);
}

.listing-card--map-active {
  outline: 3px solid var(--esm-spring-aqua) !important;
  outline-offset: 2px;
  transform: translateY(-3px);
}

/* Split layout adjustments for business cards */
.esm-directory-layout--split .listings-grid {
  grid-template-columns: repeat(2, 1fr) !important;
}
@media (max-width: 780px) {
  .esm-directory-layout--split .listings-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Enhanced Spotlight Track */
.boost-spotlight {
  background: linear-gradient(135deg, rgba(6, 40, 49, 0.04) 0%, rgba(18, 165, 148, 0.07) 100%);
  border: 1px solid rgba(14, 116, 136, 0.15);
  border-radius: 20px;
  padding: 1.15rem 1.25rem 0.85rem;
  margin-bottom: 1.5rem;
}
.boost-spotlight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.boost-spotlight-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--esm-ink);
}
.boost-spotlight-sub {
  display: block;
  font-size: 0.8rem;
  color: var(--esm-ink-muted);
}
.boost-spotlight-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--esm-amber-deep);
  background: rgba(217, 138, 43, 0.12);
  border: 1px solid rgba(217, 138, 43, 0.3);
  transition: all 0.18s ease;
}
.boost-spotlight-cta:hover {
  background: var(--esm-amber-gold);
  color: #ffffff;
}
.spotlight-card {
  flex: 0 0 285px !important;
  border-radius: 16px !important;
  padding: 1rem 1.1rem !important;
}
.spotlight-meta-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.spotlight-badge {
  background: rgba(245, 158, 11, 0.22);
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
}
.spotlight-hood {
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Quick Filter Pill Buttons (Deals / Boosted) */
.esm-quick-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.44rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--esm-border-strong);
  background: #ffffff;
  color: var(--esm-ink-soft);
  cursor: pointer;
  transition: all 0.16s ease;
}
.esm-quick-filter-btn:hover {
  border-color: var(--esm-river-mid);
  color: var(--esm-river-deep);
}
.esm-quick-filter-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.28);
}
