/* Полка рилсов + короткая форма вопроса (reels.js) */
.reels-sec { background: var(--navy); color: #fff; }
.reels-sec .s-lead { margin-bottom: 0; }
/* Телефон: заголовок → видео → форма. Компьютер: заголовок и форма слева, видео справа. */
.reels-wrap { display: grid; gap: 28px; grid-template-areas: "head" "shelf" "ask"; }
.reels-head { grid-area: head; }
.reels-shelf, .reels-slider { grid-area: shelf; }
.reels-slider { min-width: 0; }
.reels-ask { grid-area: ask; }
@media (min-width: 900px) {
  .reels-wrap { grid-template-columns: minmax(340px, 460px) minmax(0, 1fr); grid-template-rows: auto 1fr;
    grid-template-areas: "head shelf" "ask shelf"; column-gap: 56px; row-gap: 28px; }
  .reels-ask { align-self: start; }
  .reels-shelf .reel { width: 320px; }
}
.reels-shelf { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
/* Слайдер (reels.js добавляет обёртку, стрелки и ссылку «Смотреть все») */
.reels-slider { position: relative; }
.reels-slider .reels-shelf { scrollbar-width: none; overscroll-behavior-x: contain; }
.reels-slider .reels-shelf::-webkit-scrollbar { display: none; }
.reels-has-next .reels-shelf { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
  mask-image: linear-gradient(90deg, #000 82%, transparent); }
.reels-arrow { position: absolute; z-index: 2; top: var(--reel-mid, 40%); transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer;
  color: var(--navy); background: #fff; border: 0; box-shadow: 0 6px 20px rgba(0,0,0,.35);
  transition: transform .2s, background .2s; }
.reels-arrow:hover { background: #e9edf3; }
.reels-arrow:active { transform: translateY(-50%) scale(.94); }
.reels-next { right: 8px; }
.reels-prev { left: 8px; }
.reels-arrow[hidden] { display: none; }
.reels-arrow:focus-visible, .reels-all-link:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.reels-all-link { display: inline-block; margin-top: 16px; font-size: 15px; font-weight: 700; color: #fff;
  text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35); padding-bottom: 2px; }
.reels-all-link:hover { border-bottom-color: #fff; }

/* Страница всех видео /video/: сетка вместо ленты, форма справа */
.reels-all .reels-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px 12px; overflow: visible; padding-bottom: 0; }
.reels-all .reel figcaption { font-size: 13px; }
.reels-all .reel, .reels-all .reels-shelf .reel { width: auto; }
@media (min-width: 900px) {
  .reels-all .reels-wrap { grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto auto;
    grid-template-areas: "head head" "shelf ask"; }
  .reels-all .reels-ask { position: sticky; top: 88px; }
}
.reel { flex: 0 0 auto; width: min(300px, 72vw); scroll-snap-align: start; margin: 0; }
.reel video { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover;
  background: var(--navy-mid); border-radius: 14px; border: 1px solid rgba(255,255,255,.12); }
.reel figcaption { margin-top: 10px; font-size: 14px; font-weight: 600; line-height: 1.4;
  color: rgba(255,255,255,.85); }

.reels-ask { background: #fff; color: var(--text); border-radius: 14px; padding: 26px 24px; }
.reels-ask h3 { font-size: 20px; font-weight: 800; line-height: 1.25; margin-bottom: 8px; }
.reels-ask p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.reels-ask form { display: grid; gap: 10px; }
.reels-ask input[type="text"], .reels-ask textarea { width: 100%; padding: 12px 14px; font-size: 15px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); }
.reels-ask textarea { resize: vertical; min-height: 64px; }
.reels-ask button[type="submit"] { padding: 14px 18px; font-size: 15px; font-weight: 700; color: #fff;
  background: var(--accent); border-radius: 8px; }
.reels-ask button[type="submit"]:hover { background: var(--accent-dark); }
.reels-ask button:disabled { opacity: .65; cursor: wait; }
.reels-ok { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.5;
  color: var(--text-muted); }
.reels-ok input { margin-top: 3px; }
.reels-ok a { color: inherit; }
#reelsError { margin-top: 10px; font-size: 14px; color: #a5111c; line-height: 1.5; }
.reels-done { font-size: 15px; font-weight: 600; color: var(--success); line-height: 1.5; }
#reelsForm[hidden], #reelsError[hidden], #reelsDone[hidden], .reels-sec[hidden] { display: none !important; }
