/* =====================================================================
   Bloom Garden Schools: News & Events stories (loaded by news.php only)
   Featured latest story, school tag, "At a glance" facts, pull quote,
   photo gallery with a simple viewer. Uses the colour tokens from
   css/bloom-refresh.css.
   ===================================================================== */

/* School tag + date */
.bgn-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; font: 600 13px/1.3 var(--bgr-sans, "Montserrat", sans-serif); color: var(--bgr-muted, #66757f); }
.bgn-tag { display: inline-block; padding: 5px 10px; border-radius: 999px; background: var(--school, var(--bgr-ink, #1d2b64)); color: #fff; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }

/* Featured (latest) story in the list: big photo beside the text */
.bg-news-row.bgn-featured { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: center; padding-bottom: 28px; border-bottom: 1px solid var(--bgr-line, #e4dccd); }
.bg-news-row.bgn-featured .bg-news-row-image img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; }
.bg-news-row.bgn-featured h3 { font: 600 clamp(22px, 2.4vw, 30px)/1.2 var(--bgr-serif, Georgia, serif); color: var(--bgr-ink, #1d2b64); }
.bg-news-row.bgn-featured h3 a { color: inherit !important; text-decoration: none !important; }
.bg-news-row.bgn-featured h3 a:hover { color: var(--bgr-teal, #2e7089) !important; }
.bg-news-row.bgn-featured p { font-size: 1rem; }

/* Single story */
.bgn-story { max-width: 760px; }
.bgn-title { font: 600 clamp(28px, 3.6vw, 42px)/1.12 var(--bgr-serif, Georgia, serif) !important; letter-spacing: -0.01em; color: var(--bgr-ink, #1d2b64) !important; margin: 0 0 14px !important; }
.bgn-lede { font-size: 1.15rem !important; line-height: 1.7 !important; color: var(--bgr-text, #42525e) !important; margin: 0 0 24px !important; }
.bgn-hero { margin: 0 0 24px; }
.bgn-hero img { display: block; width: 100%; height: auto; border-radius: 16px; }

.bgn-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0 0 28px; border: 1px solid var(--bgr-line, #e4dccd); border-radius: 14px; background: var(--bgr-cream, #fbf7ef); overflow: hidden; }
.bgn-facts > div { padding: 14px 18px; border-bottom: 1px solid var(--bgr-line, #e4dccd); }
.bgn-facts > div:nth-child(odd) { border-right: 1px solid var(--bgr-line, #e4dccd); }
.bgn-facts > div:nth-last-child(-n+2) { border-bottom: 0; }
.bgn-facts dt { margin: 0 0 4px; font: 700 11px/1.2 var(--bgr-sans, "Montserrat", sans-serif); letter-spacing: .12em; text-transform: uppercase; color: var(--bgr-gold-deep, #8c6c00); }
.bgn-facts dd { margin: 0; color: var(--bgr-ink, #1d2b64); font-weight: 600; line-height: 1.5; }

.bgn-body p { font-size: 1.02rem; line-height: 1.85; color: var(--bgr-text, #42525e); margin: 0 0 1.1rem; }
.bgn-quote { margin: 28px 0; padding: 22px 26px; border-left: 4px solid var(--bgr-gold, #f2c75c); background: #fff; border-radius: 0 14px 14px 0; box-shadow: 0 10px 30px rgba(29, 43, 100, .07); }
.bgn-quote p { margin: 0 0 10px !important; font: 500 clamp(18px, 2vw, 22px)/1.5 var(--bgr-serif, Georgia, serif) !important; color: var(--bgr-ink, #1d2b64) !important; }
.bgn-quote footer { font: 600 13px/1.3 var(--bgr-sans, "Montserrat", sans-serif); color: var(--bgr-muted, #66757f); }
.bgn-quote footer::before { content: "\2014\00a0"; }

.bgn-subhead { margin: 34px 0 14px; font: 600 22px/1.2 var(--bgr-serif, Georgia, serif); color: var(--bgr-ink, #1d2b64); }
.bgn-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 28px; padding: 0; list-style: none; }
.bgn-gallery a { display: block; overflow: hidden; border-radius: 12px; }
.bgn-gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform var(--bgp-base, .3s) var(--bgr-ease, ease); }
.bgn-gallery a:hover img, .bgn-gallery a:focus-visible img { transform: scale(1.04); }
.bgn-gallery a:focus-visible { outline: 3px solid var(--bgr-gold, #f2c75c); outline-offset: 2px; }

.bgn-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 22px; border-top: 1px solid var(--bgr-line, #e4dccd); }

/* Photo viewer */
.bgn-viewer { max-width: min(1100px, 94vw); max-height: 92vh; padding: 0; border: 0; border-radius: 12px; background: #000; overflow: visible; }
.bgn-viewer::backdrop { background: rgba(10, 14, 40, .85); }
.bgn-viewer img { display: block; max-width: min(1100px, 94vw); max-height: 92vh; width: auto; height: auto; border-radius: 12px; }
.bgn-viewer-close { position: absolute; top: -14px; right: -14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #fff; color: var(--bgr-ink, #1d2b64); font-size: 26px; line-height: 40px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.3); }

@media (max-width: 767px) {
  .bg-news-row.bgn-featured { grid-template-columns: 1fr; gap: 16px; }
  .bgn-facts { grid-template-columns: 1fr; }
  .bgn-facts > div:nth-child(odd) { border-right: 0; }
  .bgn-facts > div:nth-last-child(2) { border-bottom: 1px solid var(--bgr-line, #e4dccd); }
  .bgn-gallery { gap: 8px; }
  .bgn-viewer-close { top: 8px; right: 8px; }
}
@media (prefers-reduced-motion: reduce) { .bgn-gallery img { transition: none; } }
