/* ============================================================
   StowHelp.com - Design System
   Vehicle & Recreation Storage Directory
   ============================================================ */

:root {
  /* Brand Colors */
  --navy: #0B1D33;
  --navy-light: #132D4F;
  --slate: #1E3A5F;
  --steel: #3A5A7C;
  --sky: #4A90D9;
  --ice: #7EB8E4;
  --white: #FFFFFF;
  --off-white: #F4F7FA;
  --light-gray: #E8ECF1;
  --mid-gray: #9BAFC4;
  --dark-gray: #5A6B7D;
  --orange: #E8722A;
  --orange-dark: #C95E1F;
  --orange-light: #F09A5C;
  --green: #2ECC71;
  --green-dark: #27AE60;
  --red: #E74C3C;
  --gold: #F1C40F;

  /* Typography */
  --font-display: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(11,29,51,0.12);
  --shadow-md: 0 4px 12px rgba(11,29,51,0.15);
  --shadow-lg: 0 8px 32px rgba(11,29,51,0.2);
  --shadow-glow: 0 0 20px rgba(74,144,217,0.3);

  /* Spacing */
  --container: 1200px;
  --gap: 24px;
  --radius: 8px;
  --radius-lg: 12px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--off-white);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--sky); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--orange); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ============================================================
   Layout
   ============================================================ */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gap); }
.section { padding: 80px 0; }
.section-alt { background: var(--white); }
.grid { display: grid; gap: var(--gap); }
.grid-2 { display: grid; gap: var(--gap); grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; gap: var(--gap); grid-template-columns: repeat(3, 1fr); }
.grid-4 { display: grid; gap: var(--gap); grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; align-items: center; gap: var(--gap); }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11,29,51,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(74,144,217,0.2);
  padding: 0 var(--gap);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
}
.logo .icon { font-size: 1.6rem; }
.logo span { color: var(--orange); }
.logo-icon {
  font-size: 2rem;
  display: inline-block;
  animation: logoSpin 1s ease-in-out;
  transform-style: preserve-3d;
  perspective: 200px;
}
@keyframes logoSpin {
  0% { transform: rotateY(0deg) scale(0.5); opacity: 0; }
  50% { transform: rotateY(180deg) scale(1.2); opacity: 0.5; }
  100% { transform: rotateY(360deg) scale(1); opacity: 1; }
}
.logo-icon.flip {
  animation: logoFlip 0.6s ease-in-out;
}
@keyframes logoFlip {
  0% { transform: rotateY(0deg) scale(1); }
  50% { transform: rotateY(90deg) scale(0.8); opacity: 0.3; }
  100% { transform: rotateY(0deg) scale(1); opacity: 1; }
}

.main-nav { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.main-nav a {
  color: var(--mid-gray);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 6px 9px;
  border-radius: 6px;
  transition: all 0.2s;
  white-space: nowrap;       /* prevent "Top Cities" wrapping to 2 lines */
  flex-shrink: 0;             /* prevent flex container from squeezing items */
}
.main-nav a:hover,
.main-nav a.active { color: var(--white); background: rgba(255,255,255,0.08); }
.main-nav .cta-btn {
  background: var(--orange);
  color: var(--white);
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.main-nav .cta-btn:hover { background: var(--orange-dark); color: var(--white); }
.main-nav .nav-dropdown-trigger { white-space: nowrap; }

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

/* Nav Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger { cursor: pointer; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  border: 1px solid rgba(74,144,217,0.2);
  border-radius: 8px;
  padding: 8px 0;
  padding-top: 16px;
  min-width: 220px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 100;
}
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}
.nav-dropdown-menu.open { display: block; }
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--mid-gray);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover { color: var(--white); background: rgba(255,255,255,0.06); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--slate) 50%, var(--navy-light) 100%);
  padding: 140px 0 100px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(74,144,217,0.15) 0%, transparent 70%);
}
.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 16px;
}
.hero h1 span { color: var(--orange); }
.hero .subtitle {
  font-size: 1.25rem;
  color: var(--ice);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Search Bar */
.search-bar {
  display: flex;
  flex-wrap: wrap;
  max-width: 720px;
  margin: 0 auto 24px;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35), 0 0 0 3px rgba(232,114,42,0.4);
}
.search-bar input {
  flex: 1;
  min-width: 200px;
  padding: 20px 24px;
  border: none;
  outline: none;
  font-size: 1.1rem;
  color: var(--navy);
}
.search-bar input::placeholder { color: var(--mid-gray); }
.search-bar select {
  padding: 20px 16px;
  border: none;
  border-left: 2px solid var(--light-gray);
  background: var(--off-white);
  color: var(--navy);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  outline: none;
}
.search-bar button {
  padding: 20px 36px;
  background: var(--orange);
  color: var(--white);
  border: none;
  font-weight: 800;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.3px;
}
.search-bar button:hover { background: var(--orange-dark); }

/* Stats Bar */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.stat { text-align: center; }
.stat .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--orange);
  display: block;
}
.stat .label {
  font-size: 0.85rem;
  color: var(--mid-gray);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================================
   Category Cards
   ============================================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
.category-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-gray);
  transition: all 0.3s;
  text-decoration: none;
  color: var(--navy);
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--sky);
  color: var(--navy);
}
.category-card .emoji { font-size: 2.8rem; margin-bottom: 12px; display: block; }
.category-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.category-card .count {
  font-size: 0.82rem;
  color: var(--dark-gray);
}
.category-card .tag {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.category-card .tag.green { background: var(--green); }

/* ============================================================
   Listing Cards
   ============================================================ */
.listing-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-gray);
  transition: all 0.3s;
}
.listing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.listing-card .card-img {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--navy-light), var(--slate));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.listing-card .card-body { padding: 16px 20px; }
.listing-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.listing-card .location {
  font-size: 0.85rem;
  color: var(--dark-gray);
  margin-bottom: 8px;
}
.listing-card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.listing-card .badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--off-white);
  color: var(--steel);
}
.listing-card .badge.premium { background: var(--orange); color: var(--white); }
.listing-card .badge.verified { background: var(--green); color: var(--white); }
.listing-card .rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--gold);
  margin-top: 8px;
}
.listing-card .rating span { color: var(--dark-gray); font-size: 0.8rem; }

/* ============================================================
   How It Works / Value Props
   ============================================================ */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}
.value-item .icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--slate));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 16px;
  box-shadow: var(--shadow-glow);
}
.value-item h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.value-item p { color: var(--dark-gray); font-size: 0.92rem; line-height: 1.5; }

/* ============================================================
   Section Headings
   ============================================================ */
.section-heading {
  text-align: center;
  margin-bottom: 48px;
}
.section-heading h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.section-heading h2 span { color: var(--orange); }
.section-heading p {
  font-size: 1.05rem;
  color: var(--dark-gray);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================
   CTA Section
   ============================================================ */
.cta-section {
  background: linear-gradient(135deg, var(--navy), var(--slate));
  padding: 80px 0;
  text-align: center;
  color: var(--white);
}
.cta-section h2 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.cta-section p {
  color: var(--ice);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-dark); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--navy); }
.btn-secondary:hover { background: var(--off-white); color: var(--navy); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.3);
}
.btn-outline:hover { border-color: var(--white); color: var(--white); }
.btn-sm { padding: 8px 16px; font-size: 0.88rem; }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }

/* ============================================================
   Forms
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: var(--navy);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--light-gray);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--navy);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(74,144,217,0.15); }
.form-textarea { resize: vertical; min-height: 120px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--navy);
  color: var(--mid-gray);
  padding: 60px 0 24px;
  border-top: 3px solid var(--orange);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p { font-size: 0.88rem; line-height: 1.6; max-width: 280px; }
.footer-col h4 {
  color: var(--white);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: var(--mid-gray);
  font-size: 0.88rem;
  padding: 4px 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
}
.footer-bottom a { color: var(--mid-gray); }
.footer-bottom a:hover { color: var(--white); }

/* ============================================================
   Directory Pages
   ============================================================ */
.directory-hero {
  background: linear-gradient(135deg, var(--navy), var(--slate));
  padding: 120px 0 60px;
  color: var(--white);
  text-align: center;
}
.directory-hero h1 { font-size: 2.6rem; font-weight: 800; margin-bottom: 12px; }
.directory-hero p { color: var(--ice); font-size: 1.1rem; max-width: 680px; margin-left: auto; margin-right: auto; }

.filter-bar {
  background: var(--white);
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  margin: -28px auto 40px;
  max-width: var(--container);
  border: 1px solid var(--light-gray);
}
.filter-bar select,
.filter-bar input {
  padding: 10px 14px;
  border: 1px solid var(--light-gray);
  border-radius: var(--radius);
  font-size: 0.92rem;
  color: var(--navy);
  background: var(--off-white);
  outline: none;
}
.filter-bar select:focus,
.filter-bar input:focus { border-color: var(--sky); }

/* iOS Safari: prevent auto-text-enlargement on orientation change */
html { -webkit-text-size-adjust: 100%; }
body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* ============================================================
   State Browse
   ============================================================ */
.state-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.state-link {
  display: block;
  padding: 10px 12px;
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--navy);
  text-align: center;
  transition: all 0.2s;
}
.state-link:hover {
  border-color: var(--sky);
  background: rgba(74,144,217,0.05);
  color: var(--sky);
}
.state-link .count {
  font-size: 0.75rem;
  color: var(--dark-gray);
  display: block;
}

/* City search bar */
.city-search-wrap {
  max-width: 480px;
  margin: 0 auto 32px;
}
.city-search-box {
  position: relative;
}
.city-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mid-gray);
  pointer-events: none;
}
.city-search-input {
  width: 100%;
  padding: 14px 16px 14px 42px;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--light-gray);
  border-radius: 12px;
  background: var(--white);
  color: var(--midnight);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.city-search-input:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(74,144,217,0.15);
}
.city-search-input::placeholder {
  color: var(--mid-gray);
}
.city-search-results {
  margin-bottom: 24px;
}
.city-search-empty {
  text-align: center;
  color: var(--dark-gray);
  font-size: 0.92rem;
  padding: 24px 0;
}

/* Popular cities grid */
.popular-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}
.popular-city-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 14px;
  background: var(--white);
  border: 2px solid var(--light-gray);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
}
.popular-city-card:hover {
  border-color: var(--orange);
  box-shadow: 0 4px 16px rgba(232,114,42,0.12);
  transform: translateY(-2px);
}
.popular-city-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--midnight);
}
.popular-city-pop {
  font-size: 0.78rem;
  color: var(--dark-gray);
  margin-top: 4px;
}

/* Toggle all cities button */
.toggle-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  background: var(--off-white);
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.toggle-all-btn:hover {
  background: var(--white);
  border-color: var(--sky);
  color: var(--sky);
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--light-gray);
  padding: 16px 0;
}
.faq-item summary {
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  padding: 8px 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--orange);
  font-weight: 300;
}
.faq-item[open] summary::after { content: '-'; }
.faq-item .answer {
  color: var(--dark-gray);
  font-size: 0.95rem;
  line-height: 1.7;
  padding: 8px 0 4px;
}

/* ============================================================
   Alerts / Messages
   ============================================================ */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  margin-bottom: 16px;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ============================================================
   Pagination
   ============================================================ */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a,
.pagination span {
  padding: 8px 14px;
  border: 1px solid var(--light-gray);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--navy);
  background: var(--white);
  transition: all 0.2s;
}
.pagination a:hover { border-color: var(--sky); color: var(--sky); }
.pagination .active {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}

/* ============================================================
   Reveal Animations
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s, transform 0.6s;
}
.reveal.visible { opacity: 1; transform: none; }
.stagger > * { transition-delay: calc(var(--i, 0) * 100ms); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .grid-4, .category-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 900px) {
  /* Mid-range band: prevent crammed 3-4 column grids between 600-900px */
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
/* Nav-only breakpoint: collapse to hamburger BELOW where the desktop
   13-link nav (Boat / RV / Car / Motorcycle / Services / Tools / States /
   Top Cities / We Buy Cars / Inventory / Blog / My Dashboard / List Your
   Facility) physically fits. Above this width the desktop nav stays
   horizontal with no wrapping; below it the mobile hamburger appears
   so items don't crash into each other. The 1100px threshold leaves
   room for the bookmark bar on smaller laptop screens. */
@media (max-width: 1100px) {
  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--navy);
    padding: 16px;
    border-bottom: 1px solid rgba(74,144,217,0.2);
    z-index: 200;
    gap: 0;
  }
  .main-nav.open a { padding: 12px 16px; font-size: 0.95rem; white-space: normal; }
  .main-nav.open .cta-btn { margin-top: 8px; text-align: center; }
  .hamburger { display: block; }
  .main-nav.open .nav-dropdown { position: static; }
  .main-nav.open .nav-dropdown-menu {
    position: static;
    transform: none;
    left: auto;
    background: rgba(255,255,255,0.04);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    min-width: unset;
  }
  .main-nav.open .nav-dropdown-menu::before { display: none; }
  .main-nav.open .nav-dropdown-menu a { padding-left: 32px; font-size: 0.88rem; }
  .main-nav.open .nav-dropdown-trigger { padding: 12px 16px; font-size: 0.95rem; }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .hero .subtitle { font-size: 1.05rem; }
  .search-bar { flex-direction: column; border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 2px rgba(232,114,42,0.3); }
  .search-bar select { border-left: none; border-top: 1px solid var(--light-gray); width: 100%; }
  .search-bar input { min-width: unset; }
  .search-bar button { border-radius: 0 0 12px 12px; padding: 18px; }
  .stats-bar { gap: 24px; flex-wrap: wrap; }
  .grid-2, .grid-3, .value-grid { grid-template-columns: 1fr; }
  .grid-4, .category-grid { grid-template-columns: repeat(2, 1fr); }
  .state-grid { grid-template-columns: repeat(3, 1fr); }
  .popular-grid { grid-template-columns: repeat(3, 1fr); }
  /* Homepage "For Facility Owners" two-column section collapses to one column on mobile */
  .owners-cta-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  /* Homepage trust-signals bar - tighten gap on phones so numbers don't stack lopsided */
  .trust-stats { gap: 20px !important; }
  .trust-stats > div span:first-child { font-size: 1.8rem !important; }
  /* Subscribe row email + button - email fills width, button wraps below */
  .subscribe-row { flex-direction: column !important; }
  .subscribe-row .btn { width: 100%; }
  /* Catch-all: any inline two-column grids inside .section collapse on phones
     so we don't miss inline-styled blocks that lack a responsive class. */
  .section [style*="grid-template-columns:1fr 1fr"],
  .section [style*="grid-template-columns: 1fr 1fr"],
  .section [style*="grid-template-columns:2fr 1fr"],
  .section [style*="grid-template-columns: 2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .section { padding: 48px 0; }
  .filter-bar { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; margin-bottom: 24px; }
  .footer-brand p { max-width: 100%; }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    font-size: 0.78rem;
  }
  .site-footer { padding: 40px 0 20px; }

  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--navy);
    padding: 16px;
    border-bottom: 1px solid rgba(74,144,217,0.2);
    z-index: 200;
    gap: 0;
  }
  .main-nav.open a { padding: 12px 16px; font-size: 0.95rem; }
  .main-nav.open .cta-btn { margin-top: 8px; text-align: center; }
  .hamburger { display: block; }

  /* Mobile dropdowns: static, not absolute */
  .main-nav.open .nav-dropdown { position: static; }
  .main-nav.open .nav-dropdown-menu {
    position: static;
    transform: none;
    left: auto;
    background: rgba(255,255,255,0.04);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    min-width: unset;
  }
  .main-nav.open .nav-dropdown-menu::before { display: none; }
  .main-nav.open .nav-dropdown-menu a { padding-left: 32px; font-size: 0.88rem; }
  .main-nav.open .nav-dropdown-trigger { padding: 12px 16px; font-size: 0.95rem; }

  /* Pricing grid responsive */
  .pricing-grid { grid-template-columns: 1fr !important; }

  /* Directory hero */
  .directory-hero { padding: 80px 0 32px; }
  .directory-hero h1 { font-size: 1.6rem; }
  .directory-hero p { font-size: 0.92rem; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .category-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .state-grid { grid-template-columns: repeat(2, 1fr); }
  .popular-grid { grid-template-columns: repeat(2, 1fr); }
  .section-heading h2 { font-size: 1.6rem; }
  .directory-hero { padding: 70px 0 20px; }
  .directory-hero h1 { font-size: 1.35rem; }
  /* Checkbox grids used on list-your-facility / my-listing: single column at phone width */
  .checkbox-grid { grid-template-columns: 1fr !important; }
  /* Tables in card bodies: allow horizontal scroll so content doesn't
     get clipped when authors forget to wrap. */
  .card table, .section table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
/* Any multi-column form grid should wrap to 1 column on narrow phones */
@media (max-width: 560px) {
  .checkbox-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
