/* ============================================================
   BFGI — Blog pages (update.php single article + updates.php list)

   Standalone layout, no site chrome dependencies. The old site's
   test-header2.php + footer.php rely on a stack of JS libs that
   aren't loaded here; this stylesheet owns the entire page.
   ============================================================ */

:root {
  --bu-red:   #e31e24;
  --bu-red-d: #b4151a;
  --bu-ink:   #0b1220;
  --bu-ink-2: #334155;
  --bu-muted: #64748b;
  --bu-line:  #e5e8ee;
  --bu-bg:    #f6f8fb;
  --bu-card:  #ffffff;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--bu-ink);
  background: var(--bu-bg);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bu-red); text-decoration: none; }
a:hover { color: var(--bu-red-d); }

/* ===== Top bar ===== */
.bu-top {
  background: #ffffff;
  border-bottom: 1px solid var(--bu-line);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}
.bu-top__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.bu-top__logo { height: 44px; width: auto; }
.bu-top__nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}
.bu-top__nav a {
  color: var(--bu-ink);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 0;
  position: relative;
}
.bu-top__nav a:hover { color: var(--bu-red); }
.bu-top__cta {
  background: var(--bu-red);
  color: #fff !important;
  padding: 10px 18px !important;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13.5px;
  transition: background .15s;
}
.bu-top__cta:hover { background: var(--bu-red-d); color: #fff !important; }

@media (max-width: 599px) {
  .bu-top__inner { padding: 0 16px; gap: 12px; }
  .bu-top__logo { height: 34px; }
  .bu-top__nav { gap: 12px; }
  .bu-top__nav a:not(.bu-top__cta) { display: none; } /* only CTA + logo on phone */
}

/* ===== Breadcrumbs ===== */
.bu-crumbs {
  max-width: 1080px;
  margin: 24px auto 0;
  padding: 0 24px;
  font-size: 13px;
  color: var(--bu-muted);
}
.bu-crumbs a { color: var(--bu-muted); font-weight: 600; }
.bu-crumbs a:hover { color: var(--bu-red); }
.bu-crumbs .sep { margin: 0 8px; color: #cbd5e1; }
.bu-crumbs .cur { color: var(--bu-ink); }

/* ===== Article (update.php) ===== */
.bu-article {
  max-width: 820px;
  margin: 20px auto 60px;
  padding: 0 24px;
}
.bu-article__hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  margin: 24px 0 32px;
  background: #e9eef5;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.bu-article__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(227, 30, 36, 0.08);
  color: var(--bu-red);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  margin-bottom: 20px;
}
.bu-article__title {
  margin: 0 0 16px;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--bu-ink);
}
.bu-article__date {
  font-size: 14px;
  color: var(--bu-muted);
  margin-bottom: 28px;
}
.bu-article__lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--bu-ink-2);
  margin: 0 0 32px;
  padding: 20px 24px;
  background: #fff;
  border-left: 4px solid var(--bu-red);
  border-radius: 0 8px 8px 0;
  font-weight: 500;
}
.bu-article__body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--bu-ink);
}
.bu-article__body p { margin: 0 0 20px; }
.bu-article__body h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 36px 0 12px;
  color: var(--bu-ink);
}
.bu-article__body h3 {
  font-size: 21px;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--bu-ink);
}
.bu-article__body ul,
.bu-article__body ol { margin: 0 0 20px; padding-left: 24px; }
.bu-article__body li { margin-bottom: 6px; }
.bu-article__body img {
  border-radius: 8px;
  margin: 24px 0;
}
.bu-article__body blockquote {
  margin: 24px 0;
  padding: 16px 24px;
  border-left: 4px solid var(--bu-red);
  background: #fff;
  color: var(--bu-ink-2);
  font-style: italic;
}

.bu-article__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
  padding: 10px 18px;
  background: #fff;
  border: 1px solid var(--bu-line);
  border-radius: 8px;
  color: var(--bu-ink);
  font-weight: 700;
  font-size: 14px;
  transition: all .15s;
}
.bu-article__back:hover {
  background: var(--bu-red);
  color: #fff !important;
  border-color: var(--bu-red);
}

/* ===== Listing (updates.php) ===== */
.bu-list {
  max-width: 1200px;
  margin: 20px auto 60px;
  padding: 0 24px;
}
.bu-list__head {
  text-align: center;
  margin: 40px 0 48px;
}
.bu-list__title {
  margin: 0 0 14px;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--bu-ink);
}
.bu-list__title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: var(--bu-red);
  margin: 16px auto 0;
  border-radius: 2px;
}
.bu-list__lede {
  margin: 0 auto;
  max-width: 56ch;
  font-size: 16px;
  color: var(--bu-muted);
  line-height: 1.6;
}

.bu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 1024px) { .bu-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .bu-grid { grid-template-columns: 1fr; gap: 20px; } }

.bu-card {
  background: var(--bu-card);
  border: 1px solid var(--bu-line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 20px rgba(15, 23, 42, 0.05);
  transition: transform .22s cubic-bezier(.2,.8,.2,1),
              box-shadow .22s cubic-bezier(.2,.8,.2,1),
              border-color .22s;
}
.bu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06), 0 18px 36px rgba(15, 23, 42, 0.10);
  border-color: transparent;
  color: inherit;
}
.bu-card__media {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #e9eef5;
  overflow: hidden;
  position: relative;
}
.bu-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.bu-card:hover .bu-card__media img { transform: scale(1.05); }
.bu-card__date {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(4px);
  padding: 6px 10px 7px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  min-width: 44px;
}
.bu-card__date .d { font-size: 15px; font-weight: 800; color: var(--bu-ink); }
.bu-card__date .m {
  font-size: 10px; font-weight: 700; color: var(--bu-red);
  margin-top: 2px; text-transform: uppercase; letter-spacing: 0.1em;
}
.bu-card__body {
  padding: 20px 22px 22px;
  display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto;
}
.bu-card__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--bu-ink);
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bu-card:hover .bu-card__title { color: var(--bu-red); }
.bu-card__summary {
  margin: 0;
  font-size: 14px;
  color: var(--bu-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bu-card__read {
  margin-top: auto;
  padding-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--bu-red);
}

/* ===== Pagination ===== */
.bu-pager {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 48px;
}
.bu-pager a, .bu-pager span {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--bu-line);
  background: #fff;
  color: var(--bu-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: all .15s;
}
.bu-pager a:hover {
  border-color: var(--bu-red);
  color: var(--bu-red);
}
.bu-pager .cur {
  background: var(--bu-red);
  border-color: var(--bu-red);
  color: #fff;
}

/* ===== "More updates" section at bottom of article ===== */
.bu-more {
  background: #fff;
  border-top: 1px solid var(--bu-line);
  padding: 60px 0;
  margin-top: 60px;
}
.bu-more__inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.bu-more__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 20px;
}
.bu-more__title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.bu-more__all {
  font-size: 14px;
  font-weight: 700;
  color: var(--bu-red);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ===== Empty / 404 ===== */
.bu-empty {
  max-width: 560px;
  margin: 80px auto;
  padding: 48px 24px;
  text-align: center;
}
.bu-empty h1 {
  margin: 0 0 12px;
  font-size: 28px;
  color: var(--bu-ink);
}
.bu-empty p { color: var(--bu-muted); margin: 0 0 24px; }

/* ===== Simple footer ===== */
.bu-foot {
  background: #0b1220;
  color: #cbd5e1;
  padding: 32px 0;
  margin-top: 60px;
  text-align: center;
  font-size: 13.5px;
}
.bu-foot a { color: #cbd5e1; }
.bu-foot a:hover { color: #fff; }
.bu-foot__links { margin-bottom: 12px; }
.bu-foot__links a { margin: 0 10px; }
