@font-face { font-family: 'Gilroy'; src: url('assets/fonts/Gilroy-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Gilroy'; src: url('assets/fonts/Gilroy-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Gilroy'; src: url('assets/fonts/Gilroy-Semibold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Gilroy'; src: url('assets/fonts/Gilroy-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Gilroy'; src: url('assets/fonts/Gilroy-Extrabold.woff2') format('woff2'); font-weight: 800; font-display: swap; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Gilroy', -apple-system, Segoe UI, Roboto, sans-serif;
  background: #f5f7fa; color: #1e293b; line-height: 1.5;
  -webkit-font-smoothing: antialiased; font-size: 18px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 42, 71, 0.04);
}
.hdr-inner { max-width: 1600px; margin: 0 auto; padding: 20px 36px; display: flex; align-items: center; gap: 28px; }
.logo { font-size: 28px; font-weight: 800; color: #0a2540; letter-spacing: -0.8px; cursor: pointer; transition: opacity .15s; }
.logo:hover { opacity: .7; }
.logo span { color: #2563eb; }

.search { flex: 1; max-width: 560px; position: relative; }
.search input {
  width: 100%; padding: 14px 48px 14px 50px;
  background: #f1f5f9; border: 2px solid transparent; border-radius: 14px;
  color: #1e293b; font-size: 17px; font-weight: 500; font-family: inherit;
  transition: background .2s, border-color .2s;
}
.search input:focus { outline: none; background: #fff; border-color: #2563eb; }
.search input::placeholder { color: #94a3b8; }
.search::before { content: '🔍'; position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 18px; opacity: .55; }
.search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%;
  background: #cbd5e1; color: #fff; display: none;
  align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; transition: background .15s;
}
.search-clear:hover { background: #94a3b8; }
.search-clear.visible { display: flex; }

.stats-mini { font-size: 15px; color: #64748b; white-space: nowrap; font-weight: 500; }
.stats-mini b { color: #0a2540; font-weight: 700; }

.hero { max-width: 1600px; margin: 0 auto; padding: 56px 36px 16px; }
.hero h1 { font-size: 52px; font-weight: 800; color: #0a2540; letter-spacing: -1.5px; margin-bottom: 14px; line-height: 1.1; }
.hero p { color: #475569; font-size: 21px; max-width: 820px; font-weight: 500; }
.stats-row { display: flex; gap: 20px; margin-top: 38px; flex-wrap: wrap; margin-left: -24px; }
.stat-num { font-size: 44px; font-weight: 800; color: #0a2540; letter-spacing: -1px; line-height: 1; }
.stat-lbl { color: #2563eb; font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; margin-top: 8px; }
.stat-card { padding: 18px 24px; border-radius: 16px; background: transparent; border: 2px solid transparent; user-select: none; transition: transform .15s, background .15s, border-color .15s, box-shadow .15s; }
.stat-card.clickable { cursor: pointer; }
.stat-card.clickable:hover {
  background: #fff;
  border-color: #2563eb;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.15);
}
.stat-card.clickable:hover .stat-num { color: #2563eb; }
.stat-card .stat-num { transition: color .15s; }

.crumbs { max-width: 1600px; margin: 0 auto; padding: 26px 36px 4px; font-size: 16px; color: #64748b; font-weight: 500; }
.crumbs a { cursor: pointer; transition: color .15s; }
.crumbs a:hover { color: #2563eb; }
.crumbs .sep { margin: 0 10px; opacity: .5; }
.crumbs .cur { color: #0a2540; font-weight: 600; }

.section { max-width: 1600px; margin: 0 auto; padding: 36px 36px 24px; }
.section-title { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; padding-bottom: 18px; border-bottom: 2px solid #e2e8f0; }
.section-title h2 { font-size: 32px; font-weight: 800; color: #0a2540; letter-spacing: -0.6px; }
.section-title .icon { font-size: 28px; }
.section-title .cnt { color: #94a3b8; font-size: 18px; font-weight: 600; margin-left: 4px; }

.toolbar { max-width: 1600px; margin: 0 auto; padding: 16px 36px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; background: #fff; padding: 6px; border-radius: 14px; border: 1px solid #e2e8f0; width: fit-content; box-shadow: 0 1px 3px rgba(15, 42, 71, 0.04); }
.tab { padding: 12px 22px; border-radius: 10px; font-size: 16px; font-weight: 600; color: #64748b; transition: background .15s, color .15s; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tab:hover { background: #f1f5f9; color: #0a2540; }
.tab.active { background: #2563eb; color: #fff; }
.tab .badge { background: rgba(255,255,255,.25); padding: 2px 8px; border-radius: 6px; font-size: 13px; font-weight: 700; }
.tab:not(.active) .badge { background: #e2e8f0; color: #64748b; }

.view-switch { display: flex; gap: 4px; background: #fff; padding: 6px; border-radius: 14px; border: 1px solid #e2e8f0; box-shadow: 0 1px 3px rgba(15, 42, 71, 0.04); }
.view-btn { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #64748b; transition: background .15s, color .15s; }
.view-btn:hover { background: #f1f5f9; color: #0a2540; }
.view-btn.active { background: #2563eb; color: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 26px; }
.card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; overflow: hidden; cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column; box-shadow: 0 1px 3px rgba(15, 42, 71, 0.04);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(15, 42, 71, 0.12); border-color: #cbd5e1; }
.card-img { aspect-ratio: 16 / 10; background: #f1f5f9; position: relative; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-img img { transform: scale(1.06); }
.card-img.empty::after { content: '📁'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 64px; opacity: .25; }
.card-body { padding: 20px 22px 22px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card-title { color: #0a2540; font-weight: 700; font-size: 19px; line-height: 1.3; letter-spacing: -0.2px; }
.card-meta { color: #64748b; font-size: 15px; font-weight: 500; }

.grid.list-view { display: flex; flex-direction: column; gap: 12px; grid-template-columns: none; }
.grid.list-view .card { flex-direction: row; align-items: stretch; border-radius: 14px; }
.grid.list-view .card:hover { transform: translateX(4px); }
.grid.list-view .card-img { width: 180px; flex-shrink: 0; aspect-ratio: auto; }
.grid.list-view .card-body { padding: 18px 24px; justify-content: center; }

.project-head { max-width: 1600px; margin: 0 auto; padding: 14px 36px 0px; }
.project-head h1 { font-size: 42px; font-weight: 800; color: #0a2540; letter-spacing: -1px; margin-bottom: 14px; line-height: 1.15; }
.project-head .desc { color: #475569; font-size: 18px; max-width: 1000px; white-space: pre-wrap; font-weight: 500; line-height: 1.55; }

.media-grid {
  max-width: 1600px; margin: 0 auto; padding: 10px 36px 80px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px;
}
.media-tile-wrap { display: flex; flex-direction: column; gap: 8px; }
.media-tile {
  aspect-ratio: 4 / 3; background: #f1f5f9; border-radius: 14px; overflow: hidden; cursor: pointer;
  position: relative; border: 1px solid #e2e8f0;
  transition: transform .2s, box-shadow .2s; display: block;
}
.media-tile:hover { transform: scale(1.03); box-shadow: 0 12px 28px rgba(15, 42, 71, 0.15); }
.media-tile img { width: 100%; height: 100%; object-fit: cover; }
.media-tile .play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 64px; color: rgba(255,255,255,.95); text-shadow: 0 6px 24px rgba(0,0,0,.5); pointer-events: none;
}
.media-tile.pdf {
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px;
  color: #2563eb; font-weight: 700; font-size: 17px; padding: 22px; text-align: center;
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.media-tile.pdf::before { content: '📄'; font-size: 64px; }
.media-tile.pdf:hover { color: #1e40af; }

.video-caption {
  color: #0a2540; font-weight: 600; font-size: 15px;
  line-height: 1.35; text-align: center; padding: 0 4px;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word;
}

.presentation-gallery { max-width: 1600px; margin: 0 auto; padding: 10px 36px 80px; }
.swiper-main {
  width: 100%; aspect-ratio: 16 / 9; background: #0a2540;
  border-radius: 14px; overflow: hidden; margin-bottom: 16px; border: 1px solid #e2e8f0;
}
.swiper-main .swiper-slide {
  display: flex; align-items: center; justify-content: center;
  background: #0a2540; cursor: zoom-in;
}
.swiper-main .swiper-slide img { width: 100%; height: 100%; object-fit: contain; }
.swiper-main .swiper-button-prev,
.swiper-main .swiper-button-next {
  color: #fff; background: rgba(10, 37, 64, .55);
  width: 54px; height: 54px; border-radius: 50%;
  backdrop-filter: blur(4px); transition: background .2s;
}
.swiper-main .swiper-button-prev:hover,
.swiper-main .swiper-button-next:hover { background: rgba(37, 99, 235, .85); }
.swiper-main .swiper-button-prev::after,
.swiper-main .swiper-button-next::after { font-size: 22px; font-weight: 800; }
.swiper-main .swiper-pagination-fraction {
  color: #fff; background: rgba(10, 37, 64, .55); width: fit-content;
  left: 50%; transform: translateX(-50%);
  padding: 6px 14px; border-radius: 20px; font-size: 14px; font-weight: 600; bottom: 14px;
}
.swiper-thumbs { width: 100%; padding: 6px 2px 2px; }
.swiper-thumbs .swiper-slide {
  width: 140px; height: 84px; opacity: .55; cursor: pointer;
  border-radius: 8px; overflow: hidden;
  border: 2px solid transparent;
  transition: opacity .2s, border-color .2s; background: #f1f5f9;
}
.swiper-thumbs .swiper-slide:hover { opacity: .85; }
.swiper-thumbs .swiper-slide-thumb-active { opacity: 1; border-color: #2563eb; }
.swiper-thumbs .swiper-slide img { width: 100%; height: 100%; object-fit: cover; }

.empty-msg { text-align: center; padding: 100px 20px; color: #64748b; font-size: 17px; font-weight: 500; }
.empty-msg h3 { color: #0a2540; font-size: 26px; margin-bottom: 10px; font-weight: 700; }

.group-section { padding-top: 20px; padding-bottom: 28px; scroll-margin-top: 100px; }
.group-divider { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; padding-top: 10px; }
.group-label { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 800; color: #0a2540; letter-spacing: -0.4px; white-space: nowrap; }
.group-label .icon { font-size: 26px; }
.group-label .cnt { color: #94a3b8; font-weight: 600; font-size: 17px; }
.group-line { flex: 1; height: 2px; background: linear-gradient(90deg, #cbd5e1, transparent); border-radius: 2px; }

@media (max-width: 1100px) {
  body { font-size: 17px; }
  .hero h1 { font-size: 44px; }
  .hero p { font-size: 19px; }
  .section-title h2 { font-size: 28px; }
  .project-head h1 { font-size: 36px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
}
@media (max-width: 780px) {
  .hdr-inner { flex-wrap: wrap; padding: 14px 18px; gap: 14px; }
  .stats-mini { display: none; }
  .hero { padding: 34px 18px 10px; }
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 17px; }
  .stats-row { gap: 28px; margin-top: 28px; }
  .stat-num { font-size: 32px; }
  .section, .crumbs, .project-head, .media-grid, .toolbar, .presentation-gallery { padding-left: 18px; padding-right: 18px; }
  .section-title h2 { font-size: 24px; }
  .project-head h1 { font-size: 28px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card-title { font-size: 16px; }
  .card-body { padding: 14px 16px 16px; }
  .tab { padding: 10px 16px; font-size: 14px; }
  .group-label { font-size: 19px; }
  .swiper-thumbs .swiper-slide { width: 92px; height: 56px; }
  .swiper-main .swiper-button-prev,
  .swiper-main .swiper-button-next { width: 42px; height: 42px; }
  .swiper-main .swiper-button-prev::after,
  .swiper-main .swiper-button-next::after { font-size: 16px; }
  .video-caption { font-size: 13px; }
}

.description-section { 
    margin: 20px 0; 
    background-size: cover;
    background-position: top left 360px;
}
.description {
  /* background: var(--card-bg, #fff); */
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 24px 28px;
  line-height: 1.65;
  font-size: 16px;
  color: var(--text, #1f2937);
  max-width: 900px;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(66px);
}
.description-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 14px 0;
  line-height: 1.3;
  color: var(--text, #111);
}
.description p {
  margin: 0 0 12px 0;
}
.description p:last-child { margin-bottom: 0; }

.keywords-section { margin: 10px 0 20px; }
.keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.kw-chip {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(59,130,246,0.08);
  color: #2563eb;
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .description { padding: 18px 16px; font-size: 15px; }
  .description-title { font-size: 18px; }
}

.match-info { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.match-badge {
  display: inline-block; align-self: flex-start;
  font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  padding: 3px 9px; border-radius: 6px;
  background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe;
}
.match-badge.kw { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }

.search-snippet {
  font-size: 13px; color: #64748b; line-height: 1.5;
  background: #f8fafc; border-left: 3px solid #cbd5e1;
  padding: 8px 10px; border-radius: 0 6px 6px 0;
  word-break: break-word;
}
.search-snippet mark {
  background: #fde68a; color: #0a2540;
  padding: 0 2px; border-radius: 2px; font-weight: 600;
}

/* ===== Таблицы тех. характеристик внутри .description (аккордеон) ===== */
.spec-tables-inline {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.description > .spec-tables-inline:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.spec-table-block {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.spec-table-block[open] {
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(15, 42, 71, 0.05);
}

/* Заголовок-аккордеон */
.spec-table-title {
  list-style: none;            /* убираем стандартный маркер */
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-size: 17px;
  font-weight: 700;
  color: #0a2540;
  letter-spacing: -0.2px;
  line-height: 1.3;
  background: #f8fafc;
  transition: background .15s, color .15s;
}
.spec-table-title:hover { background: #f1f5f9; color: #1e40af; }
.spec-table-title::-webkit-details-marker { display: none; } /* Safari */
.spec-table-title::marker { content: ''; }                   /* Firefox */

.spec-table-block[open] .spec-table-title {
  background: #eff6ff;
  border-bottom: 1px solid #dbeafe;
}

.spec-chevron {
  display: inline-block;
  font-size: 14px;
  color: #2563eb;
  transition: transform .2s ease;
  flex-shrink: 0;
  width: 14px;
  text-align: center;
}
.spec-table-block[open] .spec-chevron { transform: rotate(90deg); }

.spec-title-text { flex: 1; }

/* Содержимое таблицы */
.spec-table-wrap {
  overflow-x: auto;
  background: #fff;
}
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  color: #1e293b;
}
.spec-table th,
.spec-table td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #eef2f7;
  white-space: pre-wrap;
  word-break: break-word;
}
.spec-table thead th {
  background: #f1f5f9;
  color: #0a2540;
  font-weight: 700;
  border-bottom: 2px solid #cbd5e1;
}
.spec-table tbody tr:nth-child(odd)  { background: #fcfcfd; }
.spec-table tbody tr:hover           { background: #f1f5f9; }
.spec-table tbody tr:last-child td   { border-bottom: none; }
.spec-table td:first-child,
.spec-table th:first-child { font-weight: 600; color: #0a2540; }

.spec-table-empty {
  color: #64748b;
  font-size: 15px;
  padding: 14px 18px;
  background: #f8fafc;
  margin: 0;
}

/* Лёгкая анимация раскрытия (поддерживают современные браузеры) */
@supports (interpolate-size: allow-keywords) {
  .spec-table-block::details-content {
    height: 0;
    overflow: clip;
    transition: height .25s ease, content-visibility .25s allow-discrete;
  }
  .spec-table-block[open]::details-content {
    height: auto;
  }
}

@media (max-width: 640px) {
  .spec-table { font-size: 14px; }
  .spec-table th, .spec-table td { padding: 8px 10px; }
  .spec-table-title { font-size: 16px; padding: 12px 14px; }
}

/* ===== Акценты для поиска ===== */
.match-badge.prod {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}
.card.is-product {
  outline: 2px solid transparent;
  position: relative;
}
.card.is-product::before {
  content: 'Продукция';
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: rgb(9 43 89 / 92%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}