/* ============================================================
   NEWS.CSS
   Press / news grid — uses casestudy.css tokens throughout.
   Load order: reset.css → casestudy.css → style.css → news.css
   ============================================================ */


/* ── GRID ──────────────────────────────────────────────────── */

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--cs-md);          /* 24px */
    align-items: start;
}


/* ── CARD ──────────────────────────────────────────────────── */

.news-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--cs-xs);    /* 8px */
    overflow: hidden;
    color: inherit;
    text-decoration: none !important;
    box-shadow:
        0 0 0 1px rgba(0, 0, 64, .08),
        0 2px 8px  rgba(0, 0, 64, .10);
    transition:
        transform  .25s ease,
        box-shadow .25s ease;
	min-height: 300px;

    /* background-color set per-card by the inline JS */
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 0 0 1px rgba(0, 0, 64, .12),
        0 8px 24px rgba(0, 0, 64, .18);
    text-decoration: none !important;
}


/* ── THUMBNAIL ─────────────────────────────────────────────── */

/* cs-img-slot handles position:relative + overflow:hidden.
   news-thumb adds a fixed aspect ratio so every card crops evenly. */
.news-thumb {
    aspect-ratio: 1.6;
    height: auto;           /* override any fixed height from cs-img-grid-3 */
	border-radius: 0;
	box-shadow: unset;
	border-bottom: solid thin var(--cs-grey_md);
}

.news-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}


/* ── TITLE ─────────────────────────────────────────────────── */

.news-title {
    /* cs-body is 21px/140% — scaled down for card context */
    font-size: clamp(.875rem, calc(.8rem + .333vw), 1rem);
    line-height: 145%;
    padding: var(--cs-sm);         /* 16px */
    margin: 0;
    flex: 1;
    color: #000041;
}

.news-card:hover .news-title {
    color: var(--cs-accent);       /* #1a0edd on hover */
}


/* ============================================================
   BREAKPOINTS — mirrors casestudy.css tablet / mobile tokens
   ============================================================ */


/* 4 → 3 columns @ ≤ 1200px */
@media (max-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 3 → 2 columns @ ≤ 860px (tablet) */
@media (max-width: 860px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--cs-sm);
    }
}

/* 2 → 1 column @ ≤ 480px (mobile) */
@media (max-width: 480px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: var(--cs-sm);
    }
    .news-title {
        font-size: .9rem;
        padding: var(--cs-xs) var(--cs-sm);
    }
}
