@charset "UTF-8";

/* ─────────────────────────────────────────────
       ОБЁРТКА ЛЕНТЫ
    ───────────────────────────────────────────── */
.news-feed {
  --news-padding: 0.95rem;
  --color-accent: #460f01;
  --color-muted: #7a746a;
  --color-border: #f0f0f0;
  --radius: 0.7rem;

  display: flex;
  flex-direction: column;
  gap: 1.5rem;

  /* БЛОК НОВОСТИ */
  .news-item {
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* grid-template-rows: auto 160px; */
    gap: 0 0.95rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: box-shadow 0.2s ease;
    padding: var(--news-padding);
    background-color: white;
  }

  /* .news-item:hover {
    box-shadow: 0 4px 12px rgb(0 0 0/0.08);
  } */

  .news-header {
    grid-column: 1/-1;
    grid-row: 1;
    align-items: baseline;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1rem;
  }

  .news-feed__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: white;
    padding: var(--news-padding);
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
    /* box-shadow: var(--shadow); */
  }

  .news-feed__caption {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: space-between;
  }

  .news-feed__header-subscribe {
    /* color: var(--color-accent); */
    text-decoration: none;
    font-size: 0.9rem;
    color: #505050;
  }

  .news-feed__header-subscribe:hover {
    text-decoration: underline;
  }

  .news-feed__header-icon {
    width: 36px;
    height: 36px;
  }

  .news-title {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;

    a {
      color: inherit;
      text-decoration: none;
    }

    a:hover {
      color: var(--color-accent);
    }
  }

  .news-date {
    font-size: 0.78rem;
    font-style: italic;
    color: var(--color-muted);
    letter-spacing: 0.04rem;
    white-space: nowrap;
  }

  .news-figure {
    grid-column: 1;
    grid-row: 2;
    border-radius: calc(var(--radius) - 2px);
    overflow: hidden;

    img {
      display: block;
      max-width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }

  .news-body {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
  }

  .news-excerpt {
    color: #505050;
    font-size: 0.92rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    overflow: hidden;
  }

  .news-action {
    align-self: flex-start;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--color-accent);
  }

  /* НОВОСТЬ БЕЗ ТЕКСТА — только картинка */
  .news-item:not(:has(.news-body)) .news-figure {
    grid-column: 1/-1;
    grid-row: 2;
    display: flex;
    justify-content: center;
  }
}
