body {
  background: #ffffff;
}

.mediatheque {
  min-height: calc(100vh - var(--header-h));
  padding: 100px 24px 80px;
  background: #e6ebf1;
}

.mediatheque__intro {
  max-width: 727px;
  margin: 0 auto 80px;
  text-align: center;
}

.mediatheque h1 {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 35px;
  font-weight: 600;
  line-height: 45px;
  text-transform: uppercase;
}

.mediatheque__intro p {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
  font-weight: 500;
  line-height: 28px;
}

.media-list {
  display: flex;
  flex-direction: column;
  gap: 50px;
  max-width: 1344px;
  margin: 0 auto;
}

.media-row {
  scroll-margin-top: calc(var(--header-h) + 16px);
  display: grid;
  grid-template-columns: 204px minmax(0, 540px) minmax(0, 540px);
  grid-template-areas: "info doc video";
  gap: 6px 30px;
  align-items: start;
}

.media-row__bloc {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.media-row__bloc--doc {
  grid-area: doc;
}

.media-row__bloc--video {
  grid-area: video;
}

.media-row__info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 344px;
  padding: 26px 16px 20px;
  border-radius: 15px;
  background: linear-gradient(
29deg, #053871 0%, #053871 48%, #0077c2 100%);
  text-align: center;
}

.media-row__photo {
  width: 145px;
  height: 145px;
  margin-bottom: 20px;
  overflow: hidden;
  border: 3px solid rgba(81, 188, 236, 0.5);
  border-radius: 50%;
  background: #e8eef3;
}

.media-row__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-row__info h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 20px;
  font-weight: 500;
  line-height: 26px;
}

.media-row__info p {
  margin: 0;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 500;
  line-height: 15px;
}

.media-row__card {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 540 / 344;
  border: 6px solid var(--white);
  border-radius: 15px;
  box-shadow: none;
  background: var(--white);
  text-decoration: none;
}

.media-row__card--empty {
  visibility: hidden;
  pointer-events: none;
  border-color: transparent;
  background: transparent;
}

.media-row__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left;
  transition: transform 0.35s ease;
}

.media-row__card--doc:hover img,
.media-row__card--doc:focus-within img {
  transform: scale(1.08);
}

.media-row__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 20px 18px 80px;
  background: rgba(18, 18, 18, 0.62);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.media-row__card--doc:hover .media-row__overlay,
.media-row__card--doc:focus-within .media-row__overlay {
  opacity: 1;
}

.media-row__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.media-row__action i {
  font-size: 28px;
}

.media-row__overlay-title {
  position: absolute;
  right: 12px;
  bottom: 40px;
  left: 12px;
  margin: 0;
  color: var(--white);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.media-row__card--video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
}

.media-row__play {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-row__play img {
  width: 98px;
  height: 98px;
  object-fit: contain;
}

.media-row__label {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
  font-weight: 500;
  line-height: 28px;
  text-align: center;
  text-transform: uppercase;
}

.media-row__card:hover,
.media-row__card:focus-visible {
  filter: none;
}

@media (hover: none) {
  .media-row__overlay {
    opacity: 1;
  }
}

@media (max-width: 1400px) {
  .mediatheque {
    padding: 48px 16px 56px;
  }

  .mediatheque h1 {
    font-size: 26px;
    line-height: 34px;
  }

  .mediatheque__intro {
    margin-bottom: 40px;
  }

  .mediatheque__intro p {
    font-size: 15px;
    line-height: 23px;
  }

  .mediatheque__intro p br {
    display: none;
  }

  .media-list {
    gap: 36px;
  }

  .media-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "info"
      "doc"
      "video";
    justify-items: center;
    gap: 12px;
  }

  .media-row__info {
    max-width: 280px;
    min-height: 0;
    padding-bottom: 28px;
  }

  .media-row__bloc {
    max-width: 540px;
  }

  .media-row__bloc--empty,
  .media-row__card--empty {
    display: none;
  }
}
