/*
|--------------------------------------------------------------------------
| Word Intelligence category hero and capped post cards
|--------------------------------------------------------------------------
|
| Loaded after desktop-density-85.css so these final responsive dimensions
| are not overridden by the older auto-fit grid rules.
|
*/

/*
|--------------------------------------------------------------------------
| Compact individual-category header
|--------------------------------------------------------------------------
|
| Uses the same breadcrumb-bar dimensions and typography as the main
| Categories page, but without rendering breadcrumb navigation.
|
*/

.breadcrumb-bar .breadcrumb-header {
    min-width: 0;
    margin: 0;

    color: var(--text-color);

    font-family:
        "Inter",
        sans-serif;

    font-size:
        clamp(
            1.55rem,
            2vw,
            2rem
        );

    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.1;

    overflow-wrap: anywhere;
}

.wi-category-bar {
    justify-content: flex-start;
}

.wi-category-bar__heading {
    display: flex;
    min-width: 0;
    align-items: center;
    gap:
        clamp(
            5px,
            1vw,
            10px
        );
}

.wi-category-bar__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    padding: 3px 8px;

    border-radius: 999px;

    background: var(--bg-color);
    color: var(--text-color);


    font-family:
        "Inter",
        sans-serif;

    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    margin-top: -15px;
}

/*
|--------------------------------------------------------------------------
| Compact category header — mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 599px) {
    .wi-category-bar {
        height: auto;
        min-height: 70px;

        margin-top: 0;

        padding:
            17px
            clamp(
                20px,
                6vw,
                28px
            );
    }

    .breadcrumb-bar .breadcrumb-header {
        font-size:
            clamp(
                1.35rem,
                7vw,
                1.75rem
            );

        letter-spacing: -0.03em;
    }

    .wi-category-bar__heading {
        gap: 9px;
    }

    .wi-category-bar__count {
        min-width: 34px;
        min-height: 27px;

        padding: 4px 9px;

        font-size: 0.78rem;
    }
}

/*
|--------------------------------------------------------------------------
| Standard homepage and category post cards
|--------------------------------------------------------------------------
*/

.wi-post-card-grid {
    display: grid;
    width: 100%;

    grid-template-columns:
        minmax(0, 1fr);

    gap:
        clamp(
            15px,
            1vw,
            20px
        );

    align-items: stretch;
    justify-content: center;
    justify-items: center;
}

.wi-post-card {
    width: 100%;
    max-width: 420px;
}

/*
|--------------------------------------------------------------------------
| Tablet
|--------------------------------------------------------------------------
*/

@media
    (min-width: 600px)
    and
    (max-width: 1023px)
{

    .wi-post-card-grid {
        grid-template-columns:
            repeat(
                auto-fit,
                minmax(
                    260px,
                    360px
                )
            );

        justify-content: center;
        justify-items: stretch;
    }

    .wi-post-card {
        max-width: 360px;
    }
}

/*
|--------------------------------------------------------------------------
| Standard desktop and laptop
|--------------------------------------------------------------------------
*/

@media (min-width: 1024px) {
    .wi-post-card-grid {
        grid-template-columns:
            repeat(
                auto-fit,
                minmax(
                    250px,
                    320px
                )
            );

        justify-content: start;
        justify-items: stretch;
    }

    .wi-post-card {
        max-width: 320px;
    }
}

/*
|--------------------------------------------------------------------------
| Wide desktop
|--------------------------------------------------------------------------
*/

@media (min-width: 1440px) {
    .wi-post-card-grid {
        grid-template-columns:
            repeat(
                auto-fit,
                minmax(
                    270px,
                    340px
                )
            );
    }

    .wi-post-card {
        max-width: 340px;
    }
}

/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 599px) {

    .wi-post-card-grid {
        justify-items: center;
    }

    .wi-post-card {
        max-width: 420px;
    }
}

/*
|--------------------------------------------------------------------------
| Final responsive post-card grid
|--------------------------------------------------------------------------
|
| Cards fill the complete content row instead of retaining a fixed
| individual maximum width.
|
*/

/*
|--------------------------------------------------------------------------
| Default mobile layout
|--------------------------------------------------------------------------
*/

.wi-post-card-grid {
    display: grid;
    width: 100%;
    min-width: 0;

    grid-template-columns:
        minmax(0, 1fr);

    grid-auto-rows: 1fr;

    gap:
        clamp(
            15px,
            1vw,
            20px
        );

    align-items: stretch;
    justify-content: stretch;
    justify-items: stretch;
}

.wi-post-card {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 100%;
}

.wi-post-card .card-content {
    flex: 1;
}

/*
|--------------------------------------------------------------------------
| Tablet and compact laptop
|--------------------------------------------------------------------------
*/

@media
    (min-width: 600px)
    and
    (max-width: 1205px)
{
    .wi-post-card-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}

/*
|--------------------------------------------------------------------------
| Standard desktop
|--------------------------------------------------------------------------
|
| This includes the screen shown in your screenshot.
|
*/

@media
    (min-width: 1205px)
    and
    (max-width: 1699px)
{
    .wi-post-card-grid {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );
    }
}

/*
|--------------------------------------------------------------------------
| Extra-wide desktop
|--------------------------------------------------------------------------
*/

@media (min-width: 1700px) {
    .wi-post-card-grid {
        grid-template-columns:
            repeat(
                4,
                minmax(0, 1fr)
            );
    }
}

/*
|--------------------------------------------------------------------------
| Individual-category pagination
|--------------------------------------------------------------------------
|
| Retains the normal Word Intelligence page-button and nav-button theme.
|
*/

.wi-pagination .page-button,
.wi-pagination .nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;
}

.wi-pagination .page-button.active {
    border-color: var(--accent-color);

    background: var(--accent-color);
    color: var(--text-color-inverse);
}

.wi-pagination .nav-button:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.wi-pagination .page-button:hover:not(.active),
.wi-pagination .nav-button:hover:not(:disabled) {
    background: var(--button-color);
    color: var(--text-color-inverse);
}

.wi-pagination .nav-button i {
    line-height: 1;
    pointer-events: none;
}

@media (max-width: 599px) {
    .wi-pagination {
        margin-top: 24px;
    }

    .wi-pagination .page-button,
    .wi-pagination .nav-button {
        width: 34px;
        height: 34px;

        font-size: 0.82rem;
    }
}