/* ============================================================
   old36.css — layout for the PA 36 photo tour
   Loaded AFTER band-clean.css so these rules win.
   ============================================================ */

.old36-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 15px 3rem;
}

/* ---------- Page title ------------------------------------ */

.old36-head {
  text-align: center;
  padding: 1.5rem 1rem 0.5rem;
}

.old36-head h1 {
  margin: 0 0 0.25rem;
  color: var(--primary);
}

.old36-head .subtitle {
  margin: 0;
  color: var(--text-light);
  font-size: 1.05rem;
  font-style: italic;
}

/* ---------- Intro prose ------------------------------------ */

.old36-intro {
  max-width: 70ch;
  margin: 0 auto 2.5rem;
  text-align: left;
}

.old36-intro p {
  margin-bottom: 1em;
}

.old36-intro .note {
  background: var(--bg-light);
  border-left: 4px solid var(--secondary);
  padding: 0.75rem 1rem;
  font-size: 0.95em;
}

/* ---------- Two-column layout: map rail + legs -------------- */

.road-layout {
  display: grid;
  grid-template-columns: minmax(170px, 230px) 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* The sticky map rail. align-self:start is required for sticky
   to work inside a grid — otherwise the item stretches to full
   height and has nothing to scroll within. */
.map-rail {
  position: sticky;
  top: 1rem;
  align-self: start;
  text-align: center;
}

.map-rail img {
  max-height: calc(100vh - 7rem);
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 2px 10px var(--shadow-color);
  cursor: zoom-in;
}

.map-rail .map-label {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--text-light);
}

/* ---------- Sections ("legs" of the road) ------------------- */

.legs {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  min-width: 0;           /* lets the grid column shrink properly */
}

.leg {
  scroll-margin-top: 1rem;
}

.leg-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0 0 0.9rem;
  padding: 0.5rem 0.85rem;
  background: var(--bg-light);
  border-left: 5px solid var(--primary);
  border-radius: 0 4px 4px 0;
  font-size: 1.1rem;
  text-align: left;
}

.leg-head .miles {
  font-weight: normal;
  font-size: 0.85em;
  color: var(--text-light);
}

.leg-head .decommissioned {
  font-weight: normal;
  font-size: 0.72em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-white);
  background: var(--primary);
  padding: 0.15em 0.6em;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Photo grid -------------------------------------- */

/* Always 4 equal columns. The widest section has 4 photos, so this keeps
   every section on a single row AND keeps thumbnails the same size from
   one section to the next. Sections with 2 or 3 photos simply leave the
   trailing columns empty rather than growing their images. */
.shots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.shot {
  margin: 0;
}

.shot a {
  display: block;
  overflow: hidden;
  border-radius: 5px;
  background: #eee;
  box-shadow: 0 1px 5px var(--shadow-color);
}

.shot img {
  width: 100%;
  aspect-ratio: 3 / 2;      /* every photo is 1.5:1, so nothing is cropped hard */
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.shot a:hover img,
.shot a:focus-visible img {
  transform: scale(1.05);
}

.shot a:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 2px;
}

.shot figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: center;
}

/* ---------- Footer note ------------------------------------- */

.old36-foot {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ---------- Narrow screens ---------------------------------- */

@media (max-width: 800px) {
  .road-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Un-stick the map and let it sit above the photos. */
  .map-rail {
    position: static;
    max-height: none;
  }

  .map-rail img {
    max-height: 55vh;
  }

  /* Four across is unreadable on a phone; pair them up instead. */
  .shots {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .shot figcaption {
    font-size: 0.78rem;
  }
}
