/* HOME-03D — горизонтальная галерея истории (landing-build-test) */
:root {
  --lp-hg-bg: #f4f2eb;
  --lp-hg-panel: rgba(255, 255, 255, 0.92);
  --lp-hg-text: #2a331c;
  --lp-hg-muted: #5c6348;
  --lp-hg-accent: #3f492a;
  --lp-hg-highlight: #d4e04a;
  --lp-hg-shadow: 0 28px 60px rgba(22, 28, 14, 0.12);
}

.lp-history-hscroll,
.lp-history-hscroll * {
  box-sizing: border-box;
}

.lp-history-hscroll {
  position: relative;
  padding: 96px 0 0;
  /* фон страницы (тема/Elementor), без отдельной подложки секции */
  background: none;
  background-color: transparent;
  overflow: hidden;
}

.lp-history-hscroll__intro {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px 40px;
  text-align: center;
}

.lp-history-hscroll__eyebrow {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  color: var(--lp-hg-accent);
  font: 600 clamp(14px, 1.25vw, 18px) / 1.3 "Montserrat", "Segoe UI", sans-serif;
  letter-spacing: 0.06em;
  text-transform: none;
}

.lp-history-hscroll__eyebrow::before {
  content: "";
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M42.4 5S19.6 19 31.1 42.9c0 0 24-6 11.3-37.9ZM10.4 28.2s-17.3 23.1 3.7 42.4c0 0 21.7-15.5-3.7-42.4Zm69 25.5S62.7 36 42.5 46.5c4.4-4.8 9.5-9.3 15.1-13.1 4 4.3 17.4 15.1 38.7-4.3 0 0-18.6-9.7-39.9.3C42.5 36.5 22.8 55 10.6 93.9c0 0 1.2 2.4 4.8 0 0 0 2-6.6 6.3-15.7 4 5.6 16.3 17.4 40.9 1.2 0 0-17.4-18.5-38.2-6.5 3.5-6.7 8-14.1 13.7-21.2 3.4 5.1 15.7 18.9 41.3 2Z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M42.4 5S19.6 19 31.1 42.9c0 0 24-6 11.3-37.9ZM10.4 28.2s-17.3 23.1 3.7 42.4c0 0 21.7-15.5-3.7-42.4Zm69 25.5S62.7 36 42.5 46.5c4.4-4.8 9.5-9.3 15.1-13.1 4 4.3 17.4 15.1 38.7-4.3 0 0-18.6-9.7-39.9.3C42.5 36.5 22.8 55 10.6 93.9c0 0 1.2 2.4 4.8 0 0 0 2-6.6 6.3-15.7 4 5.6 16.3 17.4 40.9 1.2 0 0-17.4-18.5-38.2-6.5 3.5-6.7 8-14.1 13.7-21.2 3.4 5.1 15.7 18.9 41.3 2Z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

/* Тема (theme.css) задаёт div h2 крупный размер и text-transform — сбрасываем */
h2.lp-history-hscroll__title {
  margin: 0 auto;
  max-width: min(56rem, 96vw);
  padding: 0 12px;
  color: var(--lp-hg-text);
  text-transform: none !important;
  font-family: "Montserrat", "Segoe UI", sans-serif !important;
  font-weight: 600 !important;
  font-style: normal !important;
  font-size: unset !important;
  line-height: normal !important;
  letter-spacing: normal !important;
  text-wrap: wrap;
}

/* Ровно две визуальные строки на десктопе: тема не ломает span’ы */
.lp-history-hscroll__title-line {
  display: block;
  font-family: "Montserrat", "Segoe UI", sans-serif !important;
  font-weight: 600 !important;
  font-style: normal !important;
  text-transform: none !important;
  letter-spacing: -0.04em !important;
  font-size: clamp(22px, 4.2vw, 44px) !important;
  line-height: 1.12 !important;
}

@media (min-width: 900px) {
  .lp-history-hscroll__title-line {
    white-space: nowrap;
    /* 1.75vw: две длинные строки без горизонтального скролла до ~900px */
    font-size: clamp(14px, 1.75vw, 36px) !important;
    line-height: 1.15 !important;
  }
}

@media (min-width: 1200px) {
  .lp-history-hscroll__title-line {
    font-size: clamp(20px, 2.2vw, 40px) !important;
  }
}

.lp-history-hscroll__lead {
  margin: 18px auto 0;
  max-width: 52ch;
  color: var(--lp-hg-muted);
  font: 400 17px/1.65 "Roboto", "Segoe UI", Arial, sans-serif;
  text-wrap: pretty;
}

.lp-history-hscroll__stage {
  position: relative;
  margin-top: 4px;
}

/* Подсказка: центр по вертикали совпадает с серединой полосы слайдов (rail padding-top + половина высоты карточки) */
.lp-history-hscroll__swipe-hint {
  position: absolute;
  left: 50%;
  top: calc(12px + min(58vh, 560px) / 2);
  transform: translate(-50%, -50%);
  z-index: 6;
  pointer-events: none;
  width: clamp(96px, 21vw, 128px);
  height: clamp(96px, 21vw, 128px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.45s ease,
    visibility 0.45s ease,
    transform 0.45s ease;
}

.lp-history-hscroll__swipe-hint.is-dismissed {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.94);
}

.lp-history-hscroll__swipe-hint__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--lp-hg-accent) 45%, transparent);
  animation: lp-hg-hint-pulse 2.4s ease-in-out infinite;
}

.lp-history-hscroll__swipe-hint__icons {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2.2vw, 14px) clamp(14px, 3vw, 20px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 2px 16px rgba(18, 22, 12, 0.2),
    inset 0 0 0 1px rgba(42, 51, 28, 0.1);
  color: var(--lp-hg-accent);
  animation: lp-hg-hint-arrows-x 2.4s ease-in-out infinite;
}

/* Подсказка «листайте в стороны»: двойные шевроны, контур для чёткости на фото */
.lp-history-hscroll__swipe-hint__arrows {
  display: block;
  flex-shrink: 0;
  width: clamp(52px, 13vw, 76px);
  height: auto;
}

@keyframes lp-hg-hint-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
    box-shadow: 0 0 0 0 transparent;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
    box-shadow: 0 0 0 10px color-mix(in srgb, var(--lp-hg-highlight) 18%, transparent);
  }
}

@keyframes lp-hg-hint-arrows-x {
  0%,
  100% {
    transform: translateX(-3px);
  }
  50% {
    transform: translateX(3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lp-history-hscroll__swipe-hint__ring,
  .lp-history-hscroll__swipe-hint__icons {
    animation: none !important;
  }

  .lp-history-hscroll__swipe-hint__ring {
    opacity: 0.88;
  }
}

.lp-history-hscroll__rail {
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: clamp(18px, 6vw, 72px);
  padding: 12px clamp(18px, 6vw, 72px) 28px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x pinch-zoom;
  cursor: grab;
}

.lp-history-hscroll__rail::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.lp-history-hscroll__rail.lp-history-hscroll__rail--dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.lp-history-hscroll__rail:focus-visible {
  outline: 2px solid var(--lp-hg-accent);
  outline-offset: 4px;
}

.lp-history-hscroll__slide {
  position: relative;
  flex: 0 0 min(88vw, 980px);
  scroll-snap-align: center;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--lp-hg-shadow);
  height: min(58vh, 560px);
  min-height: min(58vh, 560px);
  background: #dfe2d4;
}

.lp-history-hscroll__slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 0.7s ease;
  pointer-events: none;
  user-select: none;
}

.lp-history-hscroll__slide.is-active img {
  transform: scale(1);
}

.lp-history-hscroll__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(18, 22, 12, 0.05) 0%, rgba(18, 22, 12, 0.38) 100%);
}

.lp-history-hscroll__panel {
  position: relative;
  z-index: 2;
  margin: -120px clamp(18px, 5vw, 64px) 48px;
  padding: clamp(22px, 3vw, 34px) clamp(22px, 3.5vw, 40px);
  border-radius: 24px;
  background: var(--lp-hg-panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(26, 33, 17, 0.08);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(18px, 3vw, 40px);
  align-items: end;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.lp-history-hscroll__year {
  margin: 0;
  font: 600 clamp(52px, 10vw, 118px) / 0.85 "Montserrat", "Segoe UI", sans-serif;
  letter-spacing: -0.06em;
  color: var(--lp-hg-accent);
  font-variant-numeric: tabular-nums;
  min-width: 3ch;
}

.lp-history-hscroll__copy {
  min-width: 0;
  padding-bottom: 6px;
}

.lp-history-hscroll__mtitle {
  margin: 0 0 10px;
  font: 600 clamp(20px, 2.1vw, 28px) / 1.2 "Montserrat", "Segoe UI", sans-serif;
  letter-spacing: -0.02em;
  color: var(--lp-hg-text);
}

.lp-history-hscroll__mdesc {
  margin: 0;
  color: var(--lp-hg-muted);
  font: 400 16px/1.65 "Roboto", "Segoe UI", Arial, sans-serif;
  max-width: 52ch;
  text-wrap: pretty;
}

@media (max-width: 720px) {
  .lp-history-hscroll {
    padding-top: 72px;
  }

  .lp-history-hscroll__panel {
    margin-top: -88px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .lp-history-hscroll__year {
    font-size: clamp(44px, 14vw, 72px);
  }

  .lp-history-hscroll__slide {
    height: 52vh;
    min-height: 52vh;
  }

  .lp-history-hscroll__swipe-hint {
    top: calc(12px + 52vh / 2);
  }
}
