/* ══════════════════════════════════════════════════════════════
   MSCS — Facilities Capital Projects  |  project.css v3.0
   Single authoritative stylesheet — zero override layers
   ══════════════════════════════════════════════════════════════ */

/* ── SCOPED RESET ───────────────────────────────────────────── */
#bfg-facilities *,
#bfg-facilities *::before,
#bfg-facilities *::after,
#bfg-modal-overlay *,
#bfg-modal-overlay *::before,
#bfg-modal-overlay *::after,
#bfg-lightbox *,
#bfg-lightbox *::before,
#bfg-lightbox *::after {
  box-sizing: border-box;
}

/* ── DESIGN TOKENS ──────────────────────────────────────────── */
:root {
  --navy: #002855;
  --navy-mid: #003b70;
  --navy-deep: #00183a;
  --red: #c8102e;
  --red-dk: #96001f;
  --gold: #c8a951;
  --gold-lt: #e8c86a;

  --bg: #f3f2ef;
  --surface: #ffffff;
  --border: rgba(0, 40, 85, 0.1);
  --border-md: rgba(0, 40, 85, 0.18);

  --text: #17171a;
  --text-md: #4a4a50;
  --text-lt: #72727a;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-2xl: 32px;
  --r-pill: 999px;

  --shadow-xs: 0 1px 3px rgba(0, 24, 60, 0.06);
  --shadow-sm: 0 4px 16px rgba(0, 24, 60, 0.07);
  --shadow-md: 0 8px 32px rgba(0, 24, 60, 0.1);
  --shadow-lg: 0 20px 56px rgba(0, 24, 60, 0.14);
  --shadow-xl: 0 32px 80px rgba(0, 18, 50, 0.22);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.22, 0.68, 0, 1.2);
}

/* ── BASE ───────────────────────────────────────────────────── */
#bfg-facilities {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
#bfg-facilities .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ══════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════ */
.meta-block:nth-child(3) {
  display: none;
}
#bfg-facilities .fac-hero {
  position: relative;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* overflow: hidden; */
  isolation: isolate;
  background-color: var(--navy-deep);
  background-image: linear-gradient(
    108deg,
    rgba(0, 22, 54, 0.97) 0%,
    rgba(0, 40, 85, 0.9) 44%,
    rgba(0, 40, 85, 0.44) 100%
  );
  background-size: cover;
  background-position: center;
}
#bfg-facilities .fac-hero.has-hero-bg {
  background-image:
    linear-gradient(
      108deg,
      rgba(0, 18, 46, 0.97) 0%,
      rgba(0, 36, 78, 0.9) 42%,
      rgba(0, 36, 78, 0.4) 100%
    ),
    var(--bfg-hero-bg);
  background-size: cover;
  background-position: center;
}
/* gold left stripe */
#bfg-facilities .fac-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  /* background: linear-gradient(to bottom, var(--gold), rgba(200, 169, 81, 0)); */
  z-index: 1;
  pointer-events: none;
}
/* bottom vignette */
#bfg-facilities .fac-hero::after {
  content: "";
  position: absolute;
  inset: 55% 0 0 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 22, 52, 0.6));
  z-index: 0;
  pointer-events: none;
}

#bfg-facilities .hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 5.5rem 2.5rem 3rem;
}
#bfg-facilities .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffea95;
  margin-bottom: 0.5rem;
}
#bfg-facilities .hero-eyebrow::before {
  content: "";
  display: block;
  width: 26px;
  height: 7px;
  border-radius: 2px;
  background: var(--gold);
  flex-shrink: 0;
}
#bfg-facilities .hero-h1 {
  font-size: clamp(42px, 6.2vw, 74px);
  font-weight: 900;
  color: #fff;
  line-height: 0.96;
  letter-spacing: -0.055em;
  text-wrap: balance;
  max-width: 820px;
  margin-bottom: 1.4rem;
}
#bfg-facilities .hero-h1 em {
  font-style: normal;
  color: #ffd447;
}
#bfg-facilities .hero-desc {
  font-size: 16px;
  color: rgba(228, 244, 255, 0.88);
  max-width: 640px;
  line-height: 1.78;
}

p.hero-desc {
  padding: 0;
  font-size: 1.4em !important;
}

/* ── STATS STRIP ─────────────────────────────────────────────── */
#bfg-facilities .stats-strip {
  position: relative;
  z-index: 3;
  max-width: 1200px;
  width: calc(100% - 5rem);
  margin: 2.5rem auto -3.2rem;
  margin-bottom: 1em;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: rgba(0, 20, 50, 0.93);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 28px 70px rgba(0, 18, 52, 0.36);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
#bfg-facilities .stat-cell {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 1.35rem 1.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
#bfg-facilities .stat-cell:last-child {
  border-right: none;
}
#bfg-facilities .stat-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: rgba(200, 169, 81, 0.12);
  border: 1px solid rgba(200, 169, 81, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  color: var(--gold);
}
#bfg-facilities .stat-num {
  font-size: clamp(26px, 2.8vw, 40px);
  font-weight: 900;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -0.03em;
}
#bfg-facilities .stat-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.3;
}

/* ══════════════════════════════════════════════════════════════
   BODY LAYOUT
   ══════════════════════════════════════════════════════════════ */
#bfg-facilities .fac-body {
  max-width: 1360px;
  margin: 0 auto;
  padding: 2.75rem 0.5rem 5rem;
}

/* ── CONTROL PANEL ───────────────────────────────────────────── */
#bfg-facilities .fac-control-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}
#bfg-facilities .fac-control-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  flex-wrap: wrap;
}
#bfg-facilities .fac-control-kicker {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 5px;
}
#bfg-facilities .fac-control-title {
  font-size: clamp(17px, 1.9vw, 23px);
  font-weight: 900;
  color: #3e4044;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
}
#bfg-facilities .results-label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  /* background: #f0f5fb; */
  /* border: 1px solid rgba(0, 40, 85, 0.09); */
  color: #901f1f;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  font-weight: 500 !important;
}
/* search + status */
#bfg-facilities .fac-control-grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
#bfg-facilities .fac-search-wrap {
  position: relative;
}
#bfg-facilities .fac-search-wrap .asm-search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #7a92ac;
  pointer-events: none;
  z-index: 1;
}
#bfg-facilities .fac-search-input,
#bfg-facilities .fac-status-select {
  width: 100%;
  height: 48px;
  border: 1.5px solid #d4dce8;
  border-radius: var(--r-md);
  background: #fafbfd;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition:
    border-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease),
    background 0.16s;
}
#bfg-facilities .fac-search-input {
  padding: 0 16px 0 46px;
}
#bfg-facilities .fac-status-select {
  padding: 0 38px 0 14px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2367809a' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
#bfg-facilities .fac-search-input:focus,
#bfg-facilities .fac-status-select:focus {
  border-color: var(--navy);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 40, 85, 0.09);
}
#bfg-facilities .fac-search-input::placeholder {
  color: #9caab8;
  font-weight: 500;
}

/* filter pills */
#bfg-facilities .filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
#bfg-facilities .f-pill {
  display: inline-flex;
  align-items: center;
  height: 37px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1.5px solid #d2dae6;
  background: #fafbfd;
  color: var(--text-md);
  font-family: "DM Sans", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.17s var(--ease);
  white-space: nowrap;
  user-select: none;
}
#bfg-facilities .f-pill:hover {
  border-color: var(--navy-mid);
  color: var(--navy);
  background: #f0f5fb;
  transform: translateY(-1px);
}
#bfg-facilities .f-pill.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 6px 18px rgba(200, 16, 46, 0.22);
  transform: translateY(-1px);
}

/* project key legend */
#bfg-facilities .project-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 1rem;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: #f5f7fa;
  border: 1px solid #e0e8f0;
}
#bfg-facilities .project-key-title {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-lt);
}
#bfg-facilities .project-key-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-md);
}
#bfg-facilities .project-key-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
#bfg-facilities .key-complete {
  background: #22c55e;
}
#bfg-facilities .key-progress {
  background: #f59e0b;
}

/* ── SECTION HEADINGS ────────────────────────────────────────── */
#bfg-facilities .project-section {
  margin-bottom: 0.5rem;
}

#bfg-facilities .sec-head {
  display: flex;
  /* align-items: center;
  justify-content: space-between;
  margin: 2.6rem 0 1.1rem; */
}
#bfg-facilities .sec-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
#bfg-facilities .sec-head-bar {
  width: 3px;
  height: 20px;
  background: var(--red);
  border-radius: 3px;
  flex-shrink: 0;
}
#bfg-facilities .sec-head-title {
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text);
}
#bfg-facilities .sec-head-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
#bfg-facilities .sec-view-btn {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--border-md);
  background: var(--surface);
  color: var(--navy);
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.17s var(--ease);
}
#bfg-facilities .sec-view-btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ── CARDS GRID ──────────────────────────────────────────────── */
#bfg-facilities .cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

/* ══════════════════════════════════════════════════════════════
   PROJECT CARD
   ══════════════════════════════════════════════════════════════ */
#bfg-facilities .p-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition:
    transform 0.22s var(--ease-spring),
    box-shadow 0.22s var(--ease),
    border-color 0.18s var(--ease);
  animation: cardIn 0.3s var(--ease) both;
  will-change: transform;
}
#bfg-facilities .p-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-md);
}
#bfg-facilities .p-card:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}
@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* thumbnail */
#bfg-facilities .card-thumb {
  height: 150px;
  position: relative;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
#bfg-facilities .card-thumb.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.04) 0%,
    rgba(0, 20, 52, 0.52) 100%
  );
  z-index: 1;
}
/* no-photo placeholder */
#bfg-facilities .card-thumb.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef3fb 0%, #dce7f5 100%) !important;
}
#bfg-facilities .card-thumb-icon {
  display: none;
} /* hidden by default */
#bfg-facilities .card-thumb.no-image .card-thumb-icon {
  display: flex;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.78);
  color: var(--navy);
  border: 1px solid rgba(0, 40, 85, 0.13);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 2;
  display: none;
}

/* photo badge */
#bfg-facilities .photo-badge {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 3;
  font-size: 10.5px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 0.7px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  letter-spacing: 0.01em;
  line-height: 1;
  background: rgb(14 27 47 / 72%);
  color: #fff;
}
#bfg-facilities .photo-badge.Photosavailable {
  display: none !important;
}
#bfg-facilities .photo-badge.NewInProgress,
#bfg-facilities .photo-badge.PhotosComingSoon,
#bfg-facilities .photo-badge.Photosnotready {
  background: rgba(245, 158, 11, 0.92);
  color: #1a1000;
}
#bfg-facilities .photo-badge.Nophotoavailable {
  background: rgba(80, 90, 100, 0.82);
  color: #fff;
}

/* card body */
#bfg-facilities .card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
#bfg-facilities .card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 9px;
}
#bfg-facilities .chip {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  letter-spacing: 0.01em;
  line-height: 1;
}
#bfg-facilities .chip-type {
  display: none;
}
#bfg-facilities .chip-done {
  background: #dcfce7;
  color: #166534;
}
#bfg-facilities .chip-wip {
  background: #fef9c3;
  color: #854d0e;
}

#bfg-facilities .card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-lt);
  margin: 0 0 3px;
  line-height: 1.3;
}
#bfg-facilities .card-school {
  font-size: 17px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.22;
  flex: 1;
  letter-spacing: -0.015em;
  margin: 0;
  padding-top: 0.2em;
}
#bfg-facilities .card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid #f0eee8;
  gap: 8px;
}
#bfg-facilities .card-date {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-lt);
}
#bfg-facilities .card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--navy);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition:
    background 0.17s var(--ease),
    transform 0.17s var(--ease);
  flex-shrink: 0;
}
#bfg-facilities .p-card:hover .card-btn {
  background: var(--red);
  transform: translateY(-1px);
}

/* empty state */
#bfg-facilities .bfg-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 220px;
  padding: 2.5rem;
  border: 1.5px dashed rgba(0, 40, 85, 0.18);
  border-radius: var(--r-xl);
  background: var(--surface);
  text-align: center;
  color: var(--text-lt);
}
#bfg-facilities .bfg-empty-state strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
}

/* ══════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════ */
#bfg-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 8, 28, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: none;
  overflow-y: auto;
  padding: 2rem 1rem 3rem;
  -webkit-overflow-scrolling: touch;
}
#bfg-modal-overlay.is-open {
  display: block;
}

#bfg-modal {
  background: var(--surface);
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.28s var(--ease-spring) both;
  border-radius: 0.1em;
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* modal header */
#bfg-modal .m-header {
  position: relative;
  background: linear-gradient(
    135deg,
    #061624 0%,
    var(--navy) 52%,
    #103d72 100%
  );
  padding: 1.5rem 1.75rem 1.9rem;
}
#bfg-modal .m-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--gold), transparent 55%);
}
#bfg-modal .m-eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 8px;
}
#bfg-modal .m-title {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.032em;
  margin: 0 0 6px;
}
#bfg-modal .m-sub {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  font-size: 2em;
  padding-top: 0;
}
#bfg-modal .m-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
#bfg-modal .m-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* photo grid */
#bfg-modal .m-photos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 16px 16px 0;
}
#bfg-modal .photo-slot {
  aspect-ratio: 4/3;
  border-radius: var(--r-md);
  background: #eff3f8;
  border: 1px solid #e0e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-lt);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition:
    transform 0.18s var(--ease-spring),
    border-color 0.15s,
    box-shadow 0.15s;
}
#bfg-modal .photo-slot.has-photo:hover {
  transform: scale(1.05);
  border-color: var(--red);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
  z-index: 2;
}
#bfg-modal .photo-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#bfg-modal .photo-more {
  position: absolute;
  inset: 0;
  background: rgba(0, 28, 64, 0.74);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

/* meta blocks */
#bfg-modal .m-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 14px 16px;
}
#bfg-modal .meta-block {
  background: #f6f9fc;
  border: 1px solid #e4ecf4;
  border-radius: var(--r-md);
  padding: 11px 13px;
}
#bfg-modal .meta-lbl {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-lt);
  margin: 0 0 4px;
}

#bfg-modal .meta-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
  padding: 0.5em 0;
}

/* description */
#bfg-modal .m-desc {
  padding: 0 16px 14px;
  font-size: 13.5px;
  line-height: 1.78;
  color: var(--text-md);
  margin: 0;
}

/* actions */
#bfg-modal .m-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px 18px;
  border-top: 1px solid #f0eee8;
}
#bfg-modal .btn-red {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 0 22px;
  border-radius: var(--r-md);
  border: none;
  background: var(--red);
  color: #fff;
  font-family: "DM Sans", sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 0.16s,
    transform 0.16s var(--ease);
}
#bfg-modal .btn-red:hover:not(:disabled) {
  background: var(--red-dk);
  transform: translateY(-1px);
}
#bfg-modal .btn-red:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
#bfg-modal .btn-outline {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 22px;
  border-radius: var(--r-md);
  border: 1.5px solid #cdd5de;
  background: transparent;
  color: var(--text-md);
  font-family: "DM Sans", sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 0.15s,
    color 0.15s;
}
#bfg-modal .btn-outline:hover {
  border-color: var(--navy);
  color: var(--navy);
}

/* ══════════════════════════════════════════════════════════════
   LIGHTBOX
   ══════════════════════════════════════════════════════════════ */
#bfg-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  z-index: 999999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  gap: 0.75rem;
}
#bfg-lightbox.is-open {
  display: flex;
}
#bfg-lightbox .lb-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
#bfg-lightbox .lb-close:hover {
  background: rgba(255, 255, 255, 0.28);
}
#bfg-lightbox .lb-main {
  max-width: 90vw;
  max-height: 72vh;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
#bfg-lightbox .lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
#bfg-lightbox .lb-nav:hover {
  background: rgba(255, 255, 255, 0.28);
}
#bfg-lightbox .lb-prev {
  left: 1rem;
}
#bfg-lightbox .lb-next {
  right: 1rem;
}
#bfg-lightbox .lb-counter {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
}
#bfg-lightbox .lb-thumbs {
  display: flex;
  gap: 7px;
  max-width: 90vw;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: thin;
}
#bfg-lightbox .lb-thumb {
  flex-shrink: 0;
  width: 62px;
  height: 46px;
  border-radius: var(--r-sm);
  object-fit: cover;
  cursor: pointer;
  opacity: 0.45;
  border: 2px solid transparent;
  transition:
    opacity 0.15s,
    transform 0.15s,
    border-color 0.15s;
}
#bfg-lightbox .lb-thumb:hover {
  opacity: 0.78;
}
#bfg-lightbox .lb-thumb.active {
  opacity: 1;
  border-color: var(--gold);
  transform: scale(1.07);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1020px) {
  #bfg-facilities .fac-body {
    padding: 5.25rem 1.75rem 4rem;
  }
  #bfg-facilities .hero-inner {
    padding: 4.5rem 1.75rem 2.5rem;
  }
  #bfg-facilities .stats-strip {
    width: calc(100% - 3.5rem);
    grid-template-columns: repeat(2, 1fr);
  }
  #bfg-facilities .stat-cell:nth-child(2) {
    border-right: none;
  }
  #bfg-facilities .stat-cell:nth-child(1),
  #bfg-facilities .stat-cell:nth-child(2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  #bfg-facilities .fac-control-grid {
    grid-template-columns: 1fr;
  }
  #bfg-modal .m-meta {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  #bfg-facilities .fac-hero {
    min-height: auto;
  }
  #bfg-facilities .hero-inner {
    padding: 3.5rem 1.25rem 2.25rem;
  }
  #bfg-facilities .hero-h1 {
    font-size: clamp(36px, 11vw, 48px);
  }
  #bfg-facilities .hero-desc {
    font-size: 14.5px;
  }
  #bfg-facilities .stats-strip {
    width: calc(100% - 2rem);
    margin-top: 1.75rem;
    margin-bottom: -2.4rem;
  }
  #bfg-facilities .fac-body {
    padding: 4.5rem 1.1rem 3rem;
  }
  #bfg-facilities .fac-control-panel {
    padding: 1.1rem;
    border-radius: var(--r-lg);
  }
  #bfg-facilities .cards-grid {
    grid-template-columns: 1fr;
  }
  #bfg-facilities .card-thumb {
    height: 192px;
  }
  #bfg-modal .m-photos {
    grid-template-columns: repeat(2, 1fr);
  }
  #bfg-modal .m-meta {
    grid-template-columns: 1fr;
  }
  #bfg-modal .m-actions {
    flex-direction: column;
  }
  #bfg-modal .btn-red,
  #bfg-modal .btn-outline {
    width: 100%;
    justify-content: center;
  }
  #bfg-modal-overlay {
    padding: 1rem 0.75rem 2.5rem;
  }
  .stat-num sup {
    margin-left: 0.35em;
  }
}

@media (max-width: 600px) {
  #bfg-facilities .stats-strip {
    width: calc(100% - 3.5rem);
    grid-template-columns: repeat(1, 1fr);
  }
}

@media (max-width: 420px) {
  #bfg-facilities .fac-control-top {
    flex-direction: column;
    align-items: stretch;
  }
  #bfg-facilities .results-label {
    align-self: flex-start;
  }
  #bfg-facilities .stats-strip {
    grid-template-columns: 1fr;
    margin-bottom: -1.8rem;
  }
  #bfg-facilities .stat-cell:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* =========================================
   ELITE UI POLISH OVERRIDES (ADD TO BOTTOM)
========================================= */

/* ---------- STATS STRIP (cleaner) ---------- */
#bfg-facilities .stats-strip {
  background: rgba(0, 20, 50, 0.88);
  border-radius: 14px;
  backdrop-filter: blur(12px);
}

#bfg-facilities .stat-cell {
  flex-direction: column;
  align-items: flex-start;
  padding: 1.2rem 1.4rem;
  gap: 4px;
}

#bfg-facilities .stat-num {
  font-size: clamp(24px, 2.5vw, 34px);
}

#bfg-facilities .stat-label {
  font-size: 13px;
  opacity: 0.75;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.96);
}

/* ---------- CONTROL PANEL (tighter + modern) ---------- */
#bfg-facilities .fac-control-panel {
  padding: 1.25rem 1.25rem 1.4rem;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 24, 60, 0.06);
}

#bfg-facilities .fac-control-grid {
  gap: 10px;
}

#bfg-facilities .fac-search-input,
#bfg-facilities .fac-status-select {
  height: 44px;
  font-size: 13px;
}

/* ---------- FILTER PILLS ---------- */
#bfg-facilities .f-pill {
  height: 34px;
  font-size: 12px;
  padding: 0 14px;
}

#bfg-facilities .f-pill.active {
  box-shadow: 0 4px 12px rgba(200, 16, 46, 0.18);
}

/* ---------- PROJECT KEY ---------- */
#bfg-facilities .project-key {
  background: #f7f9fc;
  border-radius: 12px;
  padding: 8px 12px;
}

#bfg-facilities .project-key-item {
  font-size: 11px;
}

/* ---------- CARDS GRID (bigger + better spacing) ---------- */
#bfg-facilities .cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* ---------- CARD ---------- */
#bfg-facilities .p-card {
  border-radius: 10px;
}

#bfg-facilities .p-card:hover {
  transform: translateY(-6px);
}

/* ---------- CARD IMAGE ---------- */
#bfg-facilities .card-thumb {
  height: 170px;
}

/* ---------- NO PHOTO STATE (IMPORTANT FIX) ---------- */
#bfg-facilities .card-thumb.no-image {
  background: linear-gradient(135deg, #3c485b, #435061) !important;
}

#bfg-facilities .card-thumb.no-image::after {
  content: "Photos Available Soon";
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 11px;
  font-weight: 700;
  color: #4a4a50;
  background: rgba(255, 255, 255, 0.85);
  padding: 6px 10px;
  border-radius: 20px;
}

/* ---------- CARD TEXT ---------- */
#bfg-facilities .card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-lt);
}

#bfg-facilities .card-school {
  font-size: 18px;
  font-weight: 800;
}

/* ---------- BUTTON ---------- */
#bfg-facilities .card-btn {
  height: 34px;
  font-size: 12px;
  padding: 0 16px;
}

/* ---------- SECTION HEAD ---------- */
#bfg-facilities .sec-head {
  margin: 2.2rem 0 1rem;
}

#bfg-facilities .sec-head-title {
  font-size: 12px;
}

/* ---------- EMPTY STATE ---------- */
#bfg-facilities .bfg-empty-state {
  border-radius: 16px;
}

.stat-num sup {
  top: -0.5em;
  margin-left: 0.35em;
  font-weight: 300;
}
button.view-all-btn {
  background: #30559b;
  color: #fff;
  border-radius: 0.3em;
  margin: 1em auto;
  display: block;
  border: none;
  padding: 0.4em 2em;
}
#bfg-facilities .sec-head-title {
  font-size: 17px;
  font-weight: 700 !important;
  padding: 0 0.5em;
  margin-top: -0.25em;
}
