.news-grid-wrapper {
    font-family: 'DM Sans', sans-serif;
    padding: 24px 0;
}

/* ── Mosaic Grid ── */
.mosaic-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-rows: 275px;
    gap: 12px;
}

/* ── Tile base ── */
.news-tile {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: #1a1a1a;
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.news-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-tile:hover img {
    transform: scale(1.05);
}

/* Gradient overlay */
.news-tile::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            transparent 20%,
            rgba(0, 0, 0, 0.3) 50%,
            rgba(0, 0, 0, 0.88) 100%);
    pointer-events: none;
}

/* No image fallback */
.news-tile.no-image {
    background: #f5f5f0;
}

.news-tile.no-image::after {
    display: none;
}

/* Content overlay */
.tile-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    z-index: 2;
}

.no-image .tile-content {
    position: relative;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.tile-category {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.12);
    padding: 3px 8px;
    border-radius: 2px;
    margin-bottom: 8px;
}

.no-image .tile-category {
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
}

.tile-title {
    font-family: 'Playfair Display', serif;
    color: #fff;
    /* line-height: 1.3; */
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.no-image .tile-title {
    color: #1a1a1a;
}

.tile-date {
    /* font-size: 11px; */
    color: rgba(255, 255, 255, 0.55);
    margin-top: 6px;
    font-weight: 500;
}

.no-image .tile-date {
    color: #999;
}

/* ── Hover shine ── */
.news-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.news-tile:hover::before {
    background: rgba(255, 255, 255, 0.04);
}

/* ────────────────────────────────────────
     REPEATING PATTERN every 10 items
  ──────────────────────────────────────── */

/* HERO — 1, 11, 21, 31... */
.news-tile:nth-child(10n + 1) {
    grid-column: span 2;
    grid-row: span 2;
}

.news-tile:nth-child(10n + 1) .tile-title {
    /* font-size: 22px; */
    /* -webkit-line-clamp: 3; */
}

.news-tile:nth-child(10n + 1) .tile-content {
    padding: 24px;
}

/* SMALL — 2, 12, 22... */
.news-tile:nth-child(10n + 2) {
    grid-column: span 1;
    grid-row: span 1;
}

.news-tile:nth-child(10n + 2) .tile-title {
    /* font-size: 13px; */
    /* -webkit-line-clamp: 2; */
}

/* SMALL — 3, 13, 23... */
.news-tile:nth-child(10n + 3) {
    grid-column: span 1;
    grid-row: span 1;
}

.news-tile:nth-child(10n + 3) .tile-title {
    /* font-size: 13px; */
    /* -webkit-line-clamp: 2; */
}

/* SMALL ROW — 4,5,6,7 then 14,15,16,17... */
.news-tile:nth-child(10n + 4){
    grid-column: span 1;
    grid-row: span 1;
}

.news-tile:nth-child(10n + 4) .tile-title {
    /* font-size: 13px; */
    /* -webkit-line-clamp: 2; */
}



.news-tile:nth-child(10n + 5),
.news-tile:nth-child(10n + 7) {
    grid-column: span 1;
    grid-row: span 1;
}


.news-tile:nth-child(10n + 6){
    grid-column: span 2;
    grid-row: span 1;

}



.news-tile:nth-child(10n + 4) .tile-title,
.news-tile:nth-child(10n + 5) .tile-title,
.news-tile:nth-child(10n + 6) .tile-title,
.news-tile:nth-child(10n + 7) .tile-title {
    /* font-size: 13px; */
    /* -webkit-line-clamp: 2; */
}

/* WIDE MEDIUM — 8, 18, 28... */
.news-tile:nth-child(10n + 8) {
    grid-column: span 2;
    grid-row: span 1;
}

.news-tile:nth-child(10n + 8) .tile-title {
    /* font-size: 15px; */
    /* -webkit-line-clamp: 2; */
}

/* WIDE MEDIUM — 9, 19, 29... */
.news-tile:nth-child(10n + 9) {
    grid-column: span 2;
    grid-row: span 1;
}

.news-tile:nth-child(10n + 9) .tile-title {
    /* font-size: 15px; */
    /* -webkit-line-clamp: 2; */
}

/* SMALL — 10, 20, 30... */
.news-tile:nth-child(10n + 0) {
    grid-column: span 1;
    grid-row: span 1;
}

.news-tile:nth-child(10n + 0) .tile-title {
    /* font-size: 13px; */
    /* -webkit-line-clamp: 2; */
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .mosaic-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-tile:nth-child(10n + 1) {
        grid-column: span 2;
        grid-row: span 1;
    }

    .news-tile:nth-child(10n + 2),
    .news-tile:nth-child(10n + 3) {
        grid-column: span 1;
    }

    .news-tile:nth-child(10n + 8),
    .news-tile:nth-child(10n + 9) {
        grid-column: span 1;
    }
}

@media (max-width: 640px) {
    .mosaic-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
    }

    .news-tile {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

    .news-tile:nth-child(10n + 1) .tile-title {
        /* font-size: 17px; */
    }
}

/* ── Fade-in animation ── */
@keyframes tileIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-tile {
    animation: tileIn 0.4s ease both;
}