/* ============================================================
   SGLS NEWS & UPDATES — sgls-news.css
   Add to: sgls-child-fixed/sgls-news.css

   WCAG 2.1 AA contrast ratios documented inline.
   ============================================================ */


/* ══════════════════════════════════════════
   TWENTY TWENTY OVERRIDE
   Remove when migrating to GeneratePress.
   ══════════════════════════════════════════ */

.sgls-news,
.sgls-news * {
    writing-mode: horizontal-tb !important;
    word-break: normal !important;
}

.sgls-news__header {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
}

.sgls-news__grid {
    display: grid !important;
    grid-template-columns: 1.5fr 1fr 1fr !important;
    gap: 16px !important;
}

.sgls-news__card {
    display: flex !important;
    flex-direction: column !important;
}

.sgls-news__card-body {
    display: flex !important;
    flex-direction: column !important;
}


/* ══════════════════════════════════════════
   SECTION SHELL
   ══════════════════════════════════════════ */

.sgls-news {
    background: #ffffff;
    padding: 56px 0 60px;
    border-bottom: 1px solid #E5EDE7;
}

.sgls-news__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 44px;
}


/* ── Section header ─────────────────────────────────────────── */

.sgls-news__header {
    margin-bottom: 32px;
    gap: 20px;
    flex-wrap: wrap;
}

/* Eyebrow — contrast: #007A3D on #fff = 5.2:1 ✅ */
.sgls-news__eyebrow {
    font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #007A3D;
    margin: 0 0 8px;
}

/* H2 — contrast: #1A1A1A on #fff = 18.1:1 ✅ */
.sgls-news__title {
    font-family: "Merriweather", Georgia, serif;
    font-size: clamp(22px, 2.5vw, 28px);
    font-weight: 700;
    color: #1A1A1A;
    margin: 0;
    line-height: 1.2;
}

/* View all link — contrast: #005C2E on #fff = 7.1:1 ✅ */
.sgls-news__viewall {
    font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #005C2E;
    text-decoration: none;
    white-space: nowrap;
    padding-bottom: 2px;
    border-bottom: 1.5px solid transparent;
    transition: border-color 0.15s, gap 0.15s;
}

.sgls-news__viewall:hover {
    border-bottom-color: #005C2E;
}

.sgls-news__viewall:focus-visible {
    outline: 3px solid #007A3D;
    outline-offset: 3px;
}


/* ── News grid ──────────────────────────────────────────────── */

.sgls-news__grid {
    align-items: stretch;
}


/* ── Individual card ────────────────────────────────────────── */

.sgls-news__card {
    background: #ffffff;
    border: 1.5px solid #E5EDE7;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.sgls-news__card:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
    border-color: #C0DEC8;
}

.sgls-news__card--featured {
    border-color: #C0DEC8;
}


/* ── Card image / colour band ───────────────────────────────── */

.sgls-news__card-img {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.sgls-news__card--featured .sgls-news__card-img {
    height: 120px;
}

.sgls-news__card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Green — Requirement Updates */
.sgls-news__card-img--green {
    background: #2C3830;
    color: rgba(255, 255, 255, 0.35);
}

/* Blue — News & Announcements */
.sgls-news__card-img--blue {
    background: #F0F4F0;
    color: #007A3D;
}

/* Gold — MOU & MRA */
.sgls-news__card-img--gold {
    background: #FDF6E8;
    color: #C8A96E;
}


/* ── Card body ──────────────────────────────────────────────── */

.sgls-news__card-body {
    padding: 16px 18px 18px;
    flex: 1;
    gap: 0;
}


/* ── Category tag ───────────────────────────────────────────── */

.sgls-news__card-tag {
    font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin: 0 0 7px;
}

/* Green tag — contrast: #005C2E on #fff = 7.1:1 ✅ */
.sgls-news__card-tag--green { color: #005C2E; }

/* Blue tag — contrast: #007A3D on #fff = 5.2:1 ✅ */
.sgls-news__card-tag--blue  { color: #007A3D; }

/* Gold tag — contrast: #8A6820 on #fff = 5.5:1 ✅ */
.sgls-news__card-tag--gold  { color: #8A6820; }


/* ── Card title ─────────────────────────────────────────────── */

.sgls-news__card-title {
    font-family: "Merriweather", Georgia, serif;
    font-size: 14px;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.4;
    margin: 0 0 8px;
}

.sgls-news__card--featured .sgls-news__card-title {
    font-size: 17px;
}

.sgls-news__card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}

.sgls-news__card-title a:hover {
    color: #007A3D;
}

.sgls-news__card-title a:focus-visible {
    outline: 3px solid #007A3D;
    outline-offset: 3px;
    border-radius: 2px;
}


/* ── Excerpt (featured card only) ───────────────────────────── */
/* Contrast: #555 on #fff = 7.0:1 ✅ */

.sgls-news__card-excerpt {
    font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
    font-size: 13px;
    color: #555555;
    line-height: 1.65;
    margin: 0 0 10px;
}


/* ── Date ───────────────────────────────────────────────────── */
/* Contrast: #767676 on #fff = 4.54:1 ✅ */

.sgls-news__card-date {
    font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
    font-size: 12px;
    color: #767676;
    margin: auto 0 0;
    padding-top: 8px;
}


/* ── RESPONSIVE: Tablet (≤900px) ────────────────────────────── */

@media (max-width: 900px) {

    .sgls-news__inner {
        padding: 0 28px;
    }

    .sgls-news {
        padding: 44px 0 48px;
    }

    .sgls-news__grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 14px !important;
    }

    .sgls-news__card--featured {
        grid-column: 1 / -1;
    }

    .sgls-news__card--featured .sgls-news__card-img {
        height: 100px;
    }
}


/* ── RESPONSIVE: Mobile (≤600px) ────────────────────────────── */

@media (max-width: 600px) {

    .sgls-news__inner {
        padding: 0 20px;
    }

    .sgls-news {
        padding: 36px 0 40px;
    }

    .sgls-news__grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .sgls-news__header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
}


/* ── REDUCED MOTION ─────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .sgls-news__card,
    .sgls-news__card-title a,
    .sgls-news__viewall {
        transition: none;
    }
}
