/* stylelint-disable no-descending-specificity */

/*
 * Copyright 2020 Adobe. All rights reserved.
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */

:root {
  /* brand colors */
  --brand-primary-blue: #001F3F;
  --brand-primary-blue-trans: rgb(6 16 63 / 75%);
  --brand-secondary-blue: #3674B5;
  --brand-yellow: #FDCF09;
  --brand-red: #AF3E3E;
  --brand-light: #F5F5F5;
  --brand-gray: #E0E0E0;
  --brand-light-gray: #F5F5F5;
  --brand-light-blue: #9EC6F3;
  --brand-dark-text-color: #707070;
  --brand-border-light: #CAC4D0;

  /* colors */
  --background-color: white;
  --light-color: #f8f8f8;
  --dark-color: #505050;
  --text-color: #001F3F;
  --link-color: #3674B5;
  --link-hover-color: #1d3ecf;

  /* fonts */
  --body-font-family: "Source Sans 3", sans-serif;
  --body-font-family-bold: "Source Sans 3 Bold", sans-serif;
  --heading-font-family: "Source Serif 4", serif;

  /* body sizes */
  --body-font-size-m: 22px;
  --body-font-size-s: 19px;
  --body-font-size-xs: 17px;

  /* heading sizes */
  --heading-font-size-xxl: 55px;
  --heading-font-size-xl: 44px;
  --heading-font-size-l: 34px;
  --heading-font-size-m: 27px;
  --heading-font-size-s: 24px;
  --heading-font-size-xs: 22px;
  --heading-font-size-xxs: 16px;

  /* nav height */
  --agency-bar-height: 95px;
  --megamenu-height: 50px;
  --nav-height: calc(var(--agency-bar-height) + var(--megamenu-height));
  --footer-height: 600px;

  /* spacing */
  --padding-xxs: 10px;
  --padding-xs: 15px;
  --padding-s: 30px;
  --padding-m: 40px;
  --padding-l: 100px;
}

@media (width >=900px) {
  :root {
    /* body sizes */
    --body-font-size-m: 18px;
    --body-font-size-s: 16px;
    --body-font-size-xs: 14px;

    /* heading sizes */
    --heading-font-size-xxl: 64px;
    --heading-font-size-xl: 32px;
    --heading-font-size-l: 28px;
    --heading-font-size-m: 24px;
    --heading-font-size-s: 20px;
    --heading-font-size-xs: 18px;
    --heading-font-size-xxs: 16px;

    /* nav height */
    --agency-bar-height: 56px;
    --megamenu-height: 100px;
    --footer-height: 385px;
    --max-width: 1400px;
  }
}

body {
  display: none;
  margin: 0;
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: var(--body-font-family);
  font-size: var(--body-font-size-m);
  line-height: 1.6;

  &::-webkit-scrollbar {
    display: none;
  }
}

body.appear {
  display: block;
}

div,
section {
  box-sizing: border-box;
}

header {
  height: var(--nav-height);
  position: fixed;
  top: 0;
  left: 0;
  background-color: white;
  z-index: 100;
}

header .header,
footer .footer {
  visibility: hidden;
}

header .header[data-block-status="loaded"],
footer .footer[data-block-status="loaded"] {
  visibility: visible;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  /* display: flex; */
  align-items: center;
  margin: 0;
  font-family: var(--heading-font-family);
  font-weight: 400;
  line-height: 1.25;
  scroll-margin: 40px;
  text-align: left;
  min-width: 100%;

  a {
    color: var(--brand-light-blue);
  }

  &:has(strong) {
    display: block;
  }
}

a {
  position: relative;

  &.external {
    position: relative;

    >img.external-icon[src] {
      color: var(--brand-light-blue);
      width: 10px;
      padding: 0;
      margin: 0;
      margin-left: 3px;
      display: inline-block;
    }
  }
}

h1 {
  font-size: var(--heading-font-size-xl);
  font-weight: 700;
  margin-bottom: 32px;
}

h2 {
  font-size: var(--heading-font-size-l);
  font-weight: 700;
  margin-bottom: 18px;
}

h3 {
  font-size: var(--heading-font-size-m);
  margin-bottom: var(--padding-m);
  margin-bottom: 16px;
}

h4 {
  font-size: var(--heading-font-size-s);
}

h5 {
  font-size: var(--heading-font-size-xs);
}

h6 {
  font-size: var(--heading-font-size-xxs);
}

@media (width >=900px) {
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    margin-top: 16px;
    margin-bottom: 8px;
  }

  h1 {
    font-size: var(--heading-font-size-xl);
    font-weight: 700;
    margin-bottom: 32px;
  }

  h2 {
    font-size: var(--heading-font-size-l);
    font-weight: 700;
  }

  h3 {
    font-size: var(--heading-font-size-m);
  }

  h4 {
    font-size: var(--heading-font-size-s);
  }

  h5 {
    font-size: var(--heading-font-size-xs);
  }

  h6 {
    font-size: var(--heading-font-size-xxs);
  }
}

strong {
  font-family: 'Source Sans 3 Bold', Arial, Helvetica, sans-serif;
}

p,
dl,
ol,
ul,
blockquote,
code,
pre {
  margin: 0;
  margin-bottom: 16px;
}

main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--nav-height) - var(--footer-height));
}

main ol {
  counter-reset: section;
}

main ol li {
  margin-left: 10px;
}

main>div {
  margin: 0;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  box-sizing: border-box;
  border: 1px solid rgb(217 217 217);
  border-radius: 8px;
  display: flex;
  min-height: 40px;
  min-width: 240px;
  width: 100%;
  align-items: center;
  align-self: stretch;
  font-size: 16px !important;
  padding: 6px 16px !important;
}

input,
select {
  max-height: 40px;
}

input[type="radio"], input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-width: unset;
  min-height: unset;
}

pre {
  padding: 16px;
  border-radius: 8px;
  background-color: var(--light-color);
  overflow-x: auto;
  white-space: pre;
}

@media (width >=900px) {
  main {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: var(--nav-height);
  }
}

/* links */
a:any-link {
  color: var(--link-hover-color);
  text-decoration: none;
  overflow-wrap: break-word;
}

a:hover {
  text-decoration: underline;
}

.button-container {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;

  em {
    width: 100%;
  }
}

/* buttons */
a.button:any-link,
button {
  box-sizing: border-box;
  display: inline-block;
  max-width: 100%;
  margin: 12px 0;
  font-family: var(--body-font-family);
  font-size: var(--body-font-size-m);
  font-style: normal;
  font-weight: 500;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  color: var(--link-color);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.button:hover,
a.button:focus,
button:hover,
button:focus {
  cursor: pointer;
}

button:disabled,
button:disabled:hover {
  background-color: var(--light-color);
  cursor: unset;
}

a.button.secondary,
button.secondary {
  background-color: unset;
  border: 2px solid currentcolor;
  color: var(--text-color);
}

main img {
  max-width: 100%;
  width: 100vw;
  height: auto;
}

.icon {
  display: inline-block;
  height: 24px;
  width: 24px;
}

.icon img {
  height: 100%;
  width: 100%;
}

/* sections */
main>.section {
  width: 100vw;

  &:first-of-type {
    margin-top: var(--nav-height);
  }

  p {
    margin-bottom: var(--padding-xs);
  }
}

main>.section:first-child {
  margin-top: var(--nav-height);
  padding-top: 0;
}

main>.section>div {
  display: flex;
  position: relative;
  flex-direction: column;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;

  /* Optional padding for smaller screens */
  box-sizing: border-box;
}

main>.section>div.default-content-wrapper {
  >h1 {
    position: relative;
    display: inline-block;

    /* margin-bottom: 20px; */

    &::after {
      content: "";
      display: block;
      width: 70px;
      height: 5px;
      background-color: var(--brand-light-blue);
      margin-top: 8px;
    }
  }

  > :is(picture, p) {
    &:only-child {
      img {
        width: 100%;
      }
    }
  }
}

main>.section:last-child {
  margin-bottom: var(--padding-m);
}

main>.section:first-child:not(.hero-container) {
  margin-top: 40px;
}

div.section:has(> .mobile) {
  display: flex !important;
}

div.section:has(> .desktop) {
  display: none !important;
}

@media (width >=900px) {
  div.section:has(> .mobile) {
    display: none !important;
  }

  div.section:has(> .desktop) {
    display: flex !important;
  }

  main>.section {
    align-items: flex-start;
    margin: var(--padding-m) 0;
  }

  main>.section:first-child {
    /* NA     */
  }

  main>.section.float-image {
    .default-content-wrapper {
      display: block;

      p {
        text-align: justify;
      }

      p:has(picture) {
        margin: 0 0 1em 1em;
        display: inline;
        width: 30%;
        float: right;

        img {
          float: right;
          margin: 0 0 50px 50px;
        }
      }
    }
  }

  main>.section>div {
    /* margin: 0 auto; */
    width: unset;
  }
}

/* section metadata */
main .section.light,
main .section.highlight {
  background-color: var(--light-color);
  margin: 0;
  padding: 40px 0;

  &.blue {
    background-color: var(--brand-light-blue);
  }
}

main .section.centered {
  >div {
    >* {
      text-align: center;
      justify-content: center;

      &::after {
        display: none !important;
      }
    }
  }
}