/* ==========================================================================
   news.css — News & Events page
   Same language as the homepage and careers page: navy hero, cyan gradient
   accents, Outfit headings, pill buttons.
   All classes are prefixed nw- so nothing collides with other pages.
   ========================================================================== */

.news-page {
    background: #f4f9ff;
}

.nw-wrap {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 24px;
}

.nw-section {
    padding: 90px 0;
}

.nw-title {
    text-align: center;
    margin-bottom: 44px;
}

.nw-line {
    width: 80px;
    height: 4px;
    margin: 0 auto 18px;
    border-radius: 2px;
    background: linear-gradient(90deg, #0077a8, #00dcff);
}

.nw-title h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.9rem, 4.2vw, 2.8rem);
    font-weight: 800;
    color: #002b45;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.nw-title p {
    color: #0077a8;
    font-size: 0.92rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nw-grad {
    background: linear-gradient(135deg, #00dcff, #7ec8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    border: none;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background 0.25s ease;
}

.nw-btn-primary {
    background: linear-gradient(135deg, #00b8ff, #0077a8);
    color: #fff;
    box-shadow: 0 15px 40px rgba(0, 150, 220, 0.35);
}

.nw-btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 50px rgba(0, 180, 255, 0.5);
}

.nw-btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
}

.nw-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
}

.brand {
            display: flex;
            align-items: center;
            gap: 10px;
            text-decoration: none;
        }

        .brand img {
            height: 45px;
            width: auto;
        }

        .brand span {
            font-weight: 700;
            font-size: 20px;
        }
/* ============ HERO ============ */
.nw-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    text-align: center;
    padding: 140px 0 120px;
    background:
        radial-gradient(circle at 20% 25%, rgba(0, 184, 255, 0.22) 0%, transparent 45%),
        radial-gradient(circle at 85% 70%, rgba(0, 220, 255, 0.16) 0%, transparent 40%),
        linear-gradient(160deg, #001420 0%, #002b45 55%, #03446d 100%);
}

.nw-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 22px;
    border-radius: 50px;
    background: rgba(0, 200, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #d4f0ff;
    margin-bottom: 22px;
}

.nw-hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.4rem, 5.6vw, 4.2rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -1.2px;
    margin-bottom: 18px;
    text-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
}

.nw-hero p {
    max-width: 62ch;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

.nw-hero-facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 40px;
    margin-top: 36px;
    list-style: none;
}

.nw-hero-facts li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

.nw-hero-facts strong {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    color: #00dcff;
}

.nw-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    line-height: 0;
}

.nw-wave svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ============ FILTERS ============ */
.nw-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 38px;
}

.nw-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid #cfe3f0;
    background: #fff;
    color: #03446d;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nw-chip:hover {
    border-color: #00b8ff;
}

.nw-chip[aria-pressed="true"] {
    background: linear-gradient(135deg, #00b8ff, #0077a8);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 150, 220, 0.3);
}

.nw-chip .n {
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 20px;
    background: rgba(0, 119, 168, 0.12);
    font-size: 0.78rem;
}

.nw-chip[aria-pressed="true"] .n {
    background: rgba(255, 255, 255, 0.25);
}

/* ============ CATEGORY COLOURS ============ */
.nw-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border-radius: 30px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    background: #e8f4fb;
    color: #0077a8;
}

.nw-tag[data-cat="Certifications"] { background: #e6f7ee; color: #0f7a46; }
.nw-tag[data-cat="Collaborations"] { background: #eaf0ff; color: #3949ab; }
.nw-tag[data-cat="Events"]         { background: #fff2e5; color: #b4530a; }
.nw-tag[data-cat="Announcements"]  { background: #f3e9ff; color: #6b31b3; }

/* ============ FEATURED POST ============ */
.nw-featured {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 0;
    margin-bottom: 46px;
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0, 150, 210, 0.15);
    box-shadow: 0 22px 55px rgba(0, 60, 100, 0.1);
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    width: 100%;
    padding: 0;
    transition: box-shadow 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nw-featured:hover {
    transform: translateY(-6px);
    box-shadow: 0 34px 70px rgba(0, 110, 160, 0.2);
}

.nw-featured .nw-shot {
    min-height: 340px;
}

.nw-featured .nw-fbody {
    padding: 38px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

.nw-featured h3 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    font-weight: 800;
    color: #002b45;
    line-height: 1.25;
}

.nw-featured p {
    color: #3a4f60;
    line-height: 1.8;
}

.nw-latest {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    padding: 7px 15px;
    border-radius: 30px;
    background: rgba(0, 20, 32, 0.78);
    backdrop-filter: blur(8px);
    color: #7fe6ff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

/* ============ POST IMAGE (shared) ============ */
.nw-shot {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0a3d62, #0d6ba7);
}

.nw-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.nw-card:hover .nw-shot img,
.nw-featured:hover .nw-shot img {
    transform: scale(1.06);
}

/* When the image file is missing, show a tidy tile instead of a broken icon */
.nw-shot.missing img {
    display: none;
}

.nw-shot.missing::after {
    content: "\f03e";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 2.4rem;
    color: rgba(255, 255, 255, 0.3);
}

/* ============ POST GRID ============ */
.nw-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.nw-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0, 150, 210, 0.15);
    box-shadow: 0 14px 36px rgba(0, 60, 100, 0.07);
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.nw-card:hover {
    transform: translateY(-8px);
    border-color: #00b4e6;
    box-shadow: 0 28px 55px rgba(0, 110, 160, 0.18);
}

.nw-card .nw-shot {
    height: 190px;
    flex-shrink: 0;
}

.nw-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px 24px 24px;
    flex: 1;
}

.nw-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.nw-date {
    font-size: 0.82rem;
    font-weight: 600;
    color: #5a6b7c;
    white-space: nowrap;
}

.nw-date i {
    color: #00a6d6;
    margin-right: 6px;
}

.nw-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #002b45;
    line-height: 1.35;
}

.nw-card p {
    font-size: 0.93rem;
    line-height: 1.7;
    color: #5a6b7c;
}

.nw-read {
    margin-top: auto;
    padding-top: 14px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0077a8;
}

.nw-read i {
    margin-left: 6px;
    transition: transform 0.25s ease;
}

.nw-card:hover .nw-read i {
    transform: translateX(5px);
}

.nw-empty {
    grid-column: 1 / -1;
    padding: 50px;
    text-align: center;
    color: #5a6b7c;
}

.nw-more {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

/* ============ POST DIALOG ============ */
.nw-dialog {
    width: min(880px, calc(100% - 32px));
    max-height: calc(100dvh - 40px);
    margin: auto;
    padding: 0;
    border: none;
    border-radius: 26px;
    background: #fff;
    color: #1a2b3c;
    box-shadow: 0 40px 100px rgba(0, 20, 40, 0.45);
    overflow: hidden;
}

.nw-dialog::backdrop {
    background: rgba(0, 20, 32, 0.65);
    backdrop-filter: blur(4px);
}

.nw-dialog[open] {
    display: flex;
    flex-direction: column;
    animation: nw-rise 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes nw-rise {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

.nw-d-shot {
    position: relative;
    height: 280px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #0a3d62, #0d6ba7);
    overflow: hidden;
}

.nw-d-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nw-d-shot.missing img {
    display: none;
}

.nw-d-shot::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(0, 20, 32, 0.85) 0%, transparent 60%);
}

.nw-d-head {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 26px 34px;
    color: #fff;
}

.nw-d-head h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.4rem, 3.2vw, 2.1rem);
    font-weight: 800;
    line-height: 1.2;
    margin-top: 12px;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.nw-d-head .nw-date {
    color: rgba(255, 255, 255, 0.85);
    margin-top: 8px;
    display: inline-block;
}

.nw-d-head .nw-date i {
    color: #7fe6ff;
}

.nw-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 20, 32, 0.55);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nw-close:hover {
    background: rgba(0, 20, 32, 0.8);
    transform: rotate(90deg);
}

.nw-d-body {
    padding: 30px 34px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.nw-d-body p {
    color: #3a4f60;
    line-height: 1.9;
    margin-bottom: 16px;
}

.nw-d-body ul {
    margin: 0 0 18px 0;
    padding-left: 22px;
}

.nw-d-body li {
    color: #3a4f60;
    line-height: 1.8;
    margin-bottom: 8px;
}

.nw-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin: 6px 0 22px;
}

.nw-fact {
    padding: 14px 18px;
    border-radius: 14px;
    background: #f0f8fd;
    border-left: 4px solid #00a6d6;
}

.nw-fact dt {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #0077a8;
    margin-bottom: 4px;
}

.nw-fact dd {
    margin: 0;
    font-weight: 600;
    color: #002b45;
}

.nw-d-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 34px;
    border-top: 1px solid #e6f0f7;
    background: #f8fcff;
}

.nw-share {
    background: none;
    border: 1px solid #cfe3f0;
    color: #03446d;
    padding: 11px 18px;
    border-radius: 40px;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.nw-share:hover {
    border-color: #00b8ff;
}

/* ============ CLOSING CTA ============ */
.nw-cta {
    position: relative;
    overflow: hidden;
    padding: 84px 0;
    text-align: center;
    color: #fff;
    background:
        radial-gradient(circle at 15% 20%, rgba(0, 220, 255, 0.25), transparent 40%),
        linear-gradient(135deg, #002b45, #03446d);
}

.nw-cta h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.8rem, 4.2vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 14px;
}

.nw-cta p {
    max-width: 58ch;
    margin: 0 auto 28px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.8;
}

.nw-cta-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1000px) {
    .nw-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .nw-featured .nw-shot {
        min-height: 240px;
    }

    .nw-featured .nw-fbody {
        padding: 28px 26px 32px;
    }
}

@media (max-width: 760px) {
    .nw-section {
        padding: 60px 0;
    }

    .nw-hero {
        padding: 118px 0 92px;
    }

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

    .nw-d-shot {
        height: 210px;
    }

    .nw-d-head,
    .nw-d-body,
    .nw-d-foot {
        padding-left: 22px;
        padding-right: 22px;
    }

    /* Filter chips become one swipeable row */
    .nw-filters {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        margin-inline: -24px;
        padding: 4px 24px 14px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .nw-filters::-webkit-scrollbar {
        display: none;
    }

    .nw-chip {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }
}

@media (max-width: 480px) {
    .nw-dialog {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .nw-d-foot .nw-btn,
    .nw-d-foot .nw-share {
        flex: 1 1 100%;
    }

    .nw-cta-links .nw-btn {
        flex: 1 1 100%;
    }
}

@media (hover: none) {
    .nw-card:hover,
    .nw-featured:hover {
        transform: none;
    }

    .nw-card:hover .nw-shot img,
    .nw-featured:hover .nw-shot img {
        transform: none;
    }
}
