/* ============================================================
   /services/hub/edtech/style.css
   Локальные стили страницы «Дизайн для EdTech».
   Базовые стили (hero, sub-nav, section, finale, footer, buttons
   и т. д.) приходят из /services/hub/style.css.
   ============================================================ */

/* ---------- CHIP-NAV между отраслями ---------- */
.hub-chip-section { padding: 0 0 40px; }

.hub-chip-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.hub-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s var(--ease);
}

.hub-chip:hover {
  border-color: rgba(74, 146, 243, 0.5);
  color: var(--ink);
  background: rgba(74, 146, 243, 0.08);
  transform: translateY(-2px);
}

.hub-chip.active {
  border-color: rgba(74, 146, 243, 0.55);
  color: var(--ink);
  background: rgba(74, 146, 243, 0.14);
  pointer-events: none;
}

/* ---------- Блок «Часто ищут» ---------- */
.search-queries-section {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.queries-header { text-align: center; margin-bottom: 32px; }

.queries-title {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 500;
  letter-spacing: -0.05em;
  color: var(--ink);
}

.queries-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.query-chip {
  display: inline-flex;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  font-size: 13px;
  text-decoration: none;
  transition: all 0.25s var(--ease);
}

.query-chip:hover {
  border-color: rgba(74, 146, 243, 0.5);
  color: var(--ink);
  background: rgba(74, 146, 243, 0.08);
  transform: translateY(-2px);
}

/* ---------- NICHE-CARD с фоновой картинкой ---------- */
.niche-card--image {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.niche-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0;
  filter: saturate(0.9) contrast(1.02);
  transition:
    opacity 0.5s var(--ease),
    transform 0.8s var(--ease),
    filter 0.5s var(--ease);
  pointer-events: none;
}

.niche-card__image.is-loaded { opacity: 0.55; }

.niche-card--image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(6, 9, 16, 0.55) 0%,
    rgba(6, 9, 16, 0.75) 45%,
    rgba(6, 9, 16, 0.94) 100%
  );
  transition: background 0.5s var(--ease);
  pointer-events: none;
}

.niche-card--image:hover .niche-card__image.is-loaded {
  opacity: 0.75;
  transform: scale(1.06);
  filter: saturate(1) contrast(1.05);
}

.niche-card--image:hover::before {
  background: linear-gradient(
    180deg,
    rgba(6, 9, 16, 0.45) 0%,
    rgba(6, 9, 16, 0.7) 45%,
    rgba(6, 9, 16, 0.92) 100%
  );
}

.niche-card--image .niche-card__top,
.niche-card--image .niche-card__title,
.niche-card--image .niche-card__desc,
.niche-card--image .niche-card__arrow {
  position: relative;
  z-index: 1;
}

.niche-card--image .niche-card__title {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.niche-card--image .niche-card__desc {
  color: rgba(232, 238, 247, 0.78);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.niche-card--image .niche-card__tag {
  background: rgba(6, 9, 16, 0.5);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(232, 238, 247, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.niche-card--image .niche-card__icon {
  background: rgba(6, 9, 16, 0.45);
  border-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.niche-card--image:hover .niche-card__icon {
  background: rgba(74, 146, 243, 0.35);
  border-color: rgba(74, 146, 243, 0.7);
}

.niche-card--image .niche-card__arrow { color: #fff; }
.niche-card--image::after { color: rgba(74, 146, 243, 0.12); }

/* LIST VIEW с превью */
.niches-grid[data-view="list"] .niche-card--image {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  grid-template-areas:
    "img top   arrow"
    "img title arrow"
    "img desc  arrow";
  column-gap: 20px;
  row-gap: 2px;
  align-items: center;
  padding: 16px 24px 16px 16px;
}

.niches-grid[data-view="list"] .niche-card--image .niche-card__image {
  position: relative;
  inset: auto;
  grid-area: img;
  width: 112px;
  height: 100%;
  min-height: 96px;
  border-radius: 14px;
  opacity: 1;
  object-fit: cover;
  z-index: 0;
}

.niches-grid[data-view="list"] .niche-card--image::before,
.niches-grid[data-view="list"] .niche-card--image::after { display: none; }

.niches-grid[data-view="list"] .niche-card--image .niche-card__top {
  grid-area: top;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  gap: 12px;
}

.niches-grid[data-view="list"] .niche-card--image .niche-card__title {
  grid-area: title;
  margin: 0;
  font-size: 18px;
  align-self: end;
  color: var(--ink);
  text-shadow: none;
}

.niches-grid[data-view="list"] .niche-card--image .niche-card__desc {
  grid-area: desc;
  margin: 0;
  align-self: start;
  color: var(--muted);
  text-shadow: none;
  font-size: 13px;
}

.niches-grid[data-view="list"] .niche-card--image .niche-card__arrow {
  grid-area: arrow;
  color: var(--blue);
  white-space: nowrap;
}

.niche-card__image[data-error="true"] { display: none; }

/* ---------- HERO-CHIP → подсветка + toolbar-state ---------- */
.hero-chip.is-active {
  border-color: rgba(74, 146, 243, 0.65);
  color: #fff;
  background: rgba(74, 146, 243, 0.18);
  box-shadow: 0 0 0 4px rgba(74, 146, 243, 0.12);
}

.industries-toolbar__left {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.industries-toolbar__active {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 12px;
  border: 1px solid rgba(74, 146, 243, 0.4);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(74, 146, 243, 0.1);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  animation: activeChipIn 0.35s var(--ease);
}

.industries-toolbar__active[hidden] { display: none; }

@keyframes activeChipIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.industries-toolbar__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(74, 146, 243, 0.2);
}

.industries-toolbar__clear {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: none;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.industries-toolbar__clear [data-lucide] {
  width: 12px;
  height: 12px;
  stroke-width: 2.4;
}

.industries-toolbar__clear:hover { background: rgba(255, 255, 255, 0.14); }

.niche-card.is-highlighted {
  border-color: rgba(74, 146, 243, 0.75);
  background:
    linear-gradient(160deg, rgba(74, 146, 243, 0.18), transparent 55%),
    var(--card);
  box-shadow:
    0 0 0 1px rgba(74, 146, 243, 0.5),
    0 20px 50px rgba(74, 146, 243, 0.18),
    0 0 60px rgba(74, 146, 243, 0.12);
  transform: translateY(-4px);
  animation: cardPulse 1.2s var(--ease);
}

@keyframes cardPulse {
  0%   { box-shadow: 0 0 0 0 rgba(74, 146, 243, 0.6), 0 20px 50px rgba(74, 146, 243, 0.1); }
  60%  { box-shadow: 0 0 0 14px rgba(74, 146, 243, 0), 0 20px 50px rgba(74, 146, 243, 0.22); }
  100% { box-shadow: 0 0 0 1px rgba(74, 146, 243, 0.5), 0 20px 50px rgba(74, 146, 243, 0.18), 0 0 60px rgba(74, 146, 243, 0.12); }
}

.niches-grid.has-highlight .niche-card:not(.is-highlighted) {
  opacity: 0.32;
  filter: saturate(0.5) blur(1.5px);
  transform: scale(0.985);
}

.niches-grid .niche-card {
  transition:
    opacity 0.4s var(--ease),
    filter 0.4s var(--ease),
    transform 0.4s var(--ease),
    border-color 0.35s var(--ease),
    background 0.35s var(--ease),
    box-shadow 0.5s var(--ease);
}

.niches-grid.has-highlight .niche-card:not(.is-highlighted):hover {
  transform: scale(0.985);
  border-color: var(--border);
}

/* ---------- SECTORS ---------- */
.sectors-head {
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 56px;
}

.sectors-head h2 {
  margin: 18px 0 0;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.sectors-intro {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.sectors-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.sector-card {
  position: relative;
  padding: 28px 26px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, rgba(74, 146, 243, 0.05), transparent 55%),
    var(--card-bg);
  transition:
    border-color 0.35s var(--ease),
    transform 0.35s var(--ease),
    background 0.35s var(--ease);
}

.sector-card:hover {
  border-color: rgba(74, 146, 243, 0.45);
  background:
    linear-gradient(160deg, rgba(74, 146, 243, 0.14), transparent 55%),
    var(--card);
  transform: translateY(-5px);
}

.sector-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.sector-card__icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--blue);
  background: rgba(74, 146, 243, 0.08);
  transition:
    border-color 0.3s ease,
    background 0.3s ease,
    transform 0.3s var(--ease);
}

.sector-card__icon [data-lucide] {
  width: 20px;
  height: 20px;
  stroke-width: 1.6;
}

.sector-card:hover .sector-card__icon {
  border-color: rgba(74, 146, 243, 0.55);
  background: rgba(74, 146, 243, 0.16);
  transform: translateY(-2px);
}

.sector-card__tags {
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
  max-width: 68%;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.sector-card:hover .sector-card__tags {
  border-color: rgba(74, 146, 243, 0.4);
  color: var(--ink);
}

.sector-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.sector-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

/* ---------- ROADMAP ---------- */
.roadmap-head {
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 56px;
}

.roadmap-head h2 {
  margin: 18px 0 0;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.roadmap-intro {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.roadmap {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.roadmap::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 31px;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(74, 146, 243, 0.05) 0%,
    rgba(74, 146, 243, 0.4) 10%,
    rgba(74, 146, 243, 0.4) 90%,
    rgba(74, 146, 243, 0.05) 100%
  );
  pointer-events: none;
}

.roadmap-step {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
  padding: 22px 0;
  transition: transform 0.35s var(--ease);
}

.roadmap-step:hover { transform: translateX(4px); }

.roadmap-step__marker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.roadmap-step__num {
  position: relative;
  z-index: 1;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--ink);
  background: var(--card-bg);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  transition:
    border-color 0.35s var(--ease),
    background 0.35s var(--ease),
    color 0.35s var(--ease);
}

.roadmap-step__icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--blue);
  background: rgba(74, 146, 243, 0.08);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}

.roadmap-step__icon [data-lucide] {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}

.roadmap-step:hover .roadmap-step__num {
  border-color: rgba(74, 146, 243, 0.6);
  background: rgba(74, 146, 243, 0.12);
  color: #fff;
}

.roadmap-step:hover .roadmap-step__icon {
  border-color: rgba(74, 146, 243, 0.5);
  background: rgba(74, 146, 243, 0.18);
}

.roadmap-step__body { padding-top: 8px; min-width: 0; }

.roadmap-step__body h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.roadmap-step__body p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.roadmap-step__time {
  align-self: center;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  font-size: 12px;
  white-space: nowrap;
}

/* ---------- GUARANTEES ---------- */
.guarantees-head {
  text-align: center;
  margin-bottom: 56px;
}

.guarantees-head h2 {
  margin: 18px 0 0;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1.04;
}

.guarantees-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--border);
}

.guarantee-card {
  padding: 32px 28px 34px;
  background: var(--card-bg);
  transition: background 0.35s var(--ease);
}

.guarantee-card:hover { background: #111925; }

.guarantee-card__icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--blue);
  background: rgba(74, 146, 243, 0.08);
  transition:
    border-color 0.3s ease,
    background 0.3s ease,
    transform 0.3s var(--ease);
}

.guarantee-card__icon [data-lucide] {
  width: 20px;
  height: 20px;
  stroke-width: 1.6;
}

.guarantee-card:hover .guarantee-card__icon {
  border-color: rgba(74, 146, 243, 0.55);
  background: rgba(74, 146, 243, 0.16);
  transform: translateY(-2px);
}

.guarantee-card h3 {
  margin: 0 0 12px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.guarantee-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

/* ---------- TOOLKIT ---------- */
.toolkit-head {
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 48px;
}

.toolkit-head h2 {
  margin: 18px 0 0;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.toolkit-intro {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.toolkit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toolkit-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 12px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition:
    border-color 0.3s var(--ease),
    background 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.toolkit-item:hover {
  border-color: rgba(74, 146, 243, 0.5);
  background: rgba(74, 146, 243, 0.08);
  transform: translateY(-2px);
}

.toolkit-item img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ---------- LEGAL NOTE ---------- */
.legal-note { padding: 0 0 20px; }

.legal-note__card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 20px;
  align-items: flex-start;
  max-width: 880px;
  margin: 0 auto;
  padding: 22px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 0.3s var(--ease);
}

.legal-note__card:hover { border-color: rgba(74, 146, 243, 0.25); }

.legal-note__icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--blue);
  background: rgba(74, 146, 243, 0.06);
  flex-shrink: 0;
}

.legal-note__icon [data-lucide] {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.legal-note__body { min-width: 0; }

.legal-note__title {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.legal-note__text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* ---------- Scroll-margin ---------- */
#overview,
#services,
#sectors,
#comparison,
#included,
#roadmap,
#guarantees,
#toolkit,
#cases,
#process,
#faq,
#contact {
  scroll-margin-top: var(--subnav-h);
}

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .sectors-head,
  .roadmap-head,
  .toolkit-head { gap: 40px; }
}

@media (max-width: 900px) {
  .sectors-grid,
  .guarantees-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 850px) {
  .sectors-head,
  .roadmap-head,
  .toolkit-head {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .sectors-intro,
  .roadmap-intro,
  .toolkit-intro { max-width: 100%; }
}

@media (max-width: 700px) {
  .industries-toolbar { flex-wrap: wrap; gap: 12px; }
  .industries-toolbar__left { width: 100%; justify-content: space-between; }
  .industries-toolbar__active { font-size: 11.5px; padding: 4px 5px 4px 10px; }

  .hub-chip-section { padding-bottom: 24px; }
  .hub-chip { font-size: 12px; padding: 6px 12px; }

  .search-queries-section { padding: 40px 0; }
  .query-chip { font-size: 12px; padding: 6px 12px; }

  .niches-grid[data-view="list"] .niche-card--image {
    grid-template-columns: 1fr;
    grid-template-areas:
      "img"
      "top"
      "title"
      "desc"
      "arrow";
    row-gap: 10px;
    padding: 14px 16px;
  }

  .niches-grid[data-view="list"] .niche-card--image .niche-card__image {
    width: 100%;
    height: 160px;
    min-height: 160px;
  }

  .niches-grid[data-view="list"] .niche-card--image .niche-card__title { font-size: 16px; }
  .niches-grid[data-view="list"] .niche-card--image .niche-card__desc { font-size: 12.5px; }

  .sectors-grid,
  .guarantees-grid { grid-template-columns: 1fr; }
  .sector-card,
  .guarantee-card { padding: 24px 22px 26px; }

  .roadmap-step {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 18px;
    row-gap: 10px;
  }

  .roadmap::before { left: 23px; }
  .roadmap-step__num { width: 48px; height: 48px; font-size: 12px; }
  .roadmap-step__icon { width: 30px; height: 30px; }
  .roadmap-step__body { padding-top: 4px; }
  .roadmap-step__body h3 { font-size: 18px; }
  .roadmap-step__body p { font-size: 14px; }
  .roadmap-step__time { grid-column: 2; justify-self: start; }

  .toolkit-item { font-size: 13px; padding: 10px 16px 10px 12px; }
  .toolkit-item img { width: 18px; height: 18px; }

  .legal-note__card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px 20px;
  }

  .legal-note__icon { width: 38px; height: 38px; }
  .legal-note__title { font-size: 14px; }
  .legal-note__text { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .niche-card.is-highlighted { animation: none; }
  .industries-toolbar__active { animation: none; }
}