/**
 * TVK PLASTIC — Inner pages (products, about, documents, services)
 * Extends main.css · Yandex-style blocks
 */
@import url("tvk-gpi-transport-ribbon.css?v=1.3");
@import url("tvk-product-specs.css?v=1.0");

/* Page shell */
.product-page main,
.tvk-inner-page main,
body:not(.home-page) main {
  background: var(--bg-base);
}

.page-hero {
  padding: calc(var(--header-h) + 24px) 0 clamp(32px, 4vw, 48px);
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-base) 100%);
  border-bottom: 1px solid var(--bg-border);
}

.page-hero .container,
.page-hero .hero-grid {
  display: grid; gap: clamp(24px, 4vw, 40px);
  align-items: start;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  max-width: 20ch;
}

.page-hero .hero-lead,
.page-hero .hero-lead--offer {
  font-size: 1.0625rem; color: var(--text-secondary);
  line-height: 1.6; max-width: 62ch;
}

.hero-points, .bullet-list {
  list-style: none; display: flex; flex-direction: column; gap: 10px;
  margin-top: 16px; padding: 16px 20px;
  border-radius: var(--radius-lg); background: var(--bg-elevated);
  border: 1px solid var(--bg-border); border-left: 4px solid var(--data);
}

.hero-points li, .bullet-list li {
  font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.55;
  padding-left: 0; position: relative;
}

.hero-points strong, .bullet-list strong { color: var(--text-primary); }

.page-section {
  padding-block: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--bg-border);
}

.page-section:nth-child(even) { background: var(--bg-surface); }

.page-grid {
  display: grid; gap: clamp(20px, 3vw, 32px);
  grid-template-columns: 1fr;
  align-items: start;
}

.content-stack {
  display: flex; flex-direction: column; gap: 16px;
  min-width: 0;
}

/* Yandex-style content blocks */
.content-card {
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-top: 3px solid var(--accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.content-card h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--bg-border);
}

.content-card h3 { font-size: 1.125rem; margin-bottom: 12px; }

.content-card p,
.content-card li,
.card-intro {
  font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.6;
}

.content-card .card-intro { margin-bottom: 16px; }

.side-card {
  padding: clamp(24px, 3vw, 32px);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  position: static;
  top: auto;
}

/* Анкета в правой колонке — липнет к экрану при скролле */
@media (min-width: 901px) {
  .page-grid > #contact,
  .page-grid > aside#contact.side-card,
  .page-grid > .side-card#contact {
    position: sticky;
    top: calc(var(--header-h, 64px) + 12px);
    align-self: start;
    z-index: 30;
    max-height: calc(100dvh - var(--header-h, 64px) - 20px);
    overflow-y: auto;
  }
}

/* Hero: не липнет поверх блока статистики (иначе «призрачный» текст KPI) */
.page-hero .side-card,
.page-hero aside.side-card {
  position: static;
  top: auto;
}

.page-hero {
  overflow: hidden;
  isolation: isolate;
}

.product-page .page-hero {
  overflow: visible;
  isolation: isolate;
}

.tvk-inner-page .page-hero {
  overflow: visible;
  isolation: isolate;
}

.tvk-inner-band {
  position: relative;
  z-index: 2;
}

.side-card h3:not(.lead-form__title) {
  font-size: 1.125rem; margin-bottom: 16px;
  padding-bottom: 10px; border-bottom: 1px solid var(--bg-border);
}

/* Анкета в боковой колонке — заголовок по центру */
form.lead-form .lead-form__title,
.side-card .lead-form .lead-form__title,
#contact .lead-form .lead-form__title {
  text-align: center !important;
  width: 100% !important;
  text-transform: none !important;
}

form.lead-form > .form-note,
.side-card .lead-form > .form-note,
#contact .lead-form > .form-note {
  text-align: center !important;
  width: 100% !important;
}

.product-media .product-photo {
  margin: 12px 0; border-radius: var(--radius-md);
  overflow: hidden; background: var(--bg-base);
  border: 1px solid var(--bg-border);
}

.product-media .product-photo img,
.product-media .product-photo video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.product-caption { font-size: 0.875rem; color: var(--text-muted); margin-top: 12px; }

.product-nav a {
  display: block; padding: 10px 14px; margin-top: 8px;
  border-radius: var(--radius-md); font-size: 0.875rem; font-weight: 500;
  color: var(--text-secondary); text-decoration: none;
  background: var(--bg-elevated); border: 1px solid var(--bg-border);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.product-gpi-accessories-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.product-nav a:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.product-gpi-accessories-btn:hover {
  background: var(--accent);
  color: #0a0c10;
  border-color: var(--accent);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.product-nav { margin-top: 20px; }

/* Tables */
.table-shell, .tvk-table-scroll, .product-table {
  margin-top: 16px; border-radius: var(--radius-md);
  border: 1px solid var(--bg-border); overflow: hidden;
}

.table-shell table, .product-table table,
.content-card table {
  width: 100%; border-collapse: collapse; font-size: 0.875rem;
}

.table-shell th, .product-table th, .content-card table th {
  padding: 12px 14px; text-align: left; font-size: 0.6875rem;
  font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted); background: var(--bg-base);
  border-bottom: 1px solid var(--bg-border);
}

.table-shell td, .product-table td, .content-card table td {
  padding: 11px 14px; color: var(--text-secondary);
  border-bottom: 1px solid var(--bg-border);
}

.table-shell tbody tr:hover td,
.product-table tbody tr:hover td,
.content-card table tbody tr:hover td {
  background: rgba(0, 201, 167, 0.04); color: var(--text-primary);
}

.product-note { margin-top: 12px; font-size: 0.8125rem; color: var(--text-muted); }

/* Documents grid */
.documents-grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  align-items: stretch;
}

/* Каталог комплектующих: фото в .document-card */
.document-card .catalog-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-border);
  background: var(--bg-base);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.document-card .catalog-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 8px;
  box-sizing: border-box;
}

@media (min-width: 1280px) {
  .tvk-inner-page--download .documents-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.document-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 100%;
  padding: clamp(24px, 3vw, 32px);
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-left: 4px solid var(--data);
  transition: transform var(--transition), border-color var(--transition);
}

.document-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 201, 167, 0.4);
}

.document-card h3 {
  font-size: 1.125rem;
  margin-bottom: 10px;
}

.document-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.document-card .doc-meta {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
}

.document-card .button,
.document-card > a.button {
  margin-top: auto;
  padding-top: 14px;
  width: 100%;
  max-width: 100%;
  align-self: stretch;
  flex: 0 0 auto;
}

.documents-cta { margin-top: 24px; }

/* Inner hero stats band */
.tvk-inner-band { padding-bottom: clamp(24px, 3vw, 40px); }

.tvk-inner-stats__grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}

.tvk-inner-stat {
  min-height: 100px; padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-top: 3px solid var(--data);
}

.tvk-inner-stat__value {
  display: block; font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800; color: var(--data); letter-spacing: -0.03em;
  font-family: var(--font-mono);
}

.tvk-inner-stat__label {
  display: block; margin-top: 6px;
  font-size: 0.875rem; color: var(--text-secondary);
}

.mission-values-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}

.mission-values .content-card { text-align: center; border-top-color: var(--data); }

/* Breadcrumbs */
.breadcrumbs, .page-breadcrumbs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 16px; font-size: 0.8125rem; color: var(--text-muted);
}

.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--data); }

/* Product hero accents */
.product-hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; margin-bottom: 4px;
  border-radius: var(--radius-md);
  font-size: 0.8125rem; font-weight: 600; color: var(--data);
  background: var(--data-dim); border: 1px solid rgba(0, 201, 167, 0.25);
}
.product-hero-badge__link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.product-hero-badge__link:hover { color: var(--text-primary); }

.eyebrow--heat-square::before {
  content: ""; display: inline-block; width: 8px; height: 8px;
  margin-right: 8px; background: var(--accent); vertical-align: middle;
}

/* Video instructions (services pages) */
.video-instruction-grid {
  display: grid;
  gap: clamp(20px, 3vw, 28px);
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .video-instruction-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.video-instruction-card .video-embed-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 14px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--bg-border);
  background: var(--bg-base);
}

.video-instruction-card .video-embed-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-instructions-rutube-more {
  margin-top: clamp(24px, 4vw, 36px);
  padding-top: clamp(20px, 3vw, 28px);
  border-top: 1px solid var(--bg-border);
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 56rem;
}

.video-instructions-rutube-more a {
  color: var(--data);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}

.video-instructions-rutube-more a:hover {
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .video-instruction-card h3 {
    font-size: 1rem;
    line-height: 1.35;
  }

  .video-instruction-grid {
    gap: 16px;
  }
}

/* Product pages — unified shell */
.product-page main {
  background: var(--bg-base);
  overflow-x: visible;
}

/* Продуктовые карточки — без «шара» снизу и лишних полей */
body.product-page::before,
body.product-page::after {
  display: none !important;
  content: none !important;
}

.product-page .page-hero {
  padding: calc(var(--header-h) + 16px) 0 24px;
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-base) 100%);
  border-bottom: 1px solid var(--bg-border);
}

.product-page .page-hero .container,
.product-page .page-hero .hero-grid {
  gap: 20px;
}

.product-page .page-section {
  padding-block: 28px 32px;
}

.product-page .page-section.gpi-ribbon-section {
  padding-block: 32px 40px;
}

.product-page .content-stack {
  gap: 12px;
}

.product-page .content-card {
  padding: 20px 22px;
}

.product-page .content-card h2 {
  margin-bottom: 12px;
  padding-bottom: 8px;
}

.product-page .hero-points,
.product-page .bullet-list {
  margin-top: 12px;
  padding: 12px 16px;
}

.product-page .page-grid {
  align-items: start;
  gap: 20px;
}

.product-page .page-grid > .side-card#contact {
  padding: 20px 22px;
  padding-block: 20px 22px;
  align-self: start;
  justify-self: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}

.product-page .page-hero .product-media {
  position: relative;
  z-index: 2;
  isolation: isolate;
}

.product-page .page-hero .hero-copy {
  overflow: visible;
  max-width: none;
  min-width: 0;
}

.product-page .page-hero .hero-copy .hero-lead,
.product-page .page-hero .hero-copy .hero-points {
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.product-page .product-media {
  border-radius: var(--radius-xl);
  border: 1px solid var(--bg-border);
  background: var(--bg-elevated);
  overflow: hidden;
}

.product-page .content-stack .engineering-section,
.product-page .engineering-section--embed {
  grid-column: 1 / -1;
  margin: 8px 0 12px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

.product-page .engineering-section .section-heading {
  margin-bottom: 12px;
}

.product-page .engineering-section .section-intro {
  margin-bottom: 0;
}

.product-page .gpi-ribbon-section .section-heading {
  margin-bottom: 16px;
}

/* Заголовок ленты логистики — по центру (все страницы с gpi-ribbon-section) */
.gpi-ribbon-section .section-heading,
.product-page .gpi-ribbon-section .section-heading {
  text-align: center !important;
  margin-inline: auto !important;
  max-width: min(920px, 100%);
  justify-items: center;
}

.gpi-ribbon-section .section-heading .eyebrow,
.product-page .gpi-ribbon-section .section-heading .eyebrow {
  justify-content: center;
}

.gpi-ribbon-section .section-heading .eyebrow::after,
.product-page .gpi-ribbon-section .section-heading .eyebrow::after {
  background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.85), transparent);
}

.gpi-ribbon-section .section-heading h2,
.product-page .gpi-ribbon-section .section-heading h2 {
  margin-inline: auto;
  text-align: center !important;
}

.gpi-ribbon-section .section-heading .section-intro,
.product-page .gpi-ribbon-section .section-heading .section-intro {
  margin-inline: auto !important;
  text-align: center !important;
  max-width: 62ch;
}

.gpi-ribbon-section .section-heading .tvk-heading-sweep::after,
.product-page .gpi-ribbon-section .section-heading .tvk-heading-sweep::after {
  left: 50%;
  right: auto;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
}

.gpi-ribbon-section .section-heading .tvk-heading-sweep.is-swept::after,
.product-page .gpi-ribbon-section .section-heading .tvk-heading-sweep.is-swept::after {
  transform: translateX(-50%) scaleX(1);
}

.gpi-ribbon-section > .container,
.product-page .gpi-ribbon-section > .container {
  display: flex;
  justify-content: center;
}

/* размеры ленты на карточках продукта — tvk-gpi-transport-ribbon.css */

/* Inner / download — без двойных рамок и лишних эффектов */
.page-hero .side-card.content-card,
.page-hero .side-card.side-card--form {
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-top: 1px solid var(--bg-border);
  box-shadow: none;
}

.page-hero .side-card.content-card::before,
.page-hero .side-card.content-card::after,
.page-hero .side-card.side-card--form::before,
.page-hero .side-card.side-card--form::after {
  display: none !important;
}

/* Documents page: hero media card (as product pages) */
.download-page .page-hero .product-media {
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  box-shadow: none;
}

.document-card.content-card {
  padding: clamp(24px, 3vw, 32px);
  border-top: 3px solid var(--data);
  box-shadow: none;
}

.document-card.content-card.beautiful-card:hover,
.document-card:hover {
  transform: none;
}

.download-page .page-hero,
.tvk-inner-page .page-hero {
  padding-top: calc(var(--header-h) + 20px);
}

.download-page .page-hero .hero-grid,
.tvk-inner-page .page-hero .hero-grid {
  align-items: start;
  gap: clamp(24px, 3vw, 40px);
}

/* Documents hero: layout handled by override below */

@media (max-width: 1023px) {
  .download-page .page-hero .side-card,
  .tvk-inner-page .page-hero .side-card {
    position: static;
    order: 2;
  }
}

.content-card-lifted {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  border-top-width: 4px;
}

.document-card.content-card { border-top: none; border-left-width: 4px; }

.content-card.beautiful-card:hover,
.document-card:hover {
  border-color: rgba(0, 201, 167, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24);
}

.content-card.beautiful-card { transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition); }

/* Footer on inner pages */
.site-footer:not(#contact) {
  padding-block: clamp(32px, 4vw, 48px);
  background: var(--bg-surface);
  border-top: 1px solid var(--bg-border);
}

@media (min-width: 768px) {
  .page-hero .container,
  .page-hero .hero-grid { grid-template-columns: 1.2fr 0.8fr; }
  body.tvk-inner-page--contacts .page-hero .hero-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    justify-items: center;
  }
  .page-grid { grid-template-columns: 1fr min(360px, 32%); }
  .tvk-inner-stats__grid { grid-template-columns: repeat(3, 1fr); }
}

/* Documents hero: force video right column on desktop (override generic hero-grid) */
@media (min-width: 900px) {
  body.download-page .page-hero .hero-grid,
  body.tvk-inner-page--download .page-hero .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr) !important;
    align-items: stretch !important;
    max-width: none !important;
  }

  body.download-page .page-hero .product-media,
  body.tvk-inner-page--download .page-hero .product-media {
    max-width: 520px !important;
    align-self: stretch !important;
    justify-self: end !important;
  }

  body.download-page .page-hero .product-media .product-photo,
  body.tvk-inner-page--download .page-hero .product-media .product-photo {
    margin: 12px 0;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (min-width: 1024px) {
  .tvk-inner-stats__grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 900px) {
  .mission-values-grid { grid-template-columns: 1fr; }
  .side-card { position: static; }

  .product-page .page-hero .hero-copy {
    display: flex !important;
    flex-direction: column !important;
  }

  .product-page .page-hero .hero-copy > * {
    order: unset !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .product-page .page-grid {
    grid-template-columns: 1fr !important;
  }

  .product-page .page-grid > .content-stack,
  .product-page .page-grid > .side-card#contact {
    grid-column: 1;
    grid-row: auto;
  }

  .product-page .page-grid > .side-card#contact {
    order: 10;
    margin-top: 8px;
    max-width: 100%;
  }
}

/* Продуктовые: сетка и таблицы не «съезжают» */
.product-page .page-hero .hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: clamp(16px, 2.5vw, 24px);
  align-items: start;
}

.product-page .page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: clamp(20px, 2.5vw, 32px);
  align-items: start;
}

.product-page .page-grid > .content-stack {
  grid-column: 1;
  grid-row: auto;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  position: relative;
  z-index: auto;
}

.product-page .page-grid > .side-card#contact {
  grid-column: 2;
  grid-row: auto;
}

.product-page .content-stack,
.product-page .table-shell,
.product-page .u-table-scroll {
  min-width: 0;
  max-width: 100%;
}

.product-page .table-shell,
.product-page .u-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.product-page .content-card .card-intro {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 16px;
  clear: both;
}

.product-page .content-card .card-intro .button {
  position: static;
  display: inline-flex;
  vertical-align: baseline;
  margin: 0;
}

.product-page .page-section {
  overflow: visible;
}

.product-page main {
  padding-bottom: 48px;
}

@media (min-width: 992px) {
  .product-page .page-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gpi-transport-ribbon-track { animation: none; }
}
