/* STIPPEL Timeline — очищені стилі без дублювань */
.stippel-timeline {
  --st-blue: #501b19;
  --st-green: #823f3d;
  --st-gold: #b88c1f;
  color: var(--st-blue);
  padding: 48px 0;
  font-family: inherit;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.stippel-timeline *,
.stippel-timeline *::before,
.stippel-timeline *::after { box-sizing: border-box; }

/* Заголовок */
.stippel-timeline__header { text-align: center; margin: 0 16px 32px; }
.stippel-timeline__eyebrow { font-size: 12px; letter-spacing: .25em; font-weight: 700; color: var(--st-green); }
.stippel-timeline__header h2 { font-size: clamp(25px, 3vw, 42px); margin: 12px 0; color: var(--st-blue); }
.stippel-timeline__header p { color: #5e6872; }

/* Прокручування без видимої смуги */
.stippel-timeline__viewport {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.stippel-timeline__viewport::-webkit-scrollbar { display: none; }

/* Центральна горизонтальна вісь */
.stippel-timeline__track {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  min-width: 100%;
  position: relative;
  padding: 16px 10px;
}
.stippel-timeline__track::before {
  content: "";
  position: absolute;
  top: 325px;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--st-blue);
}

/* Картки: 420 px на великих екранах */
.stippel-timeline__item {
  flex: 0 0 420px;
  width: 420px;
  min-width: 420px;
  height: 650px;
  position: relative;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 8px;
}
.stippel-timeline__card {
  position: absolute;
  left: 10px;
  right: 10px;
  width: auto;
  height: 285px;
  padding: 18px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-top: 3px solid #813d3d;
  border-radius: 3px;
  box-shadow: none;
}
.stippel-timeline__item.is-top .stippel-timeline__card { top: 0; }
.stippel-timeline__item.is-bottom .stippel-timeline__card { top: 337px; }
.stippel-timeline__year { font-weight: 800; font-size: 28px; color: var(--st-green); }
.stippel-timeline__card h3 { font-size: 17px; line-height: 1.3; margin: 9px 0 7px; color: var(--st-blue); overflow-wrap: break-word; }
.stippel-timeline__card p { font-size: 16px; line-height: 1.45; margin: 0; color: #4e5a64; }
.stippel-timeline__card ul { padding-left: 17px; margin: 9px 0 0; font-size: 15px; line-height: 1.5; color: #4e5a64; }

/* Симетричні з'єднання: вісь проходить через центр маркера */
.stippel-timeline__stem {
  position: absolute;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: var(--st-green);
}
.stippel-timeline__item.is-top .stippel-timeline__stem { top: 285px; height: 26px; }
.stippel-timeline__item.is-bottom .stippel-timeline__stem { top: 311px; height: 26px; }
.stippel-timeline__dot {
  position: absolute;
  top: 302px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  background: var(--st-green);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--st-blue);
  z-index: 3;
}

/* Особливе оформлення ювілейної картки */
.stippel-timeline__item.is-anniversary .stippel-timeline__card {
  background: #fff9ee;
  border: 1px solid #e9d9b7;
  border-top: 3px solid #c58c2b;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: flex-start;
}
.stippel-timeline__item.is-anniversary .stippel-timeline__year { color: var(--st-gold); }
.stippel-timeline__anniversary-logo { display: block; width: 150px; height: 150px; max-width: 100%; object-fit: contain; margin: 8px auto 0; }

/* Кнопки в стилі сайту */
.stippel-timeline__controls { display: flex; gap: 12px; justify-content: center; margin-top: 14px; }
.stippel-timeline__controls button {
  background: var(--st-blue);
  color: #fff;
  border: 1px solid var(--st-blue);
  border-radius: 4px;
  min-height: 42px;
  padding: 8px 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transition: background-color .2s ease;
}
.stippel-timeline__controls button:hover { background: #813d3d; border-color: #813d3d; }
.stippel-timeline__controls button:focus-visible { outline: 2px solid #c58c2b; outline-offset: 3px; }
.stippel-timeline__controls button:disabled { opacity: .35; cursor: not-allowed; }

/* Мобільна версія: одна картка на ширину екрана */
@media (max-width: 767px) {
  .stippel-timeline { padding: 28px 0; }
  .stippel-timeline__header { margin-bottom: 22px; }
  .stippel-timeline__viewport { scroll-padding-inline: 0; }
  .stippel-timeline__track { width: 100%; min-width: 100%; padding: 12px 0; gap: 0; }
  .stippel-timeline__track::before { top: 381px; }
  .stippel-timeline__item {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 410px;
    padding: 0;
  }
  .stippel-timeline__item.is-top .stippel-timeline__card,
  .stippel-timeline__item.is-bottom .stippel-timeline__card {
    top: 0;
    bottom: auto;
    left: 12px;
    right: 12px;
    width: auto;
    height: 335px;
    min-height: 335px;
    padding: 16px;
    overflow: visible;
  }
  .stippel-timeline__item.is-top .stippel-timeline__stem,
  .stippel-timeline__item.is-bottom .stippel-timeline__stem {
    top: 335px;
    height: 34px;
  }
  .stippel-timeline__dot { top: 360px; }
  .stippel-timeline__card h3 { font-size: 16px; line-height: 1.35; }
  .stippel-timeline__anniversary-logo { width: 130px; height: 130px; margin-top: 10px; }
  .stippel-timeline__controls { align-items: center; }
}
