html {
  height: 100%;
}

#scroll-to-top {
  border-color: transparent;
  border-radius: 100%;
  bottom: 4vw;
  box-shadow: rgba(0, 0, 0, 0.1) 0 0 0.2vw;
  height: 5vw;
  padding: 0;
  position: fixed;
  right: 4vw;
  text-align: center;
  transform: rotate(180deg);
  transition: opacity 0.3s ease-out;
  z-index: 900;
  width: 5vw;

  &.hidden {
    opacity: 0;
    pointer-events: none;
  }

  [class^=icon] {
    margin: 0;
  }
}

.sr-only:not(:focus):not(:active) {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

header {
  position: fixed;
  width: 100%;
  left: 0; top: 0;
  z-index: 99;
  font-weight: bold;
  padding: 2vw 0;
  transition: 0.3s;
}

body.page:not(.page-banner) header {
  background-color: #009DE0;
}

header.fixed {
  background-color: #009DE0;
  padding: 0.7vw 0;
}

.logo {
  align-items: center;
  color: #fff;
  display: flex;
  float: left;
  font-family: var(--font-family-brand);
  font-size: 2.2vw;
  letter-spacing: -0.05vw;
  text-shadow: 0 0 1px black;

  .dot {
    letter-spacing: -0.15vw;
  }
}

.logo img {
  height: 3.2vw;
  margin-right: 1vw;
  width: auto;
}

header .logo {
  transition: 0.3s;
}

header.fixed .logo {
  font-size: 2.2vw;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}


#scroll-progress {
  position: fixed;
  top: 0;
  width: 0%;
  height: 0.35vw;
  background: var(--colour-primary);
  z-index: 10000;
}

@media screen and (max-width: calc(1200px - 1px)) {
  #scroll-progress {
    height: 4.2px;
  }
}

.content {
  flex-grow: 1;
}

[data-cart="item-count"]:empty {
  display: none;
}

.menucontrols {
  float: right;
  position: relative;
  text-shadow: 0 0 1px black;

  button {
    background: transparent;
    cursor: pointer;
    color: var(--colour-background);
    float: left;
    font-size: 2.5vw;
    transition: 0.3s background-color;
    width: 4vw; height: 4vw;
  }

  [data-cart="item-count"] {
    background: var(--colour-background);
    border-radius: 100%;
    bottom: -10px;
    color: var(--colour-foreground);
    font-size: 13px;
    height: 20px;
    line-height: 20px;
    position: absolute;
    text-align: center;
    right: -10px;
    width: 20px;
  }

  header:not(.fixed) & a {
    color: var(--colour-background);
  }
}

a.hidemenu {
  position: fixed;
  right: 1vw; top: 1vw;
  width: 2vw; height: 2vw;
  color: var(--colour-foreground);
  font-size: 2.2vw;
  transition:1.6s;
  -webkit-transition:1.6s;
  opacity: 0;
  visibility: hidden;
}

nav {
  background: #fff;
  box-shadow: 0 0 40px rgba(0,0,0,0.25);
  position: fixed;
  height: 100%;
  overflow-y: auto;
  opacity: 0;
  padding: 5vw 5vw 5vw 5vw;
  right: -30vw; top: 0;
  transition:0.6s;
  -webkit-transition:0.6s;
  width: 25vw;
  z-index: 99;

  &.active {
    right: 0;
  }

  ul {
    list-style: none;

    li {
      font-size: 1.2vw;
      margin-bottom: 2vw;
      padding-left: 0;

      a {
        color: var(--colour-foreground);
        border-bottom: 1px solid rgba(0,0,0,0);
        transition:0.6s; -webkit-transition:0.6s;
      }
    }
  }
}

.cart-link a {
  position: relative;
}

.cart-empty {
  .cart-button,
  .cart-link {
    display: none !important;
  }
}

nav ul li a:hover,
nav ul li.active a {
  border-bottom: 1px solid dodgerblue;
  color: dodgerblue;
  text-decoration: none !important;
}

.header-buttons {
  align-items: center;
  color: var(--colour-background);
  display: flex;
  font-size: 1.8vw;
}

.cart-button {
  margin-right: 2vw;
  margin-top: 0.75vw;
  position: relative;
}

.cart-button,
.cart-link {
  [data-cart="item-count"] {
    background: var(--colour-primary);
    border-radius: 100%;
    color: var(--colour-foreground);
    font-size: 1vw;
    height: 1.5vw;
    line-height: 1.5vw;
    position: absolute;
    right: -0.75vw;
    top: -0.75vw;
    text-align: center;
    width: 1.5vw;
  }
}

@media screen and (max-width: calc(1024px - 1px)) {
  .header-buttons {
    font-size: 18px;
  }

  .cart-button {
    margin-right: 20px;
    margin-top: 7.5px;
    position: relative;
  }

  .cart-button,
  .cart-link {
    [data-cart="item-count"] {
      font-size: 10px;
      height: 15px;
      line-height: 15px;
      right: -7.5px;
      top: -7.5px;
      width: 15px;
    }
  }
}

.brands {
  background: #fff;
  padding: 2vw 0;
}

.brands img {
  width: 12%;
  height: auto;
}

.aside {
  padding: 2.5vw;
}

.aside {
  h1, h2, h3, h4, h5, h6 {
    margin-bottom: 3vw;
  }
}

@media screen and (max-width: calc(1200px - 1px)) {
  .aside {
    padding: 15px;
  }
}

details {
  border: 0 solid var(--colour-border);
  display: block;

  &[open] {
    padding-bottom: var(--margin-md);
  }

  &:not(:first-child) {
    border-top-width: 1px;
  }
}

summary {
  display: flex;
  font-weight: bold;
  list-style: none;
  padding: var(--margin-sm);
  transition: background-color 0.2s;

  &:before {
    content: '↓';
    display: inline-block;
    margin-right: 2vw;
  }

  &:hover {
    background-color: var(--colour-background-hover);
  }

  &:active {
    background-color: var(--colour-background-active);
  }

  &:focus {
    &:hover:not(:active) {
      background-color: var(--colour-background-hover);
    }

    background-color: var(--colour-background-active);
    text-decoration: underline;
  }

  @media screen and (max-width: calc(1024px - 1px)) {
    &:before {
      margin-right: 20px;
    }
  }

  [open] & {
    border: 0 solid var(--colour-border);
    border-bottom-width: 1px;
    margin-bottom: var(--margin-md);

    &:before {
      content: '↑';
    }
  }

  .light {
    font-weight: normal;
  }
}

.courses .featured > div {
  align-items: end;
  border: 0 solid var(--colour-border);
  flex-grow: 1;

  &:not(:last-child) {
    border-right-width: 1px;
  }

  & > :first-child {
    flex-grow: 1;
  }
}

@media screen and (max-width: calc(768px - 1px)) {
  .courses .featured > div {
    padding-left: 0;
    border-right-width: 0 !important;
  }
}

.courses dl {
  display: grid;
  grid-template-columns: 2.5vw 1fr;

  dt {
    font-weight: 600;

    i {
      display: inline-block;
    }
  }

  @media screen and (max-width: calc(1024px - 1px)) {
    grid-template-columns: 25px 1fr;
  }
}

.course-list {
  .course {
    position: relative;
    transition: background-color 0.2s;

    a {
      bottom: 0;
      left: 0;
      position: absolute;
      right: 0;
      top: 0;
    }

    &:hover {
      background-color: var(--colour-background-hover);
    }

    &:focus-within {
      &:hover:not(:active) {
        background-color: var(--colour-background-hover);
      }

      background-color: var(--colour-background-active);
    }

    @media screen and (min-width: 1024px) {
      .course-details {
        align-items: center;
        display: grid;
        grid-template-columns: 1fr 20vw 7vw 1vw;
      }
    }
  }
}

.about .text {
  font-size: 125%;
  line-height: 150%;
}

.about .video {
  display: flex;
  justify-content: center;
  margin-top: var(--margin-lg);
  width: 100%;
}

.about .video:not(:last-child) {
  margin-bottom: var(--margin-lg);
}

.about .video video {
  aspect-ratio: 16/9;
  width: 50vw;
  height: auto;
  object-fit: cover;
  object-position: center;
}

.about .image {
  aspect-ratio: 1;
  border-radius: 100%;
  margin-bottom: 3vw;
  margin-left: auto;
  margin-right: auto;
  margin-top: 3vw;
  object-fit: cover;
  object-position: 8%;
  overflow: hidden;
  width: 33vw;
}

.about img {
  filter: contrast(1.1) grayscale(0.1);
  height: 100%;
  transition: 0.6s;
  width: 100%;

  &:hover {
    transform: scale(1.1);
  }
}

.method {
  h1:after {
    display: none;
  }

  .text p {
    line-height: 150%;
  }

  .thumb {
    position: relative;
    overflow: hidden;
  }

  .thumb a {
    bottom: 0;
    display: block;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
  }

  .thumb {
    border-radius: 1vw;
    &:not(.no-shadow) {
      box-shadow: 0 0 2vw rgba(0, 0, 0, 0.1);
    }

    img {
      aspect-ratio: 1.62/1;
      display: block;
      height: auto;
      object-fit: cover;
      object-position: center;
      transition:0.6s; -webkit-transition:0.6s;
      width: 100%;
    }
  }

  .number {
    background-color: var(--colour-primary);
    border-radius: 100%;
    display: inline-block;
    font-weight: bolder;
    text-align: right;
    width: 1.25em;
  }

  &.invert .number,
  .invert & .number {
    color: var(--colour-foreground);
  }

  @media screen and (min-width: calc(768px)) {
    .container {
      align-items: center;
      display: flex;
      justify-content: space-between;
    }

    .text {
      width: 45%;
    }

    .thumb {
      border-radius: 7px;
      width: 45%;
    }
  }
}

.services{
  padding: 6vw 0 6vw 0;
}

.services h2{
  text-align: center;
  font-size: 4.3vw;
  margin-bottom: 1.5vw;
}

.services h4{
  text-align: center;
  font-size: 1.2vw;
  margin-bottom: 4vw;
  font-weight: 500;
  padding:0 15%;
  line-height: 140%;
}

.servicesitemswrap{
  display: flex;
  flex-wrap: wrap;
  justify-content:center;
  margin:0 -30px;
}

.servicesitemswrap .item{
  flex-basis: 33.33%;
  margin-bottom: 5vw;
  padding: 0 30px;
}

.servicesitemswrap .item .itemcontent{
  position: relative;
  float: left;
  width: 100%;
  height: 100%;
  padding: 0;
  text-align: center;
}

.servicesitemswrap .item .itemcontent .thumb{
  float: left;
  filter: saturate(0.2);
  margin-top: 2.5vw;
  overflow: hidden;
  width: 100%;
}

.servicesitemswrap .item .itemcontent .thumb a{
  cursor: zoom-in;
}

.servicesitemswrap .item .itemcontent .thumb img{
  float: left;
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  object-fit: cover;
  object-position: center;
  transition:0.6s; -webkit-transition:0.6s;
}

.servicesitemswrap .item .itemcontent .thumb:hover img{
  transform: scale(1.1);
}

.servicesitemswrap .item .itemcontent h3{
  font-size: 1.5vw;
  margin-bottom: 1vw;
}

.servicesitemswrap .item .itemcontent h3 a{
  color: var(--colour-foreground);
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0);
}

.servicesitemswrap .item .itemcontent h3 a:hover{
  border-bottom: 1px solid rgba(0,0,0,1);
}

.servicesitemswrap .item .itemcontent p{
  color: #555;
  font-size: 1.2vw;
  line-height: 150%;
}

.contact {
  background: var(--colour-primary);
  padding: 6vw 0 6vw 0;

  input[type="text"],
  input[type="email"],
  select {
    float: left;
    width: 30%;
  }
}

.contact h2 {
  text-align: center;
  font-size: 4.3vw;
  margin-bottom: 1vw;
}

.contact h5 {
  text-align: center;
  font-size: 1.3vw;
  margin-bottom: 1vw;
}

.contact h5 a {
  color: var(--colour-foreground);
  border-bottom: 1px solid var(--colour-foreground);
}

.map {
  width: 100%;
}

.map iframe {
  display: block;
  height: 400px;
  width: 100%;
}

footer ul {
  list-style: none;
  margin: 0;

  li {
    padding: 0;
  }
}

footer {
  color: #ccc !important;

  .light {
    color: #999 !important;
  }
}

footer a:hover {
  text-decoration: underline;
}

footer h2 {
  color: #fff;
  font-size: 1.5vw;

  &:after {
    display: none;
  }
}

footer .bottom a {
  color: inherit;
}

footer .social a {
  text-decoration: none;
}

@media screen and (max-width: calc(1024px - 1px)) {
  footer h2 {
    font-size: 15px;
  }
}

footer {
  input[type="text"],
  input[type="email"] {
    background: var(--colour-background-light);
    color: var(--colour-background);
    font-size: 1vw;
    height: auto;
    padding: 1vw;
    margin-bottom: 1.5vw;

    &::placeholder {
      color: var(--colour-background);
    }
  }

  .btn {
    font-size: 1vw;
    padding: 1vw 2vw;
  }
}
