/* featured-posts.css — Recent Posts (automatic) + Featured Posts (hand-picked) */

/* ========================================
   Recent: compact, image-led, no excerpt
   ======================================== */
.recent-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.recent-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #EFE6DC;
}

.recent-body {
    padding: 14px 16px 18px;
}

.recent-title {
    font-family: "Kreon", serif;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ink-deep);
    text-wrap: balance;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

/* ========================================
   Featured: bigger, horizontal, with the excerpt
   ======================================== */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

/* Thumbnails are always 16:9 and some use the full frame, so they're shown
   whole: an exact 16:9 box inset in the card, text beside it, both centred.
   The columns are sized so the image height roughly matches the text. */
.featured-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 20px;
    padding: 14px;
}

.featured-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    background-color: #EFE6DC;
}

.featured-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 4px 8px 4px 0;
}

.featured-title {
    font-family: "Kreon", serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink-deep);
    margin-bottom: 10px;
    text-wrap: balance;
}

.featured-excerpt {
    font-size: 18px;
    line-height: 1.5;
    color: var(--ink);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1500px) {
    .featured-card {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    }

    .featured-title {
        font-size: 23px;
    }

    .featured-excerpt {
        font-size: 17px;
        -webkit-line-clamp: 3;
    }
}

@media (max-width: 1100px) {
    .recent-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    /* One card per row: keep the image from towering over the text. */
    .featured-card {
        grid-template-columns: minmax(0, 0.65fr) minmax(0, 1fr);
    }

    .featured-excerpt {
        -webkit-line-clamp: 4;
    }
}

/* Narrow tablets: the card is narrower, so give the image back some width. */
@media (max-width: 900px) and (min-width: 601px) {
    .featured-card {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
    }
}

/* Phones: recent becomes a tight list, featured stacks image-on-top. */
@media (max-width: 600px) {
    .recent-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .recent-card {
        flex-direction: row;
        align-items: stretch;
    }

    .recent-thumb {
        flex: 0 0 42%;
        align-self: center;
    }

    .recent-body {
        padding: 10px 12px;
        align-self: center;
        min-width: 0;
    }

    .recent-body .card-meta {
        font-size: 11px;
        letter-spacing: 0.04em;
        margin-bottom: 4px;
    }

    .recent-title {
        font-size: 17px;
    }

    .featured-card {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 12px;
    }

    .featured-body {
        padding: 2px 6px 6px;
    }

    .featured-title {
        font-size: 22px;
    }
}
