/* ═══ «Кругозор»: Кинозал + Telegram (horizon2.js) ═══ */
.hz2 { margin-top: 72px; }
.hz2-kick { display: inline-flex; align-items: center; gap: 10px; font: 800 .7rem var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--blue-600, #2563eb); }
.hz2-kick::before { content: ''; width: 26px; height: 2px; border-radius: 2px; background: currentColor; }
.hz2 h3 { margin: 10px 0 8px; font: 800 clamp(1.5rem, 3.2vw, 2.1rem)/1.15 var(--font-display); letter-spacing: -.02em; }
.hz2 h3 em { font-style: normal; color: var(--blue-600, #2563eb); }
.hz2 .kz-head p, .hz2 .tgx-head p { margin: 0; max-width: 60ch; color: var(--text-secondary); font-size: .95rem; line-height: 1.55; }

/* ── Кинозал ── */
.kz-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.kz-ctrl { display: flex; gap: 8px; flex: 0 0 auto; }
.kz-arr { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid rgba(200,210,230,.8); background: #fff; color: var(--blue-600); font: 400 1.6rem/1 var(--font-body); cursor: pointer; transition: all .25s cubic-bezier(.16,1,.3,1); }
.kz-arr:hover { background: var(--blue-600); color: #fff; border-color: transparent; transform: scale(1.06); }
.kz-rail { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 26px; margin: -8px -4px 0; scrollbar-width: none; overscroll-behavior-x: contain; }
.kz-rail::-webkit-scrollbar { display: none; }
.kz-card { flex: 0 0 216px; scroll-snap-align: start; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 12px; }
.kz-poster { position: relative; aspect-ratio: 2 / 3; border-radius: 20px; overflow: hidden; background: linear-gradient(160deg, #1e3a8a, #0b1a3a);
  box-shadow: 0 18px 34px -18px rgba(15,23,42,.55), 0 0 0 1px rgba(15,23,42,.06); transition: transform .45s cubic-bezier(.16,1,.3,1), box-shadow .45s; }
.kz-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transition: transform .6s cubic-bezier(.16,1,.3,1), filter .4s; }
.kz-ph { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 18px 18px 80px; color: #fff; text-align: center; }
.kz-ph b { font: 800 1.15rem/1.15 var(--font-display); } .kz-ph small { opacity: .7; }
.kz-poster::after { content: ''; position: absolute; inset: 0; z-index: 2; background: linear-gradient(to top, rgba(2,6,23,.75), transparent 45%); pointer-events: none; }
.kz-n { position: absolute; left: 12px; bottom: 6px; z-index: 3; font: 900 3.4rem/1 var(--font-display); color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.9); letter-spacing: -.04em; text-shadow: 0 6px 18px rgba(0,0,0,.35); }
.kz-r { position: absolute; top: 10px; left: 10px; z-index: 3; padding: 4px 9px; border-radius: 10px; font: 800 .8rem var(--font-body); color: #fff; background: rgba(15,23,42,.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.kz-r.ok { background: #2f9e44; } .kz-r.hi { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.kz-age { position: absolute; top: 10px; right: 10px; z-index: 3; padding: 3px 7px; border-radius: 8px; font: 800 .66rem var(--font-body); color: #fff; background: rgba(255,255,255,.18); box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.kz-hover { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; padding: 18px; color: #fff;
  background: linear-gradient(to top, rgba(7,18,51,.97) 15%, rgba(7,18,51,.82) 60%, rgba(7,18,51,.55)); opacity: 0; transform: translateY(12px); transition: opacity .3s, transform .4s cubic-bezier(.16,1,.3,1); }
.kz-hover p { margin: 0; font-size: .82rem; line-height: 1.5; }
.kz-go { align-self: flex-start; padding: 7px 12px; border-radius: 999px; background: #f97316; font: 800 .72rem var(--font-body); }
@media (hover: hover) {
  .kz-card:hover .kz-poster { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 30px 50px -22px rgba(30,64,175,.6); }
  .kz-card:hover .kz-poster img { transform: scale(1.06); }
  .kz-card:hover .kz-hover { opacity: 1; transform: none; }
}
.kz-card:focus-visible { outline: none; } .kz-card:focus-visible .kz-poster { box-shadow: 0 0 0 4px rgba(59,130,246,.5); }
.kz-meta b { display: block; font: 800 1rem/1.25 var(--font-display); }
.kz-meta small { display: block; margin-top: 3px; font-size: .74rem; color: var(--text-muted); line-height: 1.35; }
.kz-why { margin: 7px 0 0; font-size: .8rem; line-height: 1.45; color: var(--text-secondary); }
.kz-why em { display: inline-block; margin-right: 6px; padding: 2px 8px; border-radius: 999px; font: 800 .6rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; font-style: normal; color: #c2410c; background: #ffedd5; vertical-align: 1px; }
.kz-card.is-top .kz-poster { box-shadow: 0 18px 34px -18px rgba(234,88,12,.6), 0 0 0 2px #fb923c; }
@media (hover: none) { .kz-meta .kz-why { display: block; } }

/* ── Telegram ── */
.tgx-head { margin-bottom: 18px; }
.tgx-chs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.tgx-ch { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; border-radius: 999px; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #2563eb 55%, #3b82f6); box-shadow: 0 10px 22px -14px rgba(37,99,235,.8); transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s; }
.tgx-ch:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -14px rgba(37,99,235,.9); }
.tgx-ch .tgx-av { width: 34px; height: 34px; font-size: .7rem; box-shadow: 0 0 0 2px rgba(255,255,255,.55); }
.tgx-ch-t { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.tgx-ch-t b { font: 800 .86rem var(--font-display); white-space: nowrap; }
.tgx-ch-t small { font-size: .68rem; opacity: .8; white-space: nowrap; }
.tgx-sub { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #1d4ed8; font: 800 .9rem/1 var(--font-body); }
.tgx-av { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; font-style: normal; font: 800 .72rem var(--font-body); color: #fff;
  background: linear-gradient(135deg, var(--h, #3b82f6), color-mix(in srgb, var(--h, #3b82f6) 60%, #1d4ed8)); }
.tgx-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tgx-chips button { padding: 8px 14px; border-radius: 999px; border: 1.5px solid rgba(200,210,230,.8); background: #fff; font: 600 .82rem var(--font-body); color: var(--text-secondary); cursor: pointer; transition: all .2s; }
.tgx-chips button.on { background: var(--blue-600, #2563eb); color: #fff; border-color: transparent; box-shadow: 0 6px 14px -6px rgba(37,99,235,.6); }
.tgx-grid { columns: 3 300px; column-gap: 16px; }
.tgx-post { break-inside: avoid; display: flex; flex-direction: column; margin: 0 0 16px; border-radius: 22px; overflow: hidden; text-decoration: none; color: inherit; background: #fff;
  box-shadow: 0 10px 26px -16px rgba(15,23,42,.35), 0 0 0 1px rgba(200,210,230,.55); transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s;
  animation: tgxIn .55s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes tgxIn { from { opacity: 0; transform: translateY(14px); } }
.tgx-post:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -20px rgba(30,64,175,.45), 0 0 0 1px rgba(59,130,246,.35); }
.tgx-media { position: relative; background: #0b1a3a; }
.tgx-media img { display: block; width: 100%; max-height: 340px; object-fit: cover; }
.tgx-post.is-lead .tgx-media img { max-height: 420px; }
.tgx-play { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(15,23,42,.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 0 0 2px rgba(255,255,255,.6); transition: transform .3s; }
.tgx-play svg { width: 24px; height: 24px; margin-left: 3px; }
.tgx-post:hover .tgx-play { transform: scale(1.1); background: #f97316; }
.tgx-dur { position: absolute; right: 10px; bottom: 10px; padding: 3px 8px; border-radius: 8px; font: 700 .72rem var(--font-body); color: #fff; background: rgba(15,23,42,.7); }
.tgx-body { position: relative; padding: 14px 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.tgx-post.no-img .tgx-body { border-top: 4px solid var(--h, #3b82f6); }
.tgx-by { display: flex; align-items: center; gap: 9px; }
.tgx-by span { display: flex; flex-direction: column; line-height: 1.15; flex: 1; min-width: 0; }
.tgx-by b { font-size: .82rem; } .tgx-by small { font-size: .7rem; color: var(--text-muted); }
.tgx-new { font-style: normal; padding: 3px 8px; border-radius: 999px; font: 800 .6rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: #fff; background: #f97316; }
.tgx-body h4 { margin: 0; font: 800 1rem/1.35 var(--font-display); }
.tgx-body p { margin: 0; font-size: .86rem; line-height: 1.5; color: var(--text-secondary); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tgx-post.no-img .tgx-body p { -webkit-line-clamp: 7; }
.tgx-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid rgba(200,210,230,.5); font-size: .74rem; color: var(--text-muted); }
.tgx-open { color: #229ed9; font-weight: 700; } .tgx-open i { font-style: normal; display: inline-block; transition: transform .25s; }
.tgx-post:hover .tgx-open i { transform: translate(2px, -2px); }
.tgx-more { display: flex; justify-content: center; margin-top: 6px; }
.tgx-empty { padding: 24px; border-radius: 18px; background: var(--bg-soft, #f4f7fd); color: var(--text-muted); text-align: center; }
.tgx-skel { pointer-events: none; }
.tgx-skel .tgx-media { height: 180px; background: linear-gradient(90deg, #e8eef8, #f4f7fd, #e8eef8); background-size: 200% 100%; animation: tgxSk 1.2s linear infinite; }
.tgx-skel .tgx-body i { display: block; height: 12px; border-radius: 6px; background: #eef2f8; } .tgx-skel .tgx-body i:nth-child(2) { width: 80%; } .tgx-skel .tgx-body i:nth-child(3) { width: 55%; }
@keyframes tgxSk { to { background-position: -200% 0; } }
@media (max-width: 900px) { .tgx-grid { columns: 2 260px; } }
@media (max-width: 760px) {
  .hz2 { margin-top: 52px; }
  .kz-head { align-items: flex-start; } .kz-ctrl { display: none; }
  .kz-rail { margin: -8px -16px 0; padding: 8px 16px 22px; scroll-padding: 0 16px; gap: 14px; }
  .kz-card { flex-basis: 62%; }
  .tgx-chs { gap: 8px; }
  .tgx-grid { columns: 1; }
}
@media (prefers-reduced-motion: reduce) { .tgx-post { animation: none; } }

/* ═══ раздел «Мир баскетбола» (после Сообщества) ═══ */
#worldfeed { background: linear-gradient(180deg, #ffffff 0%, #f0f4ff 100%); }
#worldfeed #hzTg { margin-top: 0; }

/* ── Telegram v2: ровная сетка одинаковых карточек ── */
.tgx-grid { columns: auto !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; align-items: stretch; }
.tgx-grid .tgx-post { margin: 0; height: 100%; break-inside: auto; cursor: pointer; }
.tgx-grid .tgx-media { aspect-ratio: 16 / 10; overflow: hidden; flex: 0 0 auto; }
.tgx-grid .tgx-media img { width: 100%; height: 100%; max-height: none !important; object-fit: cover; transition: transform .6s cubic-bezier(.16,1,.3,1); }
.tgx-post:hover .tgx-media img { transform: scale(1.05); }
.tgx-media.empty { background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--h) 65%, transparent), transparent 60%), linear-gradient(135deg, #1d4ed8, #3b82f6); }
.tgx-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 14px 18px; color: #fff; }
.tgx-ph b { font: 900 6rem/1 var(--font-display); opacity: .35; margin-top: -10px; }
.tgx-ph small { font: 800 .66rem var(--font-body); letter-spacing: .16em; text-transform: uppercase; opacity: .8; }
.tgx-media .tgx-new { position: absolute; top: 10px; left: 10px; z-index: 2; box-shadow: 0 4px 12px -4px rgba(249,115,22,.7); }
.tgx-grid .tgx-body { flex: 1; display: flex; flex-direction: column; gap: 8px; border-top: 0 !important; }
.tgx-grid .tgx-body h4 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.tgx-grid .tgx-body p { -webkit-line-clamp: 3 !important; min-height: 4.5em; white-space: normal; }
.tgx-grid .tgx-foot { margin-top: auto; }
.tgx-open { color: var(--blue-600, #2563eb); }

/* ── пост в нашем окне ── */
.tgm { display: flex; flex-direction: column; gap: 16px; }
.tgm-media { position: relative; border-radius: 20px; overflow: hidden; background: #020617; }
.tgm-media img { display: block; width: 100%; max-height: 62vh; object-fit: contain; margin: 0 auto; }
.tgm-video { display: block; width: 100%; max-height: 70vh; background: #000; }
.tgm-ext { display: grid; place-items: center; min-height: 220px; text-decoration: none; color: #fff; }
.tgm-ext img { opacity: .55; }
.tgm-ext .tgx-play { position: absolute; }
.tgm-ext-l { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); padding: 8px 14px; border-radius: 999px; background: rgba(15,23,42,.75); font: 700 .8rem var(--font-body); white-space: nowrap; }
.tgm-gal { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 20px; scrollbar-width: none; }
.tgm-gal::-webkit-scrollbar { display: none; }
.tgm-gal img { flex: 0 0 100%; scroll-snap-align: center; max-height: 62vh; object-fit: contain; background: #020617; border-radius: 20px; }
.tgm-gal-n { margin-top: -8px; font-size: .74rem; color: var(--text-muted); text-align: center; }
.tgm-by { display: flex; align-items: center; gap: 10px; }
.tgm-by .tgx-av { width: 40px; height: 40px; }
.tgm-by span { display: flex; flex-direction: column; flex: 1; min-width: 0; } .tgm-by b { font-size: .92rem; } .tgm-by small { font-size: .74rem; color: var(--text-muted); }
.tgm-by em { font-style: normal; font-size: .78rem; color: var(--text-muted); }
.tgm-text { font-size: 1rem; line-height: 1.65; color: var(--text-primary); word-wrap: break-word; }
.tgm-text a { color: var(--blue-600, #2563eb); text-decoration: underline; text-underline-offset: 3px; }
.tgm-text blockquote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--h, #3b82f6); background: var(--bg-soft, #f4f7fd); border-radius: 0 12px 12px 0; }
.tgm-spoil { background: #1e293b; color: transparent; border-radius: 4px; cursor: pointer; transition: all .3s; user-select: none; }
.tgm-spoil.on { background: #eef2f8; color: inherit; user-select: auto; }
.tgm-act { display: flex; gap: 8px; flex-wrap: wrap; }
.tgm-sub { background: #229ed9 !important; color: #fff !important; border: 0 !important; }
@media (max-width: 760px) {
  .tgx-grid { grid-template-columns: 1fr; gap: 14px; }
  .tgx-grid .tgx-body p { min-height: 0; }
}
/* лента на телефоне/планшете: все карточки одной высоты */
.tgx-grid.m-rail { align-items: stretch !important; }
.tgx-grid.m-rail > .tgx-post { height: auto !important; align-self: stretch !important; }
@media (max-width: 760px) { .tgx-grid.m-rail .tgx-body p { min-height: 4.5em; } }
/* Telegram снова в «Кругозоре», кинозал — отдельным разделом после «Сообщества» */
#horizon #hzTg { margin-top: 72px; }
#worldfeed #hzFilms { margin-top: 0; }
@media (max-width: 760px) { #horizon #hzTg { margin-top: 52px; } }
