/* GoNowFlorida v2 — Mobile-First CSS */
/* No frameworks, no build tools, just clean CSS */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #0d6e6e;
  --primary-dark: #094d4d;
  --primary-light: #e0f2f2;
  --accent: #f0a500;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1a1a2e;
  --text-light: #666;
  --border: #e0e0e0;
  --success: #28a745;
  --danger: #dc3545;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   HEADER / NAV — Fixed top bar
   ============================================================ */
.header {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1rem;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
}

.header__logo {
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header__logo svg { width: 24px; height: 24px; }

.header__menu-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  display: none;
}
.nav-overlay.active { display: block; }

.nav-drawer {
  position: fixed;
  top: 0; right: -280px;
  width: 280px;
  height: 100%;
  background: white;
  z-index: 1001;
  transition: right 0.3s ease;
  padding: 1rem;
  overflow-y: auto;
}
.nav-drawer.active { right: 0; }

.nav-drawer__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  float: right;
  color: var(--text);
}

.nav-drawer a {
  display: block;
  padding: 0.75rem 0;
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border);
}
.nav-drawer a:hover { color: var(--primary); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main { margin-top: 56px; flex: 1; }

/* ============================================================
   MAP
   ============================================================ */
.map-container {
  width: 100%;
  height: 55vh;
  min-height: 300px;
  position: relative;
}

#map { width: 100%; height: 100%; z-index: 1; }

.map-controls {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 500;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-locate {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-locate:active { transform: scale(0.96); }

.radius-badge {
  background: white;
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
}

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-section {
  padding: 0.75rem 1rem;
  background: white;
  border-bottom: 1px solid var(--border);
}

.search-bar {
  display: flex;
  gap: 0.5rem;
}

.search-bar input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-bar input:focus { border-color: var(--primary); }

.search-bar button {
  padding: 0.65rem 1.25rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

/* ============================================================
   CATEGORY FILTERS
   ============================================================ */
.category-filters {
  padding: 0.5rem 1rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: white;
  border-bottom: 1px solid var(--border);
}
.category-filters::-webkit-scrollbar { display: none; }

.cat-btn {
  flex-shrink: 0;
  padding: 0.4rem 0.85rem;
  border: 2px solid var(--border);
  border-radius: 50px;
  background: white;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  color: var(--text);
}
.cat-btn:hover { border-color: var(--primary); color: var(--primary); }
.cat-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ============================================================
   LOCATION CARDS LIST
   ============================================================ */
.locations-header {
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.locations-header h2 { font-size: 1.1rem; }
.locations-header span { color: var(--text-light); font-size: 0.9rem; }

.location-list {
  padding: 0 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.location-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  display: flex;
  gap: 0.75rem;
  cursor: pointer;
  transition: box-shadow 0.2s;
  text-decoration: none;
  color: var(--text);
}
.location-card:hover { box-shadow: var(--shadow-lg); }

.location-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.location-card__info { flex: 1; min-width: 0; }
.location-card__name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.location-card__address {
  font-size: 0.85rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.location-card__meta {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.3rem;
  font-size: 0.8rem;
}
.location-card__distance {
  font-weight: 600;
  color: var(--primary);
}
.location-card__rating { color: var(--accent); }
.location-card__category {
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: capitalize;
}

/* Category icon colors */
.cat-restaurant { background: #fff3e0; }
.cat-gas_station { background: #e3f2fd; }
.cat-park { background: #e8f5e9; }
.cat-rest_stop { background: #f3e5f5; }
.cat-library { background: #fce4ec; }
.cat-grocery { background: #e0f7fa; }
.cat-hotel { background: #fff8e1; }
.cat-other { background: #f5f5f5; }

/* ============================================================
   LOADING / EMPTY STATES
   ============================================================ */
.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
}
.loading__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 0.75rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
}
.empty-state__icon { font-size: 3rem; margin-bottom: 0.75rem; }

/* ============================================================
   PAGE SECTIONS (highways, cities, blog)
   ============================================================ */
.page-header {
  background: var(--primary);
  color: white;
  padding: 1.5rem 1rem 1rem;
}
.page-header h1 { font-size: 1.5rem; }
.page-header p { opacity: 0.9; font-size: 0.9rem; }

.page-content { padding: 1rem; }

.grid-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding: 1rem;
}
.grid-link {
  background: white;
  padding: 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  text-align: center;
  font-weight: 600;
}
.grid-link:hover { box-shadow: var(--shadow-lg); }
.grid-link small { display: block; color: var(--text-light); font-weight: 400; }

/* Blog */
.blog-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.blog-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.blog-card p { color: var(--text-light); font-size: 0.9rem; }
.blog-card__date { font-size: 0.8rem; color: var(--text-light); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  padding: 2rem 1rem;
  margin-top: auto;
}
.footer a { color: rgba(255,255,255,0.85); text-decoration: none; }
.footer a:hover { color: white; }
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.footer__section h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: white;
}
.footer__section a { display: block; padding: 0.2rem 0; font-size: 0.9rem; }
.footer__stats {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 1.5rem;
  font-size: 0.85rem;
}

/* ============================================================
   AD PLACEHOLDERS
   ============================================================ */
.ad-placeholder {
  background: #f9f9f9;
  border: 2px dashed #ddd;
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  color: #aaa;
  font-size: 0.8rem;
  margin: 0.75rem 1rem;
}

/* ============================================================
   DESKTOP OVERRIDES
   ============================================================ */
@media (min-width: 768px) {
  .map-container { height: 50vh; }
  .location-list { flex-direction: row; flex-wrap: wrap; }
  .location-card { width: calc(50% - 0.375rem); }
  .footer__grid { grid-template-columns: repeat(3, 1fr); }
  .grid-links { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .main { max-width: 1200px; margin: 56px auto 0; width: 100%; }
  .location-card { width: calc(33.33% - 0.5rem); }
  .grid-links { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.hidden { display: none !important; }
