/* ===== NEWHERE MAINE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #1b2d4a;
  --navy-mid: #243a5e;
  --navy-light: #2e4a78;
  --coral: #d4552a;
  --coral-light: #e8693e;
  --cream: #faf7f2;
  --white: #ffffff;
  --text: #1e2a38;
  --muted: #5a6a7a;
  --border: #e0dbd4;
  --warm-gray: #f0ece6;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--cream); color: var(--text); line-height: 1.6; }

a { color: var(--navy-mid); text-decoration: none; }
a:hover { color: var(--coral); }
h1, h2, h3 { line-height: 1.3; }

.container { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 680px; }

/* ===== HEADER ===== */
header {
  background: var(--navy);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
header .container { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.logo { font-size: 1.2rem; font-weight: 700; color: white; display: flex; align-items: center; gap: 8px; }
.logo-dot { width: 8px; height: 8px; background: var(--coral); border-radius: 50%; }
header nav { display: flex; gap: 24px; align-items: center; }
header nav a { color: rgba(255,255,255,0.8); font-size: 0.88rem; }
header nav a:hover { color: white; }
.nav-cta { background: var(--coral); color: white !important; padding: 7px 16px; border-radius: 6px; font-size: 0.82rem !important; font-weight: 600; }
.nav-cta:hover { background: var(--coral-light) !important; }

/* ===== FOOTER ===== */
footer { background: var(--navy); color: rgba(255,255,255,0.65); padding: 40px 0; margin-top: 64px; font-size: 0.88rem; text-align: center; }
footer a { color: rgba(255,255,255,0.8); }
footer p + p { margin-top: 8px; }

/* ===== HERO ===== */
.hero {
  background: var(--navy);
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 50%; height: 100%;
  background: var(--navy-mid);
  clip-path: polygon(25% 0, 100% 0, 100% 100%, 0% 100%);
  opacity: 0.4;
}
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow { color: var(--coral); font-size: 0.75rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 14px; }
.hero h1 { font-size: 3rem; color: white; font-weight: 800; margin-bottom: 18px; max-width: 600px; }
.hero h1 span { color: #90b8e8; }
.hero-sub { font-size: 1.05rem; color: rgba(255,255,255,0.72); max-width: 500px; margin-bottom: 36px; line-height: 1.7; }

/* ===== SEARCH BOX ===== */
.search-box { display: flex; gap: 10px; max-width: 520px; }
.search-box input {
  flex: 1;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  outline: none;
  background: white;
  color: var(--text);
}
.search-box button {
  padding: 14px 28px;
  background: var(--coral);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.search-box button:hover { background: var(--coral-light); }
.search-error { color: #ff8f8f; font-size: 0.85rem; margin-top: 8px; }

/* ===== STATS ===== */
.hero-stats { display: flex; gap: 36px; margin-top: 40px; flex-wrap: wrap; }
.hero-stat { border-left: 3px solid var(--coral); padding-left: 14px; }
.hero-stat-num { font-size: 1.8rem; font-weight: 800; color: white; line-height: 1; }
.hero-stat-label { font-size: 0.78rem; color: rgba(255,255,255,0.55); margin-top: 3px; }

/* ===== SECTIONS ===== */
.section { padding: 56px 0; }
.section-eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--coral); margin-bottom: 10px; }
.section-title { font-size: 1.8rem; font-weight: 800; color: var(--navy); margin-bottom: 28px; }

/* ===== TOWN PILLS ===== */
.town-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.town-pill {
  padding: 9px 18px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.88rem;
  color: var(--navy-mid);
  font-weight: 500;
  transition: all 0.15s;
}
.town-pill:hover { background: var(--navy); color: white; border-color: var(--navy); }

/* ===== TIP BOX ===== */
.tip-box {
  background: #fff8f0;
  border-left: 4px solid var(--coral);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 28px;
}

/* ===== CATEGORY CARDS ===== */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.cat-card { background: white; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow); }
.cat-card-header { background: var(--navy); padding: 14px 18px; display: flex; align-items: center; gap: 10px; }
.cat-card-icon { font-size: 1.2rem; }
.cat-card-label { color: white; font-size: 0.9rem; font-weight: 600; flex: 1; }
.essential-badge { background: var(--coral); color: white; font-size: 0.65rem; font-weight: 700; letter-spacing: 1px; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; }
.cat-card-body { padding: 14px 18px; }
.biz-item { padding: 8px 0; border-bottom: 1px solid var(--warm-gray); }
.biz-item:last-of-type { border-bottom: none; }
.biz-name { font-size: 0.88rem; font-weight: 600; color: var(--navy-mid); }
.biz-rating { font-size: 0.75rem; color: #e67e00; margin-left: 6px; }
.biz-phone { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.biz-town-tag { font-size: 0.72rem; color: var(--muted); }
.cat-more { display: block; font-size: 0.78rem; color: var(--navy-mid); margin-top: 10px; font-weight: 500; }
.cat-more:hover { color: var(--coral); }

/* ===== RESULTS ===== */
#results { display: none; }

/* ===== BUTTONS ===== */
.btn { display: inline-block; padding: 11px 24px; background: var(--navy); color: white; border-radius: var(--radius); font-size: 0.9rem; font-weight: 600; cursor: pointer; border: none; text-align: center; }
.btn:hover { background: var(--navy-light); color: white; }
.btn-coral { background: var(--coral); }
.btn-coral:hover { background: var(--coral-light); }
.btn-outline { background: transparent; border: 2px solid var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: white; }

/* ===== CARDS ===== */
.card { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 24px; box-shadow: var(--shadow); }

/* ===== TIPS GRID ===== */
.tips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tip-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; border-left: 4px solid var(--navy-mid); }
.tip-card p { font-size: 0.85rem; color: var(--text); line-height: 1.6; }

/* ===== CTA BANNER ===== */
.cta-banner { background: var(--navy); border-radius: 14px; padding: 48px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.cta-banner h2 { font-size: 1.6rem; color: white; margin-bottom: 8px; }
.cta-banner p { color: rgba(255,255,255,0.65); font-size: 0.9rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .search-box { flex-wrap: wrap; }
  .search-box input, .search-box button { width: 100%; }
  .cta-banner { grid-template-columns: 1fr; }
  header nav { gap: 12px; }
  .nav-cta { display: none; }
}
