/**
 * Page Blog Styles
 * Стили страницы блога с чередованием широких и обычных карточек
 */

/* === ОСНОВНАЯ СТРАНИЦА БЛОГА === */
.main_content_padding {
  padding-top: 135px;
}

.blog-page {
  /* margin-top: 150px; */
  position: relative;
}

.blog-page__container {
  max-width: 1320px;
  margin: 0 auto;
  /* padding: 0 20px; */
  display: flex;
  flex-direction: column;
  gap: 70px;
}

/* === ШИРОКАЯ КАРТОЧКА === */
.blog-page__card--wide {
  display: flex;
  background: var(--berloga-white, #ffffff);
  border-radius: 30px;
  box-shadow: 0px 5px 30px 0px rgba(19, 19, 19, 0.07);
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* margin-bottom: 50px; */
  width: 100%;
}

.blog-page__card--wide:hover {
  transform: translateY(-5px);
  box-shadow: 0px 10px 40px 0px rgba(19, 19, 19, 0.12);
}

/* --- Изображение широкой карточки --- */
.blog-page__card--wide .blog-page__card-image {
  width: 50%;
  height: 326px;
  overflow: hidden;
  position: relative;
}

.blog-page__card--wide .blog-page__card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  margin: 0;
}

.blog-page__card--wide:hover .blog-page__card-img {
  transform: scale(1.05);
}

/* --- Контент широкой карточки --- */
.blog-page__card--wide .blog-page__card-content {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  gap: 32px;
}

.blog-page__card--wide .blog-page__card-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.blog-page__card--wide .blog-page__card-title {
  color: var(--berloga-text, #1a1a1a);
  font-family: 'Nunito', sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  text-align: left;
}

.blog-page__card--wide .blog-page__card-excerpt {
  color: var(--berloga-text, #1a1a1a);
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Звездочка широкой карточки --- */
.blog-page__card--wide .blog-page__card-star {
  position: absolute;
  right: 40px;
  bottom: 40px;
  width: 48px;
  height: 48px;
  z-index: 2;
}

/* === РЯД ИЗ ТРЕХ КАРТОЧЕК === */
.blog-page__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
  margin-bottom: 50px;
}

/* === ЗАГЛУШКА ОТСУТСТВИЯ СТАТЕЙ === */
.blog-page__no-posts {
  text-align: center;
  padding: 60px 20px;
  color: var(--berloga-text, #1a1a1a);
  font-family: 'Nunito', sans-serif;
  font-size: 18px;
  font-weight: 400;
}

/* === АДАПТИВНОСТЬ === */

@media (max-width: 1320px) {
  .blog-page__container {
    padding: 0 20px;
  }
}

@media (max-width: 1200px) {
  .blog-page__row {
    gap: 30px;
  }

  .blog-page__card--wide {
    margin-bottom: 40px;
  }

  .blog-page__card--wide .blog-page__card-title {
    font-size: 28px;
  }

  .blog-page__card--wide .blog-page__card-content {
    padding: 32px;
  }
}

@media (max-width: 1024px) {
  .blog-page__container {
    gap: 40px;
  }

  .blog-page__row {
    gap: 20px;
  }

  .blog-page__card--wide .blog-page__card-title {
    font-size: 24px;
  }

  .blog-page__card--wide .blog-page__card-content {
    padding: 28px;
    gap: 24px;
  }
}

/* С 768px и меньше - карточки в столбик */
@media (max-width: 768px) {
  .blog-page {
    margin-top: 40px;
  }

  .blog-page__container {
    padding: 0 20px;
    gap: 30px;
  }

  /* Широкие карточки становятся вертикальными */
  .blog-page__card--wide {
    flex-direction: column;
    margin-bottom: 30px;
  }

  .blog-page__card--wide .blog-page__card-image {
    width: 100%;
    height: 270px;
  }

  .blog-page__card--wide .blog-page__card-content {
    width: 100%;
    padding: 32px;
  }

  .blog-page__card--wide .blog-page__card-title {
    font-size: 20px;
  }

  .blog-page__card--wide .blog-page__card-star {
    left: 32px;
    top: 246px;
    right: auto;
  }

  /* Ряды становятся столбиками */
  .blog-page__row {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
  }
}

@media (max-width: 480px) {
  .blog-page__container {
    padding: 0 20px;
  }

  .blog-page__card--wide .blog-page__card-content {
    padding: 24px;
    gap: 20px;
  }

  .blog-page__card--wide .blog-page__card-title {
    font-size: 18px;
  }

  .blog-page__card--wide .blog-page__card-star {
    left: 24px;
    top: 220px;
    width: 40px;
    height: 40px;
  }
}