/*
 * Bootstrap 3 compatibility layer for the site theme, loaded right after Bootstrap 5.
 *
 * The theme (style.css, theme-color/*.css) was written for Bootstrap 3.3. These rules
 * restore the Bootstrap 3 defaults it builds on, so moving to Bootstrap 5 keeps the
 * same layout and look:
 *   1. container widths and 30px gutters
 *   2. base typography (Bootstrap 5's reboot uses larger, responsive headings)
 *   3. the navbar component, which Bootstrap 5 rebuilt with flexbox and new class names.
 *      The markup keeps the Bootstrap 3 class names (navbar-default, navbar-toggle, ...)
 *      because the theme styles them; Bootstrap 5 only provides the collapse JavaScript,
 *      which toggles .show instead of Bootstrap 3's .in.
 * Rules marked "ProMark:" are the local edits that the old Bootstrap 3 file carried.
 */

/* 1. Containers and gutters (Bootstrap 3: 750 / 970 / 1170px, 15px padding) */
.container,
.container-fluid {
  --bs-gutter-x: 30px;
  width: 100%;
  max-width: none;
  padding-right: 15px;
  padding-left: 15px;
}
@media (min-width: 768px) {
  .container {
    width: 750px;
  }
}
@media (min-width: 992px) {
  .container {
    width: 970px;
  }
}
@media (min-width: 1200px) {
  .container {
    width: 1170px;
  }
}
.row {
  --bs-gutter-x: 30px;
  align-items: flex-start; /* Bootstrap 3 columns were only as tall as their content */
}
.container::after,
.container-fluid::after {
  content: " ";
  display: table;
  clear: both;
}
/*
 * Bootstrap 5 pads every child of a .row and forces width:100%; Bootstrap 3 left non-column
 * children alone. Restore that, so e.g. .parent-div on Our Services is not padded and a .row
 * nested directly in a .row (the testimonial slider) spans its negative margins again.
 */
.row > :where(:not([class*="col-"])) {
  flex: 1 1 100%;
  width: auto;
  min-width: 0; /* don't grow to fit wide content such as the slick slider track */
  max-width: none;
  padding-right: 0;
  padding-left: 0;
}

/*
 * Columns outside a .row (the header logo, the client logo strip, the service tiles).
 * Bootstrap 3 floated and padded every col-* wherever it was; Bootstrap 5 only lays out
 * columns inside a flex .row. :where() keeps these at zero specificity so the theme's
 * own rules (e.g. .header-logo-col) still win. Bootstrap 5 classes supply the widths.
 * Breakpoints follow the class mapping: col-* any width, col-md-* >=768, col-lg-* >=992.
 * ProMark: the old local edit floated col-xs-* right; the only one used is the header
 * logo, whose float the theme sets itself, so it is not reproduced here.
 */
:where(:not(.row) > [class*="col-"]) {
  position: relative;
  min-height: 1px;
  padding-right: 15px;
  padding-left: 15px;
}
/* Bootstrap 3 columns inside a row also kept 1px height when empty */
:where(.row > [class*="col-"]) {
  min-height: 1px;
}
:where(:not(.row) > [class*="col-1"], :not(.row) > [class*="col-2"], :not(.row) > [class*="col-3"],
       :not(.row) > [class*="col-4"], :not(.row) > [class*="col-5"], :not(.row) > [class*="col-6"],
       :not(.row) > [class*="col-7"], :not(.row) > [class*="col-8"], :not(.row) > [class*="col-9"]) {
  float: left;
}
@media (min-width: 768px) {
  :where(:not(.row) > [class*="col-md-"]) {
    float: left;
  }
}
@media (min-width: 992px) {
  :where(:not(.row) > [class*="col-lg-"]) {
    float: left;
  }
}

/* 2. Base typography */
/* Bootstrap 5 turns on smooth scrolling; the theme's jQuery-animated "scroll to top" fights with it */
:root {
  scroll-behavior: auto;
}
body {
  line-height: 1.42857143;
}
h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.1;
}
h1, h2, h3 {
  margin-top: 20px;
  margin-bottom: 10px;
}
h4, h5, h6 {
  margin-top: 10px;
  margin-bottom: 10px;
}
h1 { font-size: 36px; }
h2 { font-size: 30px; }
h3 { font-size: 24px; }
h4 { font-size: 18px; }
h5 { font-size: 14px; }
h6 { font-size: 12px; }
p {
  margin: 0 0 10px;
}
ul,
ol {
  margin-top: 0;
  margin-bottom: 10px;
}
a {
  text-decoration: none;
}
a:hover,
a:focus {
  text-decoration: underline;
}
address {
  margin-bottom: 20px;
  font-style: normal;
  line-height: 1.42857143;
}
.form-group {
  margin-bottom: 15px;
}
/* Form fields and the contact form's success / error messages (sizes come from the theme) */
.form-control {
  color: #555;
  border-color: #ccc;
  line-height: 1.42857143;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.form-control::placeholder {
  color: #999;
  opacity: 1;
}
.form-control:focus {
  color: #555;
  border-color: #66afe9;
  outline: 0;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
.alert {
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 4px;
}
.alert-success {
  color: #3c763d;
  background-color: #dff0d8;
  border-color: #d6e9c6;
}
.alert-danger {
  color: #a94442;
  background-color: #f2dede;
  border-color: #ebccd1;
}
hr {
  margin-top: 20px;
  margin-bottom: 20px;
  border: 0;
  border-top: 1px solid #eee;
  opacity: 1;
}

/* 3. Navbar (Bootstrap 3.4.1 navbar, nav and navbar-default rules) */
.navbar {
  display: block;
  position: relative;
  min-height: 50px;
  padding: 0;
  margin-bottom: 20px;
  border: 1px solid transparent;
}
.navbar > .container,
.navbar > .container-fluid {
  display: block;
}
.navbar::after,
.navbar > .container::after,
.navbar-header::after,
.navbar-collapse::after,
.nav::after {
  content: " ";
  display: table;
  clear: both;
}
@media (min-width: 768px) {
  .navbar {
    border-radius: 4px;
  }
  .navbar-header {
    float: left;
  }
}
.nav {
  display: block;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}
.nav > li {
  position: relative;
  display: block;
}
.nav > li > a {
  position: relative;
  display: block;
  padding: 10px 15px;
}
.nav > li > a:hover,
.nav > li > a:focus {
  text-decoration: none;
  background-color: #eeeeee;
}
.navbar-collapse {
  padding-right: 15px;
  padding-left: 15px;
  overflow-x: visible;
  border-top: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.navbar-collapse.show {
  overflow-y: auto;
}
@media (min-width: 768px) {
  .navbar-collapse {
    width: auto;
    border-top: 0;
    box-shadow: none;
  }
  .navbar-collapse.collapse {
    display: block !important;
    height: auto !important;
    padding-bottom: 0;
    overflow: visible !important;
  }
  .navbar-collapse.show {
    overflow-y: visible;
  }
}
.container > .navbar-header,
.container-fluid > .navbar-header,
.container > .navbar-collapse,
.container-fluid > .navbar-collapse {
  margin-right: 45px; /* ProMark: Bootstrap 3 default was -15px */
  margin-left: -15px;
}
@media (min-width: 768px) {
  .container > .navbar-header,
  .container-fluid > .navbar-header,
  .container > .navbar-collapse,
  .container-fluid > .navbar-collapse {
    margin-right: 0;
    margin-left: 0;
  }
}
.navbar-toggle {
  position: relative;
  float: left; /* ProMark: Bootstrap 3 default was right */
  padding: 9px 10px;
  margin-right: 15px;
  margin-top: 8px;
  margin-bottom: 8px;
  background-color: transparent;
  background-image: none;
  border: 1px solid transparent;
  border-radius: 4px;
}
.navbar-toggle:focus {
  outline: 0;
}
.navbar-toggle .icon-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
}
.navbar-toggle .icon-bar + .icon-bar {
  margin-top: 4px;
}
@media (min-width: 768px) {
  .navbar-toggle {
    display: none;
  }
}
.navbar-nav {
  margin: 7.5px -15px;
}
.navbar-nav > li > a {
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 20px;
}
@media (min-width: 768px) {
  .navbar-nav {
    float: left;
    margin: 0;
  }
  .navbar-nav > li {
    float: left;
  }
  .navbar-nav > li > a {
    padding-top: 15px;
    padding-bottom: 15px;
  }
}
.navbar-default {
  background-color: #f8f8f8;
  border-color: #e7e7e7;
}
.navbar-default .navbar-nav > li > a {
  color: #777;
}
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
  color: #333;
  background-color: transparent;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
  color: #555;
  background-color: #e7e7e7;
}
.navbar-default .navbar-toggle {
  border-color: #ddd;
}
.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
  background-color: #ddd;
}
.navbar-default .navbar-toggle .icon-bar {
  background-color: #888;
}
.navbar-default .navbar-collapse {
  border-color: #e7e7e7;
}
