/* slider-layout.css — раскладка секции «Продукция» (слайдер).
   Самодостаточный файл: отступы секции, две колонки (текст | картинка),
   ограничение высоты картинки, нижняя панель управления, адаптив.
   Подключать ПЕРВЫМ из файлов слайдера:
     slider-layout.css → slider.css → heat-flow.css
   Цвета акцентов, анимации и плашки характеристик — в slider.css. */

/* ---------- Секция ---------- */
.tk-section {
  position: relative;
  max-width: 1520px;
  margin: 0 auto;
  padding: clamp(72px, 10vh, 128px) clamp(20px, 4vw, 56px);
  box-sizing: border-box;
}
.tk-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .26em;
  color: #75798C;
  margin-bottom: 18px;
}
.tk-heading {
  margin: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -.02em;
  color: #E9E9ED;
}
.tk-subtitle {
  margin: 16px 0 clamp(28px, 4vh, 44px);
  max-width: 640px;
  font-size: 15.5px;
  line-height: 1.6;
  color: #9397AB;
}

/* ---------- Карточка слайда: текст слева, картинка справа ---------- */
.tk-slide {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas:
    "text  image"
    "ctrl  ctrl";
  align-items: center;
  min-height: clamp(520px, 64vh, 660px);
  background: #141922;
  border: 1px solid #1D2129;
  overflow: hidden;
  isolation: isolate;
}
.tk-slide:focus-visible { outline: 2px solid var(--tk-accent, #E30613); outline-offset: 4px; }

/* фоновая сетка и свечение — под содержимым */
.tk-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(147, 151, 171, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 151, 171, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}
.tk-glow {
  position: absolute;
  z-index: -1;
  right: 4%;
  top: 50%;
  width: min(58%, 720px);
  aspect-ratio: 1;
  transform: translateY(-55%);
  pointer-events: none;
}

/* ---------- Текст ---------- */
.tk-text {
  grid-area: text;
  align-self: center;
  padding: clamp(28px, 4vw, 56px) clamp(24px, 3vw, 40px) clamp(24px, 3vw, 40px) clamp(28px, 4vw, 56px);
  min-width: 0;
}
.tk-idx {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.tk-title {
  margin: 0;
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -.01em;
  color: #E9E9ED;
  text-wrap: balance;
}
.tk-desc {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: #9397AB;
}

/* ---------- Картинка: фиксированная зона, картинка вписывается целиком ---------- */
.tk-imgwrap {
  grid-area: image;
  position: relative;
  height: clamp(300px, 46vh, 480px);
  padding: clamp(16px, 2.5vw, 36px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.tk-stage {
  width: 100%;
  height: 100%;
}
.tk-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ---------- Нижняя панель: точки слева, счётчик и кнопки справа ---------- */
.tk-controls {
  grid-area: ctrl;
  align-self: end;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(28px, 4vw, 56px) 22px;
  border-top: 1px solid #1D2129;
}
.tk-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}
.tk-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: .12em;
  color: #9397AB;
  min-width: 64px;
  text-align: center;
}
.tk-navbox { display: flex; }
.tk-navbtn,
.tk-play {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #2C3038;
  background: transparent;
  color: #B2B6CA;
  cursor: pointer;
  transition: color 200ms, border-color 200ms, background 200ms;
}
.tk-navbtn + .tk-navbtn { border-left: 0; }
.tk-navbtn:hover,
.tk-play:hover { color: #fff; border-color: var(--tk-accent, #E30613); background: rgba(255, 255, 255, .03); }
.tk-navbtn:focus-visible,
.tk-play:focus-visible { outline: 2px solid var(--tk-accent, #E30613); outline-offset: 2px; }
.tk-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
}

/* ---------- Планшет и телефон: одна колонка, картинка сверху ---------- */
@media (max-width: 900px) {
  .tk-slide {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "image"
      "text"
      "ctrl";
    min-height: 0;
  }
  .tk-imgwrap { height: clamp(220px, 52vw, 340px); }
  .tk-text { padding: 8px 24px 24px; }
  .tk-glow { right: 50%; top: 22%; width: 90%; transform: translate(50%, -50%); }
  .tk-controls { padding: 16px 24px 18px; flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .tk-controls { justify-content: center; }
  /* 22 сегмента на узком экране не помещаются в строку — хватает счётчика и полосы времени */
  .tk-dots.is-compact { display: none; }
}
