/* Naša priča: timeline, editorial copy and full-height historical photograph. */
.vp-story {
  --vp-story-accent: #8f744c;
  --vp-story-muted: #6b6b6b;
  --vp-story-height: clamp(720px, 60.35vw, 869px);
  position: relative;
  width: 100%;
  color: #191919;
  background: #fff;
}
.vp-story__frame { position: relative; width: 100%; min-height: var(--vp-story-height); }
.vp-story__timeline {
  position: absolute; z-index: 3; left: 17.5%; top: 7%; bottom: 7%; width: 12%;
}
.vp-story__timeline-list {
  display: flex; flex-direction: column; justify-content: space-between;
  height: 100%; margin: 0; padding: 0; list-style: none; position: relative;
}
.vp-story__timeline-list::before {
  content: ''; position: absolute; left: 5px; top: 16px; bottom: 16px; width: 1px; background: #b6b6b6;
}
.vp-story__timeline-item { margin: 0; padding: 0; position: relative; }
.vp-story__timeline-btn {
  display: flex; align-items: center; gap: clamp(14px, 2.7vw, 40px);
  min-height: 32px; padding: 0; border: 0; background: transparent;
  color: var(--vp-story-muted); font: 400 clamp(16px, 1.5vw, 24px)/1.2 Catamaran, sans-serif;
  cursor: pointer; text-align: left;
}
.vp-story__timeline-btn.is-active { color: var(--vp-story-accent); font-size: clamp(22px, 2.2vw, 32px); }
.vp-story__timeline-dot { width: 11px; height: 11px; flex-shrink: 0; border-radius: 50%; border: 1px solid #999; background: #fff; position: relative; }
.vp-story__timeline-btn.is-active .vp-story__timeline-dot { background: var(--vp-story-accent); border-color: var(--vp-story-accent); }
.vp-story__stage, .vp-story__slides { width: 100%; }
.vp-story__slide {
  display: grid; grid-template-columns: 32.5% 27.5% 40%; min-height: var(--vp-story-height);
}
.vp-story__slide[hidden] { display: none; }
.vp-story__portrait { grid-column: 3; grid-row: 1; position: relative; min-height: var(--vp-story-height); margin: 0; }
.vp-story__image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; object-position: right center; border-radius: 0; }
.vp-story__copy { grid-column: 2; grid-row: 1; align-self: center; min-width: 0; padding: clamp(20px, 4vh, 48px) clamp(24px, 4vw, 64px) clamp(20px, 4vh, 48px) 0; }
.vp-story__display-year { margin: 0 0 8px; color: var(--vp-story-accent); font: 400 clamp(76px, 10vw, 160px)/0.85 Italianno, cursive; }
.vp-story__title { margin: 18px 0 24px; font: 600 clamp(30px, 4vw, 60px)/1.1 Catamaran, sans-serif; color: #191919; }
.vp-story__body { margin: 0; font: 400 clamp(16px, 1.25vw, 18px)/1.5 Catamaran, sans-serif; color: var(--vp-story-muted); white-space: pre-line; }
.vp-story__nav { position: absolute; z-index: 4; top: calc(50% - 24px); display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: #090909; cursor: pointer; }
.vp-story__nav--prev { left: 4.7%; }
.vp-story__nav--next { right: 2%; }
.vp-story__nav:disabled { background: #b6b6b6; cursor: default; }
.vp-story__nav svg { width: 16px; height: 27px; }
.vp-story__nav:focus-visible, .vp-story__timeline-btn:focus-visible { outline: 2px solid var(--vp-story-accent); outline-offset: 4px; }
@media (min-width: 769px) and (max-width: 1100px) {
  .vp-story__copy { padding-right: 24px; }
  .vp-story__title { font-size: 32px; }
}
@media (max-width: 768px) {
  .vp-story { --vp-story-height: auto; }
  .vp-story__frame { padding-bottom: 0; }
  .vp-story__timeline {
    position: relative; inset: auto; width: calc(100% - 112px); margin-inline: 56px;
    padding: 14px 4px; overflow-x: auto; scrollbar-width: none;
    scroll-snap-type: x proximity; overscroll-behavior-x: contain;
  }
  .vp-story__timeline::-webkit-scrollbar { display: none; }
  .vp-story__timeline-list { flex-direction: row; justify-content: flex-start; width: max-content; min-width: 100%; gap: 8px; }
  .vp-story__timeline-list::before { display: none; }
  .vp-story__timeline-item { scroll-snap-align: center; }
  .vp-story__timeline-btn {
    justify-content: center; min-width: 72px; min-height: 44px; padding: 8px 12px;
    border: 1px solid #e1d9cc; border-radius: 24px; font-size: 17px; font-weight: 600;
    background: #faf8f4; color: #51483d;
  }
  .vp-story__timeline-btn.is-active { font-size: 17px; background: var(--vp-story-accent); border-color: var(--vp-story-accent); color: #fff; }
  .vp-story__timeline-dot { display: none; }
  .vp-story__slide { grid-template-columns: 1fr; }
  .vp-story__portrait { grid-column: 1; grid-row: 1; aspect-ratio: auto; }
  .vp-story__image { position: static; width: 100%; height: auto; object-fit: cover; }
  .vp-story__copy { grid-column: 1; grid-row: 2; padding: 32px 24px; }
  .vp-story__display-year { font-size: 100px; }
  .vp-story__title { font-size: 36px; margin: 16px 0; }
  .vp-story__body { font-size: 16px; }
  .vp-story__nav { top: 14px; bottom: auto; width: 44px; height: 44px; }
  .vp-story__nav svg { width: 12px; height: 20px; }
  .vp-story__nav--prev { left: 8px; }
  .vp-story__nav--next { right: 8px; }
}

/* Mobile: allow vertical scroll, horizontal swipe handled in JS. */
@media (max-width: 768px) {
  .vp-story__stage {
    touch-action: pan-y;
  }
}

/* Dots (mobile only). */
.vp-story__dots { display: none; }

/* Mobile: no year pills/arrows; image, then text, then dots.
   Text change is the main effect; images only crossfade softly. */
@media (max-width: 768px) {
  .vp-story__timeline,
  .vp-story__nav { display: none !important; }

  .vp-story__slides { display: grid; }
  .vp-story__slide,
  .vp-story__slide[hidden] {
    display: grid;
    grid-area: 1 / 1;
    align-content: start;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear 500ms;
  }
  .vp-story__slide.is-active {
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
    z-index: 1;
  }

  .vp-story__portrait { opacity: 0; transition: opacity 500ms ease; }
  .vp-story__slide.is-active .vp-story__portrait { opacity: 1; }

  .vp-story__copy { opacity: 0; transition: opacity 180ms ease; }
  .vp-story__slide.is-active .vp-story__copy {
    opacity: 1;
    animation: vp-story-copy-next 650ms cubic-bezier(0.2, 0.7, 0.2, 1) 120ms both;
  }
  .vp-story[data-vp-story-dir="prev"] .vp-story__slide.is-active .vp-story__copy {
    animation-name: vp-story-copy-prev;
  }

  /* Line breaks in the copy are set for desktop; let text flow on mobile. */
  .vp-story__body { white-space: normal; }

  .vp-story__dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0 24px 40px;
  }
  .vp-story__dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #cfc6b8;
    cursor: pointer;
    position: relative;
    transition: background-color 200ms ease, transform 200ms ease;
  }
  .vp-story__dot::before { content: ''; position: absolute; inset: -10px; }
  .vp-story__dot.is-active { background: var(--vp-story-accent); transform: scale(1.2); }
  .vp-story__dot:focus-visible { outline: 2px solid var(--vp-story-accent); outline-offset: 3px; }
}

@keyframes vp-story-copy-next {
  from { opacity: 0; transform: translateX(48px); }
  to { opacity: 1; transform: none; }
}
@keyframes vp-story-copy-prev {
  from { opacity: 0; transform: translateX(-48px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .vp-story__portrait,
  .vp-story__copy,
  .vp-story__slide { transition: none; }
  .vp-story__slide.is-active .vp-story__copy { animation: none; }
}
