:root {
  --clr-offwhite-dark: #f9f9fa;
  interpolate-size: allow-keywords;
}

@font-face {
  font-display: swap;
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/roboto-v48-latin-regular.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/roboto-v48-latin-500.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/roboto-v48-latin-600.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/roboto-v48-latin-700.woff2') format('woff2');
}

body {
  animation-duration: .75s;
  animation-fill-mode: both;
  animation-name: fadeIn;
  transition-timing-function: ease-in;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
    display: block;
  }
}

.fadeIn {
  opacity: 0;
}

p {
  text-wrap: pretty;
}

a.link {
  border-radius: 4px;
  color: var(--clr-aubergine);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: all .25s ease-in-out;

  &:is(:hover, :active) {
    text-decoration-color: var(--clr-aubergine);
  }

  &:is(:not(:active):focus-visible) {
    outline: 2px solid var(--clr-aubergine);
    outline-offset: max(3px,.08em);
    text-decoration: none;
  }
}

a.link-teal {
  color: var(--clr-steelx2);

  &:is(:hover, :active) {
    text-decoration-color: var(--clr-steelx2);
  }
}

a.link-light {
  color: var(--clr-light);

  &:is(:hover, :active) {
    text-decoration-color: var(--clr-light);
  }

  &:is(:not(:active):focus-visible) {
    outline: 2px solid var(--clr-light);
  }
}

:is(header .logo, .fr-link a):focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--clr-aubergine);
  outline-offset: max(3px,.08em);
  transition: all .25s ease-in-out;
}

.header {
  background-color: var(--clr-light);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.07);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 4;

  .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
    padding-inline: clamp(20px, 3vw, 48px);

    @media only screen and (max-width: 767px) {
      height: 60px;
    }
  }

  .logo {
    display: flex;
    align-items: center;

    img {
      height: 70px;
      width: auto;

      @media only screen and (max-width: 767px) {
        height: 44px;
      }
    }
  }

  .toggle-container {
    display: flex; 
    align-items: center; 
    gap: 18px;
  }

  @media only screen and (max-width: 830px) {
    .learner-employer-container {
      background-color: var(--clr-light);
      box-shadow: inset -2px 10px 8px -8px rgba(0, 0, 0, 0.07);
      opacity: 0;
      position: fixed;
      left: 0;
      top: 90px;
      visibility: hidden;
      transition: all .25s ease-in-out;
      width: 100%;
    }
  }

  @media only screen and (max-width: 767px) {
    .learner-employer-container {
      top: 60px;
    }
  }

  .btn-container {
    display: flex; 
    gap: 12px;

    @media only screen and (max-width: 830px) {
      display: flex;
      justify-content: center;
      align-items: center;
      padding-block: 16px;
      padding-inline: clamp(20px, 3vw, 56px);
    }

    @media only screen and (max-width: 460px) {
      &:lang(fr) {
        flex-wrap: wrap;
      }
    }

    @media only screen and (max-width: 370px) {
      flex-wrap: wrap;
    }

    .mat-flat-button.mat-accent,
    .mat-flat-button.mat-light {
      border-radius: 6px;
      font-size: 15px;
      font-weight: 600;
      line-height: 24px;
      min-height: 52px;
      min-width: 180px;
      padding: 14px 24px;
      text-align: center;
      white-space: nowrap;

      @media only screen and (max-width: 830px) { 
        font-size: 14px;
        min-width: auto;
        width: 100%;
      }
    }

    .mat-flat-button.mat-light {
      background-color: var(--clr-gray-200);
      color: var(--clr-aubergine);

      &:hover {
        background-color: var(--clr-gray-300);
        color: var(--clr-aubergine);
      }
    }

    .mat-flat-button.mat-accent,
    .mat-flat-button.active {
      background-color: var(--clr-steelx2);
      color: var(--clr-light);

      &:hover {
        background-color: #35575F;
        color: var(--clr-light);
      }
    }
  }

  .global-icon {
    color: var(--clr-aubergine);
    height: 18px;
    position: relative;

    @media only screen and (max-width: 767px) {
      top: -.05em;
    }

    svg {
      vertical-align: initial;
    }
  }

  .fr-link a {
    color: var(--clr-aubergine);
    font-size: clamp(19px, 3vw, 24px);
    font-weight: 700;
    letter-spacing: .08em;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-transform: uppercase;
    text-underline-offset: 5px;
    transition: all .25s ease-in-out;

    &:is(:hover, :active) {
      text-decoration-color: var(--clr-aubergine);
    }

    &:is(:not(:active):focus-visible) {
      text-decoration: none;
    }
  }
}

.header .search-input-container {
  opacity: 0;
  visibility: hidden;
  transition: all .25s ease-in-out;
  width: 100%;

  @media only screen and (max-width: 1199px) {
    background-color: var(--clr-light);
    box-shadow: inset -2px 10px 8px -8px rgba(0, 0, 0, 0.07);
    position: fixed;
    left: 0;
    top: 90px;
    z-index: 1;
  }

  @media only screen and (max-width: 830px) {
    box-shadow: none;
    top: 158px;
  }

  @media only screen and (max-width: 767px) {
    top: 128px;
  }

  @media only screen and (max-width: 460px) {
    &:lang(fr) {
      top: 192px;
    }
  }

  @media only screen and (max-width: 370px) {
    top: 192px;
  }

  form {
    padding-inline: clamp(20px, 3vw, 56px);
    position: relative;

    @media only screen and (max-width: 1199px) {
      padding-block: 14px;
    }
  }

  .search {
    position: relative;

    svg {
      position: absolute;
      left: 16px;
      top: 18px;

      @media only screen and (max-width: 767px) {
        left: 14px;
        height: 20px;
        width: 20px;
      }
    }
  }
  
  input[type="search"] {
    border: 1px solid var(--clr-aubergine25);
    border-radius: 6px;
    box-shadow: 0 0 0 1px transparent;
    color: var(--clr-aubergine);
    display: block;
    font-size: 18px;
    line-height: normal;
    min-height: 60px;
    outline: none;
    padding-block: 12px;
    padding-inline: 52px 14px;
    transition: background-color ease-in-out .25s, border-color ease-in-out .25s;
    width: 100%;
  }

  input[type="search"]::placeholder {
    color: var(--clr-aubergine50);
    opacity: 1;
    transition: color .25s ease-in-out;
  }

  input[type="search"]:focus {
    border-color: var(--clr-aubergine);
    box-shadow: 0 0 0 1px var(--clr-aubergine);
  }

  input[type="search"]:focus::placeholder {
    color: var(--clr-aubergine25);
  }

  @media only screen and (max-width: 767px) {
    input[type="search"] {
      font-size: 15px;
      min-height: 54px;
      padding-inline: 44px 14px;
    }
  }
}

.header.show .search-input-container,
.header.show .learner-employer-container {
  opacity: 1;
  visibility: visible;
}

.header.hide .search-input-container {
  opacity: 0;
  visibility: hidden;
}

@media only screen and (max-width: 1199px) {
  .header.mobile-hide .search-input-container,
  .header.mobile-hide .learner-employer-container {
    opacity: 0;
    visibility: hidden;
  }
}

@media only screen and (max-width: 767px) {
  .header.hide .learner-employer-container,
  .header.mobile-hide .learner-employer-container {
    opacity: 0;
    visibility: hidden;
  }
}

.header.header-static {
  position: relative;
  z-index: 2;

  @media only screen and (max-width: 830px) {
    &.show {
      z-index: 4;
    }

    .learner-employer-container {
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.07);
      min-height: 90px;
      top: 0;
    }
  }

  @media only screen and (max-width: 767px) {
    .learner-employer-container {
      min-height: auto;
    }
  }
}

.header.header-z-index {
  z-index: 3;
}

/* Landing page */

.hero-landingpage-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-block: 90px 32px;
  padding-inline-start: clamp(24px, 6vw, 200px);

  @media only screen and (max-width: 1399px) {
    padding-inline-start: clamp(24px, 4vw, 200px);
    padding-inline-end: clamp(24px, 3vw, 48px);
  }

  @media only screen and (max-width: 1199px) {
    grid-template-columns: 1fr;
    gap: 0;
  }

  @media only screen and (max-width: 767px) {
    margin-block: 60px 48px;
  }

  .left-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-block-start: clamp(48px, 4vw, 120px);
    padding-block-end: 32px;

    @media only screen and (max-width: 767px) {
      padding-block-end: 24px;
    }

    h1, h2 {
      line-height: normal;
      text-wrap: balance;
    }

    h1 {
      font-size: clamp(44px, 6vw, 56px);
    }

    h2 {
      color: #35575F;
      font-size: clamp(26px, 4vw, 38px);
      line-height: 1.25;
      margin-block-end: 4px;
    }

    p {
      font-size: clamp(16px, 4vw, 18px);
      margin-block-end: 0;
      max-width: 75ch;
    }

    .search-container,
    .industries-link {
      a.link {
        display: inline-block;
        text-wrap: pretty;

        svg {
          position: relative;
          top: -.05em;
        }
      }
    }

    .industries-link {
      margin-block-start: -4px;
    }
  }

  .right-content {
    background-image: url(../images/NationalPortal-Main-Banner.webp);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    height: 82vh;

    @media only screen and (max-width: 1199px) {
      display: none;
    }

    @media only screen and (max-width: 767px) {
      display: block;
      height: 500px;
    }

    @media only screen and (max-width: 499px) {
      height: 400px;
    }

    @media only screen and (max-width: 399px) {
      height: 350px;
    }
  }
}

.hero-employer .search-container {
  margin-block-start: 8px;
}

h4 {
  font-size: 20px;
  line-height: 1.3;
}

.section-subtitle {
  color: var(--clr-steelx2);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-wrap: balance;
}

.section-title {
  color: var(--clr-aubergine);
  display: inline-block;
  font-size: clamp(28px, 4vw, 32px);
  line-height: 1.35;
  text-wrap: balance;
}

.upskills-container,
.benefits-container,
.industries-search-container,
.faq-container,
.contact-container  {
  padding-inline: clamp(24px, 12vw, 220px);

  @media only screen and (max-width: 1599px) {
    padding-inline: clamp(24px, 5vw, 220px);
  }
}

.upskills-container {
  background-color: var(--clr-offwhite-dark);
  display: grid;
  gap: clamp(44px, 5vw, 64px);
  padding-block-start: clamp(48px, 8vw, 72px);
  padding-block-end: clamp(56px, 12vw, 88px);

  @media only screen and (max-width: 1699px) {
    padding-inline: clamp(24px, 8vw, 220px);
  }

  .upskills-top,
  .upskills-bottom {
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    align-items: center;
    gap: clamp(48px, 4vw, 64px);

    @media only screen and (max-width: 1099px) {
      grid-template-columns: 1fr;
    }

    img {
      height: auto;
      max-width: fit-content;
      width: 100%;

      @media only screen and (max-width: 599px) {
        max-width: 100%;
      }
    }
  }

  .upskills-bottom {
    @media only screen and (max-width: 1099px) {
      display: flex;
      flex-direction: column-reverse;
    }
  }

  .content-container {
    display: flex;
    flex-direction: column;
    gap: 24px;

    h2 {
      color: var(--clr-aubergine);
      font-size: clamp(26px, 4vw, 38px);
      line-height: 1.35;
      text-wrap: balance;
    }

    .subtitle {
      font-size: 20px;
      margin-block-end: 4px;
    }

    p {
      margin-block-end: 0;
    }
  }
}

.benefits-container {
  background-color: var(--clr-light);
  display: grid;
  gap: 16px;
  padding-block-start: clamp(48px, 8vw, 72px);
  padding-block-end: clamp(48px, 12vw, 88px);
  text-align: center;

  .three-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 48px;
    padding-block-start: clamp(32px, 4vw, 56px);

    @media only screen and (max-width: 991px) {
      grid-template-columns: 1fr;
    }
  }

  .benefit {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    text-align: left;

    h4, p {
      margin-block-end: 0;
      max-width: clamp(100%, 32vw, 48ch);
      padding-inline-start: 16px;
    }
  }
}

.industries-search-container {
  background-color: var(--clr-offwhite-dark);
  padding-block-start: clamp(44px, 8vw, 64px);
  padding-block-end: clamp(64px, 12vw, 88px);
  scroll-margin-block-start: 80px;
  text-align: center;

  @media only screen and (max-width: 1199px) {
    scroll-margin-block-start: 140px;
  }

  @media only screen and (max-width: 830px) {
    scroll-margin-block-start: 200px;
  }

  .sub-title {
    margin-block: clamp(16px, 4vw, 24px) clamp(32px, 6vw, 56px);
  }

  .industries-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 1fr;
    gap: 32px;

    @media only screen and (max-width: 1199px) {
      grid-template-columns: repeat(3, 1fr);
    }

    @media only screen and (max-width: 991px) {
      grid-template-columns: repeat(2, 1fr);
    }

    @media only screen and (max-width: 650px) {
      grid-template-columns: 1fr;
      grid-auto-rows: auto;
    }
  }

  .industry-container {
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--clr-gray-400);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    text-decoration: none;
    transition: all .25s ease-in-out;

    &:hover {
      border: 1px solid var(--clr-aubergine);
      box-shadow: 0 0 0 1px var(--clr-aubergine), 0 4px 8px rgba(0, 0, 0, 0.07);
    }

    &:focus-visible {
      outline: 2px solid var(--clr-aubergine);
      outline-offset: max(3px,.08em);
    }
  }

  .title-img-container {
    display: grid;
    grid-template-columns: clamp(250px, 12vw, 300px) 1fr;
    flex: 1;

    @media only screen and (max-width: 1199px) {
      display: flex;
      flex-direction: column;
      padding-block-end: 4px;
    }

    .bg-image {
      aspect-ratio: 16 / 9;
      background-position: center;
      background-size: cover;
      border-radius: 6px 0 0 6px;
      width: 100%;

      @media only screen and (max-width: 1199px) {
        border-radius: 6px 6px 0 0;
        max-height: 42vw;
      }
    }
  }

  .img-container {
    display: flex;
    width: 100%;
  }

  .content-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
    gap: 24px;
    padding: 24px 24px 32px;
  }

  .title {
    color: var(--clr-aubergine);
    font-size: clamp(20px, 4vw, 22px);
    font-weight: 600;
    line-height: normal;
    padding-inline: 16px;
    text-wrap: balance;
  }

  .mat-flat-button {
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    line-height: normal;
    min-width: 200px;

    svg {
      margin-inline-end: -8px;
      position: relative;
      top: -.02em;
    }
  }
}

.faq-container {
  background-color: var(--clr-light);
  display: grid;
  gap: clamp(44px, 8vw, 48px);
  padding-block: clamp(44px, 8vw, 64px);
  text-align: center;

  .faqs {
    display: grid;
    gap: 16px;
  }

  details {
    background-color: var(--clr-light);
    border: 1px solid var(--clr-aubergine25);
    border-radius: 8px;
    box-shadow: 0 0 0 2px transparent;
    text-align: left;
    transition: all .25s ease-in-out;
    
    &:is(:hover, :focus-within) {
      border-color: transparent;
      box-shadow: 0 0 0 2px var(--clr-aubergine);
    }
  }

  details[open] {
    box-shadow: 0 0 0 2px transparent;

    &:is(:hover, :focus-within) {
      background-color: var(--clr-light);
      border-color: transparent;
      box-shadow: 0 0 0 2px var(--clr-aubergine);
    }
  }

  details::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size .3s ease-in-out, content-visibility .3s ease-in-out;
    transition-behavior: allow-discrete;
  }

  details[open]::details-content {
    block-size: auto;
  }

  summary {
    color: var(--clr-aubergine);
    cursor: pointer;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-size: clamp(19px, 4vw, 20px);
    font-weight: 700;
    line-height: 1.45;
    list-style: none;
    outline: transparent;
    padding-block: clamp(20px, 4vw, 24px);
    padding-inline: clamp(20px, 4vw, 24px) 60px;
    position: relative;
    text-wrap: pretty;
    transition: color .25s ease-in-out;

    &::after {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(30, 26, 52)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
      background-position: right center;
      background-size: clamp(22px, 4vw, 24px) auto;
      background-repeat: no-repeat;
      content: "";
      display: block;
      height: clamp(22px, 4vw, 24px);
      position: absolute;
      right: clamp(14px, 3vw, 18px);
      transform: rotate(-90deg);
      transition: transform .25s ease-in-out;
      width: clamp(22px, 4vw, 24px);
    }
  }

  details[open] > summary:after {
    transform: rotate(0);
  }

  .details-content {
    display: grid;
    padding-block: 0 24px;
    padding-inline: 24px;

    p {
      margin-block-end: 0;
      padding-block-end: 12px;

      &:last-child {
        padding-block-end: 0;
      }
    }

    strong {
      color: var(--clr-aubergine);
    }

    ul {
      display: grid;
      gap: 8px;
      line-height: 1.55;
      margin: 8px 0 16px;
      padding-inline-start: 18px;
    }
  }

  .email-txt {
    font-size: 18px;

    span {
      margin-inline-end: .5ch;
    }
  }
}

.contact-container {
  background-color: var(--clr-tangerine);
  display: flex;
  justify-content: center;
  align-items: center;
  padding-block: clamp(48px, 8vw, 64px);
  text-align: left;

  p {
    color: var(--clr-aubergine);
    font-size: clamp(20px, 3vw, 24px);
    margin-block-end: 0;
    max-width: 90ch;
  }
}

footer {
  background-color: var(--clr-aubergine);
  color: var(--clr-light);
	padding-block: 40px;

  .logo-container,
  .bottom-content {
    font-size: 15px;
    padding-inline: clamp(24px, 5vw, 64px);
    text-wrap: pretty;
  }
  
  .logo-container {
    justify-content: space-between;

    .left-col {
      gap: 64px;

      @media only screen and (max-width: 991px) {
        gap: 24px;
      }

      p {
        margin-block-end: 0;
      }

      .logo img {
        height: auto;
        padding-block-start: 16px;
      }
    }
  }

  .logo-container,
  .left-col {
    display: flex;
    align-items: center;

    @media only screen and (max-width: 991px) {
      align-items: flex-start;
      flex-direction: column;
    }
  }

  .divider {
    background-color: var(--clr-aubergine75);
    display: block;
    height: 1px;
    margin-block: 40px;
    width: 100%;
  }
  
  .bottom-content {
    color: var(--clr-light);
    display: flex;
    justify-content: space-between;
    gap: 24px;
    text-wrap: balance;

    @media only screen and (max-width: 991px) {
      flex-direction: column-reverse;
    }

    .copyright, a {
      font-size: 14px;
      font-weight: 400;
    }
  }
}

/* MC Search */

.entry-title-container {
  background-color: var(--clr-tangerine);
  margin-block-start: 90px;
  padding: 72px 24px;
  text-align: center;

  @media only screen and (max-width: 767px) {
    margin-block-start: 60px;
    padding: 56px 24px;
  }

  h1.entry-title {
    color: var(--clr-aubergine);
    font-weight: 600;
    font-style: normal;
    font-size: clamp(38px, 6vw, 48px);
    line-height: normal;
    margin: 0 0 4px;
    text-wrap: balance;
  }
}

.ol-item-search-container {
  margin: 0 auto;
  max-width: 1080px;
  padding-block: 64px 96px;

  @media only screen and (max-width: 1250px) {
    padding-inline: clamp(24px, 6vw, 48px);
  }

  @media only screen and (max-width: 991px) {
    padding-block: 48px 80px;
  }
}

/* Error Pages */

.error-container {
  margin: 0 auto;
  max-width: 1080px;
  padding-block: clamp(24px, 4vw, 64px);
  padding-inline: clamp(24px, 4vw, 64px);

  h1 {
    font-size: 68px;
    line-height: 1.35;
    margin-block-end: 8px;
  }

  h2 {
    font-size: 30px;
    line-height: 1.35;
    margin-block-end: 16px;
    text-wrap: balance;
  }

  .back-btn {
    line-height: 1.25;
    margin-block: 32px;
    padding: 20px 36px;

    @media only screen and (max-width: 499px) {
      width: 100%;
    }
  }
}