/* ==========================================================================
   Грузовой центр «Барсук-КАМАЗ» (Новосибирск)
   Стили новостей и практических статей: news.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Вводный блок списка новостей (Hero)
   -------------------------------------------------------------------------- */
.news-hero {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 32px 0 44px;
}

.news-hero-inner {
  max-width: 960px;
}

.news-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.news-hero-title {
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 20px;
}

.news-hero-desc {
  font-size: var(--font-base);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 860px;
  margin: 0;
}

/* --------------------------------------------------------------------------
   2. Фильтры / Рубрикатор
   -------------------------------------------------------------------------- */
.news-filters-section {
  background-color: var(--bg-page);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  position: sticky;
  top: 60px;
  z-index: 10;
}

.news-filters-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.news-filter-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-base);
  font-size: var(--font-xs);
  font-weight: 500;
  padding: 8px 16px;
  white-space: nowrap;
  cursor: pointer;
  border-radius: 2px;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}

.news-filter-btn:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.news-filter-btn.is-active {
  background-color: var(--text-main);
  color: #FFFFFF;
  border-color: var(--text-main);
}

/* --------------------------------------------------------------------------
   3. Сетка карточек новостей
   -------------------------------------------------------------------------- */
.news-list-section {
  padding: 48px 0 64px;
}

.news-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.news-card {
  background-color: var(--bg-page);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.news-card:hover {
  border-color: var(--accent);
}

.news-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background-color: var(--bg-surface);
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.news-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.news-card:hover .news-card-img {
  transform: scale(1.03);
}

.news-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.news-card-date {
  font-family: var(--font-mono);
  font-size: var(--font-xs);
  color: var(--text-muted);
}

.news-card-read-time {
  font-family: var(--font-mono);
  font-size: var(--font-xs);
  color: var(--text-muted);
}

.news-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}

.news-card-title a {
  color: var(--text-main);
  text-decoration: none;
}

.news-card-title a:hover {
  color: var(--accent);
}

.news-card-lead {
  font-size: var(--font-xs);
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex: 1;
}

.news-card-footer {
  border-top: 1px dashed var(--border-color);
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.news-card-more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.news-card-more-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.news-card-more-link:hover svg {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   4. Страница отдельной статьи (Article Template)
   -------------------------------------------------------------------------- */
.article-hero {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 32px 0 40px;
}

.article-header {
  max-width: 880px;
}

.article-meta-tags {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.article-date,
.article-reading-time {
  font-family: var(--font-mono);
  font-size: var(--font-xs);
  color: var(--text-muted);
}

.article-title {
  font-size: clamp(1.85rem, 3.2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 20px;
}

.article-lead {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 0;
  border-left: 3px solid var(--accent);
  padding-left: 18px;
}

/* Секция контента статьи */
.article-section {
  padding: 48px 0 64px;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.article-main {
  background-color: var(--bg-page);
  border: 1px solid var(--border-color);
  padding: 40px;
}

.article-media-main {
  margin-bottom: 36px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  overflow: hidden;
}

.article-media-main img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  display: block;
}

.article-media-caption {
  padding: 10px 16px;
  font-size: var(--font-xs);
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  font-family: var(--font-mono);
}

.article-body-content {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-main);
}

.article-body-content p {
  margin-bottom: 24px;
}

.article-body-content p:last-child {
  margin-bottom: 0;
}

.article-callout-box {
  background-color: var(--bg-surface);
  border-left: 4px solid var(--accent);
  padding: 24px;
  margin: 32px 0;
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.article-callout-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.article-callout-text {
  font-size: var(--font-xs);
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

.article-footer-nav {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.article-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
}

.article-back-link:hover {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   5. Боковая колонка статьи (Sidebar)
   -------------------------------------------------------------------------- */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.article-side-card {
  background-color: var(--bg-page);
  border: 1px solid var(--border-color);
  padding: 24px;
}

.article-side-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.article-side-recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-side-recent-item {
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 12px;
}

.article-side-recent-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.article-side-recent-date {
  font-family: var(--font-mono);
  font-size: var(--font-xs);
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.article-side-recent-link {
  font-size: var(--font-xs);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
  text-decoration: none;
}

.article-side-recent-link:hover {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   6. Адаптивность
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .news-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .article-main {
    padding: 24px;
  }
}

@media (max-width: 640px) {
  .news-cards-grid {
    grid-template-columns: 1fr;
  }

  .news-filters-wrap {
    gap: 6px;
  }

  .article-header {
    max-width: 100%;
  }

  .article-footer-nav {
    flex-direction: column;
    align-items: flex-start;
  }
}
