/* Style the links within the content */
:where(.page :is(a:active, a:visited), .page a) {
  color: var(--link-color);
}

/* :where(.page a:hover) { --link-color: var(--link-color); } */

.page {
  display: grid;
  grid: "subNav content" 1fr / min-content [c1] minmax(0, 1fr);
  max-width: var(--page-max-width);
  min-height: calc(100vh - 575px);
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
  width: 100%;
  z-index: 0;
  grid-row-start: content-start;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255) 650px,
    rgba(255, 255, 255, 1) 100%
  );
}

.page__content-wrapper {
  padding: 50px;
  grid-area: content;
  grid-column-start: c1;
  min-height: calc(56.25vw - 960px);
}

@media screen and (max-width: 1280px) {
  .page {
    min-height: calc(100vh - 563px);
    display: grid;
    grid: "subNav ." 3em "subNav content" 1fr / [c1] 1fr [c2] minmax(0, 1fr);
  }
  .page__content-wrapper {
    padding: 15px;
  }
}

@media screen and (max-width: 720px) {
  .page {
    min-height: calc(100vh - 609px);
  }
}

@media screen and (max-width: 640px) {
  .page {
    min-height: calc(100vh - 666px);
  }
}

/* Header Adjustments (Make it a background image instead of just an img) */
.page__top-media {
  /* Start the image under the header */
  grid-row-start: img-start;
  overflow: hidden;
  position: relative;
  grid-column: 1;
  height: var(--media-height);
  /* max-height: 100%; */
  /* height: min-content; */
  /* z-index: -1; Removed this to fix bg pause button issue Keeping here for reference if other issue pops up */
}

/* Background image div inside top media */
.headerImageBg {
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
}

/* Update fade out mask for new headerImageBg */
.page__top-media:has(.headerImageBg) {
  min-height: 56.25vw;
}

.page__top-media:has(video) {
  /* match the image variant's visible fade region */
  min-height: 56.25vw;
}

.page__top-media video {
  inset: 0;
  height: 56.25vw;
  max-height: unset;
  object-fit: cover;
  object-position: top center;
  width: 100%;
  z-index: -1;
}

/* Gradient overlay */
.page__top-media::after {
  content: "";
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  max-height: unset;
  background: linear-gradient(
    180deg,
    rgba(233, 233, 233, 0) 0%,
    rgba(233, 233, 233, 0) calc(100% - 300px),
    rgba(233, 233, 233, 1) calc(100% - 100px),
    rgba(233, 233, 233, 1) 100%
  );
}

@media screen and (max-width: 800px) {
  .page__top-media:has(.headerImageBg) {
    min-height: unset;
    -webkit-mask-image: none;
    mask-image: none;
    height: var(--media-height);
  }

  .page__top-media:has(video) {
    min-height: unset;
    -webkit-mask-image: none;
    mask-image: none;
    height: var(--media-height);
  }
}

@media screen and (max-width: 1400px) {
  /* .page__top-media { display: flex; justify-content: center; } */
  .page__top-media video {
    height: 100%;
    object-fit: cover;
  }
}

.bg-vid__button {
  position: absolute;
  /* Max that ensured the button is positioned in line 15px from the page max width */
  right: max(15px, calc(50% - var(--page-max-width) / 2 + 15px));
  top: var(--header-total-height);
  background-color: rgba(0, 0, 0, 0.54);
  color: white;
  border: 0;
  padding: 10px;
  border-radius: 0 0 10px 10px;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  z-index: 1;
}

@media screen and (max-width: 890px) {
  .bg-vid__button {
    top: var(--header-nav-height);
  }
}

.bg-vid__button-icon {
  border-style: double;
  border-width: 0px 0 0px 10px;
  height: 15px;
  padding-right: 5px;
}

.bg-vid__button-icon.bg-vid--paused {
  border-style: solid;
  /* Make it a triangle pointing right */
  border-top: 0.5em solid transparent;
  border-bottom: 0.5em solid transparent;
  border-left: 1em solid white;
  height: 0;
  width: 0;
}

.page-titles {
  grid-area: media-spacing;
  max-width: var(--page-max-width);
  padding: 15px;
  padding-bottom: 10px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  display: none;
  flex-direction: column;
  justify-content: center;
  z-index: 0;
}

.page-titles__title {
  font-size: 48px;
  line-height: 1.2em;
  font-weight: normal;
  color: rgba(0, 0, 0, 0);
  text-shadow:
    0px 0px 0px white,
    1px 1px 0px black;
  max-width: 720px;
  margin-top: 0px;
  margin-bottom: 0px;
  background: linear-gradient(
    90deg,
    rgba(42, 123, 155, 0.01) 0%,
    rgba(69, 128, 255, 0.01) 100%
  );
}

.page-titles__subtitle {
  font-size: 18px;
  line-height: 1.2em;
  font-weight: normal;
  color: rgba(0, 0, 0, 0);
  text-shadow:
    0px 0px 0px white,
    1px 1px 0px black;
  max-width: 720px;
}

.page-titles__pretitle {
  font-size: 25px;
}

@media screen and (max-width: 800px) {
  .page__top-media :is(video) {
    object-position: top;
  }

  .headerImageBg {
    background-position: top;
  }

  .page__top-media {
    height: min-content;
  }

  .page-titles {
    padding: 0;
    justify-content: flex-end;
  }

  .page-titles__container {
    position: relative;
    padding: 15px;
    padding-bottom: 8px;
    padding-top: 10px;
    padding-right: calc(30vw + 25px);
    width: 100%;
    background: linear-gradient(
      to right,
      rgba(45, 83, 122, 0.9) 0%,
      rgba(89, 133, 178, 0.9) 39%,
      rgba(57, 85, 115, 0) 100%
    );
  }

  .page-titles__container::before {
    content: "";
    display: block;
    background: linear-gradient(
      to right,
      rgb(130 190 253 / 90%) 0%,
      rgb(114 157 201 / 90%) 39%,
      rgba(57, 85, 115, 0) 100%
    );
    height: 10px;
    width: 100%;
    position: absolute;
    top: -10px;
    left: 0;
  }

  .page-titles__title {
    font-size: max(16px, 6vw);
  }

  .page-titles__subtitle {
    font-size: 18px;
    background: linear-gradient(
      90deg,
      rgba(42, 123, 155, 0.01) 0%,
      rgba(69, 128, 255, 0.01) 100%
    );
  }

  .page-titles__pretitle {
    font-size: max(11px, 3vw);
  }
}

/*Background Image Overlay for Header text*/
.headerTextBackground {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0px;
  left: 0px;
}

@media screen and (max-width: 800px) {
  .headerTextBackgroundAngle2 {
    display: none;
  }
}

.headerTextBackgroundGradientLeft {
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(25, 83, 149, 0.76) 0%,
    rgba(17, 52, 91, 0) 100%
  );
  position: absolute;
  top: 0px;
  left: 0px;
}

.headerTextBackgroundGradientRight {
  width: 25%;
  height: 100%;
  background: linear-gradient(
    270deg,
    rgba(25, 83, 149, 0.76) 0%,
    rgba(17, 52, 91, 0) 100%
  );
  position: absolute;
  top: 0px;
  right: 0px;
}

.headerTextBackgroundAngles {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0px;
  left: 0px;
  overflow: hidden;
}

.headerTextBackgroundAngle1 {
  transform: rotate(36deg);
  width: 1600px;
  height: 500px;
  top: 0px;
  left: calc(50% - 924px);
  position: absolute;
  background: linear-gradient(
    0deg,
    rgba(165, 196, 224, 0.5) 0%,
    rgba(165, 196, 224, 0) 100%
  );
}

@media screen and (max-width: 1615px) {
  .headerTextBackgroundAngle1 {
    left: -125px;
  }
}

@media screen and (max-width: 1600px) {
  .headerTextBackgroundAngle1 {
    left: -90px;
  }
}

@media screen and (max-width: 800px) {
  .headerTextBackgroundAngle1 {
    left: -260px;
  }
}

.headerTextBackgroundAngle2 {
  transform: rotate(36deg);
  width: 1600px;
  height: 2px;
  top: 460px;
  left: calc(50% - 1058px);
  position: absolute;
  background: linear-gradient(
    0deg,
    rgb(255 255 255 / 50%) 0%,
    rgba(165, 196, 224, 0) 100%
  );
}

@media screen and (max-width: 1615px) {
  .headerTextBackgroundAngle2 {
    left: -258px;
  }
}

@media screen and (max-width: 1600px) {
  .headerTextBackgroundAngle2 {
    left: -225px;
  }
}

@media screen and (max-width: 800px) {
  .headerTextBackgroundAngle2 {
    left: -395px;
  }
}

:where(.page__content) {
  h1,
  h2,
  h3,
  h4,
  h5 {
    font-weight: bold;
    color: #1e354d;
    margin-top: 15px;
    margin-bottom: 15px;
  }

  h1 {
    line-height: 1.2em;
  }
  
  h2 {
    font-size: 24px;
    line-height: 1.2em;
  }

  h3 {
    font-size: 18px;
    line-height: 1.2em;
  }

  h4 {
    font-size: 16px;
    line-height: 1.2em;
  }

  h5 {
    font-size: 12px;
    line-height: 1.4em;
  }

  p,
  li,
  td,
  .normal {
    font-size: 15px;
    line-height: 1.4em;
  }
}

.page__content iframe {
  max-width: 100% !important;
}

/* div:has(> table) {
  overflow-x: auto;
} */

body {
  grid:
    [img-start] "header" var(--header-total-height)
    "media-spacing" var(--media-before-content)
    [content-start] "content" minmax(var(--media-after-content), 1fr)
    "footer" min-content
    / 1fr;
}

.page__content a {
  text-decoration: none;
}

.page__content a:hover {
  text-decoration: underline;
}

.page__top-media section {
  height: 100%;
}

@media screen and (max-width: 1600px) {
  .page__top-media::after {
    background: linear-gradient(
      180deg,
      rgba(233, 233, 233, 0) 0%,
      rgba(233, 233, 233, 0) 628px,
      rgba(233, 233, 233, 1) 100%
    );
  }
}

.gl-search__text[type="search"]::-webkit-search-cancel-button,
.gl-search-modal__text[type="search"]::-webkit-search-cancel-button {
  display: none;
  -webkit-appearance: none;
}

@media screen and (max-width: 890px) {
  body {
    --media-height: calc(56.25vw + 130px) !important;
    grid:
      "header" var(--header-top-height)
      [img-start] "header-nav" var(--header-nav-height)
      "media-spacing" var(--media-before-content)
      [content-start] "content" minmax(var(--media-after-content), 1fr)
      "footer" min-content
      / 1fr;
  }

  .page__top-media::after {
    min-height: calc(56.25vw + var(--header-top-height)) !important;
    background: linear-gradient(
      180deg,
      rgba(233, 233, 233, 0) 0%,
      rgba(233, 233, 233, 0) 90%,
      rgba(233, 233, 233, 1) 100%
    );
  }

  .page__top-media :is(video) {
    max-height: unset !important;
    min-height: unset !important;
  }

  .page__top-media .bg-vid__button {
    top: var(--header-nav-height);
  }
}
