@font-face {
  font-family: 'Gill Sans MT';
  src: url('../fonts/GillSansMT.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* default styles */

.visually-hidden {
  @include element-invisible();
}
.flexbox {
  @include flexbox();
}
a.tabledrag-handle .handle {
  box-sizing: content-box;
}
.hidden,
[hidden="hidden"] {
  display: none !important;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  &:focus {
    outline: none;
  }
}

html {
  font-size: 10px;
  height: 100%;
}

body {
  font-family: var(--font-primary);
  font-weight: normal;
  font-size: 1.6rem;
  line-height: 1.4;
  height: 100%;
  padding: 0;
  background-color: var(--color3);
  color: var(--color1);
  &.tabfocus {
    *:focus {
      outline: 2px solid var(--color-tabfocus) !important;
    }
    input[type="checkbox"],
    input[type="radio"] {
      &:focus {
        & + label {
          outline: 2px solid var(--color-tabfocus) !important;
        }
      }
    }
  }
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 1em;
  margin-bottom: 1rem;
  a {
    @extend %underline-anim-1;
  }
}
h1 {
  font-size: clamp(3.4rem, 3vw, 4rem);
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 3rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
h2 {
  font-weight: bold;
  font-size: 3.4rem;
}
h3 {
  font-weight: 600;
  font-size: 3rem;
}
h4 {
  font-weight: normal;
  font-size: 2.8rem;
}
h5 {
  font-weight: 600;
  font-size: 2.2rem;
}
h6 {
  font-weight: 600;
  font-size: 2rem;
}
a, a:visited {
  text-decoration: underline;
  color: var(--color-link);
}
p {
  margin: 1.5rem 0;
  a {
    @extend %link-hover-bg;
    word-break: break-word;
  }
}
blockquote {
  padding: 2rem;
  margin: 1.5rem 0;
  border-left: 5px solid var(--color1);
  background-color: var(--color3);
}

img,
video {
  max-width: 100%;
  height: auto;
}
iframe {
  max-width: 100%;
}

ul, ol {
  padding-left: 3rem;
  margin-left: 3rem;
  display: table;
  li {
    & + li {
      padding-top: 0.3rem;
    }
    ul, ol {
      margin-top: 0.3rem;
      margin-left: 0;
    }
    &::marker {
      color: currentColor;
    }
  }
}

.btn {
  display: inline-block;
  padding: 1.8rem 3rem;
  text-align: center;
  text-decoration: none;
  border-radius: 9999px;
  font-size: 1.6rem;
  font-weight: bold;
  line-height: 1em;
  box-shadow: none;
  text-shadow: none;
  transition: background-color 0.5s;
  &:hover {
    cursor: pointer;
    text-decoration: none;
  }
  &[disabled] {
    background-color: var(--btn-disabled-bg);
    color: var(--btn-disabled-color);
    pointer-events: none;
    &:hover {
      background-color: var(--btn-disabled-bg);
      color: var(--btn-disabled-color);
    }
  }
}
.btn-primary {
  @extend .btn;
  color: #fff;
  border: none;
  background: var(--btn-primary-bg);
  &:visited {
    color: #fff;
  }
  &:hover {
    background-color: var(--btn-primary-hover-bg);
  }
}
.btn-secondary {
  @extend .btn;
  background: none;
  color: var(--btn-secondary-color);
  border: 1px solid currentColor;
  &:visited {
    color: var(--btn-secondary-color);
  }
  &:hover {
    background-color: var(--btn-secondary-hover-bg);
  }
}
.btn-small {
  padding: 1.5rem 2rem;
  font-size: 1.4rem;
}
.btn-action {
  @extend .btn-primary;
  border-radius: 1.2rem;
  padding: 1rem 2rem;
  font-size: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}


input[type="submit"],
.form-submit {
  @extend .btn-primary;
}
button,
.button,
input[type="submit"] {
  @extend .btn-primary;
  &:hover {
    cursor: pointer;
    text-decoration: none;
  }
}

.close-x {
  position: relative;
  text-indent: -300vw;
  width: 4rem;
  height: 4rem;
  display: inline-block;
  padding: 0;
  margin: 0;
  box-shadow: none;
  border: none;
  background: none;
  overflow: hidden;
  z-index: 1;
  &:before,
  &:after {
    content: "";
    width: 36px;
    height: 3px;
    background: #000;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -1px 0 0 -18px;
    transition: transform 0.5s;
  }
  &:before {
    transform: rotate(45deg);
  }
  &:after {
    transform: rotate(-45deg);
  }
  &:hover {
    cursor: pointer;
    &:before {
      transform: rotate(225deg);
    }
    &:after {
      transform: rotate(135deg);
    }
  }
}

.messages {
  margin: 1em 0;
  padding: 2rem 5rem 2rem 2rem;
  color: #fff;
  background-color: var(--color-status);
  border: none;
  border-radius: $radius;
  position: relative;
  box-shadow: none;
  .msg-close {
    @extend .close-x;
    position: absolute;
    right: 2rem;
    top: 2rem;
    width: 3rem;
    height: 3rem;
    color: currentColor;
    display: none;
    &:before,
    &:after {
      width: 2rem;
      height: 2px;
      margin-left: -1rem;
      background-color: currentColor;
    }
    span {
      @extend .visually-hidden;
    }
  }
}
.messages--warning {
  color: #fff;
  background-color: var(--color-warning);
}
.messages--error {
  color: #fff;
  background-color: var(--color-error);
}

.tabs {
  &.primary {
    li {
      a {
        @extend .btn-secondary;
        @extend .btn-small;
        &.is-active {
          @extend .btn-primary;
          @extend .btn-small;
        }
      }
    }
  }
}

.table-wrap {
  display: inline-block;
  width: 100%;
  max-width: 100%;
  overflow: auto;
  overflow-y: visible;
}

table {
  border-collapse: collapse;
  tr {
    td, th {
      padding: 1rem;
      text-align: left;
    }
  }
  thead {
    td, th {
      background-color: var(--color2);
      color: #fff;
      a {
        color: currentColor;
        &:hover {
          background: none;
        }
      }
    }
  }
  tbody {
    tr {
      td {
        background-color: #fff;
        border: none;
        border-bottom: 2px solid var(--color1);
        a {
          @extend %link-hover-bg;
        }
      }
    }
  }
}

.form-input {
  color: var(--color1);
  background-color: #fff;
  font-weight: normal;
  font-family: var(--font-primary);
  font-size: 1.4rem;
  padding: 0.8rem 1.2rem;
  height: 4rem;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: $radius;
  &::placeholder {
    color: var(--color2);
    opacity: 1;
  }
  &:disabled,
  &[readonly] {
    background-color: var(--color3);
    cursor: not-allowed;
  }
  &:focus {
    background-color: #fff;
    border-color: var(--color2);
    box-shadow: 0 0 0 3px rgba(102,107,112,0.15);
  }
}
.form-input-error {
  border-color: var(--color-error);
}

legend.form-required::after {
  display: none;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0 0 3.2rem;
  min-width: 0;
  @extend %card-surface;

  legend {
    float: left;
    width: 100%;
    padding: 3.2rem 3.2rem 0;
    margin-bottom: 0;

    & + * {
      clear: left;
    }

    .form-required,
    abbr.form-required {
      display: none;
    }

    .fieldset-legend,
    .fieldset__legend {
      display: block;
      font-size: 1.4rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.15em;
      color: var(--color1);
      padding-bottom: 0;
      margin-bottom: 0;
    }
  }

  .fieldset-wrapper,
  .fieldset__wrapper {
    padding: 2.4rem 3.2rem 3.2rem;

    > .form-item:last-child {
      margin-bottom: 0;
    }
  }
}

.form-item {
  margin-bottom: 2.4rem;
}

.form-actions {
  margin-top: 2.4rem;
}

input[type="checkbox"],
input[type="radio"] {
  opacity: 0;
  float: left;
  width: 1.6rem;
  height: 1.6rem;
  & ~ label {
    position: relative;
    display: block;
    padding-left: 3rem;
    opacity: 1;
    &:before {
      content: "";
      position: absolute;
      top: 0.15em;
      left: 0;
      display: inline-block;
      width: 1.8rem;
      height: 1.8rem;
      background: #fff;
      border: 2px solid var(--border-color);
      border-radius: 4px;
    }
    &:hover {
      cursor: pointer;
    }
  }
  &:checked {
    & ~ label {
      &:before {
        background-color: var(--btn-primary-bg);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center center;
        background-size: 70%;
        border-color: var(--btn-primary-bg);
      }
    }
  }
  &.error {
    & ~ label {
      &:before {
        @extend .form-input-error;
      }
    }
  }
}
input[type="radio"] {
  & ~ label {
    &:before {
      margin-left: 2px;
      margin-top: 2px;
      width: 1.2rem;
      height: 1.2rem;
      background-color: #fff;
      border-color: #fff;
      border-radius: 100%;
      outline: 2px solid var(--color1);
    }
  }
  &:checked {
    & ~ label {
      &:before {
        background-image: none;
        border-color: #fff;
        background-color: var(--color2);
        outline-color: var(--color2);
      }
    }
  }
}
.form-type-select-tagify {
  select.tagify-select-widget {
    height: 0;
  }
}
form {
  a {
    @extend %link-hover-bg;
  }
  .form-text,
  .form-number,
  .form-select,
  .form-email,
  .form-tel,
  .form-date,
  .form-time,
  textarea {
    @extend .form-input;
    &.error {
      @extend .form-input-error;
    }
  }
  textarea {
    height: auto;
    padding: 1.5rem;
  }
  label {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    display: block;
  }
  .description,
  .form-item--description {
    font-size: 1.4rem;
    color: var(--color2);
    margin-top: 0.8rem;
  }
  label.form-required {
    color: inherit;
    abbr,
    &::after {
      color: var(--btn-primary-bg);
    }
  }
  abbr[title] {
    text-decoration: none;
  }
}

ul[class*="pager"] {
  @extend .flexbox;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 1rem 8rem;
  margin: 1em 0;
  line-height: 1;
  font-size: 1.6rem;
  color: #000;
  position: relative;
  li {
    padding: 0;
    margin: 0;
    display: inline-block;
    height: 4rem;
    line-height: 4rem;
    &[class*="active"],
    a {
      display: inline-block;
      height: 4rem;
      width: 4rem;
      color: #fff;
      line-height: 4rem;
      text-align: center;
      padding: 0;
      margin: 0 0.5rem;
      background-color: var(--color2);
      border-radius: 100%;
      text-decoration: none;
      &:hover {
        text-decoration: none;
        color: #fff;
        background-color: var(--color1);
      }
    }
    &[class*="active"] {
      color: #fff;
      background-color: var(--color1);
      a {
        margin: 0;
        color: #fff;
        background-color: var(--color1);
      }
    }
    &[class*="first"],
    &[class*="previous"],
    &[class*="next"],
    &[class*="last"] {
      position: relative;
      width: 4rem;
      margin: 1rem 0;
      text-indent: -200vw;
      a {
        float: left;
        width: 4rem;
        height: 4rem;
        position: relative;
        margin: 0;
        display: inline-block;
        &:before,
        &:after {
          content: "";
          position: absolute;
          top: 50%;
          left: 50%;
          width: 1rem;
          height: 1rem;
          margin-top: -0.7rem;
          border: 3px solid currentColor;
          transform: rotate(45deg);
        }
        &:hover {
          &:before,
          &:after {

          }
        }
      }
    }
    &[class*="first"],
    &[class*="previous"] {
      a {
        &:before,
        &:after {
          border-top: 0;
          border-right: 0;
        }
      }
    }
    &[class*="next"],
    &[class*="last"] {
      a {
        &:before,
        &:after {
          border-bottom: 0;
          border-left: 0;
        }
      }
    }
    &[class*="previous"],
    &[class*="next"] {
      a {
        &:after {
          display: none;
        }
      }
    }
    &[class*="previous"] {
      margin-right: 2rem;
      margin-left: 1rem;
      a {
        &:before {
          margin-left: -0.4rem;
        }
      }
    }
    &[class*="next"] {
      margin-left: 2rem;
      margin-right: 1rem;
      a {
        &:before {
          margin-left: -0.8rem;
        }
      }
    }
    &[class*="first"] {
      a {
        &:before {
          margin-left: -1rem;
        }
        &:after {
          margin-left: 0;
        }
      }
    }
    &[class*="last"] {
      a {
        &:before {
          margin-left: -1.2rem;
        }
        &:after {
          margin-left: -0.2rem;
        }
      }
    }
  }
}

.media--type-image {
  margin-bottom: 1em;
  .field--type-image {
    display: inline-block;
    line-height: 0;
    border: 2rem solid #fff;
    border-radius: $radius;
    box-shadow: 0 0 8px rgba(25,42,86,0.6);
    a {
      display: inline-block;
    }
  }
}
.media--type-video {
  .field--type-file {
    display: inline-block;
    line-height: 0;
    border: 2rem solid #fff;
    border-radius: $radius;
    box-shadow: 0 0 8px rgba(25,42,86,0.6);
  }
}
figure.caption {
  .media {
    margin-bottom: 0;
  }
  figcaption {
    font-size: 1.6rem;
    font-weight: 600;
  }
}
.grid-media-img {
  height: 100%;
  .field--type-image {
    @extend .flexbox;
    align-items: center;
    height: 100%;
  }
}


ul.menu,
ul.links {
  li {
    list-style: none;
  }
}
ul.links {
  margin: 0;
  li {
    padding: 0;
    margin-right: 1rem;
  }
}

.footer-macroweb-block {
  display: inline-block;
  text-align: left;
  line-height: 0;
  @extend %float-shadow;
  a {
    display: inline-block;
    width: 16rem;
    height: 3rem;
    text-indent: -500vw;
    overflow: hidden;
    background: url('../images/macroweb.svg') no-repeat center center;
    background-size: 100% auto;
    opacity: 0.5;
  }
}

div#sliding-popup {
  background: var(--color2);
  .popup-content {
    @extend .flexbox;
    -webkit-justify-content: space-between;
    -webkit-align-items: center;
    justify-content: space-between;
    align-items: center;
    position: static;
    max-width: 100%;
    padding: 1rem;
    #popup-text,
    #popup-buttons {
      max-width: none;
      margin: 0;
      padding: 1rem;
      color: #fff;
    }
    #popup-text {
      * {
        font-weight: normal;
        font-size: 1.8rem;
        color: #fff;
      }
    }
    #popup-buttons {
      @extend .flexbox;
      button {
        @extend .btn-small;
        white-space: nowrap;
        margin: 0 0.5rem;
        &:last-child {
          margin-right: 0;
        }
      }
    }
  }
}
