/* News list (all_news.php) and article (news_detail.php), redesign 2026-11-16.
   Photos keep their own shape: the frame uses the photo's real width/height (aspect-ratio set inline),
   and a blurred copy of the same photo fills any space, so nothing is cropped and there are no grey bars. */

.nw-section { padding: 64px 0 84px; background: #f6f8fc; }

/* Toolbar: count + search */
.nw-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.nw-toolbar__count { margin: 0; color: #5b6780; font-size: 14px; }
.nw-toolbar__count strong { color: #07133f; }
.nw-search { position: relative; flex: 0 1 360px; }
.nw-search input { width: 100%; height: 48px; padding: 0 48px 0 18px; border: 1px solid #d9e0ec; border-radius: 999px; background: #fff; color: #07133f; font-size: 15px; transition: border-color .2s, box-shadow .2s; }
.nw-search input:focus { outline: 0; border-color: #ff6600; box-shadow: 0 0 0 4px rgba(255,102,0,.12); }
.nw-search button { position: absolute; top: 5px; right: 5px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #07133f; color: #fff; font-size: 18px; display: grid; place-items: center; }
.nw-search button:hover { background: #ff6600; }

/* Photo frame that adapts to any upload */
.nw-photo { position: relative; display: block; overflow: hidden; background: #0b1a4f; isolation: isolate; }
.nw-photo__bg { position: absolute; inset: -20px; z-index: -1; background-size: cover; background-position: center; filter: blur(22px) saturate(1.2); opacity: .55; transform: scale(1.1); }
.nw-photo img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .6s cubic-bezier(.22,1,.36,1); }
.nw-photo--empty { display: grid; place-items: center; color: rgba(255,255,255,.5); font-size: 46px; }

/* Card grid (masonry-style columns so each card takes its photo's height) */
.nw-grid { columns: 3 320px; column-gap: 26px; }
.nw-card { break-inside: avoid; display: block; margin: 0 0 26px; overflow: hidden; border: 1px solid #e3e8f1; border-radius: 18px; background: #fff; color: inherit; box-shadow: 0 12px 34px rgba(7,19,63,.06); transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.nw-card:hover { transform: translateY(-4px); border-color: #ffd0b0; box-shadow: 0 22px 48px rgba(7,19,63,.12); text-decoration: none; color: inherit; }
.nw-card:hover .nw-photo img { transform: scale(1.03); }
.nw-card .nw-photo { max-height: 420px; }
.nw-card__body { padding: 22px 24px 24px; }
.nw-date { display: inline-flex; align-items: center; gap: 6px; color: #c2410c; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.nw-card h2, .nw-card h3 { margin: 10px 0 10px; color: #07133f; font-family: "Raleway", sans-serif; font-size: 20px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.nw-card p { margin: 0 0 16px; color: #5b6780; font-size: 14.5px; line-height: 1.65; }
.nw-more { display: inline-flex; align-items: center; gap: 8px; color: #07133f; font-size: 13.5px; font-weight: 700; }
.nw-more::after { content: "\2192"; color: #ff6600; transition: transform .25s ease; }
.nw-card:hover .nw-more { color: #ff6600; }
.nw-card:hover .nw-more::after { transform: translateX(4px); }

/* Featured (newest) story on page 1 */
.nw-featured { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); margin-bottom: 34px; overflow: hidden; border: 1px solid #e3e8f1; border-radius: 22px; background: #fff; color: inherit; box-shadow: 0 24px 60px rgba(7,19,63,.1); transition: box-shadow .3s ease; }
.nw-featured:hover { color: inherit; text-decoration: none; box-shadow: 0 30px 70px rgba(7,19,63,.16); }
.nw-featured .nw-photo { height: 100%; min-height: 320px; max-height: 520px; }
.nw-featured__body { display: flex; flex-direction: column; justify-content: center; padding: 40px 44px; }
.nw-featured h2 { margin: 12px 0 14px; color: #07133f; font-family: "Raleway", sans-serif; font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.nw-featured p { color: #5b6780; font-size: 15.5px; line-height: 1.7; }
.nw-featured:hover h2 { color: #ff6600; }
.nw-tag { display: inline-block; align-self: flex-start; padding: 5px 12px; border-radius: 999px; background: #fff1e8; color: #c2410c; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

/* Pagination */
.nw-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.nw-pages a, .nw-pages span { min-width: 44px; height: 44px; padding: 0 14px; display: inline-grid; place-items: center; border: 1px solid #d9e0ec; border-radius: 999px; background: #fff; color: #07133f; font-weight: 700; font-size: 14px; }
.nw-pages a:hover { border-color: #ff6600; color: #ff6600; text-decoration: none; }
.nw-pages .is-current { border-color: #07133f; background: #07133f; color: #fff; }
.nw-pages .is-gap { border: 0; background: none; min-width: 20px; padding: 0; }

.nw-empty { padding: 50px 30px; border: 1px dashed #cdd6e6; border-radius: 18px; background: #fff; text-align: center; color: #5b6780; }
.nw-empty h2 { color: #07133f; font-size: 22px; font-weight: 700; }

/* Article page */
.nw-article-hero .lead { max-width: 820px; }
.nw-article-hero h1 { font-size: clamp(30px, 4vw, 52px) !important; line-height: 1.12 !important; max-width: 900px; }
.nw-article { padding: 56px 0 30px; background: #fff; }
.nw-article__wrap { max-width: 860px; margin: 0 auto; }
.nw-article__figure { margin: 0 0 40px; overflow: hidden; border-radius: 20px; box-shadow: 0 24px 60px rgba(7,19,63,.14); }
.nw-article__figure .nw-photo { max-height: 78vh; }
.nw-article__figure .nw-photo img { cursor: zoom-in; }
.nw-body { color: #333d52; font-size: 17px; line-height: 1.8; }
.nw-body p { margin: 0 0 1.2em; }
.nw-body h2, .nw-body h3, .nw-body h4 { margin: 1.6em 0 .6em; color: #07133f; font-family: "Raleway", sans-serif; font-weight: 700; }
.nw-body a { color: #c2410c; text-decoration: underline; }
.nw-body img { max-width: 100%; height: auto !important; border-radius: 12px; }
.nw-body ul, .nw-body ol { padding-left: 1.3em; margin-bottom: 1.2em; }
.nw-body table { max-width: 100%; }
.nw-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 36px 0 0; padding-top: 26px; border-top: 1px solid #e3e8f1; }
.nw-share span { color: #5b6780; font-size: 14px; font-weight: 700; margin-right: 4px; }
.nw-share a, .nw-share button { width: 42px; height: 42px; display: inline-grid; place-items: center; border: 1px solid #d9e0ec; border-radius: 50%; background: #fff; color: #07133f; font-size: 20px; transition: all .2s; }
.nw-share a:hover, .nw-share button:hover { border-color: #ff6600; background: #ff6600; color: #fff; text-decoration: none; }
.nw-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 34px; }
.nw-nav a { display: block; padding: 18px 22px; border: 1px solid #e3e8f1; border-radius: 16px; color: #07133f; transition: all .2s; }
.nw-nav a:hover { border-color: #ff6600; text-decoration: none; box-shadow: 0 12px 30px rgba(7,19,63,.08); }
.nw-nav small { display: block; margin-bottom: 4px; color: #c2410c; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nw-nav strong { font-size: 15px; line-height: 1.4; }
.nw-nav .is-next { text-align: right; grid-column: 2; }

/* Full-size photo viewer */
.nw-lightbox { position: fixed; inset: 0; z-index: 9999; display: none; place-items: center; padding: 24px; background: rgba(4,10,35,.92); cursor: zoom-out; }
.nw-lightbox.is-open { display: grid; }
.nw-lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.nw-lightbox button { position: absolute; top: 18px; right: 22px; width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 26px; }

@media (max-width: 991px) {
  .nw-featured { grid-template-columns: 1fr; }
  .nw-featured .nw-photo { min-height: 0; height: auto; }
  .nw-featured__body { padding: 28px 26px 30px; }
}
@media (max-width: 575px) {
  .nw-section { padding: 44px 0 60px; }
  .nw-search { flex-basis: 100%; }
  .nw-nav { grid-template-columns: 1fr; }
  .nw-nav .is-next { grid-column: 1; }
  .nw-body { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .nw-card, .nw-photo img, .nw-more::after { transition: none; } }

/* Aligned rows (2026-11-16): equal-size photo frames, cards line up per row. Photos still show in full
   (object-fit: contain) with the blurred copy filling the frame, so no cropping. */
.nw-grid { columns: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; align-items: stretch; }
.nw-card { margin: 0; display: flex; flex-direction: column; }
.nw-card .nw-photo { aspect-ratio: 16 / 10 !important; max-height: none; }
.nw-card__body { display: flex; flex-direction: column; flex: 1; }
.nw-card h2, .nw-card h3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-card p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-card .nw-more { margin-top: auto; }
@media (max-width: 991px) { .nw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { .nw-grid { grid-template-columns: 1fr; } }

/* v3 (2026-11-16): cleaner photos and a magazine-style lead. Card photos fill their frame (no blurred bands);
   the article page still shows each photo complete at its own shape. */
.nw-grid .nw-photo img, .nw-lead .nw-photo img { object-fit: cover; }
.nw-grid .nw-photo__bg, .nw-lead .nw-photo__bg { display: none; }
.nw-section { padding-top: 48px; }
.lst-hero.svc-hero { min-height: 0; }

.nw-toolbar { margin-bottom: 14px; }
.nw-years { display: flex; flex-wrap: wrap; gap: 8px; }
.nw-years a { padding: 9px 16px; border: 1px solid #d9e0ec; border-radius: 999px; background: #fff; color: #07133f; font-size: 13.5px; font-weight: 700; line-height: 1; transition: all .2s; }
.nw-years a:hover { border-color: #ff6600; color: #ff6600; text-decoration: none; }
.nw-years a.is-on { border-color: #07133f; background: #07133f; color: #fff; }
.nw-count { margin: 0 0 26px; color: #5b6780; font-size: 14px; }
.nw-count strong { color: #07133f; }
.nw-count a { color: #c2410c; font-weight: 700; }

.nw-lead { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 26px; margin-bottom: 46px; }
.nw-lead .nw-featured { position: relative; display: block; margin: 0; min-height: 480px; border: 0; border-radius: 22px; background: #07133f; }
.nw-lead .nw-featured .nw-photo { position: absolute; inset: 0; height: 100%; max-height: none; aspect-ratio: auto !important; }
.nw-lead .nw-featured::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,19,63,0) 30%, rgba(7,19,63,.55) 58%, rgba(7,19,63,.95) 100%); pointer-events: none; }
.nw-lead .nw-featured__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 34px 36px; display: block; }
.nw-lead .nw-featured h2 { margin: 14px 0 10px; color: #fff; font-size: clamp(24px, 2.5vw, 34px); max-width: 720px; }
.nw-lead .nw-featured p { margin: 0 0 14px; max-width: 680px; color: rgba(255,255,255,.82); font-size: 15px; }
.nw-lead .nw-featured .nw-date { color: #ffb27a; }
.nw-lead .nw-featured .nw-tag { background: #ff6600; color: #fff; }
.nw-lead .nw-featured:hover h2 { color: #fff; text-decoration: underline; text-decoration-color: #ff6600; text-underline-offset: 6px; }
.nw-lead .nw-featured:hover .nw-photo img { transform: scale(1.03); }

.nw-side { display: grid; grid-template-rows: 1fr 1fr; gap: 26px; }
.nw-side__item { display: flex; flex-direction: column; overflow: hidden; border: 1px solid #e3e8f1; border-radius: 18px; background: #fff; color: inherit; box-shadow: 0 12px 34px rgba(7,19,63,.06); transition: transform .3s, box-shadow .3s, border-color .3s; }
.nw-side__item:hover { transform: translateY(-3px); border-color: #ffd0b0; box-shadow: 0 20px 44px rgba(7,19,63,.12); color: inherit; text-decoration: none; }
.nw-side__item .nw-photo { flex: 1 1 auto; min-height: 120px; aspect-ratio: auto !important; }
.nw-side__item > div { padding: 16px 20px 18px; }
.nw-side__item h3 { margin: 6px 0 8px; color: #07133f; font-family: "Raleway", sans-serif; font-size: 17px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nw-side__item:hover .nw-more { color: #ff6600; }

.nw-subhead { margin: 0 0 22px; padding-bottom: 14px; border-bottom: 1px solid #e3e8f1; color: #07133f; font-family: "Raleway", sans-serif; font-size: 24px; font-weight: 700; }

@media (max-width: 991px) {
  .nw-lead { grid-template-columns: 1fr; }
  .nw-lead .nw-featured { min-height: 420px; }
  .nw-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .nw-side__item .nw-photo { aspect-ratio: 16 / 10 !important; flex: none; }
}
@media (max-width: 575px) {
  .nw-toolbar { flex-direction: column; align-items: stretch; }
  .nw-years { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .nw-years a { flex: none; }
  .nw-lead .nw-featured { min-height: 380px; }
  .nw-lead .nw-featured__body { padding: 24px 22px; }
  .nw-side { grid-template-columns: 1fr; }
}
/* Lead block: fixed height on desktop; photos fill their space without stretching it */
@media (min-width: 992px) {
  .nw-lead { height: 540px; }
  .nw-lead .nw-featured { min-height: 0; height: 100%; }
  .nw-side { min-height: 0; }
  .nw-side__item { min-height: 0; }
  .nw-side__item .nw-photo { position: relative; flex: 1 1 0; min-height: 0; }
}
.nw-lead .nw-photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.nw-side__item .nw-photo { position: relative; }
/* Phones: keep the year chips scrolling inside the screen instead of widening the page */
.nw-toolbar > * { min-width: 0; max-width: 100%; }
.nw-section, .nw-section .container { overflow-x: clip; }
