/* ==========================================================================
   Layout — container, Bootstrap-compatible grid shim, header/footer skeleton
   The shim lets ported content (which still carries legacy .row/.col-md-*
   markup from the source site) lay out correctly without loading Bootstrap.
   ========================================================================== */

.container, .container-fluid {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-3);
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-inline: calc(var(--sp-3) * -0.5);
}
.row > [class*="col-"] {
  padding-inline: calc(var(--sp-3) * 0.5);
  width: 100%;
}

/* 12-column shim: default = full width (mobile-first), md/lg breakpoints narrow it.
   Rules are scoped as ".row > .col-md-N" (not bare ".col-md-N") to match the
   specificity of ".row > [class*='col-']" above — otherwise the higher-specificity
   base rule wins at every breakpoint and the grid never narrows. */
@media (min-width: 768px) {
  .row > .col-md-1  { width: 8.3333%; }
  .row > .col-md-2  { width: 16.6667%; }
  .row > .col-md-3  { width: 25%; }
  .row > .col-md-4  { width: 33.3333%; }
  .row > .col-md-5  { width: 41.6667%; }
  .row > .col-md-6  { width: 50%; }
  .row > .col-md-7  { width: 58.3333%; }
  .row > .col-md-8  { width: 66.6667%; }
  .row > .col-md-9  { width: 75%; }
  .row > .col-md-10 { width: 83.3333%; }
  .row > .col-md-11 { width: 91.6667%; }
  .row > .col-md-12 { width: 100%; }
}
@media (min-width: 992px) {
  .row > .col-lg-1  { width: 8.3333%; }
  .row > .col-lg-2  { width: 16.6667%; }
  .row > .col-lg-3  { width: 25%; }
  .row > .col-lg-4  { width: 33.3333%; }
  .row > .col-lg-5  { width: 41.6667%; }
  .row > .col-lg-6  { width: 50%; }
  .row > .col-lg-7  { width: 58.3333%; }
  .row > .col-lg-8  { width: 66.6667%; }
  .row > .col-lg-9  { width: 75%; }
  .row > .col-lg-10 { width: 83.3333%; }
  .row > .col-lg-11 { width: 91.6667%; }
  .row > .col-lg-12 { width: 100%; }
}

.text-center { text-align: center; }
@media (min-width: 768px) { .text-md-center { text-align: center; } }
.clearfix::after { content: ""; display: table; clear: both; }
.list-inline { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; }
.list-inline-item { display: inline-block; }

/* ---------- Sections ---------- */
.content { padding-block: var(--sp-6); }
.white-bg { background: var(--c-bg); }
.solid-bg { background: var(--c-bg-alt); }
.border-page { border-inline: 0; }

/* ---------- Header ---------- */
#header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: #fff; border-bottom: 1px solid var(--c-border);
}
.navbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  min-height: var(--header-h);
}
.logo img { height: 46px; width: auto; object-fit: contain; }
.nav-links {
  display: none; list-style: none; margin: 0; padding: 0; gap: var(--sp-4);
  align-items: center;
}
.nav-links a {
  font-weight: var(--fw-medium); color: var(--c-ink-700); padding: var(--sp-2) 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active { color: var(--c-primary); border-color: var(--c-cta); }
@media (min-width: 992px) { .nav-links { display: flex; } }

.navbar-toggler {
  display: inline-flex; flex-direction: column; gap: 4px; background: none; border: 0; padding: var(--sp-2);
}
@media (min-width: 992px) { .navbar-toggler { display: none; } }
.navbar-toggler span { width: 22px; height: 2px; background: var(--c-primary); display: block; }

.header-cta { display: flex; align-items: center; gap: var(--sp-2); }

/* ---------- Mobile nav drawer ---------- */
#mobile-nav {
  position: fixed; inset: 0 0 0 auto; width: min(320px, 86vw); background: #fff;
  transform: translateX(100%); transition: transform .3s ease; z-index: var(--z-modal);
  box-shadow: var(--shadow-lg); padding: var(--sp-4); overflow-y: auto;
}
#mobile-nav.is-open { transform: translateX(0); }
#mobile-nav ul { list-style: none; padding: 0; margin: var(--sp-4) 0 0; display: grid; gap: var(--sp-3); }
#mobile-nav a { font-weight: var(--fw-medium); font-size: var(--fs-600); }
.nav-scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1099;
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.nav-scrim.is-open { opacity: 1; pointer-events: auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-primary-700); color: #EFEAE0; padding-block: var(--sp-7) var(--sp-5); }
.footer-grid {
  display: grid; gap: var(--sp-5); grid-template-columns: 1fr; margin-bottom: var(--sp-5);
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-col h3 { color: var(--c-accent); font-size: var(--fs-600); margin-bottom: var(--sp-3); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
.footer-col a { color: #D9D3C4; }
.footer-col a:hover { color: var(--c-accent); }
.footer-legal { border-top: 1px solid rgba(255,255,255,.12); padding-top: var(--sp-4); font-size: var(--fs-400); color: #B9B2A0; }
.footer-legal a { color: #D9D3C4; text-decoration: underline; }

/* ---------- Body offset for sticky mobile bar ---------- */
@media (max-width: 767px) { body { padding-bottom: 64px; } }
