html, body {
  margin: 0;
  padding: 0;
  background: #f8f8f8;
  color: #222;
  font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
  font-size: 16px; /* reduced from 18px */
  line-height: 1.5;
  text-align: left; /* global left alignment */
}

/* Navbar and Dropdowns */
.navbar,
.navbar-nav > li > a,
.navbar-brand,
.navbar-toggle,
.navbar-collapse,
.navbar-default,
.navbar-nav,
.navbar-form,
.navbar-btn,
.navbar-nav > .open > a,
.navbar-nav > .open > a:focus,
.navbar-nav > .open > a:hover,
.navbar-default .navbar-toggle,
.navbar-default .navbar-toggle:focus,
.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:focus,
.navbar-default .navbar-nav > .open > a:hover,
.dropdown-menu {
  border-radius: 0 !important;
  text-align: left !important; /* enforce left align */
}

.navbar-header {
  align-items: flex-start;
  height: 50px;
}
.navbar-brand {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  height: 50px;
  display: flex;
  align-items: flex-start;
}
.navbar-brand img {
  max-height: 45px;
  margin-top: 5px;
}

.navbar.navbar-default {
  background: #1b497c;
  border: none;
  margin-bottom: 0;
  height: 60px;
  padding-bottom: 0;
}

.navbar-fixed-custom {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1030;
  border-radius: 0;
}


.navbar.navbar-default .navbar-brand,
.navbar.navbar-default .navbar-nav > li > a,
.navbar.navbar-default .navbar-nav > li > button,
.navbar .btn-link.navbar-btn {
  color: #fff !important;
  background: transparent;
  margin-top: 0px;
  font-size: 14px; /* normalized font size */
  text-align: left !important;
}
.navbar.navbar-default .navbar-nav > li > a:focus,
.navbar.navbar-default .navbar-nav > li > a:hover,
.navbar.navbar-default .navbar-nav > li > button:focus,
.navbar.navbar-default .navbar-nav > li > button:hover {
  color: red !important;
  background: rgba(255,255,255,0.10);
  outline: 2px solid #fff;
}
.navbar.navbar-default .navbar-toggle {
  border-color: #fff;
}
.navbar.navbar-default .navbar-toggle .icon-bar {
  background-color: #fff;
}
.container {
  max-width: 1200px;
}

/* Make collapsed navbar allow full height (no internal scroll) */
@media (max-width: 767px) {
  .navbar-collapse {
    max-height: none !important;     /* overrides the 340px cap */
  }
  .navbar-collapse.in {
    overflow-y: visible !important;  /* let dropdowns expand the container */
  }

  /* In collapsed mode, make dropdown menus part of the normal flow */
  .navbar-nav .open .dropdown-menu {
    position: static;                 /* was absolute */
    float: none;
    width: 100%;
    margin: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -999px; top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
  z-index: 100;
  text-align: left;
}
.skip-link:focus {
  left: 8px; top: 8px;
  width: auto; height: auto;
  padding: 0.5em 1em;
  background: #337ab7;
  color: #fff;
  border-radius: 4px;
  text-align: left;
}

/* Main Page Header */

.mainheader-header {
  width: 100%;
  /* Only force min-height on large screens */
}

.mainheader-bg {
  background: url('/img/flex-bg.png') center center fixed no-repeat;
  background-size: cover;
  min-height: 100vh;
  height: 100vh;
  max-height: 100vh;
  width: 100%;
  padding-top: 80px;
  padding-bottom: 60px;
  /* min-height only on large screens */
  min-height: 60vh;
  display: flex;
  align-items: flex-start;
}

.mainheader-content {
  background: #fcfcfc;
  opacity: 0.96;
  border: 1px solid #efefef;
  border-radius: 5px;
  padding: 20px 22px 20px 22px;
  margin-top: 0;
  box-shadow: 0 6px 36px 0 rgba(0,0,0,0.05);
  /* Responsive width managed by Bootstrap columns */
}

.mainheader-content h1 {
  color: #000;
  font-size: 18pt;
  line-height: 1.2;
  margin-bottom: 10px;
}

.mainheader-content h2 {
  color: #007fb6;
  font-size: 30pt;
  margin-top: 0;
  margin-bottom: 15px;
}

.mainheader-content p {
  font-size: 14pt;
  color: #111;
  margin-bottom: 25px;
}

.contact-link {
  color: #007fb6;
  font-size: 13pt;
  font-weight: bold;
  text-decoration: underline;
  margin-top: 12px;
  display: inline-block;
}

@media (max-width: 991px) {
  .mainheader-bg {
    min-height: 0;
    padding-top: 30px;
    padding-bottom: 20px;
    align-items: flex-start;
  }
  .mainheader-content {
    padding: 18px 8px 18px 8px;
    margin-top: 0;
  }
  .mainheader-content h2 {
    font-size: 18pt;
  }
}



/* Carousel styles */
#main-carousel, #main-carousel .carousel-inner, #main-carousel .item, #main-carousel img {
  height: 100vh !important;
  max-height: 100vh !important;
  min-height: 300px;
  text-align: left;
}
#main-carousel .item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* Keep caption text centered */
.carousel-caption {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  left: 0 !important; right: 0 !important;
  width: 100% !important;
  background: rgba(0,0,0,0.6) !important;
  border-radius: 0 !important;
  padding: 2em 0;
  text-align: center !important; /* keep centered */
  font-size: 14px; /* reduced */
}

@media (max-width: 767px) {
  #main-carousel, #main-carousel .carousel-inner, #main-carousel .item, #main-carousel img {
    min-height: 200px;
    height: 50vh !important;
    max-height: 50vh !important;
  }
  .carousel-caption { padding: 1em 0 !important; font-size: 14px !important; }
}

@media (max-width: 768px) {
  .carousel-caption { font-size: 14px; padding: 1em 0.5em; }
}
@media (max-width: 600px) {
  .carousel-caption { left: 2%; right: 2%; }
}

@media (max-width: 992px) {
  .container { padding: 0 0.5em; }
}

/* Footer */
.footer {
  background: #222;
  color: #fff;
  padding: 2.5em 0 1.5em 0;
  font-size: 0.85em; /* reduced */
  margin-top: 2em;
  text-align: left;
}
.footer a { color: #fff; text-decoration: underline; }
.footer a:hover, .footer a:focus { color: #fff; }
.footer .footer-heading {
  font-size: 0.83em; /* reduced */
  margin-bottom: .8em;
  color: #ffd700;
  letter-spacing: .03em;
  text-align: left;
}
.footer-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1em 0;
  text-align: left;
}
.footer-list li { margin-bottom: .5em; }
.footer-contact {
  font-style: normal;
  line-height: 1.5;
  text-align: left;
}
.footer-bottom {
  border-top: 1px solid #444;
  margin-top: 1.2em;
  padding-top: .7em;
  font-size: 0.8em; /* reduced */
  color: #ccc;
  text-align: left;
}
@media (max-width: 767px) {
  .footer .row {
    display: block;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    clear: both;
  }
  .footer .row > [class*="col-"] {
    float: none !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: left !important;
    box-sizing: border-box !important;
    clear: both;
  }
}


/* Accessibility helper */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; overflow: hidden;
  clip: rect(0,0,0,0); border: 0; background: #222;
  text-align: left;
}

/* Sidebar Image Links & Card (DRY) */
.sidebar-img-link, .sidebar-image-link img {
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  border-radius: 0;
  background: #fff;
  text-align: left;
}
.sidebar-image-link { width: 100%; margin-bottom: 18px; }
.sidebar-image-link:last-child { margin-bottom: 0; }

/* Contact Card */
.contact-card {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  padding: 15px;
  margin-bottom: 30px;
  text-align: left;
}
.contact-card .broker-photo {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 15px;
}
.contact-card h2, .contact-card h3 {
  color: #337ab7;
  margin: 0.2em 0 0.4em 0;
  font-size: 12pt; /* reduced */
  text-align: left;
}
.contact-card .btn { margin-top: 1em; }

/* Lead Form Styles (single set) */
.lead-form select[multiple] { min-height: 70px; }
.lead-form .form-group { margin-bottom: 1.2em; }
.lead-form-typeahead, .lead-form-typeahead .form-control, .lead-form-typeahead select, .lead-form-typeahead input, .lead-form-typeahead button {
  border-radius: 0 !important;
  box-shadow: none !important;
}
.lead-form-typeahead {
  width: 100%;
  margin-bottom: 25px;
  background: #fff;
  border: 1px solid #efefef;
  color: #002347;
  border-radius: 6px !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  padding: 22px 18px 16px 18px;
  text-align: left;
}
.lead-form-typeahead h2 {
  font-size: 0.9em; /* smaller font */
  font-weight: 700;
  margin-bottom: 14px;
  text-align: left;
  color: #111;
}
.lead-form-typeahead label {
  font-weight: 500;
  margin-bottom: 1px;
  font-size: 11px;
  text-align: left;
}
.lead-form-typeahead .form-group { margin-bottom: 11px; }
.lead-form-typeahead .btn {
  min-width: 54px;
  font-size: 11px;
  padding: 2px 8px;
  height: 26px;
  text-align: center;
}
.lead-form-typeahead .row { margin-left: -2px; margin-right: -2px; }
.lead-form-typeahead [class^="col-"] { padding-left: 2px; padding-right: 2px; }
@media (max-width: 767px) {
  .lead-form-typeahead .row > [class^="col-"] {
    width: 100%; float: none; margin-bottom: 8px;
  }
}

/* Typeahead suggestion list */
.typeahead-list {
  position: absolute;
  z-index: 10;
  background: #fff;
  border: 1px solid #bbb;
  border-top: none;
  max-height: 120px;
  overflow-y: auto;
  width: 100%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  display: none;
  color: #002347;
  text-align: left;
}
.typeahead-list li {
  padding: 3px 9px;
  cursor: pointer;
  font-size: 11px;
  list-style: none;
  text-align: left;
}
.typeahead-list li:hover, .typeahead-list li.active { background: #e5f2fb; }

/* Pagination styling */
.pagination > li > a, .pagination > li > span {
  color: #005ea6;
  background: #fafafa;
  border: 1px solid #ddd;
  text-align: left;
}
.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:focus,
.pagination > .active > span:focus,
.pagination > .active > a:hover,
.pagination > .active > span:hover {
  background-color: #005ea6;
  color: #fff;
  border-color: #005ea6;
  text-align: left;
}
.pagination > li > a:focus, .pagination > li > a:hover {
  background-color: #eee;
  color: #005ea6;
  text-align: left;
}
@media (max-width: 991px) {
  .pagination > li > a, .pagination > li > span {
    padding: 6px 10px;
    font-size: 12px;
    text-align: left;
  }
}
@media (max-width: 767px) {
  .results-per-page-form label, .results-per-page-form select.form-control {
    display: block;
    width: 100%;
    margin-bottom: 0.5em;
    text-align: left;
  }
  .results-per-page-form select.form-control {
    max-width: 100%;
  }
  aside.col-xs-12 {
    margin-top: 2em;
  }
}

/* RSS Article */
.rss-entry {
  border-bottom: 1px solid #ddd;
  margin-bottom: 2em;
  padding-bottom: 1em;
  text-align: left;
}
.rss-entry h2 a {
  color: #005ea6;
  text-decoration: none;
  text-align: left;
}
.rss-entry h2 a:hover, .rss-entry h2 a:focus {
  text-decoration: underline;
  outline: none;
  text-align: left;
}
.rss-meta {
  font-size: 0.8em;
  color: #666;
  margin-bottom: 0.5em;
  text-align: left;
}
.rss-content {
  font-size: 0.9em;
  color: #222;
  margin-bottom: 1em;
  text-align: left;
}
.rss-media img, .rss-media audio {
  max-width: 100%;
  margin-top: 0.5em;
}

/* Team Section */
.team-section {
  background: #f6f8fa;
  padding: 34px 20px 40px 20px;
  text-align: left;
}
.team-header {
  text-align: left;
  margin-bottom: 38px;
}
.team-header h1 {
  font-size: 1.9em;
  color: #002347;
  font-weight: 700;
  margin-bottom: 7px;
}
.team-header p {
  color: #333;
  font-size: 0.9em;
}
.team-card {
  background: #fff;
  border: 1px solid #efefef;
  border-radius: 6px;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  padding: 22px 18px 18px 18px;
  color: #002347;
  text-align: left;
  transition: box-shadow 0.15s;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.team-card:focus, .team-card:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,0.13);
  outline: none;
}
.team-photo {
  flex-shrink: 0;
  width: 160px;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  background: #eee;
}
.team-info { flex: 1; }
.team-name {
  font-size: 1em;
  font-weight: 700;
  color: #002347;
  margin: 0 0 3px 0;
}
.team-title {
  font-size: 0.85em;
  font-weight: 500;
  color: #377eb7;
  margin-bottom: 9px;
}
.team-summary {
  font-size: 0.85em;
  color: #222;
  margin-bottom: 14px;
  min-height: 60px;
}
.team-links a {
  color: #0b55aa;
  margin-right: 13px;
  font-size: 0.85em;
  text-decoration: none;
}
.team-links a:hover,
.team-links a:focus {
  color: #002347;
  text-decoration: underline;
}
@media (max-width: 767px) {
  .team-card {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 18px;
  }
  .team-photo {
    margin-bottom: 16px;
    width: 120px;
  }
  .team-info {
    flex: none;
    width: 100%;
  }
}

/* General reset and container spacing */
main#main-content {
  margin: 2em 0;
  text-align: left;
}
  /* Sidebar Image Links */
  .sidebar-img-link {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-radius: 0;
    background: #fff;
  }
  .sidebar-image-link {
    margin-bottom: 18px;
  }
  .sidebar-image-link:last-child {
    margin-bottom: 0;
  }

  /* Contact Hero Section */
  .contact-hero {
    background-color: #f6f8fa;
    padding: 40px 15px 30px;
    border-bottom: 1px solid #ececec;
    max-width: 900px;
    margin: 0 auto 40px;
    text-align: left;
  }
  .contact-hero h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #002347;
    margin-bottom: 0.5em;
  }
  .contact-hero p {
    font-size: 1.1rem;
    color: #222;
    margin-bottom: 1em;
    line-height: 1.4;
  }

  /* Office Cards */
  .office-list {
    max-width: 1200px;
    margin: 0 auto 40px;
  }
  .office-card {
    background: #fff;
    border: 1px solid #efefef;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  .office-card h2 {
    font-weight: 700;
    font-size: 1.2rem;
    color: #002347;
    margin-bottom: 0.3em;
  }
  .office-city {
    color: #377eb7;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 1rem;
  }
  .office-address,
  .office-contact {
    font-size: 1rem;
    color: #222;
    margin-bottom: 8px;
  }
  .office-contact a {
    color: #005ea6;
    text-decoration: none;
  }
  .office-contact a:hover,
  .office-contact a:focus {
    text-decoration: underline;
    color: #002347;
  }
  .office-map-link {
    margin-top: auto;
    font-weight: 600;
  }
  .office-map-link a {
    color: #005ea6;
    text-decoration: none;
  }
  .office-map-link a:hover,
  .office-map-link a:focus {
    text-decoration: underline;
    color: #002347;
  }

  @media (min-width: 992px) {
    .office-list {
      display: flex;
      justify-content: space-between;
    }
    .office-card {
      flex: 1 1 32%;
      margin-left: 10px;
      margin-right: 10px;
    }
  }

  /* Contact Form */
  .contact-form-wrapper {
    background: #fff;
    padding: 30px 25px 25px;
    border-radius: 6px;
    border: 1px solid #efefef;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    margin-bottom: 40px;
  }
  .contact-form-wrapper h2 {
    font-size: 1.8rem;
    color: #002347;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: left;
  }
  .form-group label {
    font-weight: 600;
    color: #002347;
  }
  .form-control {
    border-radius: 0;
    box-shadow: none;
  }
  .form-control:focus {
    border-color: #29abe2;
    box-shadow: 0 0 6px #9cdaf6;
    outline: none;
  }
  .form-actions {
    text-align: right;
    margin-top: 20px;
  }
  .btn-primary {
    min-width: 140px;
    font-weight: 600;
    border-radius: 0;
  }

  /* Layout for main + sidebar */
  .main-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
  }
  .content-area {
    flex: 1 1 65%;
    padding-right: 15px;
    padding-left: 15px;
    min-width: 280px;
  }
  aside.partner-links-sidebar {
    flex: 0 0 30%;
    max-width: 300px;
    padding-right: 15px;
    padding-left: 15px;
    margin-top: 0;
  }

  /* Stack on smaller devices */
  @media (max-width: 991px) {
    .main-row {
      display: block;
    }
    .content-area,
    aside.partner-links-sidebar {
      max-width: 100%;
      flex-basis: 100%;
      padding: 0 15px;
    }
    aside.partner-links-sidebar {
      margin-top: 2em;
    }
  }
  
  
  .navbar-toggle {
  border: none !important;
  background: none !important;
  box-shadow: none !important;
}
  
.navbar-toggle:focus, .navbar-toggle:active {
  outline: none !important;
  box-shadow: none !important;
}



#accessibility-content.acc-font-small {
  font-size: 13px !important;
  line-height: 1.3 !important;
}
#accessibility-content.acc-font-normal {
  font-size: 16px !important;
  line-height: 1.5 !important;
}
#accessibility-content.acc-font-large {
  font-size: 20px !important;
  line-height: 1.8 !important;
}
#accessibility-content,
#accessibility-content.acc-font-default {
  /* This ensures that the site's default is always 16px/1.5, but only if not overridden elsewhere */
  font-size: 16px;
  line-height: 1.5;
}
/* Inherit for children */
#accessibility-content.acc-font-small *,
#accessibility-content.acc-font-normal *,
#accessibility-content.acc-font-large * {
  font-size: inherit !important;
  line-height: inherit !important;
}

/* Small font */
#accessibility-content.acc-font-small .btn,
#accessibility-content.acc-font-small button,
#accessibility-content.acc-font-small input[type="button"],
#accessibility-content.acc-font-small input[type="submit"] {
  font-size: 0.9em;
  padding: 4px 10px;
  height: 2em;
}

/* Normal font (your default) */
#accessibility-content.acc-font-normal .btn,
#accessibility-content.acc-font-normal button,
#accessibility-content.acc-font-normal input[type="button"],
#accessibility-content.acc-font-normal input[type="submit"] {
  font-size: 1em;
  padding: 8px 16px;
  height: 2.5em;
}

/* Large font */
#accessibility-content.acc-font-large .btn,
#accessibility-content.acc-font-large button,
#accessibility-content.acc-font-large input[type="button"],
#accessibility-content.acc-font-large input[type="submit"] {
  font-size: 1.2em;
  padding: 12px 20px;
  height: 3em;
}

.vcenter {
  display: flex;
  align-items: center;
  justify-content: center; /* remove if you want it left-aligned */
  height: 100%;
}