/*
 * BCM Affordable Housing – static site styles.
 * Derived from the Genesis Sample theme (v3.3.0) plus the site's Additional CSS
 * and theme-colour CSS (#00b9fc accent). Desktop (>= 960px) matches the old site;
 * smaller screens use a redesigned compact header and stacked layout.
 */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { line-height: 1.15; -webkit-text-size-adjust: 100%; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; }
body {
  margin: 0; background: #fff; color: #333;
  font-family: "Source Sans Pro", sans-serif; font-size: 18px; font-weight: 400; line-height: 1.625;
  overflow-x: hidden;
}
main { display: block; }
img { max-width: 100%; height: auto; border-style: none; vertical-align: top; }
figure { margin: 0; }
a { color: #00b9fc; text-decoration: underline; transition: color .2s ease-in-out, background-color .2s ease-in-out; }
a:hover, a:focus { color: #333; text-decoration: none; }
p { margin: 0 0 30px; padding: 0; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
strong, b { font-weight: 700; }
h1, h2, h3, h4, h5, h6 { font-weight: 400; line-height: 1.2; margin: 0 0 20px; }
h1 { font-size: 30px; }
h2 { font-size: 27px; }
button { font: inherit; }

.screen-reader-text {
  border: 0; clip: rect(0, 0, 0, 0); height: 1px; overflow: hidden;
  position: absolute !important; width: 1px; word-wrap: normal !important;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100000;
  background: #fff; color: #333; padding: 15px 23px 14px; font-weight: 700; text-decoration: none;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, .6);
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid #00b9fc; outline-offset: 2px; }

/* Clearfix for the float-based desktop layout */
.site-container::after, .site-header::after, .wrap::after, .site-inner::after,
.entry::after, .entry-content::after, .nav-primary::after, .content-sidebar-wrap::after {
  content: " "; display: table; clear: both;
}

.site-container { animation: fadein 1s; word-wrap: break-word; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .site-container { animation: none; } }

.c-green { color: #32cd32; }

/* ---------- Header (mobile first) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 9999;
  background: #fff; box-shadow: 0 1px 8px rgba(0, 0, 0, .12);
}
.site-header .wrap::before, .site-header .wrap::after { display: none; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px; }
.title-area { max-width: 96px; }
.custom-logo-link img { width: 100%; height: auto; display: block; }

.menu-toggle {
  display: block; width: 48px; height: 48px; padding: 0; position: relative;
  background: transparent; border: 0; cursor: pointer; color: #333;
}
/* Hamburger drawn with CSS: middle bar + ::before / ::after */
.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after {
  position: absolute; left: 12px; width: 24px; height: 3px; background: currentColor;
  border-radius: 2px; transition: transform .2s, opacity .2s, top .2s;
}
.menu-toggle .bars { top: 22px; }
.menu-toggle .bars::before { content: ""; top: -8px; left: 0; }
.menu-toggle .bars::after { content: ""; top: 8px; left: 0; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

/* Mobile dropdown: hidden until toggled (only when JS is available) */
.nav-primary { background: #fff; border-top: 1px solid #eee; }
.js .nav-primary { display: none; }
.js .nav-primary.open { display: block; }
.js .site-header .nav-primary {
  position: absolute; top: 100%; left: 0; right: 0; box-shadow: 0 8px 12px rgba(0, 0, 0, .12);
}
.menu a {
  display: block; padding: 14px 20px; color: #333; font-size: 18px; line-height: 1.2; text-decoration: none;
  border-bottom: 1px solid #eee;
}
.menu a:hover, .menu a:focus, .menu .current > a { color: #00b9fc; }
.menu li:last-child a { border-bottom: 0; }

/* ---------- Home (mobile first) ---------- */
.page-home { background: #06344B; }
.page-home .site-header { background: #06344B; box-shadow: none; }
.page-home .menu-toggle { color: #fff; }
.page-home .title-area { background: #fff; padding: 2px; max-width: 80px; }
.page-home .nav-primary { background: #06344B; border: 0; }
.page-home .menu a { color: #fff; border-bottom-color: rgba(255, 255, 255, .15); }
.page-home .menu a:hover, .page-home .menu a:focus, .page-home .menu .current > a { color: #fff; }
.page-home .site-inner { padding: 0; background: transparent; }
.page-home .content { width: 100%; }

/* ---------- Content area ---------- */
.site-inner { padding: 24px 20px 40px; }
.entry { margin-bottom: 40px; }
.entry-title { font-size: 30px; margin-bottom: 10px; }
.entry-content p { margin-bottom: 30px; }
.entry-content br + p, .entry-content p + br { display: block; }

.portrait { margin: 0 0 20px; }
.portrait img { width: 208px; height: auto; max-width: 100%; }

.sidebar { font-size: 16px; line-height: 1.5; border-top: 1px solid #eee; padding-top: 24px; margin-top: 10px; }
.sidebar h2 { font-size: 27px; line-height: 1.2; margin: 0 0 20px; }
.sidebar ul { margin: 0 0 20px; }
.sidebar .widget { margin-bottom: 40px; }

/* ---------- Sliders ---------- */
.slider { position: relative; max-width: 1000px; margin: 0 0 30px; }
.slider-viewport { overflow: hidden; width: 100%; touch-action: pan-y pinch-zoom; }
.slider-track { display: flex; margin: 0; padding: 0; transition: transform .45s cubic-bezier(.25, .1, .25, 1); will-change: transform; }
.slider-track.dragging { transition: none; }
.slide { flex: 0 0 100%; min-width: 0; margin: 0; }
.slide img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; user-select: none; -webkit-user-drag: none; }
@media (prefers-reduced-motion: reduce) { .slider-track { transition: none; } }

.slider-btn {
  position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(0, 0, 0, .45); cursor: pointer;
  transition: background-color .2s, opacity .2s;
}
.slider-btn:hover, .slider-btn:focus-visible { background: rgba(0, 0, 0, .75); }
.slider-btn[hidden] { display: none; }
.slider-btn::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 12px;
  border: solid #fff; border-width: 0 0 3px 3px;
}
.slider-btn.prev { left: 10px; } .slider-btn.prev::after { transform: translate(-30%, -50%) rotate(45deg); }
.slider-btn.next { right: 10px; } .slider-btn.next::after { transform: translate(-70%, -50%) rotate(-135deg); }
/* Arrows auto-hide on hover-capable devices (as on the old site); always visible on touch */
@media (hover: hover) {
  .slider-btn { opacity: 0; }
  .slider:hover .slider-btn, .slider:focus-within .slider-btn { opacity: 1; }
}

/* Home hero: full-bleed, ratio of the original 1080x500 slider, min-height 300px */
.hero-slider { width: 100%; margin: 0; background: #06344B; }
.hero-slider .slide img { aspect-ratio: 1080 / 500; min-height: 300px; height: auto; }

/* ---------- Footer: hidden on the live site (display:none), omitted here ---------- */

/* ---------- Tablet / small desktop: extra room ---------- */
@media (min-width: 600px) {
  .site-inner { padding: 32px 30px 40px; }
  .title-area { max-width: 120px; }
}

/* ---------- Desktop (matches the original theme) ---------- */
@media (min-width: 960px) {
  .site-header {
    width: 1140px; max-width: 100%; margin: 0 auto; padding: 0 30px;
    border-bottom: 4px solid #333; box-shadow: none;
  }
  .site-header .wrap { display: block; padding: 0; }
  .menu-toggle { display: none; }

  .title-area { float: left; max-width: 150px; padding: 5px 0; }
  .custom-logo-link img { width: auto; }

  .nav-primary, .js .nav-primary {
    display: block; position: static; float: right; width: auto; margin-top: 30px;
    padding: 15px 0 15px; background: transparent; border: 0; box-shadow: none;
  }
  .js .site-header .nav-primary { position: static; box-shadow: none; }
  .menu { line-height: 1; width: 100%; }
  .menu li { display: inline-block; }
  .menu a { display: inline-block; padding: 12px 15px; font-size: 18px; line-height: 1; border: 0; }
  .menu li:last-child a { border: 0; }

  .site-inner { max-width: 1140px; margin: 0 auto; padding: 60px 30px 0; }
  .content { float: left; width: 65%; }
  .sidebar { float: right; width: 30%; border-top: 0; margin: 0; padding-top: 44px; }
  .sidebar ul { margin-bottom: 20px; }
  .entry { margin-bottom: 60px; }

  .portrait { float: right; margin: 0 0 20px; }

  /* ----- Home: full-width navy bar, logo overlaps it inside the 1140px column ----- */
  .page-home { background: transparent; }
  .page-home .site-header { width: 100%; max-width: none; padding: 0; background: #06344B; border: 0; }
  .page-home .site-header .wrap { position: relative; }
  .page-home .title-area {
    position: absolute; z-index: 9999; top: 0; left: max(35px, calc(50% - 535px));
    float: none; max-width: 200px; padding: 0; background: #fff;
  }
  .page-home .title-area img { width: 200px; }
  .page-home .nav-primary, .js .page-home .site-header .nav-primary {
    float: none; width: 100%; margin: 0; padding: 15px 0; background: #06344B; text-align: right; border: 0;
  }
  .page-home .site-inner { max-width: none; padding: 0; clear: both; }
  .page-home .content { float: none; width: 100%; }
  .page-home .entry { margin-bottom: 0; }
}

/* Narrow-phone polish */
@media (max-width: 430px) {
  body { font-size: 17px; }
  .entry-title { font-size: 26px; }
  .sidebar h2 { font-size: 24px; }
  .slider-btn { width: 40px; height: 40px; margin-top: -20px; }
}

/* Contact page: the old page had an empty block above the address, giving ~30px of space */
.page-contact .entry-content { padding-top: 30px; }
