/* News - the pieces more than one page uses: the story card and its grid (News, the homepage's
   "Latest news", a driver's "In the news"), the video embed (News/Item), and the status pill and
   small link-button shared by Admin/News and Me/News. */

/* ---------- Card grid ---------- */
.news-grid {
    display: grid; gap: 1.25rem; margin-top: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
}

.news-card { min-width: 0; }
.news-card-link {
    display: flex; flex-direction: column; height: 100%;
    color: inherit; text-decoration: none;
    background: var(--surface); border: 1px solid var(--border); border-radius: .85rem; overflow: hidden;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.news-card-link:hover, .news-card-link:focus-visible {
    border-color: var(--red); transform: translateY(-2px); box-shadow: var(--shadow);
}

.news-card-media {
    position: relative; display: block; aspect-ratio: 16 / 9;
    background-color: var(--thumb-bg);
}
/* Crop toward the top: news photos are mostly of people, and a centre crop of a portrait loses the face. */
.news-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.news-card-play {
    position: absolute; right: .6rem; bottom: .6rem;
    display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%;
    background: rgba(11, 13, 19, .8); color: #fff; font-size: .8rem;
}

.news-card-body { display: flex; flex-direction: column; gap: .4rem; padding: 1rem 1.1rem 1.2rem; }
.news-card-date {
    font-family: var(--font-display); font-weight: 700; font-size: .7rem;
    letter-spacing: .12em; text-transform: uppercase; color: var(--red-ink);
}
.news-card-title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; line-height: 1.25; color: var(--ink); }
.news-card-summary { font-size: .9rem; line-height: 1.5; color: var(--ink-soft); }
.news-card-flag { font-size: .75rem; font-weight: 600; color: var(--muted); }

.news-section { padding-top: 2.5rem; padding-bottom: 2.5rem; }

/* ---------- Video embed (a typed-in YouTube / Vimeo / file link) ---------- */
.video-embed {
    position: relative; aspect-ratio: 16 / 9; overflow: hidden;
    border-radius: .85rem; background: var(--thumb-bg);
}
.video-embed iframe, .video-embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Status pill and link-button (Admin/News, Me/News) ---------- */
.news-status {
    display: inline-block; white-space: nowrap;
    font: 600 .72rem/1 var(--font-sans); text-transform: uppercase; letter-spacing: .06em;
    padding: .3rem .55rem; border-radius: 999px;
    background: var(--surface-2); color: var(--ink-soft);
}
.news-status-live { background: color-mix(in srgb, var(--green) 14%, var(--surface)); color: var(--green-ink); }
.news-status-inreview { background: var(--amber-bg); color: var(--amber-ink); }
.news-status-needschanges, .news-status-rejected { background: color-mix(in srgb, var(--red-strong) 10%, var(--surface)); color: var(--red-ink); }
.news-status-archived { color: var(--muted); }

.news-inline { display: inline; margin: 0; }
.news-linkbtn {
    padding: 0; border: 0; background: none; cursor: pointer;
    font: inherit; color: var(--blue); text-decoration: underline; text-underline-offset: .15em;
}
.news-linkbtn:hover { color: var(--red-ink); }
