/* =====================================================================
   Перелинковка: «Серия», «Ещё моды на <игру>», «Мод из новости».
   Язык тот же, что у карточек модов на главной и шапки «Связь // Обсуждение»:
   превью фоном с градиентом, скошенный ярлык игры, Unbounded + JetBrains Mono,
   без скруглений. Рамки на hover не перекрашиваем (правило сайта).
   ===================================================================== */

.zx .zx-links { max-width: 1000px; margin: 64px auto 0; padding: 0 20px; }
.zx .zx-links + .zx-links { margin-top: 44px; }

.zx .zx-links-head {
    font-family: var(--font-mono); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--zx-dim);
    display: flex; align-items: center; gap: 10px; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--zx-line);
}
.zx .zx-links-head b { color: var(--zx-amber); font-weight: 500; }
/* квадратная метка - «каталог», в отличие от круглой зелёной «связи» в комментариях */
.zx .zx-links-head .dot { width: 7px; height: 7px; flex: 0 0 auto; background: var(--zx-amber); box-shadow: 0 0 8px rgba(232,178,58,.55); }
.zx .zx-links-count { color: var(--zx-faint); }
.zx .zx-links-count::before { content: "·"; margin-right: 10px; }
.zx .zx-links-all {
    margin-left: auto; font-size: 11px; letter-spacing: 1.5px; color: var(--zx-dim); text-decoration: none; white-space: nowrap;
    transition: color .2s;
}
.zx .zx-links-all i { font-size: 10px; margin-left: 6px; transition: transform .2s; }
.zx .zx-links-all:hover { color: var(--zx-amber-2); }
.zx .zx-links-all:hover i { transform: translateX(3px); }

/* ----------------------------- Серия ------------------------------ */
.zx .zx-series { list-style: none; margin: 0; padding: 0; border: 1px solid var(--zx-line); background: var(--zx-panel); counter-reset: none; }
.zx .zx-series-row { position: relative; }
.zx .zx-series-row + .zx-series-row { border-top: 1px solid var(--zx-line); }

.zx .zx-series-link {
    display: grid; grid-template-columns: 40px 112px minmax(0, 1fr) auto; align-items: center; gap: 18px;
    padding: 12px 20px 12px 14px; text-decoration: none; color: inherit; position: relative;
}
.zx a.zx-series-link { transition: background-color .2s; }
.zx a.zx-series-link:hover { background: rgba(232,178,58,.045); }

/* маршрут: узлы, соединённые линией - читается как путь по частям */
.zx .zx-series-num {
    position: relative; height: 100%; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px; color: var(--zx-amber-dim);
}
.zx .zx-series-num::before {
    content: ""; position: absolute; left: 50%; top: -12px; bottom: -12px; width: 1px; transform: translateX(-.5px);
    background: var(--zx-line-2);
}
.zx .zx-series-row:first-child .zx-series-num::before { top: 50%; }
.zx .zx-series-row:last-child .zx-series-num::before { bottom: 50%; }
/* у ненумерованной серии вместо цифры - узел */
.zx .zx-series:not(.is-numbered) .zx-series-num::after {
    content: ""; position: relative; width: 7px; height: 7px; background: var(--zx-bg-2); border: 1px solid var(--zx-line-2);
}
.zx .zx-series.is-numbered .zx-series-num { background: none; }
.zx .zx-series.is-numbered .zx-series-num::before { display: none; }

.zx .zx-series-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--zx-bg-2); border: 1px solid var(--zx-line); }
.zx .zx-series-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(.8) brightness(.78); transition: filter .3s, transform .5s; }
.zx a.zx-series-link:hover .zx-series-thumb img { filter: saturate(1) brightness(.95); transform: scale(1.04); }

.zx .zx-series-text { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.zx .zx-series-title {
    font-family: var(--font-display); font-weight: 600; font-size: 13.5px; line-height: 1.3; text-transform: uppercase; letter-spacing: -.2px;
    color: #e9e6dc; transition: color .2s;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.zx a.zx-series-link:hover .zx-series-title { color: var(--zx-amber-2); }
.zx .zx-series-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--zx-dim); }
.zx .zx-series-meta i { margin-right: 5px; font-size: 9.5px; color: var(--zx-amber-dim); }

.zx .zx-series-go { color: var(--zx-faint); font-size: 11px; transition: color .2s, transform .2s; }
.zx a.zx-series-link:hover .zx-series-go { color: var(--zx-amber); transform: translateX(3px); }

/* текущая часть: янтарная риска слева, подсветка, ярлык «Вы здесь» */
.zx .zx-series-row.is-current { background: linear-gradient(90deg, rgba(232,178,58,.09), rgba(232,178,58,0) 70%); }
.zx .zx-series-row.is-current::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 2px; background: var(--zx-amber); z-index: 1; }
.zx .zx-series-row.is-current .zx-series-num { color: var(--zx-amber); }
.zx .zx-series-row.is-current .zx-series-num::after { background: var(--zx-amber); border-color: var(--zx-amber); box-shadow: 0 0 8px rgba(232,178,58,.6); }
.zx .zx-series-row.is-current .zx-series-thumb img { filter: none; }
.zx .zx-series-row.is-current .zx-series-title { color: #f5f1e4; }
.zx .zx-series-here {
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: #12100b; font-weight: 600;
    background: var(--zx-amber); padding: 6px 12px 5px 16px; white-space: nowrap;
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%);
}

/* ------------------------- Карточки модов ------------------------- */
.zx .zx-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.zx .zx-tile {
    position: relative; overflow: hidden; isolation: isolate; text-decoration: none;
    min-height: 212px; display: flex; flex-direction: column; justify-content: flex-end;
    border: 1px solid var(--zx-line); background: var(--zx-bg-2);
}
.zx .zx-tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: saturate(.9); transition: transform .5s, filter .3s; }
.zx .zx-tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8,11,10,.05) 22%, rgba(8,11,10,.6) 58%, rgba(8,11,10,.97) 100%); }
.zx .zx-tile:hover .zx-tile-img { transform: scale(1.05); filter: saturate(1.05) brightness(1.06); }

.zx .zx-tile-badge {
    position: absolute; top: -1px; left: -1px; z-index: 2; font-family: var(--font-mono); font-size: 10px;
    letter-spacing: 1px; text-transform: uppercase; color: var(--zx-text);
    background: #12100b; padding: 8px 24px 7px 13px; display: inline-flex; align-items: center;
    clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
}
.zx .zx-tile-body { padding: 16px 18px 17px; display: flex; flex-direction: column; gap: 10px; }
.zx .zx-tile-title {
    font-family: var(--font-display); font-weight: 600; font-size: 14px; line-height: 1.28; color: #f2f0e8; text-transform: uppercase; letter-spacing: -.3px;
    text-shadow: 0 1px 2px rgba(8,11,10,.95), 0 2px 10px rgba(8,11,10,.85), 0 0 22px rgba(8,11,10,.55);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; transition: color .2s;
}
.zx .zx-tile:hover .zx-tile-title { color: var(--zx-amber-2); }
.zx .zx-tile-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1.5px; color: var(--zx-amber-dim); text-transform: uppercase; }
.zx .zx-tile-meta i { margin-right: 5px; }

/* одна карточка (мод из новости) - широкая плашка: кадр справа, текст слева; две - пополам */
.zx .zx-tiles.is-single { grid-template-columns: 1fr; }
.zx .zx-tiles.is-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.zx .zx-tiles.is-pair .zx-tile { min-height: 236px; }
.zx .zx-tile--wide { min-height: 228px; justify-content: center; }
.zx .zx-tile--wide::after { background: linear-gradient(90deg, rgba(8,11,10,.97) 0%, rgba(8,11,10,.88) 34%, rgba(8,11,10,.35) 70%, rgba(8,11,10,.1) 100%); }
.zx .zx-tile--wide .zx-tile-body { max-width: 58%; padding: 40px 28px 24px; gap: 14px; }
.zx .zx-tile--wide .zx-tile-title { font-size: 20px; line-height: 1.2; -webkit-line-clamp: 2; }
.zx .zx-tile-cta {
    align-self: flex-start; margin-top: 4px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--zx-amber); border-bottom: 1px solid rgba(232,178,58,.4); padding-bottom: 3px;
}
.zx .zx-tile-cta i { font-size: 10px; margin-left: 6px; transition: transform .2s; }
.zx .zx-tile--wide:hover .zx-tile-cta i { transform: translateX(3px); }

/* ----------------------------- Адаптив ---------------------------- */
@media (max-width: 900px) {
    .zx .zx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .zx .zx-tiles.is-single { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .zx .zx-links { margin-top: 48px; }
    .zx .zx-links-head { font-size: 11.5px; letter-spacing: 1.5px; flex-wrap: wrap; row-gap: 8px; }
    .zx .zx-links-all { margin-left: 0; flex-basis: 100%; order: 5; }

    .zx .zx-series-link { grid-template-columns: 28px 76px minmax(0, 1fr) auto; gap: 12px; padding: 11px 12px 11px 8px; }
    .zx .zx-series-title { font-size: 12px; -webkit-line-clamp: 3; }
    .zx .zx-series-meta { font-size: 9.5px; letter-spacing: 1px; }
    /* на телефоне ярлык «Вы здесь» съедал ширину названия - текущая часть и так видна
       по янтарной риске, номеру и подсветке строки */
    .zx .zx-series-here { display: none; }
    .zx .zx-series-row.is-current .zx-series-link { grid-template-columns: 28px 76px minmax(0, 1fr); }

    /* похожие на телефоне - лентой с прокруткой, а не 6 карточек столбиком */
    .zx .zx-tiles:not(.is-single) {
        display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px;
        margin: 0 -20px; padding: 0 20px 6px; scroll-padding: 0 20px; scrollbar-width: none;
    }
    .zx .zx-tiles:not(.is-single)::-webkit-scrollbar { display: none; }
    .zx .zx-tiles:not(.is-single) .zx-tile { flex: 0 0 78%; scroll-snap-align: start; min-height: 196px; }

    .zx .zx-tile--wide { min-height: 0; justify-content: flex-end; aspect-ratio: 16 / 11; }
    .zx .zx-tile--wide::after { background: linear-gradient(180deg, rgba(8,11,10,.05) 22%, rgba(8,11,10,.6) 55%, rgba(8,11,10,.97) 100%); }
    .zx .zx-tile--wide .zx-tile-body { max-width: none; padding: 16px 18px 18px; }
    .zx .zx-tile--wide .zx-tile-title { font-size: 16px; }
}
