/* ───────────────────────────────
   RESET & BASE
─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Arial, sans-serif;
  background-color: #00162B;
  color: #fff;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ───────────────────────────────
   CSS VARIABLES
─────────────────────────────── */
:root {
  --bg:           #00162B;
  --bg-dark:      #1C202D;
  --bg-card:      #2C3B4C;
  --accent:       #FF8368;
  --text-muted:   #787B86;
  --text-light:   #BBBBC9;
  --text-dim:     #D2D2DF;
  --border:       rgba(255,255,255,0.12);
  --border-nav:   #56718F;
  --max-w:        1280px;
  --px:           clamp(16px, 4vw, 80px);
  --header-h:     128px;
}

/* ───────────────────────────────
   COOKIE BANNER
─────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 960px;
  background: #1C202D;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.cookie-banner p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-light);
  flex: 1;
}
.cookie-banner p a { color: var(--accent); }
.cookie-actions { display: flex; gap: 12px; flex-shrink: 0; flex-wrap: wrap; }
.btn-cookie-accept {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-cookie-settings {
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 10px 20px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-cookie-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}

/* ───────────────────────────────
   HEADER / NAV
   Базовая раскладка .header/.header-inner теперь общая — в home/styles.css.
─────────────────────────────── */
.header-logo { display: flex; align-items: center; flex-shrink: 0; }
.header-logo img { width: 64px; height: 64px; object-fit: contain; }
.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav a {
  font-family: 'Play', Arial, sans-serif;
  font-size: 16px;
  color: var(--text-light);
  padding: 8px 14px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}
.header-nav a:hover { background: var(--border); color: #fff; }
.header-nav a.active { color: var(--accent); }
.nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: inherit;
  opacity: 0.85;
}
.nav-arrow svg {
  display: block;
  width: 16px;
  height: 16px;
}
.header-nav a.active .nav-arrow {
  opacity: 1;
}
.header-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.header-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}
.header-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header-burger.open span:nth-child(2) { opacity: 0; }
.header-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ───────────────────────────────
   MOBILE MENU
─────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 80px;
  left: 0; right: 0; bottom: 0;
  background: #00162B;
  z-index: 998;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
.mobile-menu.open { display: flex; }
.mobile-nav-list { flex: 1; list-style: none; padding: 0; margin: 0; }
.mobile-nav-item { border-top: 1px solid var(--border-nav); }
.mobile-nav-item:last-child { border-bottom: 1px solid var(--border-nav); }
.mobile-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.mobile-nav-row-link {
  font-family: 'Play', Arial, sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
}
.mobile-nav-chevron {
  flex-shrink: 0;
  width: 20px; height: 20px;
  transition: transform 0.3s ease;
  color: var(--border-nav);
}
.mobile-nav-item.expanded .mobile-nav-chevron { transform: rotate(180deg); }
.mobile-nav-sub {
  list-style: none;
  padding: 4px 20px 24px;
  margin: 0;
  display: none;
  flex-direction: column;
  gap: 12px;
}
.mobile-nav-item.expanded .mobile-nav-sub { display: flex; }
.mobile-nav-sub a { font-family: Arial, sans-serif; font-size: 16px; color: var(--text-light); transition: color 0.2s; }
.mobile-nav-sub a:hover { color: #fff; }
.mobile-nav-row.plain a {
  display: block;
  font-family: 'Play', Arial, sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
}
.mobile-menu-contacts { flex-shrink: 0; }
.mobile-contacts-header { border-top: 1px solid var(--border-nav); padding: 20px; font-size: 16px; color: #fff; }
.mobile-contacts-body { padding: 4px 20px 32px; display: flex; flex-direction: column; gap: 12px; }
.mobile-contact-row { display: flex; align-items: center; gap: 12px; font-size: 16px; color: #fff; }
.mobile-contact-row a { color: #fff; transition: color 0.2s; }
.mobile-contact-row a:hover { color: var(--text-light); }
.mobile-contact-icon { flex-shrink: 0; width: 20px; height: 20px; }
.mobile-social-row { display: flex; gap: 12px; margin-top: 28px; }
.mobile-social-btn { display: block; width: 56px; height: 56px; border-radius: 5px; overflow: hidden; transition: opacity 0.2s; }
.mobile-social-btn:hover { opacity: 0.8; }
.mobile-social-btn img { width: 56px; height: 56px; display: block; }

/* ───────────────────────────────
   BREADCRUMB WRAP
   Sits between fixed header and hero block.
   Provides header offset + horizontal alignment.
─────────────────────────────── */
.page-crumb-wrap {
  /* Отступ под fixed-хедер теперь общий (body:not(.home) в home/styles.css) */
  padding-top: 20px;
  padding-bottom: 16px;
  padding-left: 42px;
  padding-right: 42px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--border-nav); transition: color 0.2s; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb-sep {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--border-nav);
  border-radius: 1px;
  flex-shrink: 0;
}
.breadcrumb-current { color: #fff; }

/* ───────────────────────────────
   PAGE HERO
   Figma: tall rounded card, 20px side margins,
   background image + gradient overlay.
   Title left, CTA buttons bottom-right.
─────────────────────────────── */
.page-hero {
  margin: 0 42px;
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(250deg, rgba(0,22,43,0) 0%, rgba(0,22,43,0.65) 100%),
    url('../home/images/reestr.png') center / cover no-repeat;
  position: relative;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Left-side scrim so text stays readable */
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,22,43,0.55) 0%, rgba(0,22,43,0) 65%);
  pointer-events: none;
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  padding: 0 48px 44px;
}

/* Title + CTA row */
.page-hero-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.page-hero-title {
  font-family: 'Play', Arial, sans-serif;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.06;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,22,43,0.55);
}
.page-hero-subtitle {
  font-size: clamp(15px, 1.5vw, 20px);
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--text-light);
  max-width: 600px;
  margin-top: 12px;
}
.page-hero-actions { display: flex; gap: 12px; flex-shrink: 0; align-items: center; }

/* CTA buttons — match Figma exactly */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  padding: 14px 28px;
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  border-radius: 8px;
  background: rgba(44,59,76,0.5);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: -2px 2px 4px rgba(0,22,43,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(215deg, rgba(255,131,104,0.85) 0%, rgba(43,58,74,0) 100%);
  opacity: 0;
  transition: opacity .3s;
}
.btn-primary span { position: relative; z-index: 1; }
.btn-primary:hover::after { opacity: 1; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  border-radius: 8px;
  background: rgba(44,59,76,0.5);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: -2px 2px 4px rgba(0,22,43,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity 0.2s;
  white-space: nowrap;
  cursor: pointer;
}
.btn-secondary:hover { opacity: 0.85; }

/* ───────────────────────────────
   TABS BAR
   Figma: 96px tall rounded block, 20px side margins,
   border on all sides with border-radius.
   Left: "Реестр" label (32px Arial).
   Right: named tabs with icons.
─────────────────────────────── */
/* Обёртка: tabs-bar + registry-section в одном bordered блоке */
.registry-frame {
  margin: 28px 42px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: visible; /* нельзя hidden — обрезает абсолютный дропдаун */
}

.tabs-bar {
  /* margin и border убраны — теперь задаёт registry-frame */
  border-bottom: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
  background: var(--bg);
  overflow: visible; /* нельзя hidden — обрезает абсолютный дропдаун */
}
.tabs-bar-inner {
  display: flex;
  align-items: stretch;
  height: 96px;
  /* no max-width/centering — full width of the block */
}

/* Поиск по карточкам */
.tabs-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  flex: 1;
  border-right: 1px solid var(--border);
  border-radius: 12px 0 0 0;
}
.tabs-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 15px;
  width: 100%;
  min-width: 0;
}
.tabs-search-input::placeholder { color: #56718F; }
/* Нативный крестик у input[type=search] — свой стоит рядом, в разметке */
.tabs-search-input::-webkit-search-cancel-button { display: none; }

/* Лупа — кнопка отправки формы, визуально та же иконка */
.tabs-search-btn {
  flex: none;
  display: flex;
  align-items: center;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

/* Сброс поиска — показывается, только когда запрос не пуст */
.tabs-search-clear {
  flex: none;
  padding: 0 4px;
  color: #787B86;
  font-size: 22px;
  line-height: 1;
  text-decoration: none;
  transition: color 0.2s;
}
.tabs-search-clear:hover { color: #fff; }

/* Tab list — pushed to the right */
.tabs-list {
  display: flex;
  align-items: stretch;
  margin-left: auto;
  overflow: visible; /* НЕ hidden/auto — обрезает абсолютный дропдаун */
  scrollbar-width: none;
}
.tabs-list::-webkit-scrollbar { display: none; }

.tab-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 32px;
  font-family: Arial, sans-serif;
  font-size: 16px;
  color: var(--text-light);
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  outline: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
  flex-shrink: 0;
}
.tab-item:hover { color: #fff; background: rgba(255,255,255,0.04); }
/* Правый край tabs-bar — скругление на последнем элементе */
.tabs-list > *:last-child,
.tab-dropdown-wrap:last-child .tab-dropdown-trigger { border-radius: 0 12px 12px 0; }

/* "Лучшая практика" — active, gradient fill */
.tab-item.tab-best {
  background: none;
  color: var(--text-light);
}
.tab-item.tab-best--active {
  background: none;
  color: #fff;
}

/* Star icon inside "Лучшая практика" */
.tab-star {
  color: var(--accent);
  flex-shrink: 0;
  width: 18px; height: 18px;
}

/* Check badge inside "Лучшая практика" — всегда виден */
.tab-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  flex-shrink: 0;
}
.tab-check svg { width: 16px; height: 16px; }

/* Квадрат чекбокса: по умолчанию контур */
.tab-check-box {
  stroke: rgba(255,255,255,0.35);
  fill: none;
  transition: stroke 0.2s, fill 0.2s;
}
/* Галочка: скрыта по умолчанию */
.tab-check-mark { opacity: 0; transition: opacity 0.2s; }

/* Активное состояние */
.tab-best--active .tab-check-box {
  fill: var(--accent);
  stroke: var(--accent);
}
.tab-best--active .tab-check-mark { opacity: 1; }

/* Chevron icon on "Направления" / "Технологии" */
.tab-chevron {
  flex-shrink: 0;
  width: 16px; height: 16px;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.tab-item:hover .tab-chevron { color: #fff; }

/* ───────────────────────────────
   DROPDOWN — десктоп: абсолютный, мобайл: раскрывается inline
─────────────────────────────── */
.tab-dropdown-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
}
.tab-dropdown-trigger {
  /* те же стили что у .tab-item */
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 32px;
  font-family: Arial, sans-serif;
  font-size: 16px;
  color: var(--text-light);
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}
.tab-dropdown-trigger:hover { color: #fff; background: rgba(255,255,255,0.04); }
.tab-dropdown-wrap.open .tab-dropdown-trigger { color: #fff; }

/* Панель — абсолютная на десктопе */
.tab-dropdown-panel {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  width: max-content;
  min-width: 100%;
  max-width: 340px;
  background: #00162B;
  border: 1px solid var(--border);
  border-radius: 0;
  z-index: 200;
  box-shadow: 0 8px 16px rgba(0,0,0,0.4);
  overflow: hidden;
}
.tab-dropdown-wrap.open .tab-dropdown-panel { display: flex; }
.tab-dropdown-wrap.open .tab-chevron { transform: rotate(180deg); }
/* Последний дропдаун (Технологии) — прижат к правому краю блока,
   чтобы не вылезал за пределы страницы */
.tab-dropdown-wrap:last-child .tab-dropdown-panel { left: auto; right: 0; }

/* Строки в панели */
.dd-item {
  /* строка — <label> с чекбоксом внутри, поэтому relative + pointer */
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #2E2E39;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.dd-item:first-child { border-top: none; }
.dd-item:hover { background: rgba(255,255,255,0.04); }
.dd-item--active {
  background: linear-gradient(-32deg, #00162B 33%, rgba(255,131,104,0.55) 100%);
}
.dd-item-name {
  flex: 1;
  /* min-width: 0 — иначе flex-элемент не сжимается уже контента,
     и длинное название выталкивает счётчик и чекбокс за край панели */
  min-width: 0;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}
.dd-item-count {
  font-family: 'Play', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #FF8368;
  flex-shrink: 0;
}
/* Чекбокс. Нативный input прячем, но оставляем в потоке фокуса —
   рисуем квадрат .dd-item-check, галочка внутри появляется только
   у отмеченного пункта (раньше svg был виден всегда, и все строки
   выглядели выбранными). */
.dd-item-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}
.dd-item-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 5px;
  flex-shrink: 0;
  color: #fff;
  transition: border-color 0.15s, background 0.15s;
}
.dd-item-check svg {
  width: 12px;
  height: 12px;
  opacity: 0;
  transition: opacity 0.15s;
}
.dd-item-input:checked ~ .dd-item-check {
  border-color: var(--accent);
  background: var(--accent);
}
.dd-item-input:checked ~ .dd-item-check svg { opacity: 1; }
.dd-item-input:focus-visible ~ .dd-item-check {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* «Все направления» / «Все технологии» — сброс группы, не чекбокс:
   выравниваем на место отсутствующего квадрата */
.dd-item--reset { padding-right: 58px; }

/* Кнопка для случая без JS: с JS форма уходит по change */
.dd-apply {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-top: 1px solid #2E2E39;
  background: var(--accent);
  color: #00162B;
  font: 700 14px/1.4 Arial, sans-serif;
  cursor: pointer;
}

/* Счётчик выбранных в шапке дропдауна */
.tab-selected-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--accent);
  color: #00162B;
  font: 700 12px/1 Arial, sans-serif;
}

/* ───────────────────────────────
   CARDS SECTION (inside registry-frame)
─────────────────────────────── */
.registry-section {
  padding: 48px 40px 80px;
}
.registry-inner {
  /* max-width убран — карточки растягиваются на всю ширину frame */
}

/* Section heading: total count */
.registry-heading {
  font-family: 'Play', Arial, sans-serif;
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 32px;
}
.registry-heading span { color: var(--accent); }

/* ───────────────────────────────
   CARDS GRID
   Figma: 3 cards per row, gap 19px, card height 460px
─────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 19px;
}

/* Individual card */
.solution-card {
  display: flex;
  flex-direction: column;
  gap: 25px;
  height: 460px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s;
}
.solution-card:hover,
.solution-card:focus-within { transform: translateY(-4px); }

/* ── Image section (top, ~218px) with triangle clips ── */
.card-image {
  position: relative;
  flex: 0 0 218px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(0,13,25,1) 0%, rgba(30,45,60,1) 100%);
  clip-path: polygon(
    0 0,
    calc(100% - 52px) 0,
    100% 48px,
    100% 100%,
    58px 100%,
    0 calc(100% - 60px)
  );
}
.card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Orange glow on content — only on hover/focus */
.card-hover-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(227deg, rgba(255,131,104,0.55) 0%, rgba(255,131,104,0) 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  border-radius: 8px;
}
.solution-card:hover .card-hover-glow,
.solution-card:focus-within .card-hover-glow { opacity: 1; }

/* Star badge for best-practice */
.card-star {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 6px rgba(0,22,43,0.75));
  flex-shrink: 0;
}

/* ── Content section (bottom, fills rest) ── */
.card-content {
  position: relative;
  flex: 1;
  background: linear-gradient(91deg, rgba(2,24,44,1) 1%, rgba(64,76,92,1) 100%);
  border-radius: 8px;
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-start;
  overflow: hidden;
}

.card-name {
  font-family: 'Play', Arial, sans-serif;
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.33;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ───────────────────────────────
   EMPTY STATE
─────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  grid-column: 1 / -1;
}
.empty-state-icon {
  width: 64px; height: 64px;
  margin: 0 auto 24px;
  opacity: 0.3;
}
.empty-state-title {
  font-family: 'Play', Arial, sans-serif;
  font-size: 24px;
  font-weight: 400;
  color: #fff;
  margin-bottom: 12px;
}
.empty-state-text { font-size: 16px; color: var(--text-muted); }

/* ───────────────────────────────
   PAGINATION
─────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  font-family: Arial, sans-serif;
  font-size: 15px;
  color: var(--text-light);
  border: 1px solid var(--border);
  transition: all 0.2s;
  text-decoration: none;
}
.page-link:hover { border-color: var(--accent); color: #fff; }
.page-link.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.page-link.disabled { opacity: 0.3; pointer-events: none; }
.page-ellipsis { color: var(--text-muted); padding: 0 4px; font-size: 15px; }

/* ───────────────────────────────
   CONTACTS (скопировано 1:1 с /projects/tskp/)
─────────────────────────────── */
.tskp-section {
  --tskp-px: 16px;
  margin: 28px 0 0;
  padding: 24px var(--tskp-px);
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}
@media (min-width: 1101px) {
  .tskp-section {
    --tskp-px: 48px;
    margin: 32px 42px 0;
    padding: 40px var(--tskp-px);
    background: transparent;
    border: 1px solid #56718F;
    border-radius: 16px;
  }
}
.tskp-section__head {
  margin: 0 calc(-1 * var(--tskp-px)) 28px;
  padding: 0 var(--tskp-px) 24px;
  border-bottom: 1px solid #56718F;
}
.tskp-section__title {
  font-family: 'Play', sans-serif;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
  color: #fff;
}
.tskp-contact {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 32px;
  padding: 24px;
  border-radius: 8px;
  background: linear-gradient(90deg, #00162B 0%, #3F4B5B 100%);
}
.tskp-contact__photo {
  flex: 0 0 99px;
  width: 99px;
  height: 100px;
  border-radius: 4px;
  overflow: hidden;
}
.tskp-contact__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.tskp-contact__person {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
}
.tskp-contact__name {
  font: 400 24px/32px Arial, sans-serif;
  color: #fff;
  margin-bottom: 8px;
}
.tskp-contact__role {
  font: 400 16px/24px Arial, sans-serif;
  color: #fff;
  margin-bottom: 24px;
}
.tskp-contact__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 238px;
  max-width: 100%;
  height: 48px;
  border-radius: 5px;
  border: 1px solid #FF8368;
  background: transparent;
  color: #fff;
  font: 700 16px/24px Arial, sans-serif;
  text-decoration: none;
  transition: border-color .2s;
}
.tskp-contact__cta::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(227deg, rgba(255,131,104,0.8) 0%, rgba(255,131,104,0) 80%);
  opacity: 0;
  transition: opacity .3s;
}
.tskp-contact__cta span { position: relative; z-index: 1; }
.tskp-contact__cta:hover::after { opacity: 1; }

.tskp-contact__info {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 0 0 auto;
}
.tskp-contact__info li {
  display: flex;
  align-items: center;
  gap: 20px;
}
.tskp-contact__icon {
  width: 24px;
  height: 24px;
  color: #FF8368;
  flex-shrink: 0;
}
.tskp-contact__info a,
.tskp-contact__info span {
  font: 400 20px/32px Arial, sans-serif;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.tskp-contact__info a:hover { text-decoration: underline; }

@media (min-width: 769px) {
  .tskp-contact { min-height: 248px; }
  .tskp-contact__person { flex: 0 1 auto; width: 40%; max-width: 40%; min-width: 0; }
  .tskp-contact__info {
    position: absolute;
    left: 66%;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    margin: 0;
  }
}

@media (max-width: 420px) {
  .tskp-section { --tskp-px: 14px; padding: 22px var(--tskp-px); }
  .tskp-section__title { font-size: 18px; }
}

/* ───────────────────────────────
   FOOTER
─────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--px);
}
footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-logo { display: flex; flex-direction: column; gap: 8px; }
.footer-logo img { width: 48px; height: 48px; object-fit: contain; }
.footer-logo-name {
  font-family: 'Play', Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.footer-logo-full { font-size: 13px; color: var(--text-muted); max-width: 260px; line-height: 1.4; }
.footer-nav { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-nav-col { display: flex; flex-direction: column; gap: 12px; }
.footer-nav-col a { font-size: 14px; color: var(--text-muted); transition: color 0.2s; }
.footer-nav-col a:hover { color: #fff; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom p { font-size: 13px; color: var(--text-muted); }
.footer-bottom a { font-size: 13px; color: var(--text-muted); transition: color 0.2s; }
.footer-bottom a:hover { color: #fff; }

/* ───────────────────────────────
   MOBILE-ONLY ЭЛЕМЕНТЫ
   На десктопе скрыты / прозрачны, включаются в ≤768px.
─────────────────────────────── */
.tabs-mobile-title { display: none; }
.page-more-mobile  { display: none; }
.registry-cta      { display: none; }
/* Обёртка photo+person: на десктопе не влияет на flex-раскладку .tskp-contact */
.tskp-contact__head { display: contents; }

/* ───────────────────────────────
   RESPONSIVE — TABLET (≤1100px)
─────────────────────────────── */
@media (max-width: 1100px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .tabs-search { padding: 0 20px; }
  .tab-item { padding: 0 20px; }
}

/* ───────────────────────────────
   RESPONSIVE — MOBILE (≤768px)
─────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --header-h: 80px;
  }

  /* Header */
  .header-inner { height: 80px; padding: 0 20px; margin: 0; max-width: 100%; }
  .header-logo img { width: 48px; height: 48px; }
  .header-nav { display: none; }
  .header-burger { display: flex; }

  /* ── Хлебные крошки (Figma: 32px под хедером, 32px до hero) ── */
  .page-crumb-wrap { padding: 32px 20px; }
  .breadcrumb { line-height: 18px; }

  /* ── Hero: во всю ширину, 350px, r16 ── */
  .page-hero {
    margin: 0;
    min-height: 350px;
    border-radius: 16px;
    justify-content: flex-start;
  }
  .page-hero-inner { padding: 36px 20px 38px; }
  .page-hero-title-row { flex-direction: column; align-items: stretch; gap: 32px; }
  .page-hero-title { font-size: 32px; line-height: 40px; letter-spacing: -0.02em; }
  .page-hero-subtitle { font-size: 16px; line-height: 24px; color: #fff; margin-top: 16px; }
  /* Кнопки — по центру, по ширине контента (не растянуты) */
  .page-hero-actions { flex-direction: column; align-items: center; gap: 20px; width: 100%; }
  .btn-primary, .btn-secondary {
    flex: none;
    width: auto;
    min-width: 0;
    padding: 11px 24px;
    font-size: 14px;
    line-height: 24px;
    justify-content: center;
  }

  /* ── Фильтры: заголовок «Реестр» + вертикальный список ── */
  .registry-frame { margin: 24px 0 0; border: none; border-radius: 0; }
  .tabs-bar { border-bottom: none; border-radius: 0; overflow: visible; background: transparent; }
  .tabs-bar-inner { flex-direction: column; height: auto; gap: 0; }

  .tabs-mobile-title {
    display: block;
    padding: 0 20px;
    font: 400 24px/32px Arial, sans-serif;
    color: #fff;
  }

  /* Поиска в макете нет — оставлен как функциональный элемент, без рамок */
  .tabs-search {
    width: 100%;
    box-sizing: border-box;
    margin-top: 24px;
    padding: 0 20px 20px;
    border-right: none;
    border-radius: 0;
  }

  .tabs-list {
    flex-direction: column;
    margin-left: 0;
    width: 100%;
    border: none;
    border-radius: 0;
    overflow: visible;
  }
  .tab-dropdown-wrap {
    flex-direction: column;
    width: 100%;
    position: static;
  }

  /* Строка фильтра — 64px, во всю ширину, разделители #56718F */
  .tab-item,
  .tab-dropdown-trigger {
    box-sizing: border-box;
    width: 100%;
    min-height: 64px;
    padding: 20px 33px 20px 20px;
    gap: 8px;
    font: 400 14px/24px Arial, sans-serif;
    color: #fff;
    justify-content: flex-start;
    white-space: normal;
    border: none;
    border-top: 1px solid #56718F;
    border-radius: 0;
  }
  .tabs-list > *:last-child,
  .tab-dropdown-wrap:last-child .tab-dropdown-trigger { border-radius: 0; }

  /* «Направления» / «Технологии» — с градиентной заливкой */
  .tab-dropdown-trigger,
  .tab-dropdown-wrap.open .tab-dropdown-trigger {
    background: linear-gradient(90deg, #00162B 0%, #3D4A5A 100%);
  }
  .tab-chevron { margin-left: auto; width: 20px; height: 20px; color: #fff; }

  /* «Лучшая практика» — текст, звезда, чекбокс справа. Без заливки */
  .tab-item.tab-best,
  .tab-item.tab-best--active {
    order: 3;
    padding-right: 31px;
    background: none;
    border-bottom: 1px solid #56718F;
  }
  .tab-best .tab-star { order: 1; width: 20px; height: 20px; }
  .tab-best .tab-check { order: 2; margin-left: auto; width: 22px; height: 22px; }
  .tab-check svg { width: 22px; height: 22px; }
  .tab-check-box { stroke: #fff; }

  /* Dropdown — inline-раскрытие, без абсолютного позиционирования */
  .tab-dropdown-panel {
    position: static;
    width: 100%;
    min-width: unset;
    max-width: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  .dd-item { padding: 16px 20px; }

  /* ── Карточки: картинка во всю ширину + панель с текстом ── */
  .registry-section { padding: 43px 0 0; }
  .registry-heading { display: none; }

  .cards-grid { grid-template-columns: 1fr; gap: 18px; }
  .solution-card { height: auto; gap: 9px; }

  .card-image {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 360 / 217.5;
    border-radius: 5px;
    /* Срезы: правый верхний 49×64, левый нижний 42×45 (замерено по макету) */
    clip-path: polygon(
      0 0,
      calc(100% - 49px) 0,
      100% 64px,
      100% 100%,
      42px 100%,
      0 calc(100% - 45px)
    );
  }
  .card-content { padding: 23px 22px 28px 28px; gap: 8px; }
  /* Текст не обрезается — высота карточки тянется по контенту, как в макете */
  .card-name {
    display: block;
    overflow: visible;
    font-size: 18px;
    line-height: 22px;
    letter-spacing: 0;
  }
  .card-desc {
    display: block;
    overflow: visible;
    font-size: 14px;
    line-height: 15px;
    letter-spacing: 0;
    color: #D2D2DF;
  }

  /* ── Пагинация → одна кнопка «Показать еще» ── */
  .pagination { margin-top: 50px; }
  .pagination .page-link,
  .pagination .page-ellipsis { display: none; }
  .page-more-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 20px;
    border: 1px solid #56718F;
    border-radius: 5px;
    color: #fff;
    font: 700 14px/24px Arial, sans-serif;
    text-decoration: none;
  }

  /* ── Контакты ── */
  .tskp-section {
    --tskp-px: 20px;
    margin: 50px 0 0;
    padding: 0;
    border: 1px solid #56718F;
    border-radius: 8px;
  }
  .tskp-section__head {
    margin: 0;
    padding: 24px 20px;
    border-bottom: 1px solid #56718F;
  }
  .tskp-section__title { font: 400 24px/32px 'Play', Arial, sans-serif; }

  /* Контейнер перестаёт быть панелью — панелей теперь две */
  .tskp-contact {
    display: block;
    padding: 24px 20px 30px;
    background: none;
    border-radius: 0;
    gap: 0;
  }
  /* Панель 1: фото + ФИО */
  .tskp-contact__head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px;
    border-radius: 8px;
    background: linear-gradient(90deg, #00162B 0%, #3D4A5A 100%);
  }
  .tskp-contact__photo { flex: 0 0 80px; width: 80px; height: 80px; }
  .tskp-contact__person { flex: 1 1 auto; min-width: 0; }
  .tskp-contact__name { font: 400 16px/24px Arial, sans-serif; margin-bottom: 4px; }
  .tskp-contact__role { font: 400 12px/18px Arial, sans-serif; margin-bottom: 0; }
  .tskp-contact__cta { width: 100%; }

  /* Панель 2: почта + телефон слева, часы работы справа */
  .tskp-contact__info {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 0;
    margin-top: 16px;
    padding: 6px 15px;
    border-radius: 8px;
    background: linear-gradient(90deg, #00162B 0%, #3B4959 100%);
  }
  .tskp-contact__info li { gap: 6px; }
  .tskp-contact__info li:nth-child(1) { grid-area: 1 / 1; }
  .tskp-contact__info li:nth-child(2) { grid-area: 2 / 1; }
  .tskp-contact__info li:nth-child(3) { grid-area: 1 / 2; }
  .tskp-contact__icon { width: 16px; height: 16px; }
  .tskp-contact__info a,
  .tskp-contact__info span { font: 400 12px/32px Arial, sans-serif; white-space: nowrap; }

  /* ── CTA «Не нашли решение» ── */
  .registry-cta {
    display: block;
    padding: 43px 20px 50px;
    text-align: center;
  }
  .registry-cta__lead,
  .registry-cta__text { font: 400 16px/24px Arial, sans-serif; color: #fff; }
  .registry-cta__lead { margin-bottom: 16px; }
  .registry-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 41px;
    height: 48px;
    padding: 0 20px;
    border: 1px solid #56718F;
    border-radius: 5px;
    color: #fff;
    font: 700 14px/24px Arial, sans-serif;
    text-decoration: none;
  }

  /* Footer */
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-nav { gap: 24px; flex-direction: column; }

  /* Cookie */
  .cookie-banner {
    width: calc(100% - 24px);
    flex-direction: column;
    align-items: flex-start;
    bottom: 12px;
    gap: 16px;
  }
  .cookie-actions { width: 100%; }
  .btn-cookie-accept, .btn-cookie-settings { flex: 1; text-align: center; }
  .btn-cookie-close { position: absolute; top: 12px; right: 16px; }
}

/* Узкие экраны: контакты не влезают в две колонки — ставим в одну */
@media (max-width: 350px) {
  .tskp-contact__info { grid-template-columns: minmax(0, 1fr); }
  .tskp-contact__info li:nth-child(1),
  .tskp-contact__info li:nth-child(2),
  .tskp-contact__info li:nth-child(3) { grid-area: auto; }
}

/* ───────────────────────────────
   ПОПАП «ПРОКОНСУЛЬТИРОВАТЬСЯ»
─────────────────────────────── */
.consult-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.consult-modal-overlay.open { display: flex; }
.consult-modal {
  position: relative;
  background: #1C202D;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}
.consult-modal__close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.15s;
}
.consult-modal__close:hover { color: #fff; }
.consult-modal__title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
}
.consult-modal__org {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-light);
  margin: 0 0 16px;
}
.consult-modal__phone {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.consult-modal__phone:hover { opacity: 0.85; }

/* Акцент в тексте hero из админки: редактор выделяет фразу жирным,
   цвет подставляет CSS (в вёрстке для этого был отдельный класс) */
.page-hero-subtitle b,
.page-hero-subtitle strong {
  color: var(--accent);
  font-weight: inherit;
}
