/* Course News — activity.png reference, scoped to the v2 index. */
.nx-news {
    position: relative;
    width: 100%;
    overflow: hidden;
    color: #fff;
    background: #123761 url('../images/news-campus.webp') center top / cover no-repeat;
}

.nx-news,
.nx-news * {
    box-sizing: border-box;
    font-family: 'Noto Sans SC', system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* Keep the existing anchor and override its legacy section spacing. */
section#activity.nx-news {
    padding-bottom: 0;
    scroll-margin-top: 80px;
}

.nx-wrap {
    width: 100%;
    max-width: calc(1520px + 2 * var(--v2-gutter));
    margin: 0 auto;
    padding: var(--v2-section-space) var(--v2-gutter);
}

.nx-title {
    margin: 0;
    color: var(--v2-heading-color);
    font-family: var(--v2-font-display);
    font-size: var(--v2-heading-size);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.nx-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 2.1vw 0 3.4vw;
}

.nx-tabs[hidden] { display: none; }

.v2-index .nx-main[hidden],
.v2-index .nx-empty[hidden] { display: none; }
.v2-index .nx-empty { margin: 0; text-align: center; }

.nx-tab {
    min-width: 192px;
    min-height: 44px;
    padding: .65vw 1.8vw;
    border: 1px solid #2582bb;
    border-radius: var(--cta-radius);
    background: linear-gradient(180deg, #318ff4, #2e85a9);
    color: #fff;
    font-size: 21px;
    font-weight: 600;
    line-height: 30px;
    letter-spacing: 3px;
    cursor: pointer;
    transition: filter .18s ease;
}

.nx-tab.is-active {
    border-color: var(--cta-border);
    background: var(--cta-gradient);
    color: #082d76;
}

.nx-tab:hover { filter: brightness(1.07); }

.nx-main {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(28px, 3.45vw, 66px);
    align-items: start;
}

.nx-feature,
.nx-item,
.nx-tile {
    display: block;
    color: inherit;
    text-decoration: none;
}

.nx-feature:hover,
.nx-item:hover,
.nx-tile:hover {
    color: inherit;
    text-decoration: none;
}

.nx-frame {
    padding: .85vw clamp(10px, 1.2vw, 23px) 1.05vw;
    background: rgba(161, 188, 219, .19);
    transition: background .18s ease;
}

.nx-shot {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(255, 255, 255, .05);
}

@media (max-width: 767px) {
    .nx-feature .nx-shot { max-width: 594px; margin: 0 auto; }
}

@supports not (aspect-ratio: 16 / 9) {
    .nx-shot::before {
        content: "";
        display: block;
        padding-top: 56.25%;
    }
}

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

.nx-feature-meta {
    position: relative;
    margin: 1.6vw 0 0 1.1vw;
    padding-left: 1.3vw;
}

.nx-rule {
    position: absolute;
    top: 0;
    left: 0;
    width: .42vw;
    height: 5.2vw;
    background: linear-gradient(#ffdb83, rgba(255, 219, 131, 0));
}

.nx-feature-text {
    display: flex;
    flex-direction: column;
    gap: .65vw;
    min-width: 0;
}

.nx-feature-title,
.nx-feature-subtitle {
    font-size: clamp(22px, 1.75vw, 33px);
    line-height: 1.6666667;
    overflow-wrap: break-word;
    text-wrap: balance;
}
.nx-feature-title {
    color: var(--v2-heading-color);
    font-weight: 600;
}
.nx-feature-subtitle {
    color: #fff;
    font-weight: 700;
}
.nx-feature-subtitle[hidden] { display: none; }
.nx-phrase { display: inline-block; max-width: 100%; vertical-align: top; overflow-wrap: anywhere; }
.v2-index .nx-news .nx-headline-fit { white-space: nowrap; text-wrap: nowrap; overflow-wrap: normal; }
.v2-index .nx-news .nx-headline-fit .nx-phrase { display: inline; }
.v2-index .nx-news .nx-headline-fit .nx-item-title,
.v2-index .nx-news .nx-headline-fit .nx-item-subtitle { font-size: inherit; line-height: inherit; }

.nx-feature-date {
    color: #fff;
    font-size: clamp(16px, 1.25vw, 25px);
    font-weight: 500;
    line-height: 1.6;
}

.nx-list {
    display: flex;
    flex-direction: column;
    gap: 1vw;
}

.nx-item {
    display: grid;
    grid-template-columns: minmax(0, 34%) minmax(0, 1fr);
    gap: clamp(16px, 1.55vw, 26px);
    align-items: center;
}

.nx-item .nx-shot {
    /* Only the photograph is framed; the copy sits on the campus backdrop. */
    border: .3vw solid rgba(161, 188, 219, .3);
    box-sizing: content-box;
    width: calc(100% - .6vw);
}

.nx-item-text {
    display: flex;
    flex-direction: column;
    gap: .45vw;
    min-width: 0;
}

.nx-item-heading {
    font-size: 19px;
    line-height: 33px;
}

.nx-item-title {
    color: #fff;
    font-size: 19px;
    font-weight: 600;
    line-height: 33px;
    overflow-wrap: anywhere;
}

.nx-item-date {
    color: #fff;
    font-size: clamp(15px, 1.02vw, 19px);
    font-weight: 500;
    line-height: 1.65;
}

.nx-item-subtitle {
    color: #fff;
    font-size: clamp(15px, 1.02vw, 19px);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.nx-item.is-spare,
.nx-item.is-hidden { display: none; }

.nx-more-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 2.35vw;
}

.nx-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .4vw 1.45vw;
    border: 1px solid #d1b779;
    color: #ffdb83;
    font-size: clamp(15px, 1.05vw, 21px);
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
    transition: background .18s ease;
}

.nx-more:hover {
    color: #ffdf9a;
    background: rgba(255, 219, 131, .12);
    text-decoration: none;
}

.nx-activities { margin-top: 4.15vw; }

.nx-sub {
    margin: 0 0 0 .8vw;
    color: #fff;
    font-size: clamp(24px, 1.9vw, 38px);
    font-weight: 700;
    line-height: 1.5;
}

/*
 * Three tiles across only while each stays wide enough to read. One column
 * left each tile 411px tall at 760px - 1272px of grid for three items - which
 * was most of why the stacked section reached 3084px there.
 */
.nx-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.95vw;
    margin-top: 1vw;
}

@media (max-width: 479px) {
    .nx-grid { grid-template-columns: minmax(0, 1fr); }
}

.nx-tile {
    padding: .6vw .72vw .72vw;
    background: rgba(161, 188, 219, .22);
    transition: background .18s ease;
}

.nx-feature:hover .nx-frame,
.nx-tile:hover { background: rgba(161, 188, 219, .34); }
.nx-item:hover .nx-item-title { color: #ffdb83; }
.nx-activities .nx-more-row { margin-top: 1.6vw; }

/* Reuse the site's play asset for actual video entries. */
.nx-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(48px, 4.3vw, 86px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: url('../../images/playbtn.png') center / contain no-repeat;
    pointer-events: none;
}

.nx-news a:focus-visible,
.nx-tab:focus-visible {
    outline: 3px solid #ffdb83;
    outline-offset: 5px;
}

@media (max-width: 767px) {
    .nx-main { grid-template-columns: minmax(0, 1.035fr) minmax(0, 1fr); gap: 28px; }
    .nx-tabs { gap: 12px; margin: 30px 0 40px; }
    .nx-tab { min-width: 0; padding: 10px 22px; font-size: clamp(16px, 1.9vw, 21px); }
    .nx-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 16px; }
    .nx-list { gap: 18px; }
    .nx-feature-meta { margin-top: 22px; padding-left: 18px; }
    .nx-feature-text { gap: 10px; }
    .nx-rule { width: 5px; height: 82px; }
    .nx-item-text { gap: 6px; }
    .nx-item-title { font-size: clamp(15px, 1.75vw, 19px); line-height: 1.65; }
    .nx-grid { gap: 20px; margin-top: 20px; }
    .nx-more-row { margin-top: 28px; }
    .nx-activities { margin-top: 60px; }
    .nx-activities .nx-more-row { margin-top: 24px; }
}

@media (max-width: 767px) {
    .nx-news { background-position: 62% top; }
    .nx-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 26px 0 34px; }
    .nx-tab { min-width: 0; padding: 12px 8px; font-size: 16px; }
    .nx-main { grid-template-columns: minmax(0, 1fr); gap: 30px; }
    .nx-frame { padding: 10px; }
    .nx-feature-meta { margin-left: 10px; }
    .nx-item { grid-template-columns: minmax(110px, 1fr) minmax(0, 1.65fr); gap: 16px; }
    .nx-item .nx-shot { border-width: 4px; width: calc(100% - 8px); }
    .nx-more { padding: 9px 20px; font-size: 16px; }
    .nx-sub { margin-left: 8px; font-size: 26px; }
    .nx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nx-tile { padding: 9px; }
}

@media (prefers-reduced-motion: reduce) {
    .nx-news * { transition: none; }
}
