/**
 * News grid (template-parts/news-grid.php): blog page and category archives
 * Same look as the old builder grid: square cards, blue overlay, inner frame, date and title at the bottom
 * @since 1.0.1
 */

.nw-news-page #page {
    background-color: #fff;
}

.nw-news-page .rex-tab-wrap-parent,
.nw-news-page footer {
    opacity: 1;
}

.nw-news {
    max-width: 1025px;
    margin: 20px auto 60px;
    padding: 0 20px;
    box-sizing: content-box;
}

.nw-news__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.nw-news__card {
    position: relative;
    display: flex;
    align-items: flex-end;
    aspect-ratio: 1 / 1;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    background: #009cff center / cover no-repeat;
    color: #fff;
    text-decoration: none;
    transition: box-shadow .3s;
}

.nw-news__card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 156, 255, 0.7);
    transition: background-color .3s;
}

.nw-news__card::after {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.nw-news__card:hover,
.nw-news__card:focus {
    color: #fff;
    box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.nw-news__card:hover::before,
.nw-news__card:focus::before {
    background-color: rgba(0, 156, 255, 0.55);
}

.nw-news__text {
    position: relative;
    z-index: 1;
    display: block;
    font-family: Poppins, sans-serif;
    letter-spacing: 1px;
}

.nw-news__date {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.nw-news__title {
    display: block;
    font-size: 17px;
    font-weight: 300;
    line-height: 1.5;
}

.nw-news__empty {
    text-align: center;
}

@media screen and (max-width: 1023px) {
    .nw-news__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 767px) {
    .nw-news {
        margin-top: 10px;
        margin-bottom: 40px;
    }

    .nw-news__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
