/* ===========================
   Блог — список статей (на всю ширину, .container-wide з header-v2.css)
   =========================== */
.bl { --bl-ink: #1f2133; --bl-muted: #6b6f86; --bl-line: #eceef5; padding-bottom: 20px; }
.bl a { text-decoration: none; }
.bl a:hover { text-decoration: none; }
.bl a:focus-visible { outline: 3px solid #667eea; outline-offset: 2px; border-radius: 10px; }

/* ---- шапка ---- */
.bl-mast { position: relative; overflow: hidden; color: #fff; background: linear-gradient(120deg, #667eea, #764ba2); }
.bl-mast::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -120px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.bl-mast-in {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding-top: 30px;
  padding-bottom: 26px;
}
.bl-crumbs { font-size: 13px; opacity: .85; margin-bottom: 10px; }
.bl-crumbs a { color: #fff; }
.bl-crumbs a:hover { text-decoration: underline; }
.bl-mast h1 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 42px; font-weight: 700; letter-spacing: -.01em; color: #fff; }
.bl-mast p { margin: 6px 0 0; max-width: 62ch; opacity: .9; font-size: 16px; }
.bl-mast-side { display: grid; gap: 10px; justify-items: end; }
.bl-search { position: relative; width: 360px; max-width: 100%; margin: 0; }
.bl-search input {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px 0 44px;
  font-size: 15px;
  color: #1f2133;
  background: #fff;
  box-shadow: 0 8px 20px rgba(20, 10, 60, .2);
}
.bl-search input:focus { outline: 3px solid #ffe066; }
.bl-search i { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: #8a8ea6; }
.bl-stats { display: flex; gap: 18px; font-size: 13px; opacity: .9; }
.bl-stats b { font-size: 16px; }

/* ---- категорії ---- */
.bl-chips {
  background: rgba(246, 247, 251, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e9ebf3;
}
.bl-chips-in { display: flex; gap: 8px; padding-top: 12px; padding-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.bl-chips-in::-webkit-scrollbar { display: none; }
.bl-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e6e8f0;
  font-size: 14px;
  font-weight: 600;
  color: #4b4f66;
  white-space: nowrap;
  transition: border-color .2s ease;
}
.bl-chip:hover { border-color: #667eea; color: #4b4f66; }
.bl-chip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.bl-chip small { color: #9a9eb8; font-weight: 600; }
.bl-chip.is-on { background: linear-gradient(120deg, #667eea, #764ba2); color: #fff; border-color: transparent; }
.bl-chip.is-on small { color: rgba(255, 255, 255, .8); }

.bl-search-note { margin-top: 18px; padding: 12px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--bl-line); color: var(--bl-muted); font-size: 14px; }
.bl-search-note a { margin-left: 10px; color: #667eea; font-weight: 700; }

/* ---- спільне ---- */
.bl-noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #667eea, #764ba2); }
.bl-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 1;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.bl-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: #8a8ea6; font-variant-numeric: tabular-nums; }

/* ---- головна стаття ---- */
.bl-lead { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; padding-top: 24px; padding-bottom: 8px; }
.bl-lead-big {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 420px;
  border-radius: 20px;
  overflow: hidden;
  color: #fff;
  box-shadow: 0 14px 34px rgba(30, 20, 80, .18);
}
.bl-lead-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.bl-lead-big:hover .bl-lead-img { transform: scale(1.03); }
.bl-lead-shade { position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(10, 8, 25, .88)); }
.bl-lead-txt { position: relative; z-index: 1; display: grid; gap: 10px; max-width: 780px; padding: 28px; }
.bl-lead-title { font-family: Georgia, 'Times New Roman', serif; font-size: 32px; font-weight: 700; line-height: 1.12; color: #fff; text-wrap: balance; }
.bl-lead-excerpt { font-size: 15.5px; opacity: .9; color: #fff; }
.bl-lead-big .bl-meta { color: rgba(255, 255, 255, .85); }

.bl-lead-side { display: grid; gap: 18px; }
.bl-mini {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--bl-line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(30, 20, 80, .05);
  transition: transform .2s ease, box-shadow .2s ease;
}
.bl-mini:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(30, 20, 80, .12); }
.bl-mini-img { width: 100%; height: 100%; min-height: 150px; object-fit: cover; display: block; }
.bl-mini-body { display: grid; gap: 6px; align-content: center; padding: 14px 14px 14px 0; min-width: 0; }
.bl-mini-cat { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.bl-mini-title { font-size: 16.5px; font-weight: 700; line-height: 1.25; color: var(--bl-ink); }

/* ---- популярне ---- */
.bl-pop { padding-top: 18px; padding-bottom: 6px; }
.bl-pop-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--bl-line);
  border-radius: 18px;
  padding: 16px 20px;
}
.bl-pop-title { font-family: Georgia, 'Times New Roman', serif; font-size: 21px; font-weight: 700; color: var(--bl-ink); white-space: nowrap; }
.bl-pop-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.bl-pop-item { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 14px; line-height: 1.3; color: var(--bl-ink); min-width: 0; }
.bl-pop-item:hover { color: #764ba2; }
.bl-pop-item b {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 30px;
  line-height: 1;
  background: linear-gradient(120deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bl-pop-item > span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.bl-pop-item small { display: block; margin-top: 3px; color: #9a9eb8; }

/* ---- сітка ---- */
.bl-gridsec { padding-top: 18px; padding-bottom: 10px; }
.bl-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 6px 0 14px; }
.bl-sec-h h2 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 24px; color: var(--bl-ink); }
.bl-sec-h span { color: #8a8ea6; font-size: 14px; }
.bl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.bl-card {
  display: grid;
  grid-template-rows: auto 1fr;
  background: #fff;
  border: 1px solid var(--bl-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(30, 20, 80, .05);
  transition: transform .2s ease, box-shadow .2s ease;
  min-width: 0;
}
.bl-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(30, 20, 80, .13); }
.bl-card-cover { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #eef0f8; }
.bl-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.bl-card:hover .bl-card-cover img { transform: scale(1.04); }
.bl-card-body { display: grid; gap: 8px; align-content: start; padding: 16px; }
.bl-card-title { font-size: 17px; font-weight: 700; line-height: 1.28; color: var(--bl-ink); text-wrap: balance; }
.bl-card-excerpt {
  color: var(--bl-muted);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.bl-tg {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 22px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #229ed9, #2aabee 45%, #667eea);
  box-shadow: 0 12px 26px rgba(34, 158, 217, .3);
}
.bl-tg-ic {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #229ed9;
  font-size: 24px;
  transform: rotate(-6deg);
}
.bl-tg-title { font-size: 20px; font-weight: 800; color: #fff; }
.bl-tg-text { font-size: 14px; opacity: .92; color: #fff; }
.bl .bl-tg-btn { justify-self: start; padding: 10px 18px; border-radius: 12px; background: #fff; color: #229ed9; font-weight: 800; }

/* компактна картка Telegram у правій колонці під двома статтями */
.bl-tg--compact {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  transition: transform .2s ease;
}
.bl-tg--compact:hover { transform: translateY(-3px); color: #fff; }
.bl-tg--compact .bl-tg-ic { width: 44px; height: 44px; font-size: 20px; border-radius: 13px; }
.bl-tg--compact .bl-tg-txt { display: grid; gap: 2px; min-width: 0; }
.bl-tg--compact .bl-tg-title { font-size: 16px; }
.bl-tg--compact .bl-tg-text { font-size: 13px; }
.bl-tg--compact .bl-tg-btn { padding: 8px 14px; font-size: 13px; white-space: nowrap; }

.bl-more { display: flex; justify-content: center; margin-top: 24px; }
.bl-more a {
  padding: 13px 28px;
  border-radius: 14px;
  background: #fff;
  border: 2px solid #e1e4f2;
  font-weight: 800;
  color: #764ba2;
  transition: border-color .2s ease;
}
.bl-more a:hover { border-color: #667eea; color: #764ba2; }
.bl-more a.is-loading { opacity: .6; pointer-events: none; }

.bl-pages { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 14px; font-size: 14px; color: #8a8ea6; }
.bl-pages a { color: #667eea; font-weight: 700; }

.bl-empty { margin: 30px 0; padding: 40px 20px; border-radius: 18px; background: #fff; border: 1px solid var(--bl-line); text-align: center; color: var(--bl-muted); }
.bl-empty-ic { font-size: 42px; margin-bottom: 8px; }
.bl-empty a { color: #667eea; font-weight: 700; }

/* ---- адаптив ---- */
@media (max-width: 1599px) { .bl-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1199px) {
  .bl-pop-list { grid-template-columns: repeat(3, 1fr); }
  .bl-pop-item:nth-child(n+4) { display: none; }
}
@media (max-width: 991px) {
  .bl-mast-in { grid-template-columns: 1fr; padding-top: 70px; }
  .bl-mast-side { justify-items: stretch; }
  .bl-search { width: auto; }
  .bl-stats { display: none; }
  .bl-lead { grid-template-columns: 1fr; }
  .bl-lead-side { grid-template-columns: 1fr 1fr; }
  .bl-lead-side .bl-tg--compact { grid-column: 1 / -1; }
  .bl-grid { grid-template-columns: repeat(2, 1fr); }
  .bl-pop-box { grid-template-columns: 1fr; }
}
@media (max-width: 575px) {
  .bl-mast-in { padding-top: 64px; padding-bottom: 18px; }
  .bl-mast h1 { font-size: 30px; }
  .bl-mast p { font-size: 14.5px; }
  .bl-lead { padding-top: 14px; }
  .bl-lead-big { min-height: 300px; }
  .bl-lead-title { font-size: 22px; }
  .bl-lead-txt { padding: 18px; }
  .bl-lead-excerpt { display: none; }
  /* телефон: дві статті поруч ховаємо, картку Telegram лишаємо */
  .bl-lead-side { grid-template-columns: 1fr; }
  .bl-lead-side .bl-mini { display: none; }
  .bl-tg--compact { grid-template-columns: auto 1fr; }
  .bl-tg--compact .bl-tg-btn { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
  .bl-pop { display: none; }
  .bl-grid { grid-template-columns: 1fr; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .bl-card, .bl-mini, .bl-lead-img, .bl-card-cover img, .bl-chip, .bl-more a { transition: none; }
  .bl-card:hover, .bl-mini:hover { transform: none; }
  .bl-lead-big:hover .bl-lead-img, .bl-card:hover .bl-card-cover img { transform: none; }
}
