/* Служебная страница ADS — на ПК маршрут, на меньших экранах столбик */

.ads-hub {
  max-width: 1080px;
  padding-bottom: 48px;
}

.ads-hub-head {
  text-align: center;
  margin: 0 auto 36px;
  max-width: 720px;
}

.ads-hub-kicker {
  margin: 0 0 8px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted-foreground, #a1a1aa);
  font-family: var(--nb-font, "Space Grotesk", sans-serif);
}

.ads-hub-title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 800;
  font-family: var(--nb-font, "Space Grotesk", sans-serif);
  color: var(--foreground, #fafafa);
}

.ads-hub-intro {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--muted-foreground, #d4d4d8);
}

.ads-hub-intro p {
  margin: 0 0 0.6em;
}

.ads-hub-path {
  list-style: none;
  margin: 0;
  padding: 8px 0 0;
  position: relative;
}

.ads-hub-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
  align-items: center;
  gap: 18px 12px;
  position: relative;
  z-index: 1;
}

.ads-hub-step.is-odd .ads-hub-copy { grid-column: 1; grid-row: 1; text-align: right; }
.ads-hub-step.is-odd .ads-hub-rail { grid-column: 2; grid-row: 1; }
.ads-hub-step.is-odd .ads-hub-visual { grid-column: 3; grid-row: 1; }

.ads-hub-step.is-even .ads-hub-visual { grid-column: 1; grid-row: 1; justify-self: end; }
.ads-hub-step.is-even .ads-hub-rail { grid-column: 2; grid-row: 1; }
.ads-hub-step.is-even .ads-hub-copy { grid-column: 3; grid-row: 1; text-align: left; }

.ads-hub-copy {
  min-width: 0;
}

.ads-hub-step-title {
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 800;
  font-family: var(--nb-font, "Space Grotesk", sans-serif);
}

.ads-hub-step-text {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--muted-foreground, #d4d4d8);
  overflow-wrap: break-word;
  word-break: normal;
}

.ads-hub-step-text p {
  margin: 0 0 0.5em;
}

.ads-hub-rail {
  display: flex;
  justify-content: center;
  align-items: center;
}

.ads-hub-node {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  background: var(--primary, #facc15);
  color: #111;
  border: var(--nb-border-w, 3px) solid var(--border, #111);
  box-shadow: 3px 3px 0 0 var(--border, #111);
}

.ads-hub-visual {
  min-width: 0;
}

.ads-hub-shot {
  display: block;
  width: min(100%, 340px);
  margin: 0;
  padding: 0;
  border: var(--nb-border-w, 3px) solid var(--border, #111);
  border-radius: var(--nb-radius, 8px);
  background: var(--card, #18181b);
  box-shadow: 5px 5px 0 0 var(--border, #111);
  overflow: hidden;
  cursor: zoom-in;
  text-decoration: none;
  color: inherit;
}

.ads-hub-step.is-odd .ads-hub-shot {
  margin-right: auto;
}

.ads-hub-step.is-even .ads-hub-shot {
  margin-left: auto;
}

.ads-hub-shot img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
}

.ads-hub-shot.is-empty {
  cursor: default;
  min-height: 140px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  color: #111;
  background: var(--primary, #facc15);
}

.ads-hub-shot:hover,
.ads-hub-shot:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 0 var(--border, #111);
}

.ads-hub-bend {
  list-style: none;
  height: 64px;
  margin: -6px 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.ads-hub-bend svg {
  width: min(280px, 46vw);
  height: 100%;
  overflow: visible;
}

.ads-hub-bend-ink {
  fill: none;
  stroke: var(--border, #111);
  stroke-width: 30;
  stroke-linecap: round;
}

.ads-hub-bend-fill {
  fill: none;
  stroke: var(--primary, #facc15);
  stroke-width: 22;
  stroke-linecap: round;
}

.ads-hub-form {
  margin-top: 48px;
}

.ads-hub-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12040;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.ads-hub-lightbox[hidden] {
  display: none !important;
}

.ads-hub-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(12, 11, 9, 0.82);
  cursor: pointer;
}

.ads-hub-lightbox-img {
  position: relative;
  z-index: 1;
  max-width: min(960px, 92vw);
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 3px solid var(--border, #111);
  border-radius: 8px;
  box-shadow: 6px 6px 0 0 var(--border, #111);
  background: #111;
}

.ads-hub-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 3px solid var(--border, #111);
  border-radius: 8px;
  background: var(--primary, #facc15);
  color: #111;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 3px 3px 0 0 var(--border, #111);
}

html[data-theme="light"] .ads-hub-title {
  color: #111;
}

html[data-theme="light"] .ads-hub-step-text,
html[data-theme="light"] .ads-hub-intro {
  color: #3f3f46;
}

@media (max-width: 1100px) {
  .ads-hub-head {
    text-align: left;
    margin-bottom: 22px;
  }

  .ads-hub-title {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
  }

  .ads-hub-path {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
  }

  .ads-hub-path::before {
    display: none;
  }

  .ads-hub-step,
  .ads-hub-step.is-odd,
  .ads-hub-step.is-even {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .ads-hub-copy,
  .ads-hub-step.is-odd .ads-hub-copy,
  .ads-hub-step.is-even .ads-hub-copy {
    order: 2;
    text-align: left;
  }

  .ads-hub-visual,
  .ads-hub-step.is-odd .ads-hub-visual,
  .ads-hub-step.is-even .ads-hub-visual {
    order: 1;
    width: 100%;
    justify-self: stretch;
  }

  .ads-hub-rail,
  .ads-hub-node {
    display: none !important;
  }

  .ads-hub-bend,
  .ads-hub-bend.is-odd,
  .ads-hub-bend.is-even {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 36px;
    width: 100%;
    margin: 10px 0 16px;
  }

  .ads-hub-bend svg {
    display: none;
  }

  .ads-hub-bend::before {
    content: "";
    display: block;
    width: min(240px, 72%);
    height: 18px;
    background: var(--primary, #facc15);
    border: 3px solid var(--border, #111);
    border-radius: 20px;
    box-shadow: 3px 3px 0 0 var(--border, #111);
  }

  .ads-hub-shot,
  .ads-hub-step.is-odd .ads-hub-shot,
  .ads-hub-step.is-even .ads-hub-shot {
    width: 100%;
    margin: 0;
    box-shadow: 3px 3px 0 0 var(--border, #111);
  }

  .ads-hub-shot img {
    max-height: 240px;
    width: 100%;
    object-fit: cover;
  }

  .ads-hub-shot.is-empty {
    display: none;
  }
}

body.ads-hub-zoom-open {
  overflow: hidden;
}
