/* ============================================================
   Блог (листинг) — изолированные стили
   Префикс: blg- (всё под .blg-root). База — news.css (nws-), отличия:
   нет «горячих дат», на карточке несколько тегов (4 фикс. цвета),
   мета = просмотры+чтение (без даты), фильтр — мультивыбор 4 тегов.
   Токены/ресет/шрифт на .blg-root, НЕ глобально. Контейнер 1297px.
   ============================================================ */

body { margin: 0; }

.blg-root {
  --blg-accent: #FE5D26;
  --blg-accent-hover: #D95427;
  --blg-black: #312D2B;
  --blg-text: #272F3D;
  --blg-bg: #F6F6F6;
  --blg-white: #FFFFFF;
  --blg-border: rgba(49, 45, 43, 0.1);
  --blg-card-shadow: 0 1px 4px 0 rgba(49, 45, 43, 0.08);
  --blg-transition: .25s ease;
  --blg-radius-lg: 24px;

  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--blg-text);
  background-color: var(--blg-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.blg-root *,
.blg-root *::before,
.blg-root *::after { box-sizing: border-box; }

.blg-root :where(h1, h2, h3, p) { margin: 0; }
.blg-root a { text-decoration: none; color: inherit; }
.blg-root img { max-width: 100%; height: auto; display: block; }
.blg-root button { font-family: inherit; }

/* --- Контейнер --- */
.blg-container {
  max-width: 1327px; /* контент 1297px */
  margin: 0 auto;
  padding: 24px 15px 0;
}

/* --- Heading --- */
.blg-heading { padding: 24px 0 28px; }

.blg-heading-title {
  font-size: 32px;
  font-weight: 500;
  line-height: 40px;
  color: var(--blg-black);
}

/* --- Filters (мультивыбор 4 тегов + «Все») --- */
.blg-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.blg-filter-btn {
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--blg-border);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--blg-text);
  cursor: pointer;
  transition: all var(--blg-transition);
  white-space: nowrap;
}

.blg-filter-btn:hover { border-color: var(--blg-accent); color: var(--blg-accent); }

.blg-filter-btn--active {
  background: var(--blg-accent);
  border-color: var(--blg-accent);
  color: var(--blg-white);
}

.blg-filter-btn--active:hover {
  background: var(--blg-accent-hover);
  border-color: var(--blg-accent-hover);
  color: var(--blg-white);
}

/* --- Listing --- */
.blg-listing { padding-bottom: 16px; }

.blg-listing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.blg-listing-title {
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
  color: var(--blg-black);
}

.blg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.blg-card[hidden] { display: none; }

/* --- Card --- */
.blg-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--blg-radius-lg);
  background: var(--blg-white);
  box-shadow: var(--blg-card-shadow);
  overflow: hidden;
  transition: transform var(--blg-transition), box-shadow var(--blg-transition);
}

.blg-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(49, 45, 43, 0.1);
}

.blg-card-img {
  position: relative;
  padding: 8px;
  overflow: hidden;
}

.blg-card-img img {
  width: 100%;
  aspect-ratio: 404 / 303;
  object-fit: cover;
  border-radius: 16px;
}

/* Несколько тегов — контейнер top-left */
.blg-card-tags {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  z-index: 1;
  max-width: calc(100% - 40px);
}

.blg-card-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--blg-white);
  color: var(--blg-black);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.blg-tag--holidays { background: #4454EB; color: var(--blg-white); }
.blg-tag--equipment { background: #0891B2; color: var(--blg-white); }
.blg-tag--tips { background: #D97706; color: var(--blg-white); }
.blg-tag--interesting { background: #9333EA; color: var(--blg-white); }

/* Hover icon */
.blg-card-hover {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 1;
}

.blg-card:hover .blg-card-hover { top: 20px; right: 20px; opacity: 1; }

/* Card content */
.blg-card-content {
  padding: 8px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Мета: просмотры + время чтения */
.blg-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 16px;
  color: var(--blg-text);
  opacity: 0.5;
}

.blg-card-views::before,
.blg-card-read::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
  background: currentColor;
}

.blg-card-views::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M1.333 8s2.667-4.667 6.667-4.667S14.667 8 14.667 8s-2.667 4.667-6.667 4.667S1.333 8 1.333 8z' stroke='currentColor' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='8' cy='8' r='2' stroke='currentColor' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M1.333 8s2.667-4.667 6.667-4.667S14.667 8 14.667 8s-2.667 4.667-6.667 4.667S1.333 8 1.333 8z' stroke='currentColor' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='8' cy='8' r='2' stroke='currentColor' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.blg-card-read::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='8' cy='8' r='6.667' stroke='currentColor' stroke-width='1.2'/%3E%3Cpath d='M8 4.667V8l2.333 1.333' stroke='currentColor' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='8' cy='8' r='6.667' stroke='currentColor' stroke-width='1.2'/%3E%3Cpath d='M8 4.667V8l2.333 1.333' stroke='currentColor' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.blg-card-title {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: var(--blg-black);
  margin-bottom: 8px;
}

.blg-card-text {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--blg-black);
  opacity: 0.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === Навигация листинга: «Показать ещё» + пагинация === */
.blg-navigation-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 0;
  padding-bottom: 64px;
}

.blg-root .blg-show-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 10px;
  background: var(--blg-white);
  box-shadow: var(--blg-card-shadow);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--blg-text);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.blg-root .blg-show-more:hover { background-color: var(--blg-accent); color: var(--blg-white); }

.blg-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.blg-root .blg-pagination-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--blg-white);
  box-shadow: var(--blg-card-shadow);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--blg-text);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.blg-root .blg-pagination-link:hover { background-color: var(--blg-accent); color: var(--blg-white); }

.blg-root .blg-pagination-link--active {
  background-color: var(--blg-accent);
  color: var(--blg-white);
  pointer-events: none;
}

.blg-pagination-arrow svg { display: block; }

/* ========== Responsive ========== */
@media screen and (max-width: 991px) {
  .blg-grid { grid-template-columns: repeat(2, 1fr); }
}

@media screen and (max-width: 768px) {
  .blg-heading { padding: 16px 0 20px; }
  .blg-heading-title { font-size: 24px; line-height: 32px; }
  .blg-grid { grid-template-columns: 1fr; gap: 12px; }
  .blg-listing { padding-bottom: 8px; }
  .blg-filter-btn { padding: 6px 14px; font-size: 13px; }

  .blg-navigation-block {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-bottom: 40px;
  }
  .blg-pagination { margin-left: 0; justify-content: center; }
}

@media screen and (max-width: 480px) {
  .blg-heading-title { font-size: 24px; line-height: 32px; }
  .blg-card-content { padding: 8px 16px 20px; }
}
