/*******************************************************

    polo.gr blog (inc/functions/polo-blog.php): the hub's cards, the
    articles' frame (body links, "see also"). Header and page frame:
    css/polo.page.css.

 *******************************************************/



    .polo-blog-page .polo-blog__heading,
    .polo-article-page .polo-blog__heading {
        margin: 0 0 20px;
        color: var( --polo-black );
        font-family: var( --polo-font-gotham );
        font-size: clamp( 22px, 2vw, 28px );
        font-weight: 700;
        letter-spacing: 0;
        line-height: 1.2;
        text-align: left;
        text-transform: none;
    }

    .polo-blog__group + .polo-blog__group {
        margin-top: clamp( 40px, 5vw, 72px );
    }



    /* Cards */

    .polo-frame-page .polo-blog__cards {
        display: grid;
        grid-template-columns: repeat( auto-fill, minmax( 200px, 1fr ) );
        gap: 16px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .polo-blog__cards li {
        margin: 0;
    }

    /* .polo-frame in the selector: beats Storefront's link styles (.hentry .entry-content a). */
    .polo-frame-page .polo-frame .polo-blog__card {
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: hidden;
        border-radius: 8px;
        background-color: var( --polo-page-soft );
        color: var( --polo-black );
        text-decoration: none;
        transition: background-color 0.2s var( --polo-ease );
    }

    .polo-blog__image {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px 20px 0;
        aspect-ratio: 1;
    }

    .polo-frame-page .polo-blog__image img {
        display: block;
        width: 100%;
        height: 100%;
        margin: 0;
        object-fit: contain;
        mix-blend-mode: multiply; /* the card drawings have a white background */
        transition: transform 0.3s var( --polo-ease );
    }

    .polo-blog__title {
        display: flex;
        flex: 1 1 auto;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        padding: 16px 18px 18px;
        font-family: var( --polo-font-gotham );
        font-size: 16px;
        font-weight: 700;
        line-height: 1.3;
    }

    .polo-blog__title .polo-page-icon {
        flex: 0 0 auto;
        width: 18px;
        height: 18px;
        margin-top: 1px;
        transition: transform 0.2s var( --polo-ease );
    }

    .polo-frame-page .polo-frame .polo-blog__card:hover,
    .polo-frame-page .polo-frame .polo-blog__card:focus-visible {
        background-color: #ebebe9;
    }

    .polo-blog__card:hover img {
        transform: scale( 1.04 );
    }

    .polo-blog__card:hover .polo-page-icon {
        transform: translateX( 3px );
    }

    .polo-blog__card:focus-visible {
        outline: 3px solid var( --polo-black );
        outline-offset: 3px;
    }



    /* Articles: the editor content inside the frame */

    .polo-article__body {
        margin-top: 8px;
    }

    /* The converted content centres its own boxed sections; no extra side margins inside the frame. */
    .polo-article-page .polo-article__body .polo-boxed > .panel {
        padding-right: 0;
        padding-left: 0;
    }

    .polo-article-page .polo-frame .polo-article__body a:not( .nvm-button ):not( :has( img ) ) {
        color: var( --polo-black );
        text-decoration: underline;
        text-decoration-color: var( --polo-red );
        text-decoration-thickness: 2px;
        text-underline-offset: 3px;
    }

    .polo-article-page .polo-frame .polo-article__body a:not( .nvm-button ):not( :has( img ) ):hover {
        color: var( --polo-red );
    }

    .polo-article__more {
        margin-top: clamp( 56px, 7vw, 104px );
        padding-top: 32px;
        border-top: 1px solid var( --polo-black );
    }

    .polo-frame-page .polo-frame .polo-article__all {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        margin-top: 24px;
        padding: 12px 22px;
        border-radius: 999px;
        background-color: var( --polo-black );
        color: var( --polo-white );
        font-family: var( --polo-font-gotham );
        font-size: 15px;
        font-weight: 700;
        text-decoration: none;
        transition: background-color 0.2s var( --polo-ease );
    }

    .polo-frame-page .polo-frame .polo-article__all:hover,
    .polo-frame-page .polo-frame .polo-article__all:focus-visible {
        background-color: var( --polo-red );
    }

    .polo-article__all .polo-page-icon {
        width: 16px;
        height: 16px;
    }



    @media ( max-width: 600px ) {

        .polo-frame-page .polo-blog__cards {
            grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
            gap: 10px;
        }

        .polo-blog__image {
            padding: 14px 14px 0;
        }

        .polo-blog__title {
            padding: 12px 12px 14px;
            font-size: 14px;
        }

    }

    @media ( prefers-reduced-motion: reduce ) {

        .polo-blog__card img,
        .polo-blog__card .polo-page-icon {
            transition: none;
        }

    }
