/* ОБЪЕКТ — блок Shorts «Коротко с объекта» (objsh-*): лента вертикальных роликов на нативном scroll-snap.
   Изолирован от main.css: селекторы из двух классов (.objsh .objsh-x). Раскладка — от ширины места вставки
   (container queries; пороги чуть ниже 600/900/1200 — ширина блока меньше экрана на полосу прокрутки):
     до 589px — карточка 3:5 почти на всю ширину (не выше 72svh), справа из-за края экрана выглядывает следующая;
                лента выходит за правый отступ до края блока; навигация столбиком по центру;
     590–879px — 2 карточки 9:16, 880–1179px — 3, от 1180px — 4; навигация одной строкой:
                подсказка слева, линия прогресса по центру, счётчик и стрелки справа.
   Карточка — одна кнопка (открывает ролик в objv-modal). Ховер — только на устройствах с мышью.
   main.css гасит рамку фокуса у всего (* { outline: none !important }) — поэтому у :focus-visible здесь !important. */

.objsh,
.objsh *,
.objsh *::before,
.objsh *::after{box-sizing:border-box;}

.objsh{
  container:objsh / inline-size;
  background:var(--objekt-color-bg);
  color:var(--objekt-color-cream);
  font-family:var(--objekt-font-body);
  padding:var(--objekt-section-py-cq) 0;
  margin:0;
  overflow:hidden;
}
/* переменные раскладки — на обёртке: правила @container действуют только на потомков контейнера */
.objsh .objsh-wrap{
  --objsh-pad:16px;
  --objsh-gap:clamp(10px, 3cqw, 16px);
  --objsh-peek:clamp(18px, 6cqw, 32px);
  --objsh-n:1;
  padding:0 var(--objsh-pad);
}
.objsh p{margin:0;padding:0;}
.objsh button{font-family:inherit;margin:0;box-shadow:none;-webkit-appearance:none;appearance:none;text-transform:none;letter-spacing:normal;}
.objsh .objsh-sr{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;}

/* ---------- шапка ---------- */
.objsh .objsh-eyebrow{
  display:flex;align-items:center;gap:16px;
  font-size:var(--objekt-fs-caption);
  letter-spacing:0.24em;
  text-transform:uppercase;
  color:var(--objekt-color-accent);
  margin:0 0 16px;
}
.objsh .objsh-eyebrow span{flex-shrink:0;}
/* линия справа от эйдброу — как во всех obj*-блоках сайта, на телефоне тоже */
.objsh .objsh-eyebrow i{display:block;flex:1 1 auto;max-width:560px;height:1px;background:var(--objekt-color-line-strong);}
.objsh .objsh-title{
  font-family:var(--objekt-font-heading);
  font-weight:500;
  font-size:clamp(40px, 12cqw, 56px);
  line-height:1.05;
  letter-spacing:var(--objekt-tracking-heading);
  color:var(--objekt-color-cream);
  margin:0;
}
.objsh .objsh-sub{margin-top:12px;max-width:34em;font-size:17px;line-height:1.5;color:rgba(245,242,237,0.8);}

/* ---------- лента ---------- */
.objsh .objsh-viewport{margin-top:24px;margin-right:calc(-1 * var(--objsh-pad));}    /* на телефоне — до правого края экрана */
.objsh .objsh-track{
  display:flex;
  gap:var(--objsh-gap);
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-x:contain;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
  outline:none;
}
.objsh .objsh-track::-webkit-scrollbar{display:none;}
.objsh .objsh-track:focus-visible{outline:2px solid var(--objekt-color-accent) !important;outline-offset:4px;}
.objsh .objsh-track.is-dragging{scroll-snap-type:none;scroll-behavior:auto;cursor:grabbing;}
.objsh .objsh-track.is-dragging .objsh-card{cursor:grabbing;}

/* ширина карточки на телефоне: ширина блока − левый отступ − зазор − выглядывание; но не выше 72svh (тогда уже) */
.objsh .objsh-item{
  flex:0 0 min(calc(100cqw - var(--objsh-pad) - var(--objsh-gap) - var(--objsh-peek)), 72svh * 3 / 5);
  scroll-snap-align:start;
  scroll-snap-stop:always;
}
/* распорка в конце: последний ролик встаёт с тем же отступом от правого края, что и слева */
.objsh .objsh-end{flex:0 0 max(1px, calc(var(--objsh-pad) - var(--objsh-gap)));}

/* подталкивание ленты вместе с подсказкой: карточки уезжают влево на 32px и возвращаются (2 раза) */
.objsh .objsh-track.is-nudging .objsh-item{animation:objshNudge 1.4s ease-in-out 2;}
@keyframes objshNudge{
  0%,100%{transform:translateX(0);}
  55%{transform:translateX(-32px);}
}

/* ---------- карточка ---------- */
.objsh .objsh-card{
  position:relative;
  display:block;
  width:100%;
  aspect-ratio:3 / 5;
  padding:0;
  border:1px solid rgba(245,242,237,0.10);
  border-radius:8px;
  overflow:hidden;
  background:#151313;
  color:var(--objekt-color-cream);
  text-align:left;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  -webkit-user-select:none;user-select:none;
  transition:border-color .4s ease;
}
.objsh .objsh-card:focus-visible{outline:2px solid var(--objekt-color-accent) !important;outline-offset:3px;}
/* приближение фото при наведении — через inset, а не transform: scale (scale размывает картинку) */
.objsh .objsh-card__media{position:absolute;inset:0;display:block;transition:inset .6s cubic-bezier(.2,.7,.2,1);}
.objsh .objsh-card__img{
  display:block;width:100%;height:100%;
  max-width:none;
  object-fit:cover;
  -webkit-user-drag:none;
}
.objsh .objsh-card__shade{position:absolute;left:0;right:0;bottom:0;height:45%;background:linear-gradient(to bottom, rgba(20,18,18,0) 0%, rgba(20,18,18,0.9) 100%);pointer-events:none;}
.objsh .objsh-card__top{position:absolute;top:14px;left:14px;right:14px;display:flex;justify-content:space-between;align-items:flex-start;gap:8px;}
.objsh .objsh-card__tag,
.objsh .objsh-card__time{
  display:inline-flex;align-items:center;
  min-height:28px;
  padding:5px 10px;
  border-radius:6px;
  background:rgba(20,18,18,0.75);
  font-size:12px;
  line-height:1.2;
  color:var(--objekt-color-cream);
}
.objsh .objsh-card__tag{text-transform:uppercase;letter-spacing:0.14em;}
.objsh .objsh-card__time{font-variant-numeric:tabular-nums;letter-spacing:0.02em;}
.objsh .objsh-card__bottom{position:absolute;left:0;right:0;bottom:0;display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding:0 18px 20px 20px;}
.objsh .objsh-card__text{display:block;min-width:0;}
.objsh .objsh-wave{display:block;width:76px;height:20px;margin-bottom:12px;fill:var(--objekt-color-accent);overflow:visible;}
.objsh .objsh-wave rect{transform-box:fill-box;transform-origin:center;}
.objsh .objsh-card__title{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  overflow:hidden;
  font-family:var(--objekt-font-heading);
  font-weight:400;
  font-size:clamp(28px, 8cqw, 38px);
  line-height:1.12;
  color:var(--objekt-color-cream);
}
.objsh .objsh-card__play{
  flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  width:64px;height:64px;
  border:1.5px solid var(--objekt-color-accent);
  border-radius:50%;
  color:var(--objekt-color-cream);
  transition:background-color .3s ease, color .3s ease;
}
.objsh .objsh-card__play svg{width:42%;height:42%;margin-left:6%;}

@media (hover:hover){
  .objsh .objsh-card:hover{border-color:rgba(169,150,125,0.4);}
  .objsh .objsh-card:hover .objsh-card__media{inset:-2%;}
  .objsh .objsh-card:hover .objsh-card__play{background:var(--objekt-color-accent);color:var(--objekt-color-bg);}
  .objsh .objsh-card:hover .objsh-wave rect{animation:objshWave 1.2s ease-in-out infinite;}
}
.objsh .objsh-card:focus-visible{border-color:rgba(169,150,125,0.4);}
.objsh .objsh-card:focus-visible .objsh-card__media{inset:-2%;}
.objsh .objsh-card:focus-visible .objsh-card__play{background:var(--objekt-color-accent);color:var(--objekt-color-bg);}
.objsh .objsh-card:focus-visible .objsh-wave rect{animation:objshWave 1.2s ease-in-out infinite;}
.objsh .objsh-wave rect:nth-child(3n+1){animation-delay:-.2s;}
.objsh .objsh-wave rect:nth-child(3n+2){animation-delay:-.6s;}
.objsh .objsh-wave rect:nth-child(3n){animation-delay:-.9s;}
@keyframes objshWave{
  0%,100%{transform:scaleY(1);}
  50%{transform:scaleY(.35);}
}

/* заглушка на месте догружаемых карточек */
.objsh .objsh-item--skeleton .objsh-skel{
  display:block;width:100%;aspect-ratio:3 / 5;border-radius:8px;
  background:linear-gradient(100deg, rgba(245,242,237,0.04) 30%, rgba(245,242,237,0.09) 50%, rgba(245,242,237,0.04) 70%) #1f1c1c;
  background-size:300% 100%;
  animation:objshShimmer 1.4s ease-in-out infinite;
}
@keyframes objshShimmer{from{background-position:100% 0;}to{background-position:0 0;}}

/* ---------- навигация (телефон: столбиком по центру) ---------- */
.objsh .objsh-nav{
  display:grid;
  grid-template-areas:"hint" "ctrl" "progress";
  justify-items:center;
  row-gap:18px;
  margin-top:24px;
}
.objsh .objsh-hint{grid-area:hint;}
.objsh .objsh-hint .objekt-hint__text{max-width:9.5em;white-space:normal;text-align:center;}
.objsh .objsh-ctrl{grid-area:ctrl;display:flex;align-items:center;gap:clamp(20px, 8cqw, 36px);}
.objsh .objsh-btn{
  display:flex;align-items:center;justify-content:center;
  width:56px;height:56px;
  padding:0;
  border:1px solid var(--objekt-color-accent);
  border-radius:50%;
  background:transparent;
  color:var(--objekt-color-cream);
  cursor:pointer;
  transition:background-color .2s, color .2s, opacity .2s;
}
.objsh .objsh-btn svg{width:24px;height:24px;}
.objsh .objsh-btn:disabled{opacity:.35;cursor:default;}
.objsh .objsh-btn:focus-visible{outline:2px solid var(--objekt-color-accent) !important;outline-offset:3px;}
@media (hover:hover){
  .objsh .objsh-btn:hover:not(:disabled){background:var(--objekt-color-accent);color:var(--objekt-color-bg);}
}
.objsh .objsh-counter{min-width:5.5em;text-align:center;font-size:16px;font-variant-numeric:tabular-nums;letter-spacing:0.04em;color:rgba(245,242,237,0.6);white-space:nowrap;}
.objsh .objsh-counter__cur{color:var(--objekt-color-cream);}
/* одна тонкая линия прогресса вместо сегментов — работает при любом количестве роликов; клик — перейти к месту */
.objsh .objsh-progress{
  grid-area:progress;
  position:relative;
  justify-self:stretch;
  height:18px;
  cursor:pointer;
}
.objsh .objsh-progress::before{content:"";position:absolute;left:0;right:0;top:8px;height:2px;background:rgba(245,242,237,0.15);}
.objsh .objsh-progress__fill{
  position:absolute;top:8px;height:2px;
  left:var(--objsh-p-left, 0%);
  width:var(--objsh-p-w, 12.5%);
  background:var(--objekt-color-accent);
}

/* роликов не больше, чем видно на экране: стрелки, счётчик, прогресс и подсказка не нужны */
.objsh.is-static .objsh-nav{display:none;}

@container objsh (min-width: 390px){
  .objsh .objsh-wrap{--objsh-pad:20px;}
}

/* ---------- от 590px: несколько карточек 9:16 в ряд, навигация строкой ---------- */
@container objsh (min-width: 590px){
  .objsh .objsh-wrap{--objsh-pad:32px;--objsh-gap:12px;--objsh-n:2;}
  .objsh .objsh-eyebrow{font-size:var(--objekt-fs-meta);letter-spacing:0.3em;gap:24px;margin-bottom:20px;}
  .objsh .objsh-title{font-size:clamp(36px, 6.4cqw, 76px);}
  .objsh .objsh-sub{font-size:18px;}
  .objsh .objsh-viewport{margin-top:clamp(28px, 2.6cqw, 44px);margin-right:0;}
  .objsh .objsh-item{flex-basis:calc((100% - (var(--objsh-n) - 1) * var(--objsh-gap)) / var(--objsh-n));}
  .objsh .objsh-end{display:none;}
  .objsh .objsh-card{aspect-ratio:9 / 16;}
  .objsh .objsh-item--skeleton .objsh-skel{aspect-ratio:9 / 16;}
  .objsh .objsh-card__title{font-size:clamp(20px, 3.2cqw, 30px);}
  .objsh .objsh-card__play{width:50px;height:50px;}
  .objsh .objsh-card__bottom{padding:0 16px 18px 18px;}
  .objsh .objsh-nav{
    grid-template-columns:1fr minmax(0, 40%) 1fr;
    grid-template-areas:"hint progress ctrl";
    align-items:center;
    column-gap:24px;
    margin-top:clamp(28px, 2.6cqw, 40px);
  }
  .objsh .objsh-hint{justify-self:start;}
  .objsh .objsh-hint .objekt-hint__text{max-width:none;white-space:nowrap;text-align:left;}
  .objsh .objsh-ctrl{justify-self:end;gap:20px;}
  .objsh .objsh-btn{width:48px;height:48px;}
  .objsh .objsh-counter{font-size:17px;}
}
@container objsh (min-width: 750px){
  .objsh .objsh-card__title{font-size:clamp(20px, 2.6cqw, 30px);}
}
@container objsh (min-width: 880px){
  .objsh .objsh-wrap{--objsh-gap:14px;--objsh-n:3;}
  .objsh .objsh-card__title{font-size:clamp(20px, 2.2cqw, 30px);}
}
@container objsh (min-width: 1180px){
  .objsh .objsh-wrap{--objsh-gap:clamp(12px, 1cqw, 20px);--objsh-n:4;}
  .objsh .objsh-title{font-size:clamp(36px, 4.2cqw, 76px);}
  .objsh .objsh-card__title{font-size:clamp(20px, 1.6cqw, 30px);}
}
@container objsh (min-width: 1200px){
  .objsh .objsh-wrap{width:min(81.77083cqw, 1600px);margin:0 auto;padding:0;}
}

@media (prefers-reduced-motion: reduce){
  .objsh .objsh-track{scroll-behavior:auto;}
  .objsh .objsh-track.is-nudging .objsh-item{animation:none;}
  .objsh .objsh-card__media{transition:none;}
  .objsh .objsh-card:hover .objsh-wave rect,
  .objsh .objsh-card:focus-visible .objsh-wave rect{animation:none;}
  .objsh .objsh-item--skeleton .objsh-skel{animation:none;}
}

/* ---------- режим сетки (layout="grid", страница «Видео»): 2 / 3 / 4 колонки, «Загрузить ещё» по центру.
   Сразу видно 4 / 6 / 8 карточек — лишние из первой пачки спрятаны, их открывает кнопка (класс is-shown).
   Считаем через nth-of-type: между карточками стоят <script> с разметкой VideoObject ---------- */
.objsh--grid .objsh-filters{margin-top:clamp(20px, 2cqw, 32px);}
.objsh--grid .objsh-grid{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:12px;margin-top:clamp(20px, 2.4cqw, 40px);}
.objsh--grid .objsh-card{aspect-ratio:9 / 16;}
.objsh--grid .objsh-card__top{top:10px;left:10px;right:10px;}
.objsh--grid .objsh-card__tag,
.objsh--grid .objsh-card__time{min-height:24px;padding:4px 8px;font-size:11px;}
.objsh--grid .objsh-card__bottom{gap:8px;padding:0 10px 12px 12px;}
.objsh--grid .objsh-wave{width:56px;height:16px;margin-bottom:8px;}
.objsh--grid .objsh-card__title{font-size:17px;line-height:1.15;}
.objsh--grid .objsh-card__play{width:38px;height:38px;}
.objsh--grid .objsh-item.is-new{opacity:0;transform:translateY(16px);}
.objsh--grid .objsh-item.is-new.is-in{opacity:1;transform:none;transition:opacity .4s ease, transform .4s ease;transition-delay:var(--objsh-delay, 0ms);}
.objsh--grid .objsh-empty{margin-top:24px;font-size:15px;color:rgba(245,242,237,0.6);}
.objsh--grid .objsh-empty[hidden]{display:none;}
.objsh--grid .objsh-more-wrap{display:flex;flex-direction:column;align-items:stretch;gap:8px;margin-top:clamp(24px, 2.4cqw, 40px);}
.objsh--grid .objsh-more-wrap[hidden]{display:none;}
.objsh--grid .objsh-more{
  display:flex;align-items:center;justify-content:center;gap:14px;
  min-height:54px;padding:0 32px;border:0;border-radius:0;
  background:var(--objekt-color-accent);color:var(--objekt-color-bg);
  font-size:var(--objekt-fs-button);font-weight:500;cursor:pointer;
  transition:background-color .2s, opacity .2s;
}
.objsh--grid .objsh-more:hover{background:var(--objekt-color-accent-hover);}
.objsh--grid .objsh-more:focus-visible{outline:2px solid var(--objekt-color-cream) !important;outline-offset:3px;}
.objsh--grid .objsh-more:disabled{cursor:progress;opacity:.85;}
.objsh--grid .objsh-more__icon{position:relative;display:flex;width:20px;height:20px;}
.objsh--grid .objsh-more__icon svg{width:100%;height:100%;}
.objsh--grid .objsh-spinner{position:absolute;inset:1px;display:none;border:2px solid rgba(28,26,26,0.25);border-top-color:var(--objekt-color-bg);border-radius:50%;animation:objshSpin .8s linear infinite;}
.objsh--grid .objsh-more.is-loading .objsh-more__icon svg{display:none;}
.objsh--grid .objsh-more.is-loading .objsh-spinner{display:block;}
@keyframes objshSpin{to{transform:rotate(360deg);}}
.objsh--grid .objsh-more__note{text-align:center;font-size:14px;color:rgba(245,242,237,0.6);}
@container objsh (max-width: 589px){
  .objsh--grid .objsh-item:nth-of-type(n+5):not(.is-shown){display:none;}
  /* телефон, две узкие колонки: метка не помещается рядом с длительностью — оставляем только длительность */
  .objsh--grid .objsh-card__tag{display:none;}
  .objsh--grid .objsh-card__top{justify-content:flex-end;}
}
@container objsh (min-width: 590px){
  .objsh--grid .objsh-grid{grid-template-columns:repeat(3, minmax(0, 1fr));gap:14px;}
  .objsh--grid .objsh-card__top{top:12px;left:12px;right:12px;}
  .objsh--grid .objsh-card__tag,
  .objsh--grid .objsh-card__time{min-height:26px;font-size:12px;}
  .objsh--grid .objsh-card__bottom{padding:0 14px 16px 16px;}
  .objsh--grid .objsh-card__title{font-size:clamp(19px, 2.8cqw, 26px);}
  .objsh--grid .objsh-card__play{width:46px;height:46px;}
  .objsh--grid .objsh-more-wrap{align-items:center;}
}
@container objsh (min-width: 590px) and (max-width: 999px){
  .objsh--grid .objsh-item:nth-of-type(n+7):not(.is-shown){display:none;}
}
@container objsh (min-width: 1000px){
  .objsh--grid .objsh-grid{grid-template-columns:repeat(4, minmax(0, 1fr));gap:clamp(12px, 1.2cqw, 20px);}
  .objsh--grid .objsh-card__title{font-size:clamp(19px, 1.7cqw, 28px);}
  .objsh--grid .objsh-card__play{width:50px;height:50px;}
  .objsh--grid .objsh-wave{width:66px;height:18px;margin-bottom:10px;}
}
@media (prefers-reduced-motion: reduce){
  .objsh--grid .objsh-item.is-new{opacity:1;transform:none;}
  .objsh--grid .objsh-spinner{animation-duration:2s;}
}

/* широкий экран: стрелки со счётчиком — справа на уровне подзаголовка (JS переносит .objsh-ctrl в шапку блока) */
.objsh.is-ctrl-top .objsh-head{position:relative;padding-right:240px;}
.objsh.is-ctrl-top .objsh-head .objsh-ctrl{position:absolute;right:0;bottom:0;gap:20px;}
.objsh.is-ctrl-top .objsh-head .objsh-btn{width:48px;height:48px;}
.objsh.is-ctrl-top .objsh-head .objsh-counter{font-size:17px;}
.objsh.is-ctrl-top .objsh-nav{grid-template-columns:auto minmax(0, 1fr);grid-template-areas:"hint progress";}
