/* ============================================
   Лента блога читателей «/blog/»
   Figma: qfNOKe85ypxsa8E8HtOVtm «Блоги читателей» 7754:11274
   Подключается ПОСЛЕ feed.css и перекрывает его там,
   где макет блога расходится с макетом ленты статей.
   ============================================ */

/* ---------- Раскладка: две колонки вместо трёх ----------
   В макете 908 + 24 + 442 центрированы внутри поля 1840,
   поэтому слева и справа остаётся по 233px воздуха. */

.feed--blog .feed-layout {
  grid-template-columns: minmax(0, 908fr) minmax(0, 442fr);
  margin-inline: auto;
  max-width: calc(1374px + 80px);
}

/* ---------- Карточка истории (442×569) ---------- */

.feed-card--story .feed-card__photo {
  height: 440px;
}

.feed-card--story .feed-card__title {
  font-size: 25px;
}

/* Макет: фото → 16 → заголовок → 24 → мета (карточка живёт на gap 16).
   Сам отступ задан в базе (feed.css) через margin-top: auto + padding-top: 8,
   чтобы подпись автора вставала по нижнему краю у всех карточек ряда. */

.feed-card__author {
  color: var(--c-gray);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: normal;
  text-transform: uppercase;
}

/* ---------- Hero истории ---------- */

/* Подпись автора в блоге светлее серой меты главной */
.hero--story .hero__meta {
  color: rgba(255, 255, 255, 0.5);
}

.hero--story .hero__meta-dot {
  background: rgba(255, 255, 255, 0.5);
}

/* Фото историй светлее редакционных — притеняем низ, иначе подпись не читается */
/* z-index 1 — как у контента: псевдоэлемент идёт раньше в дереве,
   поэтому ложится над фото (z-0), но под текстом. */
.hero--story .hero__card::before {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0) 60%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

/* Hero внутри блока «Лучшие истории» живёт в общей сетке 1840, а не 1856 */
.hero--inline {
  padding-top: 0;
}

.hero--inline > .container {
  padding-inline: var(--pad);
}

/* ---------- Блоки «Лучшие истории» и «Популярное» ---------- */

.blog-block {
  padding-block: 80px;
}

.blog-plate {
  border-block: 1px solid rgba(26, 12, 4, 0.2);
  color: var(--c-terracotta-dark);
  font-family: var(--font-mono);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding-block: 18px;
  text-transform: uppercase;
}

/* У «Лучших историй» линия только сверху — снизу его закрывает hero */
.blog-plate--top {
  border-bottom: 0;
  padding-bottom: 0;
}

.blog-block .blog-plate:not(.blog-plate--top) {
  margin-top: 80px;
}

.blog-tiles {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 40px;
}

/* ---------- Карточка «Популярного» (442×704) ---------- */

.story-tile {
  aspect-ratio: 442 / 704;
  display: flex;
  overflow: hidden;
  position: relative;
}

.story-tile__photo {
  height: 100%;
  left: 0;
  object-fit: cover;
  position: absolute;
  top: 0;
  width: 100%;
}

/* Ссылка на историю растянута на всю плитку; бейдж и заголовок лежат
   выше неё и остаются самостоятельными ссылками */
.story-tile__link {
  inset: 0;
  position: absolute;
  z-index: 1;
}

.story-tile__tag,
.story-tile__title {
  position: relative;
  z-index: 2;
}

.story-tile__overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: flex-end;
  padding: 40px 16px;
  position: relative;
  width: 100%;
}

.story-tile__tag {
  color: var(--c-terracotta-dark);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: normal;
  text-transform: uppercase;
}

/* Межстрочный задан явно: у Noto Serif `normal` даёт ≈1.4, и на кегле 25px
   строки расходятся заметно шире, чем у карточек ленты (там 1.35 при 20px).
   Чем крупнее кегль, тем плотнее интерлиньяж — отсюда 1.25. */
.story-tile__title {
  color: var(--c-cream);
  font-family: var(--font-serif-text);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.story-tile__title a:hover {
  color: var(--c-white);
}

.story-tile__author {
  color: var(--c-gray);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: normal;
  text-transform: uppercase;
}

/* ---------- Сайдбар: рейтинг авторов ---------- */

/* Padding совпадает с рекламным блоком (.side-partner, 24px): внешние коробки
   у них и так одинаковые (442), но при разных отступах содержимое читалось как
   блоки разной ширины — 362 против 394 (п. 27 баг-листа). */
.side-authors {
  background: var(--c-terracotta-dark);
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 24px;
}

.side-authors__title {
  color: var(--c-white);
  font-family: var(--font-serif);
  font-size: 34px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.04;
}

.side-authors__list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Разделители между авторами — линия принадлежит соседу сверху */
.side-authors__item + .side-authors__item {
  border-top: 1px solid rgba(239, 237, 232, 0.1);
  padding-top: 24px;
}

.side-authors__item {
  align-items: center;
  display: flex;
  gap: 24px;
}

.side-authors__avatar {
  border-radius: 50%;
  flex-shrink: 0;
  height: 54px;
  object-fit: cover;
  width: 54px;
}

.side-authors__avatar--empty {
  background: rgba(239, 237, 232, 0.2);
  display: block;
}

.side-authors__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.side-authors__row {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.side-authors__name {
  color: var(--c-cream);
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.4;
  min-width: 0;
  overflow-wrap: break-word;
}

.side-authors__name:hover {
  color: var(--c-white);
}

.side-authors__views {
  color: var(--c-cream);
  flex-shrink: 0;
  font-family: var(--font-serif-text);
  font-size: 20px;
  letter-spacing: -0.03em;
  line-height: normal;
}

.side-authors__meta {
  color: rgba(214, 214, 214, 0.5);
  display: flex;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  gap: 8px;
  line-height: normal;
  text-transform: uppercase;
}

/* ---------- Секция «Станьте автором» ---------- */

.become-author {
  background: var(--c-dark-gray);
  padding: 80px 0;
}

.become-author__inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 40px 24px;
  justify-content: center;
  margin-inline: auto;
  max-width: calc(1840px + var(--pad) * 2);
  padding-inline: var(--pad);
}

.become-author__content {
  display: flex;
  flex: 1 0 0;
  flex-direction: column;
  gap: 80px;
  max-width: 753px;
  min-width: 300px;
}

.become-author__label {
  color: var(--c-terracotta-dark);
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: normal;
  text-transform: uppercase;
}

.become-author__text-wrap {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.become-author__title {
  color: var(--c-cream);
  font-family: var(--font-serif);
  font-size: clamp(34px, 2.92vw, 56px);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.04;
}

.become-author__text {
  color: var(--c-white);
  font-family: var(--font-serif-text);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: normal;
}

.become-author__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}

.become-author__media {
  flex: 1 0 0;
  max-width: 753px;
  min-width: 300px;
}

.become-author__photo {
  display: block;
  height: 445px;
  object-fit: cover;
  width: 100%;
}

/* ---------- Адаптив ---------- */

/* Узкие колонки: длинные имена авторов и заголовки историй в 442px */
@media (max-width: 1660px) {
  .side-authors__name {
    hyphens: auto;
    overflow-wrap: break-word;
  }
}

@media (max-width: 1280px) {
  .become-author__label {
    font-size: 23px;
  }

  .become-author__text {
    font-size: 20px;
  }

  .become-author__content {
    gap: 48px;
  }

  .side-authors {
    padding: 32px;
  }

  .side-authors__title {
    font-size: 28px;
  }
}

/* Планшет: колонки складываются (общий брейкпоинт проекта) */
@media (max-width: 1100px) {
  .feed--blog .feed-layout {
    display: flex;
    flex-direction: column;
    max-width: none;
  }

  .blog-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 24px;
  }

  .feed-card--story .feed-card__photo {
    height: 380px;
  }
}

@media (max-width: 768px) {
  .blog-block {
    padding-block: 48px;
  }

  .blog-block .blog-plate:not(.blog-plate--top) {
    margin-top: 48px;
  }

  .blog-plate {
    font-size: 18px;
  }

  .feed-card--story .feed-card__photo {
    height: 300px;
  }

  .feed-card--story .feed-card__title {
    font-size: 22px;
  }

  .story-tile__title {
    font-size: 22px;
  }

  .become-author {
    padding: 48px 0;
  }

  .become-author__content {
    gap: 32px;
  }

  .become-author__text {
    font-size: 18px;
  }

  .become-author__photo {
    height: 320px;
  }
}

@media (max-width: 560px) {
  .blog-tiles {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-authors {
    padding: 24px;
  }

  .side-authors__item {
    gap: 16px;
  }

  .become-author__actions .btn {
    width: 100%;
  }
}
