.media-library-page {
  background: var(--white);
}

.media-library-page .nav {
  top: 16px;
}

.media-library-page .nav > a {
  display: flex;
  align-items: center;
}

.library-hero {
  position: relative;
  height: 506px;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 88px));
}

.library-hero__inner {
  position: relative;
  z-index: 3;
  padding-top: 142px;
}

.library-hero__crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  color: var(--white);
  text-decoration: none;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  transition: color .18s ease;
}

.library-hero__crumb img {
  width: 20px;
  height: 20px;
  display: block;
  transition: filter .18s ease;
}

.library-hero__crumb:hover,
.library-hero__crumb:focus-visible {
  color: var(--red);
}

.library-hero__crumb:hover img,
.library-hero__crumb:focus-visible img {
  filter: brightness(0) saturate(100%) invert(13%) sepia(100%) saturate(6418%) hue-rotate(5deg) brightness(76%) contrast(118%);
}

.library-hero__grid {
  display: grid;
  grid-template-columns: 784px 376px;
  gap: 32px;
  align-items: stretch;
}

.library-hero__title {
  width: 784px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.library-hero h1 {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  color: var(--white);
  font-size: 64px;
  line-height: 72px;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
}

.library-hero h1 span:last-child {
  text-transform: uppercase;
}

.library-hero__title p {
  width: 100%;
  margin: 0;
  padding-left: 102px;
  color: var(--white);
  font-size: 20px;
  line-height: 28px;
  font-weight: 300;
  letter-spacing: 0;
}

.library-hero__aside {
  min-height: 140px;
  padding: 8px 0 8px 24px;
  border-left: 1px solid var(--red);
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--white);
}

.library-hero__aside h2 {
  margin: 0;
  font-size: 32px;
  line-height: 40px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0;
}

.library-hero__aside p {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  letter-spacing: 0;
}

@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  .mega-menu .btn-light:hover,
  .mega-menu .btn-light:focus-visible {
    box-shadow: inset 0 0 0 1px var(--red), 0 0 16px 4px rgba(194, 0, 0, .56);
  }

  .mega-menu .btn-ghost:hover,
  .mega-menu .btn-ghost:focus-visible,
  .mega-menu .mega-button:hover,
  .mega-menu .mega-button:focus-visible,
  .mega-menu .mega-course:hover .mega-course-body,
  .mega-menu .mega-course:focus-visible .mega-course-body,
  .mega-menu .mega-course:hover .mega-icon,
  .mega-menu .mega-course:focus-visible .mega-icon,
  .mega-menu .mega-speaker:hover .mega-speaker-icon,
  .mega-menu .mega-speaker:focus-visible .mega-speaker-icon {
    border-color: #8f9399;
  }
}

.library-content {
  position: relative;
  z-index: 1;
  padding: 48px 0 100px;
  background: var(--white);
  overflow: hidden;
}

.library-content__inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.library-filters {
  display: flex;
  align-items: center;
  gap: 16px;
}

.library-filter {
  min-height: 46px;
  padding: 12px 24px;
  border: 1px solid var(--gray-200);
  border-radius: 24px;
  background: transparent;
  color: var(--gray-400);
  text-transform: uppercase;
  font-size: 14px;
  line-height: 22px;
  font-weight: 400;
}

.library-filter.is-active {
  border-color: var(--black);
  color: var(--black);
}

.library-divider {
  width: 100%;
  height: 1px;
  background: var(--gray-200);
}

.library-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.library-featured {
  display: grid;
  grid-template-columns: 682px 478px;
  gap: 32px;
  align-items: start;
}

.library-featured__side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.library-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 16px;
  color: var(--white);
  background: var(--black);
}

.library-card--large {
  width: 682px;
  height: 424px;
}

.library-card--wide {
  width: 478px;
  height: 240px;
}

.library-card--video {
  height: 344px;
}

.library-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.library-card--video > img {
  filter: brightness(.76);
}

.library-card__body {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 16px 24px 24px;
  background: linear-gradient(180deg, rgba(2,3,3,0) 0%, var(--black) 93.75%);
}

.library-card h3 {
  margin: 0 0 4px;
  color: var(--white);
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: 0;
}

.library-card p {
  margin: 0;
  color: var(--white);
  font-size: 14px;
  line-height: 22px;
  font-weight: 400;
  letter-spacing: 0;
}

.library-video-grid {
  display: grid;
  grid-template-columns: repeat(4, 286px);
  gap: 16px;
}

.library-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 60px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 12px 20px;
  border: 1px solid var(--white);
  border-radius: 999px;
  background: rgba(244,246,248,.04);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.library-card__play::before {
  content: "";
  width: 20px;
  height: 20px;
  background: url("./assets/course-hero-play.svg") center / 20px 20px no-repeat;
}

.library-contact-wrap,
.library-footer-wrap {
  position: relative;
}

.library-footer-wrap {
  background: var(--black);
}

.media-library-page .contact::before,
.media-library-page .footer::before,
.media-library-page .community::before {
  display: none;
}

.library-contact-wrap {
  overflow: hidden;
  background: var(--white);
}

.media-library-page .contact {
  min-height: 920px;
  padding: 100px 0;
  background: var(--black);
  clip-path: polygon(0 0, 100% 88px, 100% 100%, 0 100%);
}

.media-library-page .footer {
  clip-path: polygon(0 88px, 100% 0, 100% 100%, 0 100%);
}

.media-library-page .footer-bottom.reveal-block,
.media-library-page .footer-bottom.reveal-block.is-visible {
  opacity: 1;
  transform: none;
}

.media-library-page .footer-socials {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
}

.media-library-page .footer-socials a,
.media-library-page .footer-socials img {
  display: block;
  width: 32px;
  height: 32px;
}

.media-library-page .footer-socials a {
  flex: 0 0 auto;
  font-size: 0;
  line-height: 0;
  text-decoration: none;
}

.media-library-page .footer-socials img {
  object-fit: contain;
  opacity: 1;
}

.media-library-page .messengers {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.media-library-page .messengers p {
  margin: 0;
}

.media-library-page .messengers__icons {
  display: flex;
  align-items: flex-start;
  flex: 0 0 auto;
  gap: 16px;
}

.media-library-page .community {
  padding: 100px 0 136px;
}

.media-library-page .community .two-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}

.media-library-page .community .section-title {
  width: 580px;
  margin: 0;
}

.media-library-page .community .checks {
  width: 682px;
  align-self: flex-end;
  gap: 8px;
}

.media-library-page .community-pill {
  margin-top: 0;
}

@media (max-width: 900px) {
  .library-hero {
    height: 488px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 48px));
  }

  body.mobile-menu-open .media-library-page .library-hero {
    overflow: visible;
    clip-path: none;
  }

  .library-hero__inner {
    padding-top: 94px;
  }

  .library-hero__crumb {
    margin-bottom: 32px;
  }

  .library-hero__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .library-hero__title {
    width: 100%;
    gap: 8px;
  }

  .library-hero h1 {
    gap: 8px;
    font-size: 32px;
    line-height: 40px;
  }

  .library-hero__title p {
    padding-left: 82px;
    font-size: 16px;
    line-height: 24px;
  }

  .library-hero__aside {
    min-height: 122px;
    padding: 8px 0 8px 20px;
    gap: 8px;
  }

  .library-hero__aside h2 {
    font-size: 24px;
    line-height: 32px;
  }

  .library-hero__aside p {
    font-size: 14px;
    line-height: 22px;
  }

  .library-content {
    padding: 24px 0 48px;
  }

  .library-content__inner {
    gap: 32px;
  }

  .library-filters {
    gap: 12px;
    flex-wrap: wrap;
  }

  .library-divider {
    height: 0;
    border-top: 1px solid var(--gray-200);
    background: transparent;
  }

  .library-stack {
    gap: 12px;
  }

  .library-featured {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .library-featured__side {
    gap: 12px;
  }

  .library-card--large,
  .library-card--wide,
  .library-card--video {
    width: 100%;
    height: 240px;
  }

  .library-card > img {
    height: 231.25%;
    top: -46.39%;
  }

  .library-card__body {
    padding: 16px 24px 24px;
  }

  .library-video-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .library-video-grid .library-card--video:nth-child(n + 2) {
    display: none;
  }

  .library-featured__side .library-card--wide:nth-child(n + 2)::before,
  .library-card__play {
    left: auto;
    right: 12px;
    top: 12px;
    transform: none;
  }

  .library-featured__side .library-card--wide:nth-child(n + 2)::before,
  .library-featured__side .library-card--wide:nth-child(n + 2)::after {
    content: "";
    position: absolute;
    z-index: 2;
    pointer-events: none;
  }

  .library-featured__side .library-card--wide:nth-child(n + 2)::before {
    width: 60px;
    height: 46px;
    border: 1px solid var(--white);
    border-radius: 999px;
    background: rgba(244,246,248,.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .library-featured__side .library-card--wide:nth-child(n + 2)::after {
    right: 32px;
    top: 25px;
    width: 20px;
    height: 20px;
    background: url("./assets/course-hero-play.svg") center / 20px 20px no-repeat;
  }

  .library-card__play {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .media-library-page .contact {
    min-height: 0;
    padding: 48px 0;
    background: var(--black);
    clip-path: polygon(0 0, 100% 48px, 100% 100%, 0 100%);
  }

  .media-library-page .footer {
    clip-path: polygon(0 48px, 100% 0, 100% 100%, 0 100%);
  }

  .media-library-page .footer-socials {
    gap: 16px;
  }

  .media-library-page .footer-socials a,
  .media-library-page .footer-socials img {
    width: 40px;
    height: 40px;
  }

  .media-library-page .messengers {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
  }

  .media-library-page .messengers p {
    grid-column: auto;
    margin: 0;
  }

  .media-library-page .community {
    padding: 48px 0 72px;
  }

  .media-library-page .community .two-col {
    gap: 16px;
  }

  .media-library-page .community .section-title,
  .media-library-page .community .checks {
    width: 100%;
    align-self: stretch;
  }

  .media-library-page .community-pill {
    margin-top: 16px;
  }
}

@media (min-width: 768px) and (max-width: 900px) {
  .media-library-page .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .media-library-page .footer-socials {
    gap: 24px;
  }

  .media-library-page .footer-socials a,
  .media-library-page .footer-socials img {
    width: 32px;
    height: 32px;
  }
}
