/* Walk Story Map: scrolling text beside a map that follows it. Page: modules/walks/story.php  Script: walk-story.js */
.story { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0; max-width: 1400px; margin: 0 auto; }
.story-text { grid-column: 1; grid-row: 1; padding: 0 1.25rem 40vh; }
.story-map-col { grid-column: 2; grid-row: 1; }
#storyMap { position: sticky; top: 56px; height: calc(100vh - 56px); width: 100%; z-index: 1; }
.story-step { min-height: 60vh; padding: 1.2rem 0.2rem; border-bottom: 1px solid #e6e6e6; opacity: 0.45; transition: opacity 0.3s; display: flex; flex-direction: column; justify-content: center; }
.story-step.is-active, .story-step.is-intro, .story-step.is-end { opacity: 1; }
.story-step:focus-visible { outline: 3px solid #1565c0; outline-offset: 4px; }
.story-step h2 { margin: 0 0 0.3rem; font-size: 1.3rem; }
.story-num { display: inline-block; min-width: 1.7rem; height: 1.7rem; line-height: 1.7rem; text-align: center; border-radius: 50%; background: #2e7d32; color: #fff; font-size: 0.9rem; margin-right: 0.3rem; }
.story-km { color: #555; margin: 0 0 0.6rem; font-size: 0.95rem; }
.story-meta { color: #444; }
.story-hint { color: #4a4a4a; margin-top: 1.5rem; }
.story-banner { width: 100%; max-height: 260px; object-fit: cover; border-radius: 8px; margin: 0.6rem 0; }
.story-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.5rem; margin: 0.6rem 0 1rem; }
.story-photos img { width: 100%; height: 100px; object-fit: cover; border-radius: 6px; }
.story-pin { width: 28px; height: 28px; line-height: 28px; text-align: center; border-radius: 50%; background: #fff; border: 2px solid #2e7d32; color: #1b5e20; font-weight: 700; font-size: 0.85rem; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.story-pin.is-active { background: #2e7d32; color: #fff; transform: scale(1.25); }
@media (max-width: 800px) {
    /* map sticks to the top, the story scrolls underneath it */
    .story { display: block; }
    .story-map-col { position: sticky; top: 52px; z-index: 5; }
    #storyMap { position: static; height: 38vh; }
    .story-text { padding: 0 0.9rem 45vh; }
    .story-step { min-height: 48vh; }
}
@media (prefers-reduced-motion: reduce) { .story-step { transition: none; } }
.story-wm-photo { width: 100%; max-height: 280px; object-fit: cover; border-radius: 8px; margin: 0.4rem 0 0.6rem; }
body.wm-photos-off .story-wm-photo { display: none; }
.story-toggle { font-size: 0.95rem; }
.story-pin.wm { border-color: #1565c0; color: #0d47a1; }
.story-pin.wm.is-active { background: #1565c0; color: #fff; }
.story-items { margin: 0.4rem 0; }
.story-item { border-left: 3px solid #cfd8dc; padding: 0.2rem 0.6rem; margin: 0.5rem 0; }
.story-item.is-hidden { opacity: 0.55; border-left-color: #c62828; }
.story-item-photo { width: 100%; max-height: 220px; object-fit: cover; border-radius: 6px; }
.story-item-actions { display: flex; gap: 0.6rem; margin-top: 0.2rem; }
.story-item-actions button { background: none; border: none; color: #0d47a1; cursor: pointer; padding: 0; font-size: 0.85rem; text-decoration: underline; }
.story-add { margin: 0.5rem 0; } .story-add summary { cursor: pointer; color: #0d47a1; }
.story-flash { background: #e8f5e9; color: #1b5e20; padding: 0.5rem 0.7rem; border-radius: 6px; }
body.wm-walkers-off .story-item { display: none; }
