/* ====== STICKY SUB-LOCATION RAIL (map view, multi-sub region) ======
   Twin of year-rail.css. Visible only when the user has selected a region
   that contains more than one named sub-location (e.g. Northern California
   → Mt. Shasta + Mendocino). Lets them jump between sub-galleries and
   shows which one is currently in view. */

.subloc-rail {
  position: fixed;
  left: 28px;
  top: 50%;
  transform: translate(-12px, -50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  max-width: 240px;
}

/* Soft fade behind the rail so the active label stays legible if a photo
   creeps in on narrower viewports. */
.subloc-rail::before {
  content: '';
  position: absolute;
  inset: -40px -60px -40px -40px;
  background: radial-gradient(ellipse at 30% 50%,
    rgba(10,10,10,0.78) 0%,
    rgba(10,10,10,0.45) 40%,
    rgba(10,10,10,0) 75%);
  pointer-events: none;
  z-index: -1;
}

.subloc-rail.visible {
  opacity: 1;
  transform: translate(0, -50%);
  pointer-events: auto;
}

.subloc-rail-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.32em;
  color: rgba(255,184,107,0.55);
  text-transform: uppercase;
  margin: 0 0 14px 18px;
}

.subloc-rail-eyebrow::before {
  content: '— ';
  color: rgba(255,184,107,0.3);
}

.subloc-rail-list {
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 6px 0;
  border-left: 1px solid rgba(255,255,255,0.09);
}

.subloc-rail-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.32);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  position: relative;
  padding: 8px 0 8px 18px;
  line-height: 1.2;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  gap: 10px;
  transition: color 0.3s ease, padding 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
              font-size 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.subloc-rail-item::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 50%;
  width: 0;
  height: 1px;
  background: rgba(255,184,107,0.7);
  transform: translateY(-50%);
  transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.subloc-rail-item:hover { color: rgba(255,244,221,0.85); }
.subloc-rail-item:hover::before { width: 8px; }

.subloc-rail-count {
  color: rgba(255,184,107,0.6);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
}

.subloc-rail-item.active {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.005em;
  color: rgba(255,244,221,0.97);
  text-transform: none;
  padding: 6px 0 6px 24px;
}
.subloc-rail-item.active::before {
  width: 16px;
  background: #ffb86b;
  box-shadow: 0 0 10px rgba(255,184,107,0.6);
}
.subloc-rail-item.active .subloc-rail-count {
  font-family: 'JetBrains Mono', monospace;
  font-style: normal;
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  color: rgba(255,184,107,0.85);
  align-self: center;
}

.subloc-rail-progress {
  position: absolute;
  left: -2px;
  top: 0;
  width: 3px;
  height: 0;
  background: linear-gradient(180deg,
    rgba(255,184,107,0) 0%,
    rgba(255,184,107,0.5) 30%,
    rgba(255,184,107,0.5) 70%,
    rgba(255,184,107,0) 100%);
  transition: top 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
              height 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

@media (max-width: 1180px) {
  .subloc-rail { display: none; }
}
