/* Shared presentation for the legacy public branch pages. */
:root {
  --branch-ink: #172b22;
  --branch-green: #176b3b;
  --branch-green-dark: #0e4428;
  --branch-muted: #617167;
  --branch-line: #e2eae4;
  --branch-soft: #f3f7f4;
  --branch-shadow: 0 14px 36px rgba(21, 55, 35, .08);
}

html { scroll-behavior: smooth; }
body:has(#feature-area.about-section) {
  margin: 0;
  background: var(--branch-soft) !important;
  color: var(--branch-ink);
  font-family: Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

body:has(#feature-area.about-section) #container.boxed-page {
  width: min(100%, 1280px);
  max-width: 1280px;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 auto !important;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

body:has(#feature-area.about-section) .navbar.navbar-default.navbar-top {
  min-height: 76px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--branch-line);
  background: #fff;
  box-shadow: 0 6px 20px rgba(17, 48, 30, .06);
}
body:has(#feature-area.about-section) .navbar.navbar-default.navbar-top .container {
  display: flex;
  align-items: center;
  min-height: 76px;
}
body:has(#feature-area.about-section) .navbar-brand {
  height: 76px;
  display: flex;
  align-items: center;
  color: var(--branch-ink) !important;
  font-family: Yantramanav, Roboto, sans-serif;
  font-size: 25px;
  font-weight: 700;
}
body:has(#feature-area.about-section) .navbar-brand img {
  max-height: 52px;
  width: auto;
  margin-right: 12px;
}
body:has(#feature-area.about-section) .navbar-toggle {
  border-color: var(--branch-line);
  border-radius: 10px;
  background: #fff;
}
body:has(#feature-area.about-section) .navbar-toggle .icon-bar { background: var(--branch-green); }
body:has(#feature-area.about-section) .switcher-box { display: none !important; }

body:has(#feature-area.about-section) #feature-area.about-section {
  margin: 0 !important;
  padding: 48px 24px 30px !important;
  background: transparent !important;
}
body:has(#feature-area.about-section) #feature-area > h2 {
  max-width: 1180px;
  margin: 0 auto 28px;
  color: var(--branch-ink) !important;
  font-family: Yantramanav, Roboto, sans-serif;
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
}
body:has(#feature-area.about-section) #feature-area > h2 font { color: var(--branch-green-dark) !important; }
body:has(#feature-area.about-section) #feature-area .container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: 1180px;
  padding: 0;
}
body:has(#feature-area.about-section) #feature-area .row {
  display: contents;
  margin: 0;
}
body:has(#feature-area.about-section) #feature-area .row > [class*="col-"] {
  float: none;
  width: auto;
  min-width: 0;
  padding: 0;
}
body:has(#feature-area.about-section) #feature-area .feature-content {
  height: 100%;
  min-height: 0;
  padding: 24px;
  border: 1px solid var(--branch-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--branch-shadow);
  color: var(--branch-muted);
  text-align: left;
}
body:has(#feature-area.about-section) #feature-area .feature-content a {
  color: var(--branch-green) !important;
  font-weight: 650;
  text-decoration: none;
}
body:has(#feature-area.about-section) #feature-area .feature-content a:hover { color: var(--branch-green-dark) !important; text-decoration: underline; }
body:has(#feature-area.about-section) #feature-area .feature-content > center:first-child {
  display: block;
  margin-bottom: 16px;
  color: var(--branch-ink);
  font-family: Yantramanav, Roboto, sans-serif;
  font-size: 19px;
  font-weight: 700;
}
body:has(#feature-area.about-section) #feature-area .masonry-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 8px;
  width: 100%;
  margin: 10px 0 12px;
}
body:has(#feature-area.about-section) #feature-area .masonry-thumb {
  display: block;
  width: 100%;
  height: 92px !important;
  border: 1px solid var(--branch-line);
  border-radius: 11px;
  object-fit: cover;
  background: #e9f0eb;
  color: transparent;
  font-size: 0;
}
body:has(#feature-area.about-section) #feature-area .feature-content:has(a[href*="executive.php"]) {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
body:has(#feature-area.about-section) #feature-area .feature-content:has(a[href*="executive.php"]) > center:first-child {
  margin: 0;
  text-align: left;
}
body:has(#feature-area.about-section) #feature-area .feature-content:has(a[href*="executive.php"]) > center:first-child::after {
  content: "Meet your branch leadership";
  display: block;
  margin-top: 5px;
  color: var(--branch-muted);
  font-family: Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
}

body:has(#feature-area.about-section) .latest-posts {
  width: min(100% - 48px, 1180px);
  margin: 8px auto 26px;
  padding: 0;
  background: transparent;
}
body:has(#feature-area.about-section) .latest-posts:not(:has(.post-row)) { display: none !important; }
body:has(#feature-area.about-section) .latest-posts > h4 {
  margin: 0 0 16px;
  color: var(--branch-ink);
  font-family: Yantramanav, Roboto, sans-serif;
  font-size: 25px;
}
body:has(#feature-area.about-section) .latest-posts .post-row {
  padding: 18px;
  border: 1px solid var(--branch-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--branch-shadow);
}
body:has(#feature-area.about-section) .latest-posts .post-title a { color: var(--branch-ink); font-weight: 700; }
body:has(#feature-area.about-section) .latest-posts .post-content { color: var(--branch-muted); }
body:has(#feature-area.about-section) .col-md-4:has(> .container > .row img) {
  width: 100%;
  float: none;
  padding: 0;
}
body:has(#feature-area.about-section) .col-md-4:has(> .container > .row img) > .container {
  width: min(100% - 48px, 1180px);
  max-width: 1180px;
  padding: 0 0 42px;
}
body:has(#feature-area.about-section) .col-md-4:has(> .container > .row img) > .container::before {
  content: "Branch gallery";
  display: block;
  margin: 8px 0 16px;
  color: var(--branch-ink);
  font-family: Yantramanav, Roboto, sans-serif;
  font-size: 25px;
  font-weight: 700;
}
body:has(#feature-area.about-section) .col-md-4:has(> .container > .row img) > .container > .row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
}
body:has(#feature-area.about-section) .col-md-4:has(> .container > .row img) > .container > .row > [class*="col-"] {
  float: none;
  width: auto;
  padding: 0;
}
body:has(#feature-area.about-section) .col-md-4:has(> .container > .row img) img {
  display: block;
  width: 100%;
  height: 220px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: var(--branch-shadow);
}
body:has(#feature-area.about-section) .col-md-4:has(> .container > .row img) h3 { margin: 8px 0 0; font-size: 15px; }
body:has(#feature-area.about-section) .branch-public-footer {
  position: relative;
  left: calc(-1 * max(0px, (100vw - 1280px) / 2) - 15px);
  width: 100vw;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 30px;
  flex-wrap: wrap;
  padding: 24px max(24px, calc((100% - 1180px) / 2));
  background: var(--branch-green-dark);
  color: #fff;
  font-size: 14px;
}
body:has(#feature-area.about-section) .branch-public-footer > div { display: grid; gap: 3px; }
body:has(#feature-area.about-section) .branch-public-footer strong { color: #fff; font-size: 17px; }
body:has(#feature-area.about-section) .branch-public-footer span { color: rgba(255,255,255,.74); }
body:has(#feature-area.about-section) .branch-public-footer address { margin: 0; font-style: normal; color: rgba(255,255,255,.84); }
body:has(#feature-area.about-section) .branch-public-footer a { color: #fff !important; text-decoration: underline; }
body:has(#feature-area.about-section) .branch-public-footer-home { white-space: nowrap; }

@media (max-width: 767px) {
  body:has(#feature-area.about-section) #feature-area.about-section { padding: 28px 16px 18px !important; }
  body:has(#feature-area.about-section) #feature-area > h2 { margin-bottom: 18px; }
  body:has(#feature-area.about-section) #feature-area .container { grid-template-columns: 1fr; gap: 12px; }
  body:has(#feature-area.about-section) #feature-area .row { display: contents; }
  body:has(#feature-area.about-section) #feature-area .feature-content { padding: 20px; }
  body:has(#feature-area.about-section) .latest-posts,
  body:has(#feature-area.about-section) .col-md-4:has(> .container > .row img) > .container { width: calc(100% - 32px); }
  body:has(#feature-area.about-section) #feature-area .masonry-thumb { height: 110px !important; }
  body:has(#feature-area.about-section) .col-md-4:has(> .container > .row img) > .container > .row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  body:has(#feature-area.about-section) .col-md-4:has(> .container > .row img) img { height: 160px; }
  body:has(#feature-area.about-section) .branch-public-footer { padding: 22px 16px; }
  body:has(#feature-area.about-section) .branch-public-footer { left: -15px; }
}

/* Normalize the legacy Bootstrap row, whose floated columns otherwise escape
   the card grid and leave large empty spaces at desktop widths. */
body:has(#feature-area.about-section) #feature-area > .container {
  display: block !important;
}
body:has(#feature-area.about-section) #feature-area > .container > .row.text-center.inner {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch;
  gap: 18px;
  margin: 0 auto !important;
}
body:has(#feature-area.about-section) #feature-area > .container > .row.text-center.inner > .col-md-4 {
  float: none !important;
  clear: none !important;
  position: static !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
body:has(#feature-area.about-section) #feature-area > .container > .row.text-center.inner > .col-md-4:nth-of-type(1) { grid-column: 1 !important; grid-row: 1 !important; }
body:has(#feature-area.about-section) #feature-area > .container > .row.text-center.inner > .col-md-4:nth-of-type(2) { grid-column: 2 !important; grid-row: 1 !important; }
body:has(#feature-area.about-section) #feature-area > .container > .row.text-center.inner > .col-md-4:nth-of-type(3) { grid-column: 3 !important; grid-row: 1 !important; }
body:has(#feature-area.about-section) #feature-area > .container > .row.text-center.inner > font {
  display: none !important;
}

/* The photo strip after the feature cards is an old nested Bootstrap grid. */
body:has(#feature-area.about-section) .col-md-4:has(> .container > .row.text-center img) {
  float: none !important;
  clear: both;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
body:has(#feature-area.about-section) .col-md-4:has(> .container > .row.text-center img) > .container {
  display: block !important;
  width: min(100% - 48px, 1180px) !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 0 0 42px !important;
}
body:has(#feature-area.about-section) .col-md-4:has(> .container > .row.text-center img) > .container::before {
  content: "Branch gallery";
  display: block;
  margin: 8px 0 16px;
  color: var(--branch-ink);
  font-family: Yantramanav, Roboto, sans-serif;
  font-size: 25px;
  font-weight: 700;
}
body:has(#feature-area.about-section) .col-md-4:has(> .container > .row.text-center img) > .container > .row.text-center {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px;
  margin: 0 !important;
}
body:has(#feature-area.about-section) .col-md-4:has(> .container > .row.text-center img) > .container > .row.text-center > [class*="col-"] {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}
body:has(#feature-area.about-section) .col-md-4:has(> .container > .row.text-center img) > .container > .row.text-center > [class*="col-"]:nth-of-type(1) { grid-column: 1 !important; }
body:has(#feature-area.about-section) .col-md-4:has(> .container > .row.text-center img) > .container > .row.text-center > [class*="col-"]:nth-of-type(2) { grid-column: 2 !important; }
body:has(#feature-area.about-section) .col-md-4:has(> .container > .row.text-center img) > .container > .row.text-center > [class*="col-"]:nth-of-type(3) { grid-column: 3 !important; }
body:has(#feature-area.about-section) .col-md-4:has(> .container > .row.text-center img) > .container > .row.text-center > [class*="col-"]:nth-of-type(4) { grid-column: 4 !important; }

@media (max-width: 767px) {
  body:has(#feature-area.about-section) #feature-area > .container > .row.text-center.inner {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px;
  }
  body:has(#feature-area.about-section) #feature-area > .container > .row.text-center.inner > .col-md-4:nth-of-type(n) { grid-column: 1 !important; grid-row: auto !important; }
  body:has(#feature-area.about-section) .col-md-4:has(> .container > .row.text-center img) > .container {
    width: calc(100% - 32px) !important;
  }
  body:has(#feature-area.about-section) .col-md-4:has(> .container > .row.text-center img) > .container > .row.text-center {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px;
  }
  body:has(#feature-area.about-section) .col-md-4:has(> .container > .row.text-center img) > .container > .row.text-center > [class*="col-"]:nth-of-type(n) { grid-column: auto !important; }
}
