/*
 * Rules the markup relied on from the extra Bootstrap 3/5 stylesheets that were removed.
 * Bootstrap 4.6 is the only framework now; keep this file small and delete rules as markup is cleaned up.
 */

/* Bootstrap 3 .img-responsive (72 uses), equivalent to BS4 .img-fluid + block display */
.img-responsive {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Bootstrap 3 set a 10px root font size; every rem-based size in the design (spacing utilities, headings, buttons) was tuned against it */
html {
  font-size: 10px;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Bootstrap 3 headings inherit font and color; the site stylesheet (from old style1.css) forces Poppins and #000, which made headings black on the dark theme */
h1, h2:where(.as-h1), h2:where(:not(.as-h1)), h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: inherit;
  color: inherit;
}

/* Bootstrap 3 buttons never wrap their label */
.btn {
  white-space: nowrap;
}

/* Bootstrap 3 navbar brand height; the logo uses .h-100 and collapses to 0 without it */
.navbar-brand {
  height: 50px;
}

/* Bootstrap 5 utilities still used in the markup (values copied from Bootstrap 5.3) */
.d-grid { display: grid !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-4 { gap: 1.5rem !important; }
.top-0 { top: 0 !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }

/* Bootstrap 5 sizing for direct children of .row that are not grid columns */
.row > :not([class*="col"]) {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-right: 7.5px;
  padding-left: 7.5px;
}

/* Bootstrap 5 divider: inherits the text color at low opacity, so it shows on the dark theme */
hr {
  color: inherit;
  background-color: currentColor;
  border: 0;
  border-top: 1px solid;
  opacity: 0.25;
}

/* Bootstrap 3 navbar spacing the header layout was built on */
.navbar {
  min-height: 50px;
  margin-bottom: 20px;
  border: 1px solid transparent;
}
.navbar-nav > li > a {
  line-height: 20px;
}
.navbar-collapse {
  padding-right: 15px;
  padding-left: 15px;
}
@media (max-width: 767px) {
  .navbar-collapse {
    margin-right: -15px;
    margin-left: -15px;
    border-top: 1px solid transparent;
  }
  .navbar-nav {
    margin: 7.5px -15px 0;
  }
}
@media (min-width: 768px) {
  .navbar {
    border-radius: 4px;
  }
  .navbar > .container .navbar-brand {
    margin-left: -15px;
  }
}

/* Bootstrap 3 base elements */
button, input, optgroup, select, textarea {
  color: inherit;
}
input[type="radio"], input[type="checkbox"] {
  margin: 4px 0 0;
  line-height: normal;
}
label {
  font-weight: 700;
}
video {
  display: inline-block;
  vertical-align: baseline;
}
blockquote {
  padding: 10px 20px;
  margin: 0 0 20px;
  font-size: 17.5px;
  border-left: 5px solid #eee;
}
.nav > li {
  position: relative;
  display: block;
}
.nav-pills > li + li {
  margin-left: 2px;
}

/* Bootstrap 4.0 carousel alignment */
.carousel-item {
  align-items: center;
}

/* Bootstrap 5 card text color, .text-black and list indent */
.card {
  color: #212529;
}
.text-black {
  color: #000 !important;
}
ol, ul {
  padding-left: 2rem;
}

/* Grid columns: Bootstrap 5 capped every .row child at 100% width; zero specificity so Bootstrap 4 column widths still win */
:where(.row > *) {
  max-width: 100%;
}

/* The homepage testimonial slides moved from Bootstrap 3 (.item) to Bootstrap 4 (.carousel-item);
   undo the generic ".carousel .carousel-item" styles in site.css that were written for other carousels */
#quote-carousel .carousel-item {
  color: inherit;
  font-size: inherit;
  text-align: inherit;
  overflow: visible;
  min-height: 0;
}

/* Images carry width/height attributes so the browser reserves space before they load.
   :where() keeps this at zero specificity, so any site rule that sizes an image still wins. */
:where(img[width][height]) {
  height: auto;
}

/* These images are sized by height only (logo: .h-100; testimonial photo: max-width/max-height), so width follows the aspect ratio */
:where(img.h-100[width], .testimonial-quote img.client-photo[width]) {
  width: auto;
}

/* SEO: secondary page titles are <h2 class="as-h1"> so each page has one <h1>, but they must look
   exactly like the old <h1>s. site.css selectors were extended with h2:where(.as-h1); this repeats
   Bootstrap's h1 size, because Bootstrap (loaded after site.css) sets h2 to 2rem. :where() keeps the
   same specificity as Bootstrap's `h1` rule so contextual site.css rules still win. */
h2:where(.as-h1) {
  font-size: 2.5rem;
}

/* /services hub cards and the legal pages (privacy, terms). */
.services-hub-card h3 {
  font-family: Ubuntu-Bold, sans-serif;
  font-size: 22px;
  margin-bottom: 0.75rem;
}
.services-hub-card p {
  font-size: 16px;
}
.legal-page li {
  font-size: inherit;
  margin-bottom: 0.4rem;
}
