/* Latest News listing.

   This file used to be a pre-design-system stylesheet: it declared its own
   :root (shadowing theme.css's tokens with hard-coded greens), its own body
   font-family (Segoe UI, not --font-body), its own page background and its own
   body.dark-mode block. That is why this page read as off-brand next to the
   rest of the site. Those blocks are gone — the page now inherits typography,
   surface and dark-mode behaviour from theme.css/global.css like every other
   template, and the legacy --light-grey/--white aliases are mapped onto the
   semantic tokens. The `*` margin/padding reset is kept: this stylesheet's own
   rules assume it, and box-sizing now comes from global.css. */

* {
    margin: 0;
    padding: 0;
}

main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 4rem 1.4rem;
}

/* ── Hero ─────────────────────────────────────────────────
   Full-bleed, matching the language of the Software/Services/About heroes
   (.software-hero, .bpo-hero, .about-hero): fixed brand-green surface, grid
   texture, decorative ring, and the same 158px top padding that clears the
   fixed header. The page sets body.has-dark-hero so the header sits
   transparent over it until scrolled. */
.news-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 520px;
    overflow: hidden;
    padding: 158px 0 96px;
    color: var(--on-dark);
    background:
        radial-gradient(circle at 78% 30%, color-mix(in srgb, var(--green-500) 26%, transparent), transparent 30%),
        radial-gradient(circle at 10% 88%, color-mix(in srgb, var(--green-900) 44%, transparent), transparent 34%),
        linear-gradient(135deg, var(--green-700) 0%, var(--surface-brand) 52%, var(--green-500) 100%);
}

.news-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.16;
    background-image: linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(90deg, transparent, rgb(0, 0, 0) 45%, rgb(0, 0, 0));
}

.news-hero::after {
    content: "";
    position: absolute;
    right: -180px;
    top: -220px;
    width: 620px;
    height: 620px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
}

/* Geometry mirrors <main> exactly (1180px centred, 1.4rem gutter) so the hero
   copy sits on the same left edge as the article cards below it. Constraining
   this box to a narrower max-width would re-centre it via `margin: 0 auto` and
   push the text inward — the text column is limited on .news-title/.news-subtitle
   instead. */
.news-hero-inner {
    position: relative;
    z-index: 1;
    /* width: 100% is load-bearing. .news-hero is a flex container, so without it
       this box shrink-wraps to its content and `margin: 0 auto` then centres
       that narrow box rather than the 1180px column — putting the copy ~190px
       right of the cards below. */
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.4rem;
}

.news-tag {
    display: block;
    margin-bottom: var(--space-5);
    color: color-mix(in srgb, var(--on-dark) 82%, transparent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.news-title {
    max-width: 16ch;
    font-family: var(--font-display);
    font-size: clamp(42px, 5.4vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.04em;
    margin-bottom: var(--space-5);
    text-wrap: balance;
}

.news-subtitle {
    max-width: 62ch;
    color: color-mix(in srgb, var(--on-dark) 84%, transparent);
    font-size: clamp(16px, 1.2vw, 18px);
    line-height: 1.75;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.3rem;
}

.news-card {
    /* --bg, not --bg-elevated: in dark mode theme.css points BOTH --surface and
       --bg-elevated at --green-900, so an elevated card on the --surface page
       background disappeared entirely (the page's old hand-rolled dark-mode
       block used to supply that contrast). --bg is --paper in light and
       --green-950 in dark, so the cards read against the page in both. */
    background: var(--bg);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.dark-mode .news-card {
    border-color: var(--border-strong);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.news-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.news-image {
    position: relative;
    height: 220px;
    background: linear-gradient(135deg, var(--green-900), var(--green-700));
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-image-tags {
    position: absolute;
    left: 0.8rem;
    right: 0.8rem;
    bottom: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.news-image-tags span {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 700;
    background: rgba(44, 53, 57, 0.9);
    color: var(--on-dark);
    border-radius: 999px;
    padding: 0.3rem 0.58rem;
}

body.dark-mode .news-image-tags span {
    background: rgba(15, 23, 42, 0.92);
}

.news-content {
    padding: 1.08rem 1.14rem 1.18rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-height: 248px;
}

.news-date {
    font-size: 0.86rem;
    color: var(--fg-muted);
    font-weight: 600;
}

.news-content h2 {
    font-size: 1.23rem;
    line-height: 1.36;
}

.news-content p {
    color: var(--fg-muted);
    margin: 0;
}

.news-read-more {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.93rem;
}

.news-empty {
    background: var(--bg);
    border: 1px dashed var(--border-strong);
    border-radius: 14px;
    padding: 2rem;
    color: var(--fg-muted);
}

@media (max-width: 768px) {
    main {
        padding-top: 6rem;
    }
}

/* ── Closing CTA ──────────────────────────────────────────
   Mirrors .about-cta / .case-cta-section so the page ends the same way the rest
   of the site does. .news-cta-inner repeats <main>'s geometry (see the note on
   .news-hero-inner) so the card lines up with the article grid above it. */
.news-cta {
    padding: 0 0 104px;
    background: var(--surface);
}

.news-cta-inner {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.4rem;
}

.news-cta-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: var(--space-8);
    padding: clamp(38px, 5.5vw, 72px);
    border-radius: var(--radius-lg);
    color: var(--on-brand);
    background: var(--surface-brand);
    box-shadow: var(--shadow-lg);
}

.news-cta-card::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -160px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--on-brand) 12%, transparent);
}

.news-cta-card > * {
    position: relative;
    z-index: 1;
}

.news-cta-card span {
    display: block;
    margin-bottom: var(--space-4);
    color: color-mix(in srgb, var(--on-brand) 74%, transparent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.news-cta-card h2 {
    max-width: 820px;
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(36px, 4vw, 55px);
    line-height: 1.04;
    color: var(--on-brand);
}

.news-cta-card p {
    max-width: 720px;
    margin-top: var(--space-4);
    color: color-mix(in srgb, var(--on-brand) 74%, transparent);
    line-height: 1.72;
}

.news-cta-card .btn {
    min-width: 198px;
    background: var(--paper);
    color: var(--green-800);
}

.news-cta-card .btn:hover {
    color: var(--green-600);
}

@media (max-width: 860px) {
    .news-cta-card {
        grid-template-columns: 1fr;
        align-items: start;
        gap: var(--space-6);
    }
}
