/* css/style.css */

/* =========================================
   Reset & Global
========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow-x: hidden; /* prevents sideways scroll on phones */
}

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #fff;
  min-height: 100dvh; /* better on mobile than 100vh */
  position: relative;

  /* IMPORTANT:
     We do NOT set the background image directly on body,
     we render it via ::before for iOS/Android consistency. */
  background: none;
}

/* Background image layer (stable on iPhone + Android) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;

  background: url("../assets/images/background.jpg") center / cover no-repeat;
background-position: 50% 50%;
  /* iOS/Android stability */
  transform: translateZ(0);
  will-change: transform;
}

/* Dark overlay layer */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, 0.25);
}

/* =========================================
   Navbar
========================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 15px 50px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.navbar .logo a {
  font-size: 1.5rem;
  font-weight: 900;
  color: #f2a900;
  text-decoration: none;
  transition: transform 0.25s ease;
}
.navbar .logo a:hover { transform: scale(1.05); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-links li a {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  position: relative;
  padding: 6px 0;
}

/* underline */
.nav-links li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: #f2a900;
  transition: width 0.25s ease;
}
.nav-links li a:hover::after { width: 100%; }

/* active */
.nav-links li a.active { color: #f2a900; }
.nav-links li a.active::after { width: 100%; }

/* Hamburger (hidden on desktop) */
.nav-toggle {
  display: none;
  border: 0;
  cursor: pointer;
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  background: rgba(255,255,255,0.10);
  padding: 8px 12px;
  border-radius: 12px;
}

/* =========================================
   Hero
========================================= */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  height: 80vh;
  text-align: center;
  padding: 0 20px;

  /* keeps hero text from sitting under sticky navbar */
  padding-top: 24px;
}

.hero--short { height: 45vh; }

.hero h1 {
  font-size: 3rem;
  margin-bottom: 14px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}
.hero p {
  font-size: 1.2rem;
  max-width: 900px;
  text-shadow: 1px 1px 6px rgba(0,0,0,0.6);
}

/* =========================================
   Main Content
========================================= */
.content {
  max-width: 1100px;
  margin: 20px auto 40px; /* no negative pull by default */
  padding: 20px;

  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  backdrop-filter: blur(6px);
}

/* OPTIONAL: only use on Home if you WANT overlap */
.content--lift {
  margin-top: -60px;
}

.section-card {
  background: rgba(255,255,255,0.06);
  padding: 18px;
  margin: 16px 0;
  border-radius: 14px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.section-card:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.10);
}
.section-card h2 { margin-bottom: 10px; }

.muted-text {
  opacity: 0.85;
  margin-bottom: 10px;
}

/* Header row inside cards (title + button) */
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

/* Reset button */
.btn-reset {
  appearance: none;
  border: 0;
  padding: 9px 12px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
  background: rgba(255,255,255,0.12);
  color: #fff;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-reset:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.18);
}
.btn-reset:active { transform: translateY(0); }

/* =========================================
   Map (Leaflet)
========================================= */
.route-map {
  width: 100%;
  height: 520px; /* Leaflet NEEDS a height */
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
}

/* Leaflet popup readability */
.leaflet-popup-content {
  margin: 10px 12px;
  color: #111;
  font-size: 0.95rem;
}
.map-popup-title {
  font-weight: 900;
  margin-bottom: 6px;
}
.map-popup-sub { margin-top: 2px; }
.map-popup-links {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.muted-inline { opacity: 0.7; }

/* =========================================
   Stops Grid (Tiles)
========================================= */
.stops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.stop-card {
  cursor: pointer;
  border-radius: 16px;
  padding: 14px;
  background: rgba(255,255,255,0.08);
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  transition: transform 0.2s ease, background 0.2s ease;
}
.stop-card:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.12);
}

.stop-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.stop-name {
  font-weight: 900;
  color: #f2a900;
  font-size: 1.05rem;
}
.stop-cta {
  font-weight: 800;
  opacity: 0.9;
  font-size: 0.9rem;
}

.stop-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-bottom: 12px;
}
.stop-details .k {
  opacity: 0.85;
  font-weight: 800;
  margin-right: 6px;
}
.stop-details .v { opacity: 0.98; }

.stop-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Buttons */
.stop-site,
.stop-dir,
.stop-email {
  display: inline-block;
  padding: 9px 12px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 900;
  background: rgba(255,255,255,0.10);
  color: #fff;
}
.stop-site:hover,
.stop-dir:hover,
.stop-email:hover {
  background: rgba(255,255,255,0.16);
}

.muted {
  opacity: 0.7;
  cursor: default;
}

/* =========================================
   Footer
========================================= */
footer {
  text-align: center;
  padding: 18px 12px 28px;
  opacity: 0.9;
}

/* =========================================
   Responsive
========================================= */
@media (max-width: 900px) {
  .navbar { padding: 12px 16px; }

  /* Mobile nav */
  .nav-toggle { display: inline-flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 12px;
    right: 12px;

    background: rgba(0,0,0,0.85);
    border-radius: 14px;
    padding: 12px;
    flex-direction: column;
    gap: 10px;

    z-index: 200;
    box-shadow: 0 14px 40px rgba(0,0,0,0.4);
  }
  .nav-links.open { display: flex; }

  .nav-links li a {
    padding: 10px 8px;
    display: block;
  }
  .nav-links li a::after { display: none; }

  /* Content spacing (NO negative pull on mobile) */
  .content {
    margin: 14px 12px 30px;
    padding: 14px;
  }

  /* If home uses lift, disable it on mobile */
  .content--lift { margin-top: 14px; }

  /* Hero */
  .hero {
    height: 55vh;
    padding: 0 14px;
    padding-top: 18px;
  }
  .hero--short { height: 40vh; }

  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }

  /* Grid */
  .stops-grid { grid-template-columns: 1fr; }
  .stop-details { grid-template-columns: 1fr; }

  /* Map */
  .route-map { height: 380px; }
}
