:root {
  --link: 52, 116, 214;
  --link-hover: 33, 88, 171;
}

* {
  box-sizing: border-box;
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background-color: #444;
}

::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

a {
  color: rgb(var(--link));
  text-decoration: none;
  transition: 0.3s;
  transition-property: color;
}

a:hover {
  color: rgb(var(--link-hover));
}

body {
  background-color: #fff;
  color: rgba(0, 0, 0, 0.75);
  font-family: sans-serif;
  font-size: 18px;
  line-height: 1.4;
}

iframe {
  border: none;
  display: block;
}

img {
  max-width: 100%;
}

details {
  margin: 1rem auto;
  background: #fff;
  border-radius: 0.5rem;
  background-color: rgba(var(--link), 0.025);
  user-select: none;
  overflow: hidden;
}

summary {
  padding: 1rem;
  border-radius: 0.5rem;
  background: #fff;
  position: relative;
  cursor: pointer;
  color: rgb(var(--link));
  background-color: transparent;
  transition: 0.3s;
  transition-property: color, outline;
  outline: 1px solid rgba(var(--link), 0);
  outline-offset: -1px;
}

details[open] summary {
  border-radius: 0.5rem 0.5rem 0 0;
}

summary:focus,
summary:hover {
  color: rgb(var(--link-hover));
  outline: 1px solid rgba(var(--link), 0.25);
}

dialog[open] {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
  box-shadow: 0 0 3rem rgba(0, 0, 0, 0.5);
}

header {
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1rem 0;
  text-align: center;
  color: rgba(0, 0, 0, 0.5);
}

footer {
  margin-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1rem 0;
  text-align: center;
  color: rgba(0, 0, 0, 0.5);
}

.container {
  max-width: 900px;
  margin-inline: auto;
}

.trainings:empty::before {
  display: block;
  content: "Пока ничего нет...";
}

.videos-list {
  display: grid;
  gap: 1.5rem 1rem;
  grid-template-columns: 1fr;
  font-size: 80%;
}

.videos-list a {
  display: block;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: 0.3s;
  transition-property: color, box-shadow;
  background-color: rgba(var(--link), 0.025);
  box-shadow: 0 0 0 1px rgba(var(--link), 0.025) inset;
  user-select: none;
}

.videos-list a:hover,
.videos-list a:focus {
  color: rgb(var(--link-hover));
  box-shadow: 0 0 0 1px rgba(var(--link), 0.25) inset;
}

@media (min-width: 641px) {
  .videos-list {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.videos-list a > span:nth-child(1) {
  display: block;
  width: 100%;
  margin-bottom: 0.5rem;
  background-color: rgba(0, 0, 0, 0.1);
  padding-bottom: 56%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05) inset;
  border-radius: 0.25rem;
}

.videos-list a > span:nth-child(1) > img {
  display: none;
}

.videos-list a > span:nth-child(2) {
  display: flex;
  align-items: flex-start;
}

.videos-list a > span:nth-child(2) > span:nth-child(1) {
  flex-shrink: 0;
  display: block;
  width: 2rem;
  height: 2rem;
  border-radius: 100%;
  margin-right: 0.5rem;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05) inset;
}

.videos-list a > span:nth-child(2) > span:nth-child(2) {
  min-height: 2rem;
  display: flex;
  align-items: center;
}

.videos-list .placeholder {
  display: block;
  aspect-ratio: 16/8.8;
  background-color: rgba(0, 0, 0, 0.015);
}
