/* ===================================================================
   DRIVE75 — Global Stylesheet
   Brand: Drive75 Kansas Highway 75 Corridor
   Colors, typography, and layout per Brand Guidelines V1.0
   =================================================================== */

/* --- CSS Custom Properties (Brand Tokens) --- */
:root {
  /* Main Colors */
  --river-blue: #2d7baa;
  --prairie-green: #47a146;
  --asphalt: #58595b;

  /* Supporting Colors */
  --sky-blue: #44c8f5;
  --wheat-gold: #fbb040;
  --gray-30: #bcbec0;
  --soil-brown: #8b5e3c;
  --tan: #c49a6c;
  --deep-green: #006838;

  /* Functional */
  --white: #ffffff;
  --off-white: #f7f8fa;
  --dark: #1a1a1a;
  --text-body: #3a3a3c;
  --text-light: #6b6b6e;
  --overlay: rgba(26, 26, 26, 0.55);

  /* Typography */
  --font-primary: 'Nunito Sans', Arial, Helvetica, sans-serif;
  --fw-black: 900;
  --fw-heavy: 800;
  --fw-bold: 700;
  --fw-medium: 600;
  --fw-regular: 400;
  --fw-light: 300;

  /* Spacing */
  --section-pad: 5rem 1.5rem;
  --section-pad-sm: 3rem 1.25rem;
  --container-max: 1200px;
  --radius: 8px;
  --radius-lg: 16px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition: 0.3s var(--ease);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  font-weight: var(--fw-regular);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--river-blue);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--deep-green);
}

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-black);
  line-height: 1.2;
  color: var(--dark);
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  text-transform: uppercase;
  letter-spacing: 0.015em;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

h4 {
  font-size: 1.125rem;
  font-weight: var(--fw-heavy);
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.subhead {
  font-weight: var(--fw-heavy);
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  color: var(--asphalt);
}

.caption {
  font-weight: var(--fw-light);
  font-style: italic;
  font-size: 0.875rem;
  color: var(--text-light);
}

.text-blue { color: var(--river-blue); }
.text-green { color: var(--prairie-green); }
.text-white { color: var(--white); }

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-pad);
}

.section--alt {
  background: var(--off-white);
}

.section--dark {
  background: var(--asphalt);
  color: var(--white);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--white);
}

.section--blue {
  background: var(--river-blue);
  color: var(--white);
}

.section--blue h2,
.section--blue h3 {
  color: var(--white);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}

.section-header p {
  margin-top: 0.75rem;
  color: var(--text-light);
  font-size: 1.0625rem;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid--5 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-center { text-align: center; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  font-family: var(--font-primary);
  font-weight: var(--fw-bold);
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn--primary {
  background: var(--prairie-green);
  color: var(--white);
  border-color: var(--prairie-green);
}

.btn--primary:hover {
  background: var(--deep-green);
  border-color: var(--deep-green);
  color: var(--white);
}

.btn--secondary {
  background: var(--river-blue);
  color: var(--white);
  border-color: var(--river-blue);
}

.btn--secondary:hover {
  background: #1e5f8a;
  border-color: #1e5f8a;
  color: var(--white);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn--outline:hover {
  background: var(--white);
  color: var(--river-blue);
}

.btn--outline-dark {
  background: transparent;
  color: var(--river-blue);
  border-color: var(--river-blue);
}

.btn--outline-dark:hover {
  background: var(--river-blue);
  color: var(--white);
}

/* --- Header / Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav__logo img {
  height: 42px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__links a {
  font-weight: var(--fw-bold);
  font-size: 0.9375rem;
  color: var(--asphalt);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.25rem 0;
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--prairie-green);
  transition: width var(--transition);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--river-blue);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

.nav__links .nav__cta {
  background: var(--river-blue);
  color: var(--white) !important;
  padding: 0.45rem 1.25rem;
  border-radius: 100px;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  transition: all var(--transition);
}

.nav__links .nav__cta::after {
  display: none;
}

.nav__links .nav__cta:hover {
  background: #1e5f8a;
  color: var(--white) !important;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--asphalt);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
  }

  .nav__links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav__links a {
    padding: 0.85rem 0;
    width: 100%;
    border-bottom: 1px solid var(--off-white);
  }

  .nav__toggle {
    display: flex;
  }

  .nav__toggle.open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }

  .nav__toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle.open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 1.5rem 5rem;
  overflow: hidden;
  background: var(--dark);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero__tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: var(--fw-heavy);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--wheat-gold);
  margin-bottom: 1rem;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 2rem;
  }
}

.hero__subtitle {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.88);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card__body {
  padding: 1.5rem;
}

.card__body h3 {
  margin-bottom: 0.5rem;
}

.card__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  background: rgba(45, 123, 171, 0.1);
  color: var(--river-blue);
  margin-bottom: 0.75rem;
}

/* --- Feature Row (alternating image + text) --- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.feature-row--reverse .feature-row__image {
  order: 2;
}

.feature-row__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feature-row__image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.feature-row__text h3 {
  margin-bottom: 0.75rem;
  color: var(--river-blue);
}

@media (max-width: 768px) {
  .feature-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .feature-row--reverse .feature-row__image {
    order: 0;
  }
}

/* --- Stat Bar --- */
.stat-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem;
  padding: 2rem 0;
}

.stat {
  text-align: center;
}

.stat__number {
  font-size: 2.5rem;
  font-weight: var(--fw-black);
  color: var(--white);
  line-height: 1;
}

.stat__label {
  font-size: 0.875rem;
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 0.25rem;
}

/* --- Map Section --- */
.map-container {
  width: 100%;
  height: 500px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--gray-30);
}

.map-container-full {
  width: 100%;
  height: calc(100vh - 72px);
  margin-top: 72px;
}

/* Leaflet popup overrides */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius) !important;
  font-family: var(--font-primary) !important;
}

.leaflet-popup-content {
  margin: 0.75rem 1rem !important;
  font-size: 0.9375rem !important;
  line-height: 1.5 !important;
}

.leaflet-popup-content h4 {
  font-size: 1rem;
  color: var(--river-blue);
  margin-bottom: 0.25rem;
}

.leaflet-popup-content h4 a {
  color: inherit;
  text-decoration: none;
}

.leaflet-popup-content h4 a:hover {
  text-decoration: underline;
}

.leaflet-popup-content p {
  margin: 0;
  color: var(--text-body);
  font-size: 0.875rem;
}

/* --- Icon Badge (highway shield icon used decoratively) --- */
.icon-badge {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
}

.icon-badge--sm {
  width: 32px;
  height: 32px;
}

/* --- Values / Pillars Grid --- */
.pillar {
  text-align: center;
  padding: 2rem 1.5rem;
}

.pillar__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(45, 123, 171, 0.1);
  color: var(--river-blue);
}

.pillar__icon svg {
  width: 28px;
  height: 28px;
}

.pillar h3 {
  color: var(--river-blue);
  margin-bottom: 0.5rem;
}

/* --- Community Profile Cards --- */
.community-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}

.community-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.community-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.community-card__body {
  padding: 1.5rem;
}

.community-card__body h3 {
  color: var(--river-blue);
  margin-bottom: 0.25rem;
}

.community-card__county {
  font-size: 0.8125rem;
  font-weight: var(--fw-medium);
  color: var(--prairie-green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

/* --- Explore Category Cards --- */
.explore-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  cursor: pointer;
}

.explore-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.explore-card:hover img {
  transform: scale(1.05);
}

.explore-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}

.explore-card__overlay h3 {
  color: var(--white);
  font-size: 1.375rem;
}

.explore-card__overlay p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  margin: 0;
}

/* --- CTA Banner --- */
.cta-banner {
  position: relative;
  padding: 5rem 1.5rem;
  text-align: center;
  overflow: hidden;
}

.cta-banner__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
}

.cta-banner__content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
}

.cta-banner h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.0625rem;
  margin-bottom: 2rem;
}

/* --- Footer --- */
.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 3.5rem 1.5rem 2rem;
}

.footer__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer__brand img {
  height: 38px;
  margin-bottom: 1rem;
}

.footer__brand p {
  font-size: 0.9375rem;
  max-width: 320px;
  line-height: 1.6;
}

.footer__heading {
  font-size: 0.8125rem;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer__links a {
  display: block;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9375rem;
  padding: 0.3rem 0;
}

.footer__links a:hover {
  color: var(--wheat-gold);
}

.footer__bottom {
  max-width: var(--container-max);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.8125rem;
}

.footer__bottom p {
  margin-bottom: 0.25rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer__bottom p:last-child {
  margin-bottom: 0;
}

.footer__bottom .mobile-br { display: none; }
@media (max-width: 600px) {
  .footer__bottom .mobile-br { display: inline; }
}

.footer__bottom a {
  color: rgba(255, 255, 255, 0.4);
}

.footer__bottom a:hover {
  color: var(--wheat-gold);
}

@media (max-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .section {
    padding: var(--section-pad-sm);
  }
}

/* --- Page Banner (inner pages) --- */
.page-banner {
  background: var(--river-blue);
  padding: 8rem 1.5rem 3rem;
  text-align: center;
}

.page-banner h1 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.page-banner p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.0625rem;
  max-width: 820px;
  margin: 0 auto;
}

/* --- Utility --- */
/* --- Contact Form --- */
.contact-form {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 520px) {
  .contact-form__row {
    grid-template-columns: 1fr;
  }
}

.contact-form__field {
  margin-bottom: 1rem;
}

.contact-form__field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--asphalt);
  margin-bottom: 0.35rem;
}

.contact-form__field input,
.contact-form__field textarea,
.contact-form__field select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-primary);
  font-size: 0.9375rem;
  border: 1.5px solid var(--gray-30);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--dark);
  transition: border-color var(--transition);
}

.contact-form__field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%232d7baa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='1 1.5 6 6.5 11 1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 12px 8px;
  padding-right: 2.25rem;
  cursor: pointer;
}

.contact-form__field input:focus,
.contact-form__field textarea:focus,
.contact-form__field select:focus {
  outline: none;
  border-color: var(--river-blue);
}

.contact-form__field textarea {
  resize: vertical;
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ─── Map popup shared styles ─── */
.popup-photo {
  display: block;
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}
.popup-address {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.35rem 0.65rem;
  background: rgba(45, 123, 170, 0.08);
  border: 1px solid rgba(45, 123, 170, 0.2);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--river-blue);
  line-height: 1.35;
}
