/* Numbered page strip rendered at the bottom of paginated list pages
   (module.php, category_module.php). Markup: <ul class="pagination"> with
   .prev / .next / .active <li> states. Distinct from swiper-pagination dots
   (templates/corporate_new/assets/css/components/pagination.css), which
   styles the swiper carousel bullets, not these numbered links.

   Prev and next anchors are empty in markup — chevrons come from ::before
   pseudo-elements using the loaded FontAwesome 6 kit. */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    /* Negative top tightens against .benefit-grid-section's bottom margin
       (benefit_grid.css — 64px desktop, 32px mobile). Without it the gap is
       sized for full-bleed sections, way too roomy under a pager. Mobile
       value is reset in the breakpoint below since -40px overshoots its 32px
       section margin and the pager overlaps the cards. */
    margin: -40px 0 32px;
    padding: 0;
    list-style: none;
}

@media (max-width: 768px) {
    .pagination {
        margin: 0 0 24px;
    }
}

.pagination li {
    display: flex;
}

.pagination li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    background: #fff;
    color: #101820;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease,
                background-color 0.2s ease,
                color 0.2s ease,
                box-shadow 0.2s ease;
}

@media (hover: hover) {
    .pagination li a:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.10);
    }
}

.pagination li.active a,
.pagination li.active a:hover {
    background-color: var(--brand-color, #2020B3);
    color: var(--on-brand, #fff);
    border-color: var(--brand-color, #2020B3);
}

/* Collapsed-range marker. Plain text, no pill — visually a separator
   between the windowed page numbers, not a clickable target. */
.pagination li.ellipsis {
    align-items: center;
    padding: 0 4px;
    color: rgba(0, 0, 0, 0.5);
    font-weight: 500;
    cursor: default;
}

.pagination li a:active {
    transform: translateY(0) scale(0.97);
}

/* CSS-drawn chevrons via the border trick — the FA kit here runs in SVG mode
   so ::before { content: "\fXXX" } would render as tofu. A rotated square
   with two visible sides + currentColor works under any font config and
   inherits link color (including the brand color when .active). RTL Hebrew:
   prev sits on the right (= "back" in reading direction), so its chevron
   points right; next sits on the left and points left. */
.pagination li.prev a::before,
.pagination li.next a::before {
    content: "";
    display: block;
    width: 6px;
    height: 6px;
    border-style: solid;
    border-color: currentColor;
    border-width: 2px 2px 0 0;
}

.pagination li.prev a::before {
    transform: rotate(45deg); /* points right */
}

.pagination li.next a::before {
    transform: rotate(-135deg); /* points left */
}
