/* Ajankohtaista: article listing (blog home and category archives).
   GP Elements 148 (hero with category filter) and 1010 (loop template). */
@media only screen and (min-width: 320px) {
    .ak-hero {
        padding-top: clamp(56px, 7vw, 110px);
        padding-bottom: clamp(40px, 5vw, 72px);
    }

    /* Category filter pills; the current one is picked by the body class */
    a.gb-button.ak-suodin {
        background: transparent;
        color: var(--font-clr);
        border: 2px solid var(--border-clr);
        padding: 0.7em 1.4em;
    }

    a.gb-button.ak-suodin:hover,
    .blog a.gb-button.ak-suodin-kaikki,
    .category-blogi a.gb-button.ak-suodin-blogi,
    .category-markkinakatsaus a.gb-button.ak-suodin-markkinakatsaus,
    .category-uutiset a.gb-button.ak-suodin-uutiset,
    .category-viikkokirje a.gb-button.ak-suodin-viikkokirje {
        background: var(--btn-bg);
        border-color: var(--btn-bg);
        color: var(--btn-font-clr);
    }

    /* Cards. Featured images are 2:1 banners with the title drawn in, so they are shown whole */
    .ak-listaus .gb-query-loop-item {
        padding-bottom: 0;
    }

    .ak-kortti,
    .ak-kortti:hover {
        display: block;
        color: var(--font-clr);
        text-decoration: none;
    }

    .ak-listaus .gb-query-loop-item .ak-kortti .gb-block-image {
        border-radius: 18px;
        overflow: hidden;
        margin-bottom: 18px;
        border: 1px solid var(--border-clr);
    }

    .ak-listaus .gb-query-loop-item .ak-kortti .gb-block-image img {
        width: 100%;
        height: auto;
        aspect-ratio: 2 / 1;
        object-fit: cover;
        padding-bottom: 0;
        display: block;
    }

    .ak-meta {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .ak-meta p {
        margin-bottom: 0;
    }

    .ak-kategoria {
        font-weight: 700;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--accent-clr);
    }

    .ak-kortti h2.ak-otsikko {
        font-size: clamp(20px, 1.5vw, 24px);
        line-height: 1.25;
        letter-spacing: 0;
        margin: 0 0 10px;
        transition: color 0.3s ease;
    }

    .ak-kortti:hover h2.ak-otsikko {
        color: var(--link-hover-clr);
    }

    .ak-ote {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .ak-lue-lisaa {
        font-size: 14px;
        font-weight: 600;
        text-decoration: underline;
        text-underline-offset: 4px;
        margin-bottom: 0;
    }

    /* Pagination (GB query loop pagination inside the loop template) */
    .ak-sivutus .gb-button.ak-sivu,
    .ak-sivutus .page-numbers {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        height: 44px;
        padding: 0 16px;
        border-radius: 999px;
        border: 2px solid var(--border-clr);
        background: transparent;
        color: var(--font-clr);
        text-decoration: none;
        text-transform: none;
        letter-spacing: 0;
        font-weight: 600;
        font-size: 15px;
        transform: none;
    }

    .ak-sivutus .page-numbers.gb-block-is-current,
    .ak-sivutus a.page-numbers:hover,
    .ak-sivutus a.gb-button.ak-sivu:hover {
        background: var(--btn-bg);
        border-color: var(--btn-bg);
        color: var(--btn-font-clr);
    }

    .ak-sivutus .page-numbers.dots {
        border-color: transparent;
        min-width: 24px;
        padding: 0;
    }

    /* The blog home needs the same full-width handling archive.css gives the archives */
    .blog .site-content {
        padding: 0;
    }

    .blog .site.grid-container {
        max-width: 100%;
    }

    .blog .alignfull {
        max-width: 100vw;
        width: auto;
        margin: 0;
    }
}
