.pag {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(28 / var(--screensize, 1440) * 100vw);
    margin-top: calc(35 / var(--screensize, 1440) * 100vw);
}

.pag__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(60 / var(--screensize, 1440) * 100vw);
    width: 100%;
}

.pag__more {
    margin: 0 auto;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.pag__more.is-loading,
.pag__more[disabled] {
    opacity: .6;
    cursor: default;
}

/* Стрелки не по краям страницы, а рядом с номерами: блок по ширине контента */
.pag__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: calc(212 / var(--screensize, 1440) * 100vw);
    width: auto;
    max-width: 100%;
    margin: 0 auto;
}

.pag__nums {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex: 0 0 auto;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.pag__nums::-webkit-scrollbar {
    display: none;
}

/* Номера и многоточие: Inter Display Medium 16/1.3, ширина 28, по центру */
.pag__num,
.pag__dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    min-width: 28px;
    font-family: inherit;
    font-size: 16px;
    /* В шаблоне InterDisplay начертание Medium подключено под весом 700,
       а 500 — это Regular, поэтому для макета (Inter Display Medium) нужен 700. */
    font-weight: 700;
    line-height: 1.3;
    color: #444C52;
    text-decoration: none;
    text-align: center;
    transition: color .2s ease;
}

a.pag__num:hover {
    color: #67879C;
}

/* Активная страница — только цвет, без подложки */
.pag__num.is-active {
    color: #67879C;
    cursor: default;
}

.pag__dots {
    width: auto;
    cursor: default;
}

/* Неактивное/посещённое состояние из макета (grey-lines) */
.pag__num.is-muted,
.pag__dots.is-muted {
    color: rgba(213, 223, 228, 0.91);
}

.pag__arrow {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    text-decoration: none;
    transition: opacity .2s ease;
}

.pag__arrow svg {
    display: block;
    width: 48px;
    height: 48px;
}

.pag__arrow:hover {
    opacity: .8;
}

.pag__arrow.is-disabled {
    opacity: .45;
    pointer-events: none;
}

@media (max-width: 767px) {
    .pag__inner {
        gap: 32px;
    }

    .pag__nav {
        gap: 24px;
    }

    .pag__nums {
        gap: 16px;
    }

    .pag__num,
    .pag__dots {
        width: 24px;
        min-width: 24px;
        font-size: 14px;
    }

    .pag__arrow,
    .pag__arrow svg {
        width: 36px;
        height: 36px;
    }
}
