/* Baldwin County, Alabama - Shared Stylesheet */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:      #1976d2;
  --green-dark: #1565c0;
  --green-light:#42a5f5;
  --gold:       #f9a825;
  --gold-dark:  #f57f17;
  --white:      #ffffff;
  --off-white:  #f5f5f0;
  --text:       #212121;
  --text-light: #555555;
  --border:     #ddd;
  --shadow:     0 2px 8px rgba(0,0,0,.12);
  --radius:     8px;
  --max-w:      1200px;
}

/* ── Base ─────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--green-dark); }
img { max-width: 100%; height: auto; display: block; }

/* ── Nav ──────────────────────────────────────────── */
.site-header {
  background: var(--green-dark);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .5px;
  white-space: nowrap;
}
.nav-brand span { color: var(--white); font-weight: 400; }
.nav-links { display: flex; gap: .25rem; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,.88);
  padding: .45rem .85rem;
  border-radius: 5px;
  font-size: .92rem;
  font-weight: 500;
  transition: background .18s, color .18s;
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--gold);
  color: var(--green-dark);
  text-decoration: none;
}

/* hamburger */
.nav-toggle {
  display: none;
  background: none; border: none;
  cursor: pointer; padding: .4rem;
  flex-direction: column; gap: 5px;
}
.nav-toggle span {
  display: block; width: 26px; height: 3px;
  background: var(--white); border-radius: 2px;
  transition: .25s;
}

/* ── Hero ─────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 60%, #388e3c 100%);
  color: var(--white);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  opacity: .6;
}
.hero-content { position: relative; max-width: 780px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-block;
  background: var(--gold);
  color: var(--green-dark);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: .3rem .9rem;
  border-radius: 50px;
  margin-bottom: 1.2rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.hero p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  opacity: .9;
  max-width: 620px;
  margin: 0 auto 2rem;
}
.hero-cta {
  display: inline-flex; gap: .75rem; flex-wrap: wrap; justify-content: center;
}
.btn {
  display: inline-block;
  padding: .75rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  transition: transform .18s, box-shadow .18s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.25); text-decoration: none; }
.btn-gold  { background: var(--gold); color: var(--green-dark); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.7); }
.btn-outline:hover { background: rgba(255,255,255,.12); color: var(--white); }

/* ── Stat bar ─────────────────────────────────────── */
.stat-bar {
  background: var(--green);
  color: var(--white);
  padding: 1.1rem 1.5rem;
}
.stat-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  text-align: center;
}
.stat-item strong { display: block; font-size: 1.55rem; color: var(--gold); line-height: 1.1; }
.stat-item span   { font-size: .82rem; opacity: .88; text-transform: uppercase; letter-spacing: .5px; }

/* ── Sections / Layout ────────────────────────────── */
.section { padding: 4rem 1.5rem; }
.section-alt { background: var(--off-white); }
.container { max-width: var(--max-w); margin: 0 auto; }

.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--green-dark);
  margin-bottom: .5rem;
}
.section-header p { color: var(--text-light); max-width: 580px; margin: 0 auto; }
.divider {
  width: 60px; height: 4px;
  background: linear-gradient(90deg, var(--green), var(--gold));
  border-radius: 2px;
  margin: .75rem auto 1rem;
}

/* ── Cards ────────────────────────────────────────── */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}
.card-grid .card {
  flex: 0 1 320px;
  max-width: 360px;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.card-icon {
  background: linear-gradient(135deg, var(--green), var(--green-light));
  color: var(--white);
  font-size: 2.2rem;
  text-align: center;
  padding: 1.4rem;
}
.card-body { padding: 1.25rem 1.4rem; text-align: center; }
.card-body h3 { color: var(--green-dark); margin-bottom: .45rem; font-size: 1.05rem; }
.card-body p  { color: var(--text-light); font-size: .9rem; line-height: 1.55; }

/* ── Two-col info block ───────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }
.info-block h3 { color: var(--green-dark); font-size: 1.15rem; margin-bottom: .6rem; }
.info-block p  { color: var(--text-light); margin-bottom: 1rem; font-size: .95rem; }

/* ── Feature list ─────────────────────────────────── */
.feature-list { list-style: none; }
.feature-list li {
  padding: .45rem 0 .45rem 1.8rem;
  position: relative;
  color: var(--text-light);
  font-size: .95rem;
  border-bottom: 1px solid var(--border);
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before {
  content: '✦';
  position: absolute; left: 0;
  color: var(--gold);
  font-size: .75rem;
  top: .65rem;
}

/* ── Table ────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th {
  background: var(--green-dark);
  color: var(--white);
  padding: .7rem 1rem;
  text-align: left;
  font-weight: 600;
}
.data-table td { padding: .65rem 1rem; border-bottom: 1px solid var(--border); }
.data-table tr:nth-child(even) td { background: var(--off-white); }
.data-table tr:hover td { background: #e8f5e9; }

/* ── Towns grid ───────────────────────────────────── */
.towns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.town-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.5rem;
  border-left: 4px solid var(--green);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.town-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,.14);
  border-color: var(--gold);
}
.town-card h3 {
  color: var(--green-dark);
  font-size: 1.1rem;
  margin-bottom: .3rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.town-card .tag {
  font-size: .7rem;
  background: var(--gold);
  color: var(--green-dark);
  padding: .15rem .55rem;
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.town-card p { color: var(--text-light); font-size: .88rem; line-height: 1.55; }

/* ── Attraction cards ─────────────────────────────── */
.attraction-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.attraction-card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.attraction-img {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: var(--white);
  font-size: 3rem;
  text-align: center;
  padding: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 130px;
}
.attraction-body { padding: 1.2rem 1.4rem; }
.attraction-body h3 { color: var(--green-dark); margin-bottom: .4rem; font-size: 1.05rem; }
.attraction-body .category {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  background: #e8f5e9;
  color: var(--green-dark);
  padding: .15rem .55rem;
  border-radius: 50px;
  margin-bottom: .5rem;
}
.attraction-body p { color: var(--text-light); font-size: .88rem; line-height: 1.55; }

/* ── Resource cards ───────────────────────────────── */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.4rem;
}
.resource-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: transform .2s;
}
.resource-card:hover { transform: translateY(-2px); }
.resource-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  width: 50px; height: 50px;
  background: #e8f5e9;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.resource-info h3 { color: var(--green-dark); font-size: 1rem; margin-bottom: .25rem; }
.resource-info p  { color: var(--text-light); font-size: .85rem; line-height: 1.5; }
.resource-info a  { font-size: .85rem; font-weight: 600; }

/* ── Banner strip ─────────────────────────────────── */
.banner {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: var(--white);
  padding: 3rem 1.5rem;
  text-align: center;
}
.banner h2 { font-size: 1.7rem; margin-bottom: .6rem; }
.banner p  { opacity: .88; margin-bottom: 1.5rem; }

/* ── Quick facts box ──────────────────────────────── */
.facts-box {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.facts-box h3 {
  color: var(--green-dark);
  margin-bottom: 1rem;
  font-size: 1.05rem;
  border-bottom: 2px solid var(--gold);
  padding-bottom: .5rem;
}
.fact-row {
  display: flex;
  justify-content: space-between;
  padding: .45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.fact-row:last-child { border-bottom: none; }
.fact-label { color: var(--text-light); }
.fact-value { font-weight: 600; color: var(--text); }

/* ── Footer ───────────────────────────────────────── */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.78);
  padding: 3rem 1.5rem 1.5rem;
}
.footer-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.footer-brand { font-size: 1.1rem; font-weight: 700; color: var(--gold); margin-bottom: .6rem; }
.footer-tagline { font-size: .85rem; opacity: .75; line-height: 1.6; }
.footer-col h4 { color: var(--white); font-size: .9rem; margin-bottom: .9rem; letter-spacing: .5px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .4rem; }
.footer-col a { color: rgba(255,255,255,.7); font-size: .85rem; transition: color .18s; }
.footer-col a:hover { color: var(--gold); text-decoration: none; }
.footer-bottom {
  max-width: var(--max-w);
  margin: 1.2rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  opacity: .6;
  flex-wrap: wrap;
  gap: .5rem;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--green-dark); padding: 1rem; gap: .25rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .hero { padding: 3.5rem 1rem 2.5rem; }
}

/* ── Mobile improvements (2026-03-21) ────────────────── */

/* Stat bar: fix orphaned 5th item on narrow screens */
@media (max-width: 640px) {
  .stat-bar-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
  }
  .stat-bar-inner .stat-item:last-child {
    grid-column: 1 / -1;
  }
  .stat-item strong { font-size: 1.3rem; }
}

/* Card grid: full-width cards on mobile */
@media (max-width: 640px) {
  .card-grid .card {
    flex: 0 1 100%;
    max-width: 100%;
  }
  .card-icon { padding: 1rem; font-size: 1.8rem; }
}

/* Towns grid: single column on mobile */
@media (max-width: 640px) {
  .towns-grid {
    grid-template-columns: 1fr;
  }
}

/* Data table: horizontal scroll on mobile */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) {
  .data-table { min-width: 480px; }
  .data-table th, .data-table td { padding: .5rem .75rem; font-size: .82rem; }
}

/* Resource grid: single column on mobile */
@media (max-width: 640px) {
  .resource-grid {
    grid-template-columns: 1fr;
  }
}

/* Banner buttons: stack on mobile */
@media (max-width: 480px) {
  .banner .btn { width: 100%; text-align: center; }
}

/* Footer bottom: center on mobile */
@media (max-width: 640px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .footer-bottom span { font-size: .78rem; }
}

/* Hero CTA buttons: full width on very small screens */
@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn { width: 100%; max-width: 280px; text-align: center; }
}

/* Scroll fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .nav-links {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(21, 101, 192, 0.97) !important;
    border-top: 2px solid var(--gold);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  }
}
