/* Страница «Видео» (desktop 1440 + адаптив ≤900px) */

.design-root--video .page-main--video {
  width: 1440px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 0 80px;
  box-sizing: border-box;
}

.video-detail-stage {
  position: relative;
  width: 100%;
  padding: 60px 80px 0;
  box-sizing: border-box;
}

.video-detail-breadcrumbs {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 16px;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 32px;
  overflow: hidden;
}

.video-detail-breadcrumbs__link,
.video-detail-breadcrumbs__sep {
  flex-shrink: 0;
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px;
  line-height: 18px;
  font-weight: 400;
  color: #44474f;
  opacity: 0.4;
  text-decoration: none;
  white-space: nowrap;
}


.video-detail-breadcrumbs__current {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px;
  line-height: 18px;
  font-weight: 400;
  color: #44474f;
  opacity: 1;
  text-transform: none;
}

.video-detail-grid {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 32px;
  width: 100%;
}

.video-detail-col-main {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  width: 843px;
  max-width: 100%;
  flex-shrink: 0;
}

.video-detail-player {
  position: relative;
  width: 100%;
  height: 474px;
  border-radius: 6px;
  overflow: hidden;
  box-sizing: border-box;
}

.video-detail-player:not(.is-playing) {
  cursor: pointer;
}

/* Видео — только в режиме воспроизведения; до play виден shell + cover + fade */
.video-detail-player__media {
  position: absolute;
  inset: 0;
  z-index: 8;
  border-radius: inherit;
  overflow: hidden;
  background: #000;
}

.video-detail-player__media[hidden] {
  display: none !important;
}

.video-detail-player.is-playing .video-detail-player__media {
  display: block !important;
}

.video-detail-player__video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  object-fit: contain;
  background: #000;
  vertical-align: top;
}

.video-detail-player__embed,
.video-detail-player__embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  background: #000;
}

.video-detail-player.is-playing .video-detail-player__shell,
.video-detail-player.is-playing .video-detail-player__cover,
.video-detail-player.is-playing .video-detail-player__fade,
.video-detail-player.is-playing .video-detail-player__copy,
.video-detail-player.is-playing .video-detail-player__tags,
.video-detail-player.is-playing .video-detail-player__tag,
.video-detail-player.is-playing .video-detail-player__title,
.video-detail-player.is-playing .video-detail-player__play {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.video-detail-player.is-playing .video-detail-player__video {
  object-fit: contain;
}

.video-detail-player__shell {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #dadee6 0%, #e1e3eb 100%);
}

.video-detail-player__cover {
  position: absolute;
  right: 32px;
  top: 32px;
  z-index: 2;
  width: 483px;
  height: 442px;
  max-width: calc(100% - 32px);
  box-sizing: border-box;
  border-radius: 4px;
  background-image: url("assets/video-detail-cover.webp");
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: contain;
  background-color: transparent;
  pointer-events: none;
}

/* Обложка 483×442 (video-detail-cover.webp), градиент снизу */
.video-detail-player__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 212px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, rgba(124, 154, 191, 0) 0%, #7c9abf 100%);
  pointer-events: none;
}

/* Обёртка title+tags: на десктопе просто слой, позиции у детей absolute */
.video-detail-player__copy {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

/* Frame 699 на кадре: left 112 / top 230 относительно макета 1440 → внутри плеера 843×474: +32 / +40 */
.video-detail-player__tags {
  position: absolute;
  left: 32px;
  top: 40px;
  z-index: 5;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  max-width: calc(100% - 64px);
  pointer-events: none;
}

.video-detail-player__tag {
  position: static;
  box-sizing: border-box;
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  min-height: 32px;
  padding: 8px 12px;
  background: #fff;
  border-radius: 6px;
  pointer-events: none;
}

.video-detail-player__tag-hash {
  flex: none;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  color: #44474f;
}

.video-detail-player__tag-text {
  flex: none;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  line-height: 16px;
  font-weight: 400;
  color: #44474f;
}

/* Подзаголовок в DOM под шапкой тулбара; на десктопе — оверлей на плеер (контекст .video-detail-col-main) */
.video-detail-player__subtitle {
  position: absolute;
  left: 32px;
  top: 88px;
  z-index: 5;
  box-sizing: border-box;
  width: 405px;
  max-width: calc(100% - 64px);
  margin: 0;
  min-height: 0;
  font-family: Inter, system-ui, sans-serif;
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: 115%;
  letter-spacing: -0.01em;
  color: #2f323b;
  text-transform: none;
  pointer-events: none;
}

.video-detail-player__title {
  position: absolute;
  left: 32px;
  bottom: 32px;
  z-index: 3;
  margin: 0;
  max-width: 748px;
  width: calc(100% - 64px);
  overflow-wrap: break-word;
  display: block;
  font-family: Inter, system-ui, sans-serif;
  font-size: 80px;
  font-style: normal;
  font-weight: 480;
  line-height: 90%;
  letter-spacing: 0;
  color: #fff;
  font-variation-settings: "slnt" 0, "wght" 480;
  text-shadow: 0 0 40px #375172;
  text-transform: none;
}

.video-detail-player__play {
  position: absolute;
  left: 377px;
  top: 192px;
  z-index: 6;
  width: 90px;
  height: 90px;
  margin: 0;
  padding: 24px 0 24px 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1000px;
  background: rgba(47, 50, 59, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transform: none;
}

.video-detail-player__play:focus-visible {
  outline: 2px solid #587dac;
  outline-offset: 2px;
}

.video-detail-player__play-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 0;
}

.video-detail-player__play-inner img {
  display: block;
  width: 29px;
  height: 32px;
  object-fit: contain;
}

.video-detail-aside {
  width: 405px;
  max-width: 100%;
  flex-shrink: 0;
  min-height: 474px;
  box-sizing: border-box;
  padding: 32px;
  border-radius: 6px;
  background: linear-gradient(101.48deg, #f3f3f3 0%, #eaeaea 100%);
}

.video-detail-aside__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  width: 100%;
  max-width: 341px;
}

.video-detail-aside__body-shell {
  width: 100%;
  align-self: stretch;
  box-sizing: border-box;
}

.video-detail-aside__lead {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px;
  line-height: 18px;
  font-weight: 400;
  color: #44474f;
}

.video-detail-aside__body .video-detail-aside__lead + .video-detail-aside__lead {
  margin-top: 12px;
}

.video-detail-aside__body {
  width: 100%;
  box-sizing: border-box;
}

.video-detail-aside__body.is-clamped {
  max-height: 288px;
  margin-bottom: 0;
  padding-bottom: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.video-detail-aside__body.is-clamped + .video-detail-aside__footer {
  margin-top: 0;
}

.video-detail-aside__body-shell .video-detail-aside__footer {
  display: block;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.video-detail-aside__body-shell .video-detail-aside__footer--hidden {
  display: none !important;
}

.video-detail-aside__body-shell .video-detail-aside__footer.is-visible {
  display: block !important;
}

.video-detail-aside__more-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  max-width: 100%;
}

.video-detail-aside__more-hint {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 18px;
  color: #44474f;
  pointer-events: none;
}

.video-detail-aside__footer.is-expanded .video-detail-aside__more-hint {
  display: none;
}

.video-detail-aside__more-btn {
  margin: 0;
  display: inline-block;
  max-width: 100%;
  box-sizing: border-box;
  text-align: left;
  vertical-align: baseline;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.video-detail-aside__more-btn:focus-visible {
  outline: 2px solid #587dac;
  outline-offset: 2px;
  border-radius: 2px;
}

.video-detail-toolbar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
}

.video-detail-toolbar__author {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.video-detail-toolbar__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 1000px;
  overflow: hidden;
  background: #e7ecf3;
  flex-shrink: 0;
}

.video-detail-toolbar__avatar img {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.video-detail-toolbar__avatar--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 5px;
}

.video-detail-toolbar__name {
  display: inline-block;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px;
  line-height: 18px;
  font-weight: 600;
  color: #44474f;
  text-decoration: none;
  border-bottom: 1.5px solid currentColor;
}

.video-detail-toolbar__name:hover {
  color: #2f323b;
}

.video-detail-toolbar__actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.video-detail-toolbar__action {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

button.video-detail-toolbar__action {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.video-detail-toolbar__action:hover .video-detail-toolbar__action-text {
  opacity: 0.85;
}

.video-detail-toolbar__action-text {
  font-family: Inter, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  letter-spacing: -0.01em;
  color: #375172;
}

.video-detail-toolbar__action-ico {
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  object-fit: contain;
}

@media (max-width: 900px) {
  .design-root--video .page-main--video {
    width: 100%;
    padding: 0 0 60px;
    margin: 10px 0 0;
  }

  .video-detail-stage {
    padding: clamp(20px, 6.25vw, 24px) clamp(16px, 7.8125vw, 25px) 0;
    margin-top: 0;
    box-sizing: border-box;
  }

  /* Одна строка + ellipsis названия; до плеера отступ снизу сохранён */
  .video-detail-breadcrumbs {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: auto;
    max-width: 100%;
    min-width: 0;
    min-height: 12px;
    margin: 0 0 min(32px, 10vw) 0;
    padding: 0;
    gap: 8px;
    overflow: hidden;
    box-sizing: border-box;
  }

  .design-root--video .video-detail-breadcrumbs__link,
  .design-root--video .video-detail-breadcrumbs__sep {
    color: #2f323b;
    opacity: 0.4;
  }

  .design-root--video .video-detail-breadcrumbs__current {
    color: #2f323b;
    opacity: 1;
  }

  .video-detail-breadcrumbs__link,
  .video-detail-breadcrumbs__sep,
  .video-detail-breadcrumbs__current {
    font-size: 10px;
    line-height: 12px;
  }

  .video-detail-grid {
    flex-direction: column;
    gap: 0;
  }

  /* 12px от низа плеера до блока с Денисом */
  .video-detail-col-main {
    width: 100%;
    gap: 12px;
  }

  /* Выше баннер: слева колонка copy (title+tags), справа cover */
  .video-detail-player {
    align-self: center;
    width: 100%;
    height: auto;
    min-height: 240px;
    margin-top: 12px;
    margin-left: auto;
    margin-right: auto;
    aspect-ratio: 270 / 220;
    box-sizing: border-box;
  }

  .video-detail-player__shell {
    border-radius: 6px;
    background: linear-gradient(90deg, #dadee5 0%, #e1e3eb 100%);
  }

  .video-detail-player__cover {
    top: auto;
    bottom: 0;
    left: auto;
    right: 0;
    transform: none;
    width: 38%;
    height: 72%;
    max-width: none;
    max-height: none;
    border-radius: 4px;
    background-image: url("assets/video-detail-cover.webp");
    background-repeat: no-repeat;
    background-position: bottom right;
    background-size: contain;
    background-color: transparent;
    z-index: 2;
  }

  .video-detail-player__fade {
    height: 36%;
    border-radius: 0 0 6px 6px;
  }

  /* Левая колонка: заголовок сверху, теги прижаты к низу */
  .video-detail-player__copy {
    inset: auto;
    left: 12px;
    top: 12px;
    right: 40%;
    bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    overflow: hidden;
    z-index: 5;
  }

  .video-detail-player__title {
    display: block;
    position: static;
    left: auto;
    top: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    font-family: Inter, system-ui, sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    font-variation-settings: "slnt" 0, "wght" 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #2f323b;
    text-shadow: none;
    z-index: 5;
    pointer-events: none;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    flex: 0 0 auto;
  }

  .video-detail-player__tags {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    max-width: 100%;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 4px;
    z-index: 5;
    flex: 0 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .video-detail-player__tag {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: auto;
    max-width: 100%;
    height: auto;
    min-height: 0;
    padding: 6px 10px;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
  }

  .video-detail-player__tag-hash,
  .video-detail-player__tag-text {
    flex: none;
    font-size: 10px;
    line-height: 12px;
  }

  .video-detail-player__tag-text {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Play по центру баннера */
  .video-detail-player__play {
    display: flex;
    left: 50%;
    right: auto;
    top: 50%;
    width: 50px;
    height: 50px;
    margin: 0;
    padding: 15px 0 15px 3.75px;
    border: none;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
    gap: 3.75px;
    border-radius: 625px;
    background: rgba(47, 50, 59, 0.6);
    backdrop-filter: blur(3.125px);
    -webkit-backdrop-filter: blur(3.125px);
    transform: translate(-50%, -50%);
    z-index: 6;
  }

  .video-detail-player__play-inner {
    padding-left: 0;
  }

  .video-detail-player__play-inner img {
    width: min(18.12px, 5.66vw);
    height: min(20.25px, 6.33vw);
  }

  .video-detail-player.is-playing .video-detail-player__video {
    object-fit: contain;
  }

  /* Подзаголовок под автором, +12px; кнопки +24px от подзаголовка */
  .video-detail-toolbar {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
  }

  .video-detail-toolbar__author {
    flex: 0 1 auto;
    gap: 12px;
    min-height: 32px;
    align-items: center;
    box-sizing: border-box;
  }

  /* margin-top перебивает #design-root :is(..., p){ margin:0 } из page.css */
  #design-root .video-detail-col-main .video-detail-player__subtitle {
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    max-width: none;
    margin-top: 12px;
    padding: 0;
    pointer-events: auto;
    font-family: Inter, system-ui, sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 15px;
    color: #44474f;
  }

  .video-detail-toolbar__avatar {
    width: 32px;
    height: 32px;
  }

  .video-detail-toolbar__avatar img {
    width: 12px;
    height: 12px;
  }

  .video-detail-toolbar__avatar--photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 5px;
  }

  .video-detail-toolbar__name {
    font-family: Inter, system-ui, sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: 15px;
    color: #44474f;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
    border-bottom: none;
  }

  .video-detail-toolbar__actions {
    width: 100%;
    margin-top: 24px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    align-content: flex-start;
    gap: 12px 20px;
  }

  .video-detail-toolbar__action:nth-child(3) {
    flex: 1 1 100%;
    min-width: 0;
  }

  .video-detail-toolbar__action-text {
    font-size: 13px;
    line-height: 18px;
    background: linear-gradient(180deg, #4a658a 0%, #375172 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }

  .video-detail-toolbar__action-ico {
    width: 10px;
    height: 10px;
  }

  /* Линия сверху; отступ только сверху у aside; без фона, радиуса и max-width */
  .video-detail-aside {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
    min-height: 0;
    margin-top: 32px;
    padding: 32px 0 0;
    border-top: 1px solid #d9d9d9;
    border-radius: 0;
    box-sizing: border-box;
    background: none;
  }

  .video-detail-aside__inner {
    max-width: none;
    gap: 16px;
  }

  .video-detail-aside__lead {
    font-size: 12px;
    line-height: 15px;
  }

  .video-detail-aside__body.is-clamped {
    /* max-height: 200px; */
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .design-root--video .video-detail-aside__footer {
    position: relative;
    z-index: 2;
    width: 100%;
    align-self: stretch;
    margin: 0;
    padding: 0;
    background: transparent;
    pointer-events: auto;
  }

  .video-detail-aside__body.is-clamped + .video-detail-aside__footer {
    margin-top: 0;
  }

  .design-root--video .video-detail-aside__footer.is-visible {
    display: block !important;
  }

  .design-root--video .video-detail-aside__footer--hidden {
    display: none !important;
  }

  .video-detail-aside__more-row {
    position: relative;
    z-index: 1;
    pointer-events: auto;
  }

  .video-detail-aside__more-hint {
    font-size: 12px;
    line-height: 15px;
  }

  .video-detail-aside__more-btn {
    min-height: 0;
    line-height: 15px;
    padding: 0;
    font-size: 12px;
    font-weight: 600;
  }

  .video-detail-aside__more-hint,
  .video-detail-aside__more-btn {
    vertical-align: baseline;
  }

  /* Материалы по теме: без фона секции, 60px сверху, 32px снизу у заголовка */
  .design-root--video .page-main--video > .method-section {
    margin-top: 60px;
    background: none;
    gap: 32px;
  }

  .design-root--video .page-main--video > .method-section .method-head {
    margin-bottom: 0;
  }
}
