/* ==========================================================================
   ST. FRANCIS DE SALES PRE-UNIVERSITY COLLEGE
   news.css — News page only (loaded after sfs.css and about.css, which
   supplies the shared inner-page hero). Existing design tokens only; every
   class is prefixed `sfs-nw-`.
   ========================================================================== */
.sfs-nw-sec { background: var(--sfs-paper); }
.sfs-nw-head { margin-bottom: clamp(28px, 4vw, 48px); }
.sfs-nw-kicker { display: inline-flex; align-items: center; gap: 14px; font-size: 0.905rem; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: var(--sfs-amber-ink); }
.sfs-nw-kicker::before { content: ""; width: 40px; height: 2px; background: var(--sfs-amber); }
.sfs-nw-head h2 { margin-top: 12px; font-family: var(--sfs-display); font-size: clamp(2rem, 3.6vw, 3.2rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; color: #0D306C; }

.sfs-nw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 36px); align-items: start; }
.sfs-nw-card {
  display: flex; flex-direction: column; overflow: hidden; background: var(--sfs-white);
  border: 1px solid var(--sfs-line); border-radius: 18px;
  transition: transform .45s var(--sfs-ease-out), box-shadow .45s var(--sfs-ease), border-color .3s;
}
.sfs-nw-card:hover { transform: translateY(-5px); box-shadow: 0 30px 60px -38px rgba(7, 29, 67, .5); }
.sfs-nw-card__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--sfs-line-soft); }
.sfs-nw-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--sfs-ease-out); }
.sfs-nw-card:hover .sfs-nw-card__media img { transform: scale(1.05); }
.sfs-nw-card__body { padding: clamp(22px, 2.6vw, 34px); }
.sfs-nw-date { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px; border-radius: 999px; background: rgba(13, 48, 108, .07); font-size: 0.945rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #0D306C; }
.sfs-nw-card__title { margin-top: 18px; font-family: var(--sfs-display); font-size: clamp(1.4rem, 2.1vw, 1.9rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; color: #0D306C; }
.sfs-nw-teaser { margin-top: 14px; line-height: 1.75; color: var(--sfs-ink-70); }
.sfs-nw-card:has(details[open]) .sfs-nw-teaser { display: none; }

/* Read More (native <details>, works without JS) */
.sfs-nw-more { margin-top: 20px; }
.sfs-nw-more summary {
  list-style: none; display: inline-flex; align-items: center; gap: 10px; padding: 13px 26px; cursor: pointer;
  background: #0D306C; color: var(--sfs-white); border-radius: 999px;
  font-size: 0.905rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  transition: background-color .3s var(--sfs-ease), transform .35s var(--sfs-ease-out);
}
.sfs-nw-more summary::-webkit-details-marker { display: none; }
.sfs-nw-more summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .3s var(--sfs-ease); }
.sfs-nw-more[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.sfs-nw-more summary:hover { background: #1B4A98; transform: translateY(-2px); }
.sfs-nw-more summary:focus-visible { outline: 3px solid var(--sfs-amber); outline-offset: 3px; }
.sfs-nw-more__close { display: none; }
.sfs-nw-more[open] .sfs-nw-more__open { display: none; }
.sfs-nw-more[open] .sfs-nw-more__close { display: inline; }
.sfs-nw-full { margin-top: 22px; }
.sfs-nw-full p { line-height: 1.75; color: var(--sfs-ink-70); }
.sfs-nw-full p + p { margin-top: 14px; }
.sfs-nw-full b { color: #0D306C; font-weight: 700; }
.sfs-nw-gallery { margin-top: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sfs-nw-gallery a { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 10px; background: var(--sfs-line-soft); }
.sfs-nw-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--sfs-ease-out); }
.sfs-nw-gallery a:hover img { transform: scale(1.06); }

@media (max-width: 900px) { .sfs-nw-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .sfs-nw-gallery { grid-template-columns: 1fr; } .sfs-nw-more summary { width: 100%; justify-content: center; } }

/* ---- four-card listing + detail pages ---- */
.sfs-nw-grid--4 { align-items: stretch; }
.sfs-nw-card__body { display: flex; flex-direction: column; flex: 1; align-items: flex-start; }
.sfs-nw-card__title a { color: inherit; }
.sfs-nw-card__title a:hover { color: #1B4A98; }
.sfs-nw-teaser { flex: 1; }
.sfs-nw-btn {
  margin-top: 22px; display: inline-flex; align-items: center; gap: 12px; padding: 13px 26px; border-radius: 999px;
  background: #0D306C; color: var(--sfs-white); font-size: 0.905rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  transition: background-color .3s var(--sfs-ease), transform .35s var(--sfs-ease-out), gap .3s var(--sfs-ease);
}
.sfs-nw-btn:hover { background: #1B4A98; transform: translateY(-2px); gap: 16px; }
.sfs-nw-btn:focus-visible, .sfs-nw-back:focus-visible, .sfs-nw-card__title a:focus-visible { outline: 3px solid var(--sfs-amber); outline-offset: 3px; }

.sfs-nw-h1 { font-size: clamp(2rem, 4.4vw, 3.6rem); max-width: 22ch; }
.sfs-nw-article { max-width: 880px; margin-inline: auto; }
.sfs-nw-back { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; font-size: 0.905rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #0D306C; }
.sfs-nw-back:hover { color: #1B4A98; }
.sfs-nw-back--foot { margin: 40px 0 0; }
.sfs-nw-article__title { margin-top: 18px; font-family: var(--sfs-display); font-size: clamp(1.7rem, 3.2vw, 2.7rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.1; color: #0D306C; }
.sfs-nw-article__hero { border-radius: 18px; overflow: hidden; border: 1px solid var(--sfs-line); background: var(--sfs-line-soft); }
.sfs-nw-article__hero img { width: 100%; height: auto; display: block; }
.sfs-nw-facts { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 30px; }
.sfs-nw-facts li { color: var(--sfs-ink-70); }
.sfs-nw-facts b { color: #0D306C; }
.sfs-nw-prose { margin-top: 26px; }
.sfs-nw-prose p { max-width: 70ch; font-size: 1.04rem; line-height: 1.85; color: var(--sfs-ink-70); }
.sfs-nw-prose p + p { margin-top: 18px; }
.sfs-nw-prose b { color: #0D306C; font-weight: 700; }
.sfs-nw-gallery--article { margin-top: 34px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sfs-nw-gallery--article a { border-radius: 12px; }
@media (max-width: 520px) { .sfs-nw-gallery--article { grid-template-columns: 1fr; } }

/* ---- 4-column grid on desktop, 2 on tablet, 1 on phones ---- */
.sfs-nw-grid.sfs-nw-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 1.6vw, 26px); }
.sfs-nw-grid--4 .sfs-nw-card__body { padding: clamp(18px, 1.6vw, 24px); }
.sfs-nw-grid--4 .sfs-nw-card__title { font-size: clamp(1.15rem, 1.3vw, 1.4rem); }
.sfs-nw-grid--4 .sfs-nw-teaser { font-size: 13px; line-height: 1.65; }
.sfs-nw-grid--4 .sfs-nw-btn { padding: 12px 22px; }
@media (max-width: 1100px) { .sfs-nw-grid.sfs-nw-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sfs-nw-grid.sfs-nw-grid--4 { grid-template-columns: 1fr; } }

/* ---- smaller Read More button on the news cards ---- */
.sfs-nw-grid--4 .sfs-nw-btn { margin-top: 16px; gap: 8px; padding: 8px 16px; font-size: 0.805rem; letter-spacing: .12em; }
.sfs-nw-grid--4 .sfs-nw-btn svg { width: 13px; height: 10px; }
.sfs-nw-grid--4 .sfs-nw-btn:hover { gap: 11px; }

/* ---- detail-page photo gallery + lightbox ---- */
.sfs-nw-gallery--article { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sfs-nw-gallery--article a { position: relative; border-radius: 14px; border: 1px solid var(--sfs-line); }
.sfs-nw-gallery--article a::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(13, 48, 108, .55), rgba(13, 48, 108, 0) 55%); opacity: 0; transition: opacity .35s var(--sfs-ease);
}
.sfs-nw-gallery--article a::before {
  content: ""; position: absolute; z-index: 1; right: 12px; bottom: 12px; width: 34px; height: 34px; border-radius: 50%; background: var(--sfs-white) no-repeat center / 16px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230D306C' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='M10.5 10.5L14 14M7 5v4M5 7h4'/%3E%3C/svg%3E");
  opacity: 0; transform: translateY(6px); transition: opacity .35s var(--sfs-ease), transform .35s var(--sfs-ease-out);
}
.sfs-nw-gallery--article a:hover::after, .sfs-nw-gallery--article a:focus-visible::after { opacity: 1; }
.sfs-nw-gallery--article a:hover::before, .sfs-nw-gallery--article a:focus-visible::before { opacity: 1; transform: none; }
.sfs-nw-gallery--article a:focus-visible { outline: 3px solid var(--sfs-amber); outline-offset: 3px; }
@media (max-width: 760px) { .sfs-nw-gallery--article { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.sfs-nw-lb { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; background: rgba(4, 20, 47, .94); }
.sfs-nw-lb[hidden] { display: none; }
.sfs-nw-lb__stage { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; justify-content: center; padding: 64px 12px; }
.sfs-nw-lb__stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.sfs-nw-lb__close, .sfs-nw-lb__nav {
  border: 0; cursor: pointer; color: var(--sfs-white); background: rgba(255, 255, 255, .12); border-radius: 50%; line-height: 1;
  transition: background-color .25s var(--sfs-ease);
}
.sfs-nw-lb__close:hover, .sfs-nw-lb__nav:hover { background: rgba(255, 255, 255, .28); }
.sfs-nw-lb__close:focus-visible, .sfs-nw-lb__nav:focus-visible { outline: 3px solid var(--sfs-amber); outline-offset: 2px; }
.sfs-nw-lb__close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; font-size: 1.8rem; z-index: 2; }
.sfs-nw-lb__nav { flex: none; width: 48px; height: 48px; margin-inline: 12px; font-size: 1.3rem; }
.sfs-nw-lb__count { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: 0.945rem; font-weight: 700; letter-spacing: .14em; color: rgba(255, 255, 255, .8); }
@media (max-width: 640px) {
  .sfs-nw-lb__nav { position: absolute; bottom: 12px; margin: 0; width: 42px; height: 42px; z-index: 2; }
  .sfs-nw-lb__nav--prev { left: 16px; } .sfs-nw-lb__nav--next { right: 16px; }
  .sfs-nw-lb__stage { padding: 64px 8px 70px; }
}

/* ---- detail-page header block (category pill, title, date/venue meta) ---- */
.sfs-nw-cat {
  display: inline-flex; align-items: center; gap: 9px; margin: 22px 0 0; padding: 8px 16px; border-radius: 999px;
  background: rgba(244, 165, 28, .16); color: var(--sfs-amber-ink);
  font-size: 0.885rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.sfs-nw-article__title { margin-top: 16px; }
.sfs-nw-meta { margin-top: 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; }
.sfs-nw-meta__item { display: inline-flex; align-items: center; gap: 9px; color: var(--sfs-ink-70); }
.sfs-nw-meta__item svg { color: var(--sfs-amber-ink); flex: none; }
.sfs-nw-meta__item b { color: #0D306C; font-weight: 700; }
.sfs-nw-meta__sep { width: 1px; height: 18px; background: var(--sfs-line); }
.sfs-nw-article__hero { margin-top: 28px; border-top: 0; }
@media (max-width: 520px) { .sfs-nw-meta__sep { display: none; } }

/* article gallery: 4 columns on desktop, matching the reference layout */
.sfs-nw-gallery--article { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .sfs-nw-gallery--article { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .sfs-nw-gallery--article { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
