.magazine-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
}

/* Cards */

.mag-card{
    position:relative;
    overflow:hidden;
    height:320px;
}

.mag-card.large{
    grid-column:1 / span 2;
}

.mag-card.top-small{
    grid-column:3;
}

/* Links */

.mag-card a{
    display:block;
    width:100%;
    height:100%;
    position:relative;
}

/* Images */

.mag-card img{
    position:absolute;
    top:0;
    left:0;

    width:100% !important;
    height:100% !important;

    object-fit:cover !important;
    display:block;
}

/* Overlay */

.overlay{
    position:absolute;
    inset:0;
    display:flex;
    flex-direction:column;
    justify-content:flex-end;
    padding:20px;
    background:rgba(0,0,0,.45);
    transition:background .4s ease;
}

.mag-card:hover .overlay{
    background:rgba(0,0,0,0.25);
}

/* Large Title */

.mag-card.large h2{
    font-family:"Columbia Serial Regular Font", serif;
    font-size:20px;
    line-height:1.3;
    color:#fff;
    margin:0;
}

/* Small Titles */

.mag-card.top-small h3,
.mag-card.small h3{
    font-family:"Columbia Serial Regular Font", serif;
    font-size:18px;
    line-height:1.3;
    color:#fff;
    margin:0;
}

/* Date */

.post-date{
    display:block;
    margin-top:10px;
    color:#fff;
    font-size:14px;
    line-height:1.4;
}

/* Pagination */

.mag-pagination{
    text-align:center;
    margin-top:40px;
}

.mag-pagination .page-numbers{
    display:inline-block;
    padding:2px 12px;
    margin:0 8px;
    color:#000000;
    text-decoration:none !important;
    border:none;
    background:transparent;
    font-size:18px;
    transition:all .3s ease;
}

.mag-pagination .page-numbers:hover{
    color:#9F9F9F;
}

.mag-pagination .current{
    background:#000000;
    color:#fff;
    border:1px solid #000000;
    font-weight:600;
}

/* Tablet */

@media only screen and (max-width:1024px){

    .mag-card{
        height:280px;
    }

    .mag-card.large h2{
        font-size:18px;
    }

    .mag-card.top-small h3,
    .mag-card.small h3{
        font-size:16px;
    }
}

/* Mobile */

@media only screen and (max-width:767px){

   
     .magazine-grid{
        grid-template-columns:repeat(2,1fr);
        gap:6px;
    }

    /* First card full width */

    .mag-card.large{
        grid-column:1 / -1;
        height:180px;
    }

    /* Reset desktop positioning */

    .mag-card.top-small{
        grid-column:auto;
    }

    .mag-card.top-small,
    .mag-card.small{
        height:140px;
    }

    .overlay{
        padding:10px;
    }

    .mag-card.large h2{
        font-size:16px;
        line-height:1.2;
    }

    .mag-card.top-small h3,
    .mag-card.small h3{
        font-size:12px;
        line-height:1.2;
    }

    .post-date{
        font-size:10px;
        margin-top:4px;
    }

    .mag-pagination .page-numbers{
        margin:0 4px;
        font-size:16px;
    }
}