﻿/*Denne er med Feature artikkel sist som egen formattering */
    .article-grid a
    {
        color: black !important;
    }
    /* 1 col default */
    .article-grid
    {
        display: grid;
        gap: 3rem;
        grid-template-columns: 1fr;
        
    }
    /* 2 cols from SM */
    @media (min-width:576px)
    {
        .article-grid{grid-template-columns: repeat(2, minmax(0, 1fr));}
        /* Normal last-row fill (exclude Feature) */
        .article-grid > .article-card:not(.cat-feature):last-child:nth-child(2n+1){grid-column: span 2;}
        /* Feature at end: full row in 2-col layout */
        .article-grid > .article-card.cat-feature:last-child{grid-column: 1 / -1; /* span all columns */}
    }

    /* 3 cols from LG */
    @media (min-width:992px)
    {
        .article-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); }
        
        /* Normal last-row fill (exclude Feature) */
        .article-grid > .article-card:not(.cat-feature):last-child:nth-child(3n+1){grid-column: span 3;}
        .article-grid > .article-card:not(.cat-feature):last-child:nth-child(3n+2){grid-column: span 2;}
        
        /* Feature at end: full row in 3-col layout */
        /*.article-grid > .article-card.cat-feature:last-child{grid-column: 1 / -1;}*/
        .article-grid > .article-card.cat-feature {grid-column: span 3;}
        
        .article-card.cat-feature .article-card__img { height: 500px; }
        .article-card.cat-feature .article-card__title { font-size: 3rem; }
        .article-card.cat-feature .article-card__ingress { font-size: 2rem; }
        .article-card.cat-feature .article-card__ingress { -webkit-line-clamp: 4; }
    }

    /* Card styling (keep/extend as needed) */
    .article-card
    {
        border: 1px solid rgba(0,0,0,.125);
        border-radius: .75rem;
        overflow: hidden;
        background: #fff;
        display: flex;
        flex-direction: column;
        height: 100%;
        text-decoration: none;
        color: inherit;
        box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
    }

    .article-card__img
    {
        width: 100%;
        height: 180px;
        object-fit: cover;
        display: block;
        background: #f3f3f3;
    }

    .article-card__body
    {
        padding: .9rem 1rem 1rem;
        display: flex;
        flex-direction: column;
        gap: .5rem;
        flex: 1;
    }

    .article-card__title
    {
        margin: 0;
        font-size: 2rem;
        line-height: 1.25;
        font-weight: 600;
    }

    .article-card__ingress
    {
        font-size: 1.7rem;
        line-height: 1.40;
        margin: 0;
        color: #555;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .article-card__meta
    {
        margin-top: auto;
        font-size: .85rem;
        color: black;
    }

    .article-card:hover
    {
        transform: translateY(-3px);
        background-color: #f0f0f0;
        box-shadow: .8rem .8rem .9rem .3rem rgba(0,0,0,.40);
        transition: box-shadow .15s ease, transform .15s ease;
    }

    @media (prefers-reduced-motion: reduce)
    {
        .article-card:hover
        {
            transform: none;
            box-shadow: none;
        }
    }
