/* ============================================
   САЙДБАРЫ "TE RECOMENDAMOS"
   ============================================ */

/* Базовые стили */
.recommended-sidebar {
  padding: 20px;
  margin: 20px 0;
  width: 100%;
  clear: both;
  border-radius: 8px;
}

.recommended-header h2 {
  font-size: 20px;
  color: #b00124;
  padding: 8px 0 12px;
  text-align: center;
  border-top: 1px solid #b00124;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 16px;
  text-transform: uppercase;
  font-family: "Source Serif Pro";
  letter-spacing: 0.5px;
  font-weight: 600;
}

.recommended-header .subtitle {
  font-size: 14px;
  border: none;
  display: flex;
  align-items: center;
  font-weight: 600;
  gap: 3px;
}

.aside__arrow {
  width: 15px;
  height: 15px;
  margin-right: 1px;
}

.recommended-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recommended-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e8e8e8;
  position: relative;
}

.recommended-item:last-child {
  border-bottom: none;
}

.recommended-image-wrapper {
  flex-shrink: 0;
  position: relative;
  width: 130px;
  height: 95px;
  overflow: hidden;
  background: #e8e8e8;
}

.recommended-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recommended-number {
  position: absolute;
  top: 0px;
  left: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  background: #b00124;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border-radius: 50%;
  font-family: "Source Sans Pro", sans-serif;
  z-index: 3;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.recommended-link {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s ease;
  font-family: "Source Serif Pro", serif;
  flex: 1;
  padding-top: 0;
  color: inherit;
}

.sidebar-banner {
  overflow: hidden;
  margin: 16px 0 20px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

.sidebar-banner:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Картинка */
.banner-image-wrapper {
  position: relative;
  width: 100%;
  height: 140px;
  overflow: hidden;
  background: #1a1a2e;
}

.banner-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.sidebar-banner:hover .banner-image-wrapper img {
  transform: scale(1.03);
}

/* Тег поверх картинки */
.banner-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.banner-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: "Source Sans Pro", sans-serif;
  background: rgba(176, 1, 36, 0.9);
  padding: 3px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

/* Контент под картинкой */
.banner-content {
  padding: 16px 18px 18px;
  background: #222222;
  margin-bottom: 30px;
}

.banner-title {
  font-size: 23px;
  font-weight: 600;
  color: #ffffff;
  font-family: "Source Serif Pro", serif;
  margin: 0 0 4px 0;
}

.banner-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: #666;
  font-family: "Source Sans Pro", sans-serif;
  margin: 0 0 14px 0;
  line-height: 1.4;
}

.banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #b00124;
  font-family: "Source Sans Pro", sans-serif;
  text-decoration: none;
  transition: all 0.3s ease;
}

.banner-btn:hover {
  color: #8a001c;
  gap: 10px;
}

.banner-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}

.banner-btn:hover svg {
  transform: translateX(4px);
}

/* ============================================
   АДАПТИВ
   ============================================ */

@media (max-width: 968px) {
  .banner-image-wrapper {
    height: 120px;
  }

  .banner-content {
    padding: 14px 16px 16px;
  }

  .banner-subtitle {
    font-size: 13px;
  }

  .banner-btn {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .banner-image-wrapper {
    height: 100px;
  }

  .banner-subtitle {
    font-size: 12px;
  }
}

/* ============================================
   ДЕСКТОПНАЯ ВЕРСИЯ (≥969px)
   ============================================ */

@media (min-width: 969px) {
  /* Родитель для absolute */
  .news {
    position: relative;
  }

  /* Разрешаем контейнеру не обрезать */
  .news .container {
    overflow: visible !important;
  }

  .recommended-sidebar.mobile {
    display: none;
  }

  /* Сайдбар - absolute, вне контейнера */
  .recommended-sidebar {
    position: absolute;
    right: 0;
    top: 2600px;
    width: 320px;
    margin: 0;
    padding: 7px;
    float: none;
    clear: none;
    z-index: 10;
  }

  [data-sidebar="2"] {
    top: 5725px;
  }

  [data-sidebar="2"]  span {
    display: block;
    color: #b10b1f;
    font-size: 15px;
    font-weight: 600;
  }

  [data-sidebar="3"] {
    top: 7100px;
  }

  [data-sidebar="3"] .banner-image-wrapper {
    width: 100%;
    height: 100%;
  }

  /* На десктопе картинки чуть меньше */
  .recommended-item {
    gap: 10px;
    padding: 10px 0;
  }

  .recommended-image-wrapper {
    width: 130px;
    height: 95px;
  }

  .recommended-number {
    width: 22px;
    height: 22px;
    font-size: 14px;
    top: 0px;
    left: 0px;
  }

  .recommended-link {
    font-size: 14px;
  }

  /* Чтобы текст не наезжал на сайдбар */
  .news__text,
  .news__subtitle,
  .news__list,
  .cursive {
    overflow: hidden;
  }
}

/* ============================================
   МОБИЛЬНАЯ ВЕРСИЯ (≤968px)
   ============================================ */

@media (max-width: 968px) {
  /* Убираем absolute */
  .news {
    position: static;
  }

  .news .container {
    overflow: visible;
    max-width: 375px;
    padding: 5px 15px 0;
    width: 100vw;
  }

  /* Скрываем десктопный сайдбар */
  .recommended-sidebar {
    display: none !important;
  }

  /* показываем на мобильном */
  .recommended-sidebar.mobile {
    position: static;
    max-width: 630px;
    margin: 0 auto;
    display: block !important;
  }

  .recommended-sidebar.mobile .red {
    display: block;
    color: #b10b1f;
    font-size: 15px;
    font-weight: 600;
  }

  .recommended-sidebar.mobile .recommended-image-wrapper {
    width: auto;
    max-width: 145px;
  }

  .recommended-sidebar.mobile .banner-image-wrapper {
    height: auto;
  }
}

@media (max-width: 768px) {
  .recommended-sidebar.mobile {
    max-width: 350px;
  }

  .recommended-sidebar.mobile [data-sidebar="1"] .recommended-image-wrapper {
    max-width: 130px;
  }
}
