body {
  background-color: #f3f5f8 !important;
}

section {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

section.education-breadcrumbs {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  background-color: #ffffff;
  .container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: baseline;

    * {
      &:last-child {
        font-weight: 600;
        flex-shrink: 0;
        text-transform: capitalize;
      }
    }

    a {
      color: #000036;
      font-weight: 400;
    }
  }

  &.single-resource-breadcrumbs {
    padding-bottom: 0.5rem;
    position: relative;

    .container {
      flex-wrap: nowrap;
      overflow-x: auto;
      padding-bottom: 1rem;
      padding-right: 50px;

      a,
      svg {
        flex-shrink: 0;
      }
    }

    &::after {
      content: "";
      position: absolute;
      height: 100%;
      width: 80px;
      top: 0;
      right: 0;
      background: linear-gradient(to left, #f3f5f8 40%, transparent);
    }
  }
}

section.hub-hero {
  background-color: #000036;
  color: white;
  padding: 32px 1rem;

  &.cat-hero {
    background-color: #0e3ea0;
  }

  @media (min-width: 768px) {
    padding: 56px 1rem;
  }

  .eyebrow {
    color: #36cca7;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2.25px;

    @media (min-width: 768px) {
      font-size: 20px;
    }
  }

  h1 {
    color: white;
    max-width: 900px;
    margin-bottom: 1rem;

    @media (min-width: 768px) {
      margin-bottom: 2rem;
    }
  }
  p {
    color: white;
    max-width: 1000px;
    margin: 0;
  }
}

section.hub-featured {
  padding-top: 40px;
  background-color: white;

  @media (min-width: 768px) {
    padding-top: 48px;
  }

  h2 {
    margin-bottom: 1rem;

    @media (min-width: 768px) {
      margin-bottom: 2rem;
    }
  }
  .container {
    > div {
      display: flex;
      align-items: center;
      flex-wrap: wrap-reverse;
      row-gap: 1rem;
      column-gap: 72px;
      padding-bottom: 40px;
      justify-content: space-between;

      @media (min-width: 768px) {
        padding-bottom: 72px;
      }

      .featured-content {
        flex: 1;

        @media (min-width: 768px) {
          padding-left: 3rem;
        }

        p {
          margin-bottom: 1rem;
          color: #0e3ea0;
          font-weight: 700;
          letter-spacing: 2.4px;
          text-transform: uppercase;
        }

        h3 {
          margin-bottom: 1.5rem;
        }

        a {
          margin: 0;
        }
      }

      .featured-image {
        flex: 1 1 460px;
        max-width: 668px;

        img {
          width: 100%;
          border-radius: 1rem;
        }
      }
    }
  }
}

nav.category-navigation {
  padding-top: 48px;
  padding-left: 0.75rem;
  padding-right: 0.75rem;

  .container {
    display: flex;
    gap: 1rem;
    align-items: center;
    overflow-x: auto;

    span {
      flex-shrink: 0;
    }

    a {
      color: #000036;
      font-weight: 600;
      width: fit-content;
      flex-shrink: 0;
      text-transform: capitalize;
    }

    svg {
      flex-shrink: 0;

      &:last-child {
        display: none;
      }
    }
  }
}

section.category-listing {
  padding-top: 2rem;
  padding-bottom: 2rem;
  scroll-margin-top: 120px;

  @media (min-width: 1024px) {
    padding-top: 3rem;
    padding-bottom: 1rem;
  }
  .container {
    div {
      &:has(h2) {
        display: flex;
        justify-content: space-between;
        gap: 1.5rem;
        align-items: center;
        padding-bottom: 1rem;

        .view-all-desktop {
          display: none;
        }

        @media (min-width: 1024px) {
          padding-bottom: 2rem;

          .view-all-desktop {
            display: block;
          }
        }
      }
    }

    .resource-posts-container {
      scroll-padding-left: 1.5rem;
      margin-bottom: 1rem;
      padding-bottom: 1rem;

      @media (max-width: 1024px) {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1.5rem 1rem;
        padding: 0 1.5rem 1rem;
      }
    }

    .resource-posts {
      display: flex;
      justify-content: space-between;
      width: max-content;
      scroll-snap-type: x mandatory;
      gap: 1.5rem;
      scroll-padding-start: 24px;
      padding-right: 48px;

      @media (min-width: 1024px) {
        width: 100%;
        padding-right: 0;
      }

      .education-hub-item {
        flex: 1 1 320px;
        width: 75vw;
        scroll-snap-align: start;
        display: flex;
        flex-direction: column;


        @media (min-width: 480px) {
          width: 320px;
        }

        .video-length {
          position: absolute;
          bottom: 0.5rem;
          right: 0.5rem;
          background-color: #071a4a;
          color: white;
          font-size: 14px;
          padding: 2px 6px;
        }

        img {
          width: 100%;
          aspect-ratio: 16/9;
          object-fit: cover;
          object-position: left;
          border-top-left-radius: 20px;
          border-top-right-radius: 20px;
        }

        .resource-content {
          background-color: white;
          padding: 1rem;
          border-bottom-left-radius: 20px;
          border-bottom-right-radius: 20px;
          display: flex;
          flex-direction: column;
          gap: 12px;
          flex-grow: 1;

          .eyebrow {
            font-size: 12px;
            color: #0e3ea0;
            font-weight: 700;
            text-transform: uppercase;
          }

          h3 {
            font-size: 16px !important;
            margin: 0;
          }

          button,
          a {
            margin-top: auto;
            background: none;
            border: none;
            width: fit-content;
            display: flex;
            gap: 10px;
            align-items: center;
            padding: 0;
            font-weight: 600;
            color: #000036;
            font-size: 14px;
          }
        }
      }
    }
  }

  @media (min-width: 1024px) {
    .view-all-mobile {
      display: none;
    }
  }
}

section.sub-category-listing {
  padding-top: 2rem;
  padding-bottom: 2rem;

  @media (min-width: 1024px) {
    padding-top: 3rem;
    padding-bottom: 1rem;
  }
  .container {
    div {
      &:has(h2) {
        display: flex;
        justify-content: space-between;
        gap: 1.5rem;
        align-items: center;
        padding-bottom: 1rem;

        @media (min-width: 1024px) {
          padding-bottom: 2rem;
        }
      }
    }

    .filters {
      display: flex;
      gap: 1rem;
      overflow-x: auto;
      margin: 0 -1.5rem 1rem;
      padding: 0 1.5rem 1rem;
      scroll-snap-type: x mandatory;

      @media (min-width: 767px) {
        margin-bottom: 2rem;
      }

      .resource-type-item {
        flex-shrink: 0;
        width: fit-content;
        scroll-snap-align: center;

        label {
          cursor: pointer;
          border-radius: 999px;
          border: 2px solid #c7d3e5;
          padding: 10px 1.5rem;
          font-weight: 500;
          transition: all 0.15s ease-in-out;
          text-transform: capitalize;

          &:has(input:checked) {
            border: 2px solid #0e3ea0;
          }

          &:hover {
            border: 2px solid #0e3ea0;
          }

          input {
            display: none;
          }
        }
      }
    }

    .resource-posts {
      display: grid;
      grid-template-cols: 1fr;
      justify-content: start;
      row-gap: 1rem;
      column-gap: 2rem;

      @media (min-width: 768px) {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 1.5rem;
      }

      @media (min-width: 1024px) {
        grid-template-columns: repeat(4, 1fr);
      }

      .education-hub-item {
        display: flex;
        flex-direction: column;

        .video-length {
          position: absolute;
          bottom: 0.5rem;
          right: 0.5rem;
          background-color: #071a4a;
          color: white;
          font-size: 14px;
          padding: 2px 6px;
        }

        img {
          width: 100%;
          aspect-ratio: 16/9;
          object-fit: cover;
          object-position: left;
          border-top-left-radius: 20px;
          border-top-right-radius: 20px;
        }

        .resource-content {
          background-color: white;
          padding: 1rem;
          border-bottom-left-radius: 20px;
          border-bottom-right-radius: 20px;
          display: flex;
          flex-direction: column;
          gap: 10px;
          flex-grow: 1;

          .eyebrow {
            font-size: 12px;
            color: #0e3ea0;
            font-weight: 700;
            text-transform: uppercase;
          }

          h3 {
            font-size: 16px !important;
          }

          button,
          a {
            margin-top: auto;
            background: none;
            border: none;
            width: fit-content;
            display: flex;
            gap: 10px;
            align-items: center;
            padding: 0;
            font-weight: 600;
            color: #000036;
            font-size: 14px;
          }
        }
      }
    }
  }
}

section.single-resource-post {
  padding-top: 1.5rem;
  padding-bottom: 2rem;

  .container {
    max-width: 800px;

    .eyebrow {
      text-transform: uppercase;
      font-weight: 700;
      letter-spacing: 3px;
      color: #0e3ea0;

      @media (min-width: 768px) {
        font-size: 20px;
      }
    }

    h1 {
      margin-bottom: 1.5rem;
    }

    .video-container {
      video {
        width: 100%;
      }
      iframe {
        width: 100%;
        aspect-ratio: 16/9;
        height: auto;
        min-height: fit-content;
      }
    }

    .video-description {
      margin-top: 2rem;
    }

    .resource-tips-container {
      display: grid;
      grid-template-columns: 1fr;
      gap: 0;
      margin-top: 2rem;

      .resource-tip {
        details {
          border-top: 2px solid #dae2ea;

          summary {
            display: flex;
            padding: 2rem 0;
            justify-content: space-between;
            gap: 1rem;
            align-items: center;

            @media (min-width: 768px) {
              padding: 2rem;
            }

            h4 {
              font-weight: 400;
            }

            svg {
              flex-shrink: 0;
              transition: all 0.15s ease-in-out;
            }
          }

          .tip-content {
            padding: 0 0 1rem;

            @media (min-width: 768px) {
              padding: 0 2rem 1rem;
            }
          }
        }

        details[open] {
          summary {
            padding-bottom: 1rem;
            svg {
              transform: rotate(180deg);
            }
          }
        }
      }
    }
  }
}
