/*
================================================================================
CONTENT:
================================================================================
*/

/* set the base size on HTML element so "em" & "rem" work correctly */
html {
  font-size: 18px;
}

body {
  overflow-x: hidden;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: inherit;
  line-height: 1.5;
  color: #555;
}

/* WYSIWYG
-------------------------------------------------------------------------------- */
body.wysiwyg-content {
  margin: 4px;
  color: #333;
  background-color: #fff;
}

body.wysiwyg-content img {
  height: auto;
}

body.wysiwyg-content table {
  border: 1px solid;
}

body.wysiwyg-content .collapse {
  display: block;
}

body.wysiwyg-content .flexslider li {
  display: block;
}


/* Links
-------------------------------------------------------------------------------- */
a {
  color: var(--primary-color);
}

a:hover {
  color: var(--primary-color-darker);
}

/* Disable cursor if href is empty */
a[href=""] {
  pointer-events: none;
}

/*
-------------------
File Icons
-------------------
Automatically prepends a file icon to links based on URL/File Extension
*/

a[href$=".doc"],
a[href$=".docx"],
a[href$=".pdf"],
a[href$=".ppt"],
a[href$=".pptx"],
a[href$=".xls"],
a[href$=".xlsx"] {
  display: inline-flex;
}

a[href$=".doc"]::before,
a[href$=".docx"]::before,
a[href$=".pdf"]::before,
a[href$=".ppt"]::before,
a[href$=".pptx"]::before,
a[href$=".xls"]::before,
a[href$=".xlsx"]::before {
  margin-left: 3px;
  margin-right: 5px;
  font-family: 'FontAwesome';
}

/* Word icon */
a[href$=".doc"]::before,
a[href$=".docx"]::before {
  content: "\f1c2";
  color: #1959b9;
}

/* PDF icon */
a[href$=".pdf"]::before {
  content: "\f1c1";
  color: #cd5c5c;
}

/* PowerPoint icon */
a[href$=".ppt"]::before,
a[href$=".pptx"]::before {
  content: "\f1c4";
  color: #eb5f39;
}

/* Excel icon */
a[href$=".xls"]::before,
a[href$=".xlsx"]::before {
  content: "\f1c3";
  color: #0f7b42;
}

/* Button icons inherit Button text color */
.btn[href$=".doc"]::before,
.btn[href$=".docx"]::before,
.btn[href$=".pdf"]::before,
.btn[href$=".ppt"]::before,
.btn[href$=".pptx"]::before,
.btn[href$=".xls"]::before,
.btn[href$=".xlsx"]::before {
  color: inherit;
}


/* Headings
-------------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5 {
  margin-top: 0;
  font-weight: 600;
  /* Make Headings darker compared to Text (optional) */
  filter: contrast(3);
}

h1:only-child,
h2:only-child,
h3:only-child,
h4:only-child,
h5:only-child {
  margin-bottom: 0;
}

/* No Filter if Heading has a link. It messes the link color */
h1:has(a),
h2:has(a),
h3:has(a),
h4:has(a),
h5:has(a) {
  filter: none;
}

h1 {
  font-size: 190%;
}

h2 {
  font-size: 160%;
}

h3 {
  font-size: 130%;
  color: var(--primary-color);
  filter: none;
}

h4 {
  font-size: 110%;
}

h5 {
  font-size: 90%;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary-color);
  filter: none;
}


/* Paragraphs
-------------------------------------------------------------------------------- */
p:only-child {
  margin-bottom: 0;
}

.lead {
  font-size: 130%;
  font-weight: normal;
}

.help-block {
  font-size: 90%;
  color: inherit;
  opacity: 0.7;
}

small {
  color: inherit !important;
}

b,
strong {
  /* make the text darker */
  filter: contrast(3);
}

a b,
a strong,
b:has(a),
strong:has(a) {
  filter: none;
}

/* Images
-------------------------------------------------------------------------------- */
img {
  max-width: 100%;
  height: auto;
}

/*
------------------
Aspect Ratio
------------------
<img class="ar-3x2" />
<img class="ar-3by2" />
*/

.ar-1x1,
.ar-1by1 {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.ar-3x2,
.ar-3by2 {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.ar-4x3,
.ar-4by3 {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.ar-16x9,
.ar-16by9 {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/*
------------------
Fit
------------------
<img class="cover" />
<img class="contain" />
*/

.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contain {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.placeholder {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  background-color: rgba(0, 50, 100, 0.05);
  border: 1px solid rgba(51, 50, 50, 0.1);
  fill: #33323259;
}


/* Blockquote
-------------------------------------------------------------------------------- */
blockquote {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  color: #333;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

/* stars (optional) */
blockquote::before {
  content: "\f005 \f005 \f005 \f005 \f005";
  font-family: "FontAwesome";
  display: block;
  margin-bottom: 15px;
  font-style: normal;
  color: orange;
}

blockquote footer,
blockquote small,
blockquote .small {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 100%;
  font-style: normal;
  font-weight: bold;
  color: inherit;
  opacity: 0.8;
}

blockquote cite {
  display: block;
  font-style: normal;
  font-weight: normal;
}


/* Horizontal Rule
-------------------------------------------------------------------------------- */
hr {
  position: relative;
  width: 60%;
  margin: 40px auto;
  overflow: visible;
  color: var(--accent-color);
  border-color: inherit;
}

hr::before {
  content: "\f005";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1.28571429em;
  font-family: "FontAwesome";
  text-align: center;
}

/* Lists
-------------------------------------------------------------------------------- */
ul,
ol {
  position: relative;
  margin-bottom: 1em;
}

::marker {
  color: var(--accent-color);
}


/* List Inline
------------------------------------ */
.list-inline {
  margin-bottom: 0;
}

.list-inline a:not(.btn) {
  display: block;
  padding-right: 4px;
}


/* List Checkmark
------------------------------------
<ul class="list-checkmark">
*/

.list-checkmark {
  position: relative;
}

.list-checkmark > li {
  padding-left: 5px;
}

.list-checkmark > li::marker {
  content: "\f058";
  font-family: "FontAwesome";
  color: var(--accent-color);
}


/* List Group
------------------------------------ */
.list-group-item a:only-child {
  display: block;
  margin: -10px -15px;
  padding: 10px 15px;
}


/* Breadcrumb
------------------------------------ */

.breadcrumb {
  background-color: rgba(0, 0, 0, 0.05);
  border: 0.5px solid rgba(0, 0, 0, 0.1);
}

.breadcrumb > li {
  margin: 0;
}


/* Tables
-------------------------------------------------------------------------------- */
thead {
  background-color: rgba(0, 0, 0, 0.05);
}

th {
  font-size: 80%;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.table > thead > tr > th,
.table > thead > tr > td {
  border-bottom-width: 1px;
}

@media screen and (max-width: 767px) {
  .table-responsive tbody > tr {
    margin-bottom: 30px;
    background-color: #fff;
  }

  /*
  .table-responsive > tbody > tr > td {
    display: table-cell !important;
  }

  .table-responsive > tbody > tr > td::before {
    display: none !important;
  }
  */
}

/* Box
--------------------------------------------------------------------------------
<div class="box">
  <div class="box-media"><img src="..."></div>
  <div class="box-text">Text</div>
</div>
*/

.box {
  position: relative;
  display: flex;
  margin-bottom: 60px;
  border: 0 !important;
}

@media (max-width: 768px) {
  .box {
    flex-direction: column;
  }
}

.box > * {
  display: flex;
  flex-basis: 50%;
  flex-direction: column;
  justify-content: center;
}

.box-text {
  position: relative;
  padding: 30px;
  color: #333;
  background-color: #fff;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .box-text {
    order: 1;
  }
}

@media (max-width: 768px) {
  .box-media {
    order: 2;
  }
}

.box-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/*
-------------------
Box Overlap
-------------------
<div class="box box-overlap">
*/

/* Desktops */
@media (min-width: 769px) {

  /* if "box-text" is on the LEFT of "box-image" */
  .box.box-overlap .box-text {
    margin-top: 60px;
    margin-right: -60px;
    margin-bottom: 60px;
  }

  /* if "box-text" is on the RIGHT of "box-image" */
  .box.box-overlap .box-media + .box-text {
    margin-left: -60px;
  }
}


/* Card
--------------------------------------------------------------------------------
<div class="card">
  <div class="card-media"><img src="..."></div>
  <div class="card-text">...</div>
</div>
*/

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0 0 30px 0;
  padding: 30px;
  overflow: hidden;
  color: #666;
  background-color: #fff;
  border-radius: 3px;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
  transition: all 200ms;
}

/* prevent double-margin when wrapped in a grid */
.grid .card {
  margin-bottom: 0;
}

.card:hover {
  box-shadow: 0px 8px 24px rgba(149, 157, 165, 0.35);
}

.card-media {
  margin-right: -30px;
  margin-left: -30px;
  overflow: hidden;
  border: 0;
}

/* if thumbnail appears first (at the top) */
.card-media:first-child {
  margin-top: -30px;
  margin-bottom: 30px;
}

/* if thumbnail appears last (at the bottom) */
.card-media:last-child {
  margin-top: 15px;
  margin-bottom: -30px;
}

.card-media img {
  width: 100%;
  height: 100%;
  transition: all 200ms;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.card:hover .card-media img {
  transform: scale(1.05);
}

.card-text {
  flex: 1;
}

.card > *:last-child {
  margin-bottom: 0;
}


/* Overlay
--------------------------------------------------------------------------------
<div class="overlay-item">
  <div class="overlay-media"><img src="..." /></div>
  <div class="overlay-text">...</div>
</div>
*/

.overlay-item {
  position: relative;
  display: grid;
  margin: 0 0 30px 0;
  overflow: hidden;
  color: #fff;
  background-color: #333;
  border: 0.1px solid rgba(255, 255, 255, 0.3);
}

/* prevent double-margin when wrapped in a grid */
.grid .overlay-item {
  margin-bottom: 0;
}

.overlay-media {
  position: relative;
  transition: all 200ms cubic-bezier(0.4, 0.2, 0.2, 1);
  grid-column: -1;
  grid-row: -1;
}

.overlay-media::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(45deg, black, transparent);
}

.overlay-media img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
}

.overlay-item:hover .overlay-media {
  transform: scale(1.05);
}

.overlay-text {
  position: relative;
  align-self: end;
  padding: 15px;
  grid-column: -1;
  grid-row: -1;
}

.overlay-item a:hover {
  text-decoration: none;
}


/* Modals
-------------------------------------------------------------------------------- */
.modal {
  text-align: left;
}

.modal-content {
  color: #333;
  background-color: var(--default-color);
  border: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  text-transform: uppercase;
  background-color: var(--primary-color);
  border-bottom: 0;
}

.modal-header .close {
  float: none;
  margin: 0 !important;
  padding: 5px 15px !important;
  font-size: 30px !important;
  line-height: 1 !important;
  color: inherit;
  border-color: inherit !important;
  opacity: 0.7;
}

.modal-title {
  margin: 0;
}

.modal-footer {
  text-align: left;
}

/* Responsive Media Container
-------------------------------------------------------------------------------- */
.media-container {
  position: relative;
  float: none;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  clear: both;
}

.media-container > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Videos
--------------------------------------------------------------------------------
Adds a "play" icon on video link

e.g.
<a class="videoplay" data-fancybox="videogallery" href="https://vimeo.com/1128960645" target="_blank">
  <img alt="Video Poster" src="/content/images/videos/choosing-contractor.jpg">
</a>
*/

.videoplay {
  position: relative;
  display: block;
}

.videoplay::after {
  content: "\f144";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'FontAwesome';
  font-size: 400%;
  color: #fff;
  opacity: 0.7;
}


/* Bootstrap Media Object
--------------------------------------------------------------------------------
https://getbootstrap.com/docs/3.4/components/#media
*/
.media {
  display: flex;
}

.media:first-child {
  margin-top: 15px;
}

.media-left img {
  max-width: 120px;
  border-radius: 3px;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top;
}

.media-body {
  flex: 1;
  width: auto;
}

.media-body .fa {
  font-size: 1.5em;
}

/* Bootstrap Well
--------------------------------------------------------------------------------
https://getbootstrap.com/docs/3.4/components/#wells
*/
.well {
  background-color: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.05);
  box-shadow: none;
}

/* Fission Stuff - Do Not Delete
-------------------------------------------------------------------------------- */
.fission-form-box {
  width: 64px;
  height: 64px;
  background-image: url(/cmscore/js/tiny_mce/plugins/pfforms/images/pfforms-placeholder.gif);
  background-repeat: no-repeat;
}

pre {
  padding: 10px;
  color: #fff;
  background-color: #23241f;
  border-radius: 3px;
}
