/*
Theme Name: Maine Food Truck Tracker
Theme URI: https://mainefoodtrucktracker.com
Author: POP Media / MainelySEO
Author URI: https://mainelyseo.com
Description: Official theme for MaineFoodTruckTracker.com — a live food truck map and directory for Maine.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: Proprietary
Text Domain: mftt
*/

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --navy:        #0f1923;
  --navy-mid:    #162030;
  --navy-light:  #1e2d3e;
  --navy-border: #253547;
  --teal:        #2dd4bf;
  --teal-dim:    #1a9985;
  --amber:       #f59e0b;
  --amber-dim:   #d97706;
  --amber-light: #fef3c7;
  --green:       #22c55e;
  --text:        #e2e8f0;
  --text-dim:    #94a3b8;
  --white:       #ffffff;
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 4px 32px rgba(0,0,0,0.35);
  --shadow-sm:   0 2px 12px rgba(0,0,0,0.2);
  --transition:  0.2s cubic-bezier(0.4,0,0.2,1);
  --max-w:       1200px;
  --header-h:    72px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--navy);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--amber); }
button { cursor: pointer; font-family: var(--font-body); }
ul { list-style: none; }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--white);
}
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }
p { margin-bottom: 1.2rem; color: var(--text-dim); }
p:last-child { margin-bottom: 0; }
strong { color: var(--text); font-weight: 600; }

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(15,25,35,0.96);
  border-bottom: 1px solid var(--navy-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--amber);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(245,158,11,0.3);
}

.logo-text { display: flex; flex-direction: column; line-height: 1.1; }

.logo-name {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--white);
  white-space: nowrap;
}

.logo-sub {
  font-size: 11px;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

/* WordPress wraps nav items in ul > li — reset and flatten */
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.site-nav ul ul { display: none; } /* hide sub-menus */

.site-nav li {
  margin: 0;
  padding: 0;
  position: relative;
}

.site-nav a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  display: block;
}

.site-nav a:hover,
.site-nav a.current-menu-item,
.site-nav li.current-menu-item > a,
.site-nav li.current_page_item > a {
  color: var(--text);
  background: var(--navy-light);
}

.nav-cta,
.site-nav li.nav-cta > a,
.site-nav a.nav-cta {
  background: var(--amber) !important;
  color: var(--navy) !important;
  font-weight: 700 !important;
  padding: 10px 20px !important;
  border-radius: var(--radius-sm) !important;
  margin-left: 8px;
}

.nav-cta:hover,
.site-nav li.nav-cta > a:hover,
.site-nav a.nav-cta:hover {
  background: var(--amber-dim) !important;
  color: var(--navy) !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text-dim);
  font-size: 18px;
  line-height: 1;
  margin-left: auto;
}

/* Live pill in header */
.live-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.25);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-mid);
  border-top: 1px solid var(--navy-border);
  padding: 60px 0 32px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo-name { font-size: 20px; margin-bottom: 12px; display: block; }

.footer-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-social { display: flex; gap: 10px; }

.social-link {
  width: 36px;
  height: 36px;
  background: var(--navy-light);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 15px;
  transition: all var(--transition);
  text-decoration: none;
}

.social-link:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: var(--text-dim); font-size: 14px; transition: color var(--transition); }
.footer-col ul a:hover { color: var(--teal); }

.footer-bottom {
  border-top: 1px solid var(--navy-border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy { font-size: 13px; color: var(--text-dim); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; color: var(--text-dim); }
.footer-links a:hover { color: var(--teal); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--amber);
  color: var(--navy);
  box-shadow: 0 4px 20px rgba(245,158,11,0.25);
}
.btn-primary:hover { background: var(--amber-dim); color: var(--navy); transform: translateY(-1px); }

.btn-teal {
  background: var(--teal);
  color: var(--navy);
  box-shadow: 0 4px 20px rgba(45,212,191,0.2);
}
.btn-teal:hover { background: var(--teal-dim); color: var(--navy); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--navy-border);
}
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }

.btn-lg { padding: 16px 36px; font-size: 17px; }
.btn-sm { padding: 9px 18px; font-size: 13px; }

/* ── Hero (Homepage) ───────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 80px 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% 40%, rgba(45,212,191,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(245,158,11,0.05) 0%, transparent 60%),
    var(--navy);
}

/* Subtle grid texture */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37,53,71,0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,53,71,0.4) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 0%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(45,212,191,0.1);
  border: 1px solid rgba(45,212,191,0.25);
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 28px;
  animation: fadeInDown 0.6s ease both;
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5.5rem);
  color: var(--white);
  margin-bottom: 24px;
  animation: fadeInDown 0.6s 0.1s ease both;
  line-height: 1.05;
}

.hero-title em {
  font-style: italic;
  color: var(--amber);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-dim);
  margin-bottom: 40px;
  line-height: 1.6;
  animation: fadeInDown 0.6s 0.2s ease both;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  animation: fadeInDown 0.6s 0.3s ease both;
  margin-bottom: 60px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  animation: fadeInDown 0.6s 0.4s ease both;
}

.hero-stat {}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
}
.hero-stat-num span { color: var(--amber); }
.hero-stat-label { font-size: 13px; color: var(--text-dim); font-weight: 500; }

.hero-map-preview {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 50%;
  aspect-ratio: 4/3;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--navy-border);
  box-shadow: var(--shadow);
  animation: fadeInRight 0.8s 0.3s ease both;
}

.hero-map-preview iframe {
  width: 100%;
  height: 100%;
  border: none;
  pointer-events: none;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateY(-50%) translateX(40px); }
  to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* ── Feature Cards ─────────────────────────────────────────── */
.features-section {
  padding: 100px 0;
  position: relative;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin-bottom: 12px;
}

.section-title {
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 560px;
  margin-bottom: 60px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--navy-mid);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover {
  border-color: rgba(45,212,191,0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  font-size: 36px;
  margin-bottom: 20px;
  display: block;
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--white);
  margin-bottom: 12px;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 0;
}

/* ── Trucks Section ────────────────────────────────────────── */
.trucks-section { padding: 100px 0; }

.trucks-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 20px;
}

.trucks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.truck-card {
  background: var(--navy-mid);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  text-decoration: none;
  display: block;
  color: var(--text);
}

.truck-card:hover {
  border-color: rgba(45,212,191,0.4);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: var(--text);
}

.truck-card-hero {
  height: 160px;
  background: var(--navy-light);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.truck-card-hero img { width: 100%; height: 100%; object-fit: cover; }

.truck-status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
}

.status-live { background: rgba(34,197,94,0.9); color: #0a1a0a; }
.status-upcoming { background: rgba(245,158,11,0.9); color: #1a0e00; }
.status-closed { background: rgba(15,25,35,0.85); color: var(--text-dim); border: 1px solid var(--navy-border); }

.truck-card-body { padding: 20px; }
.truck-card-name { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 4px; }
.truck-card-cuisine { font-size: 12px; color: var(--teal); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; margin-bottom: 12px; }
.truck-card-location { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-dim); }

/* ── Map CTA Banner ────────────────────────────────────────── */
.map-cta {
  background: var(--navy-mid);
  border: 1px solid var(--navy-border);
  border-radius: 20px;
  padding: 60px;
  margin: 0 0 80px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.map-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 100% at 80% 50%, rgba(45,212,191,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.map-cta-title { margin-bottom: 12px; }
.map-cta-sub { color: var(--text-dim); font-size: 1.05rem; margin-bottom: 0; }
.map-cta-actions { display: flex; gap: 12px; flex-direction: column; flex-shrink: 0; }

/* ── Page content ──────────────────────────────────────────── */
.page-hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--navy-border);
  margin-bottom: 60px;
}
.page-title { margin-bottom: 16px; }
.page-intro { font-size: 1.15rem; color: var(--text-dim); max-width: 600px; }

.page-content { padding: 0 0 80px; }
.content-body { max-width: 760px; }
.content-body h2 { margin: 40px 0 16px; }
.content-body h3 { margin: 30px 0 12px; }
.content-body p { color: var(--text-dim); line-height: 1.8; }
.content-body ul, .content-body ol { padding-left: 24px; margin-bottom: 1.2rem; }
.content-body li { color: var(--text-dim); margin-bottom: 8px; line-height: 1.7; }

/* ── Email capture strip ───────────────────────────────────── */
.email-strip {
  background: linear-gradient(135deg, var(--navy-mid) 0%, rgba(30,45,62,0.8) 100%);
  border-top: 1px solid var(--navy-border);
  border-bottom: 1px solid var(--navy-border);
  padding: 60px 0;
  text-align: center;
}

.email-strip-title { margin-bottom: 8px; }
.email-strip-sub { color: var(--text-dim); margin-bottom: 32px; font-size: 1.05rem; }

.email-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 10px;
}

.email-form input {
  flex: 1;
  background: var(--navy-light);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition);
}

.email-form input:focus { border-color: var(--teal); }
.email-form input::placeholder { color: var(--text-dim); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-map-preview { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .map-cta { grid-template-columns: 1fr; }
  .map-cta-actions { flex-direction: row; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }
  .site-nav { display: none; flex-direction: column; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--navy-mid); border-bottom: 1px solid var(--navy-border); padding: 16px; gap: 4px; z-index: 199; }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; width: 100%; }
  .site-nav a { padding: 12px 16px; border-radius: var(--radius-sm); }
  .nav-toggle { display: flex; }
  .live-pill { display: none; }
  .hero { padding: 60px 0; min-height: auto; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .map-cta { padding: 36px 24px; }
  .map-cta-actions { flex-direction: column; }
  .email-form { flex-direction: column; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-actions { flex-direction: column; }
  .btn-lg { width: 100%; justify-content: center; }
}
