/* styles.css — общий для index.html и video.html */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #000;
  color: #fff;
  line-height: 1.5;
  padding: 15px;
}

.container {
  max-width: 700px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 25px;
}

.logo {
  font-size: 42px;
  font-weight: bold;
  letter-spacing: 1.5px;
}

/* === БЛОК-СЫЛКА (главная и внутренняя) === */
.content-block {
  display: flex;
  margin-bottom: 0;
  position: relative;
  gap: 15px;
  padding: 12px;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.content-block:hover {
  outline: 2px solid #888;
  background-color: rgba(255, 255, 255, 0.03);
}

.content-block::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 75%;
  height: 1px;
  background-color: #444;
}

main > .content-block:last-of-type::after,
.mini-blocks > .content-block:last-of-type::after {
  display: none;
}

.thumbnail {
  width: 200px;
  height: 113px;
  background-color: #333;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  border-radius: 4px;
}

.text-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
}

.title {
  font-weight: bold;
  text-transform: uppercase;
  font-size: 14px;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.description {
  font-size: 13px;
  color: #ccc;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  max-height: 113px;
  text-align: left;
}

/* === МОБИЛЬНАЯ ВЕРСИЯ (главная) === */
@media (max-width: 768px) {
  body { padding: 10px; }
  .logo { font-size: 32px; letter-spacing: 1px; }

  .content-block {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }

  .content-block:hover {
    outline: none;
    background: none;
  }

  .thumbnail {
    width: 100%;
    height: 200px;
    max-width: 100%;
    border-radius: 4px;
  }

  .title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.3;
  }

  .description {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    font-size: 14px;
    max-height: none;
  }

  .content-block::after {
    width: 90%;
  }
}

@media (max-width: 480px) {
  .logo { font-size: 28px; }
  .thumbnail { height: 180px; }
  .title { font-size: 15px; }
  .description { font-size: 13px; }
}

/* === ВНУТРЕННЯЯ СТРАНИЦА === */
.video-page .logo {
  font-size: 32px;
  margin-bottom: 20px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  margin-bottom: 20px;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

.video-title {
  font-weight: bold;
  font-size: 18px;
  margin: 15px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.video-description {
  font-size: 14px;
  color: #ccc;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 10;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 30px;
}

.related-images {
  display: flex;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.related-images a {
  flex: 1;
  min-width: 45%;
  display: block;
  border-radius: 6px;
  overflow: hidden;
  transition: outline 0.2s ease;
  outline: 2px solid transparent;
}

.related-images a:hover {
  outline: 2px solid #888;
}

.related-images img {
  width: 100%;
  height: auto;
  display: block;
}

/* === МИНИ-БЛОКИ НА ВНУТРЕННЕЙ === */
.mini-blocks {
  margin-bottom: 30px;
}

/* === НИЖНИЕ БЛОКИ (общие) === */
.site-text {
  text-align: center;
  font-size: 14px;
  color: #aaa;
  margin: 35px 0;
  line-height: 1.6;
  padding: 0 15px;
}

.pagination {
  text-align: center;
  margin: 30px 0;
  font-size: 14px;
}

.pagination a {
  color: #888;
  text-decoration: none;
  margin: 0 4px;
  padding: 4px 8px;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.pagination a:hover {
  background-color: #ddd;
  color: #000;
  font-weight: bold;
}

.pagination a.active {
  color: #fff;
  font-weight: bold;
  background-color: #333;
}

.links {
  text-align: center;
  margin: 25px 0;
  font-size: 13px;
}

.links a {
  color: #888;
  text-decoration: none;
  margin: 0 8px;
  transition: color 0.2s;
}

.links a:hover {
  color: #fff;
}

footer {
  text-align: center;
  font-size: 12px;
  color: #555;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #333;
}

/* === АДАПТИВ ДЛЯ ВНУТРЕННЕЙ СТРАНИЦЫ === */
@media (max-width: 768px) {
  .video-page .logo { font-size: 28px; }
  .video-title { font-size: 16px; }
  .video-description { font-size: 13px; -webkit-line-clamp: 8; }
  .related-images a { min-width: 100%; }
  .site-text { font-size: 13px; margin: 30px 0; padding: 0 10px; }
  .pagination { font-size: 13px; margin: 25px 0; }
  .links { margin: 20px 0; font-size: 12px; }
  footer { font-size: 11px; margin-top: 25px; padding-top: 15px; }
}

.video-tags {
  font-size: 14px;
}

.link-badge {
  display: inline-block;         /* чтобы не растягивался и был в ряд */
  text-align: center;            /* центрирование текста внутри */
  color: #d3d3d3;                /* светло-серый текст */
  background-color: transparent;  /* изначально фон прозрачный */
  padding: 4px 10px;             /* внутренние отступы */
  border-radius: 0.25rem;        /* слегка скругленные края, как у bootstrap badges */
  text-decoration: none;          /* убрать подчеркивание */
  transition: all 0.3s ease;    /* плавный переход при наведении */
  cursor: pointer;               /* указатель при наведении */
  font-size: 0.875rem;           /* размер текста, как у badge */
}

.link-badge:hover {
  background-color: #ffffff;     /* белый фон при наведении */
  color: #000000;                /* черный текст при наведении */
  text-decoration: none;          /* без подчеркивания при hover */
}