/* ===== BBSO — Accessible & Readable ===== */
:root {
  /* Original site colors — preserved */
  --bg: #737362;
  --bg-content: #ebeccd;
  --bg-header: #d6d7b7;
  --nav-bg: #000000;
  --nav-hover: #d6d7b7;
  --dropdown-bg: #ebeccd;
  --dropdown-hover: #d6d7b7;
  --text: #000000;
  --text-white: #ffffff;
  --link: darkblue;
  --link-white: #ffffff;
  --red: darkred;
  --border: #000000;
  --border-light: #ffffff;

  /* Card system */
  --card-bg: #f5f4e8;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  --card-shadow-hover: 0 4px 12px rgba(0,0,0,0.18);
  --card-radius: 6px;

  /* Typography — large and readable */
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-nav: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --text-xs: 0.875rem;    /* 14px */
  --text-sm: 1rem;        /* 16px */
  --text-base: 1.125rem;  /* 18px */
  --text-md: 1.25rem;     /* 20px */
  --text-lg: 1.5rem;      /* 24px */
  --text-xl: 1.75rem;     /* 28px */

  --max-w: none;
  --radius: 4px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: 1rem; }

body {
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--text);
  background: var(--bg-content);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: underline; }
a:visited { color: var(--link); }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
ul, ol { list-style: none; }

h1, h2, h3, h4 { color: var(--text); line-height: 1.3; font-weight: bold; }
h1 { font-size: var(--text-xl); }
h2 { font-size: var(--text-lg); }
h3 { font-size: var(--text-md); }

p { margin-bottom: 0.75em; }
p:last-child { margin-bottom: 0; }

/* Custom tag classes */
.alert-heading { color: darkred; font-size: var(--text-md); font-weight: bold; margin-bottom: 0.5em; }
.section-title { color: var(--text); font-size: var(--text-md); font-weight: bold; margin-bottom: 0.5em; }
.emphasis { color: var(--text); font-weight: 700; }

/* ===== Skip Link ===== */
.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--red); color: #fff; padding: 0.75rem 1.5rem;
  z-index: 100; font-weight: bold; font-size: var(--text-sm);
}
.skip-link:focus { top: 1rem; }

/* ===== Banner ===== */
.banner { background: var(--nav-bg); }
.banner__inner { padding: 0; }
.banner__inner img { width: 100%; height: auto; display: block; }

/* ===== Navigation ===== */
.nav {
  background: var(--nav-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.nav__inner {
  padding: 0 2rem;
  display: flex; align-items: center; height: auto; min-height: 48px;
}
.nav__links { display: flex; list-style: none; width: 100%; margin: 0; padding: 0; gap: 0; }
.nav__item { position: relative; flex: 1; }
.nav__link {
  display: flex; align-items: center; justify-content: center;
  padding: 0.75rem 0.5rem; height: 100%; min-height: 48px;
  color: var(--text-white); font-family: var(--font-nav);
  font-size: var(--text-sm); text-decoration: none; background: var(--nav-bg);
  transition: background 0.15s;
}
.nav__link:hover {
  background: var(--nav-hover); color: var(--text); text-decoration: none;
}
.nav__link--active { background: var(--nav-hover); color: var(--text); }

/* Dropdowns */
.nav__dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  min-width: 240px; background: var(--dropdown-bg);
  border: 1px solid var(--border); border-top: 2px solid var(--red);
  z-index: 100; list-style: none; padding: 0; margin: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.nav__item:hover .nav__dropdown { display: block; }
.nav__dropdown-section {
  color: var(--text); font-size: var(--text-xs); font-weight: bold;
  padding: 0.75rem 1rem 0.25rem; border-bottom: 1px solid var(--border-light);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.nav__dropdown-link {
  display: block; text-align: left; color: var(--text);
  font-size: var(--text-sm); padding: 0.75rem 1rem; text-decoration: none;
  border-bottom: 1px solid var(--border-light); background: var(--dropdown-bg);
  min-height: 44px; display: flex; align-items: center;
  transition: background 0.15s;
}
.nav__dropdown-link:hover { background: var(--dropdown-hover); text-decoration: none; }

/* Mobile toggle — 48px touch target */
.nav__toggle {
  display: none; flex-direction: column; gap: 5px;
  width: 48px; height: 48px; padding: 10px;
  background: var(--nav-bg); border: 1px solid #444; border-radius: 4px;
  cursor: pointer; justify-content: center; align-self: center;
}
.nav__toggle-bar {
  display: block; width: 100%; height: 3px; background: #fff;
  border-radius: 2px; transition: transform 0.25s, opacity 0.15s;
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav__mobile { display: none; background: var(--nav-bg); padding: 0; border-bottom: 1px solid #333; }
.nav__mobile.is-open { display: block; }
.nav__mobile-section {
  color: var(--nav-hover); font-size: var(--text-sm); font-weight: bold;
  padding: 1rem 1.5rem 0.5rem; border-top: 1px solid #333;
}
.nav__mobile-link {
  display: block; color: var(--text-white); font-size: var(--text-sm);
  padding: 0.75rem 1.5rem 0.75rem 2rem; text-decoration: none;
  background: var(--nav-bg); min-height: 48px; display: flex; align-items: center;
  transition: background 0.15s;
}
.nav__mobile-link:hover { background: #333; text-decoration: none; }

/* ===== Main Content ===== */
.content-area {
  background: var(--bg-content);
  padding: 1.5rem 3rem;
  font-size: var(--text-base); color: var(--text);
  line-height: 1.65;
}
.content-area a { color: var(--link); }
.content-area a:hover { text-decoration: underline; }

/* Alert bar */
.alert-bar {
  background: var(--bg-header); padding: 0.75rem 1rem;
  margin-bottom: 1.5rem; display: flex;
  justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.5rem;
}

/* Quick links + video side-by-side */
.links-video-row {
  display: flex; gap: 1rem; margin-bottom: 1.5rem; align-items: flex-start;
}
.links-video-row .quick-links { flex: 1; margin-bottom: 0; }
.links-video-row .video-container { flex-shrink: 0; max-width: 350px; margin: 0; }

/* Quick links */
.quick-links { margin-bottom: 1.5rem; }
.quick-links__title {
  background: var(--bg-header); padding: 0.5rem 1rem;
  font-weight: bold; font-size: var(--text-sm); margin-bottom: 2px;
}
.quick-links__row {
  background: var(--bg-header); padding: 0.5rem 1rem; margin-bottom: 1px;
}
.quick-links__row a { color: var(--text); font-size: var(--text-sm); text-decoration: none; }
.quick-links__row a:hover { color: var(--red); text-decoration: underline; }

/* In-page navigation */
.inpage-nav {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  margin-bottom: 1.5rem; padding: 0.5rem 0;
  border-bottom: 1px solid #ccc;
}
.inpage-nav a {
  font-size: var(--text-sm); font-weight: 600;
  padding: 0.3rem 0.75rem; border-radius: 20px;
  background: var(--bg-header); color: var(--text);
  text-decoration: none; transition: background 0.15s;
}
.inpage-nav a:hover { background: var(--nav-hover); color: var(--red); }

/* Section headers */
.section-header {
  background: var(--bg-header); padding: 0.75rem 1rem;
  font-weight: bold; font-size: var(--text-md); margin-bottom: 1rem;
  margin-top: 2rem;
}

/* ===== Card-based Nuggets ===== */
.nuggets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.nugget-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.nugget-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.nugget-card__img {
  width: 100%; height: 180px; object-fit: cover;
  border-bottom: 3px solid var(--red);
  cursor: pointer;
  transition: filter 0.2s;
}
.nugget-card__img:hover { filter: brightness(1.05); }

.nugget-card__body {
  padding: 0.75rem 1rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.nugget-card__title {
  color: var(--red); font-size: var(--text-md);
  margin-bottom: 0.4rem; font-weight: bold; line-height: 1.3;
}
.nugget-card__title a { color: inherit; text-decoration: none; }
.nugget-card__title a:hover { text-decoration: underline; }

.nugget-card__text {
  font-size: var(--text-sm); line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nugget-card__ref {
  font-size: var(--text-xs); color: #666; margin-top: 0.5rem;
  border-top: 1px solid #ddd; padding-top: 0.4rem;
}

/* ===== Accordion News ===== */
.news-accordion { margin-bottom: 1rem; }

.news-accordion__item {
  border: 1px solid #ccc; border-radius: var(--card-radius);
  margin-bottom: 0.5rem; overflow: hidden;
  background: var(--card-bg);
}

.news-accordion__header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem; cursor: pointer;
  font-size: var(--text-sm); font-weight: 600;
  background: var(--bg-header);
  transition: background 0.15s;
}
.news-accordion__header:hover { background: var(--dropdown-hover); }
.news-accordion__date {
  font-size: var(--text-xs); color: #666; white-space: nowrap;
}
.news-accordion__summary { flex: 1; }
.news-accordion__icon {
  font-size: 1.2rem; transition: transform 0.2s;
  color: var(--red); font-weight: bold;
}
.news-accordion__item.is-open .news-accordion__icon { transform: rotate(180deg); }

.news-accordion__body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 1rem;
  font-size: var(--text-sm); line-height: 1.6;
}
.news-accordion__item.is-open .news-accordion__body {
  max-height: 200px;
  padding: 0.75rem 1rem;
}

/* Lightbox */
.lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 200; justify-content: center; align-items: center;
  cursor: zoom-out;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 90vw; max-height: 85vh;
  border-radius: 4px; box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}
.lightbox__close {
  position: absolute; top: 1rem; right: 1.5rem;
  color: #fff; font-size: 2rem; background: none; border: none;
  cursor: pointer; z-index: 201; line-height: 1;
}

/* Legacy nugget styles (for subpages that still use them) */
.nugget {
  margin-bottom: 1.5rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid #ccc;
  overflow: hidden;
}
.nugget h3 { color: darkred; font-size: var(--text-md); margin-bottom: 0.5rem; }
.nugget h3 a { color: darkred; }
.nugget img {
  float: left; max-width: 240px; margin-right: 1rem; margin-bottom: 0.5rem;
  padding: 4px; border: 0;
}
.nugget p { font-size: var(--text-sm); line-height: 1.6; }
.nugget .pub-ref { font-size: var(--text-xs); color: #333; margin-top: 0.5rem; }

/* Legacy news styles (for subpages) */
.news-item {
  margin-bottom: 0.75rem; padding-bottom: 0.75rem;
  border-bottom: 1px solid #ccc; font-size: var(--text-sm);
  line-height: 1.5;
}
.news-item:last-child { border-bottom: none; }
.news-date { font-weight: bold; }

/* Load more button — 44px touch target */
.load-more {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 48px; padding: 0.75rem;
  background: var(--bg-header); border: 1px solid #999;
  color: var(--text); font-size: var(--text-sm); font-weight: bold;
  cursor: pointer; margin-top: 1rem; border-radius: var(--card-radius);
  transition: background 0.15s;
}
.load-more:hover { background: var(--nav-hover); }

/* Hidden by default — shown on load more */
.nugget-extra, .news-extra { display: none; }
.nugget-extra.is-visible, .news-extra.is-visible { display: contents; }

/* Video */
.video-container { margin: 0; }
.video-container iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--card-radius); }

/* Footer */
.site-footer {
  background: var(--bg-content);
  padding: 1.5rem 3rem; text-align: center; font-size: var(--text-sm);
  border-top: 2px solid #999; margin-top: 2rem;
}
.footer-logos {
  display: flex; justify-content: center; align-items: center;
  gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.footer-logos img { display: inline; vertical-align: middle; }

/* Back to top — 48px touch target */
.back-to-top {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  background: var(--nav-bg); color: var(--text-white);
  width: 48px; height: 48px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  font-size: 1.5rem; text-decoration: none; z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border: 2px solid #444;
}
.back-to-top.is-visible { display: flex; }
.back-to-top:hover { background: var(--red); text-decoration: none; color: #fff; border-color: var(--red); }

/* ===== Responsive ===== */

/* Tablet */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .nav__inner { justify-content: space-between; padding: 0 0.5rem; height: auto; min-height: 48px; }
  .content-area { padding: 1.25rem; }
  .alert-bar { flex-direction: column; text-align: center; gap: 0.5rem; }
  .links-video-row { flex-direction: column; }
  .links-video-row .video-container { max-width: 100%; }
  .nuggets-grid { grid-template-columns: 1fr 1fr; }
  .footer-logos { flex-direction: column; gap: 1rem; }
  .footer-logos p { font-size: var(--text-xs); }
}

/* Small tablets and large phones */
@media (max-width: 640px) {
  .content-area { padding: 1rem; text-align: left; }
  .nuggets-grid { grid-template-columns: 1fr; }
  .video-container { max-width: 100%; }
}

/* Phones */
@media (max-width: 480px) {
  .content-area { padding: 0.75rem; }
  .nugget img { float: none; max-width: 100%; margin-right: 0; margin-bottom: 0.75rem; }
  .back-to-top { bottom: 1rem; right: 1rem; }
}
