/*
Theme Name: Baribar News
Theme URI: https://baribar.kz
Author: Baribar
Description: Жылдам, таза WordPress жаңалық шаблоны
Version: 3.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: baribar
*/

/* ════════════════════════════════════════════
   VARIABLES
════════════════════════════════════════════ */
:root {
  --black:  #111;
  --gray-7: #444;
  --gray-5: #888;
  --gray-3: #bbb;
  --gray-1: #f4f4f4;
  --white:  #fff;
  --border: #e8e8e8;
  --radius: 10px;
  --font:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --gap:    20px;
  --wrap:   1200px;
  --hdr-h:  72px;
}

/* ════════════════════════════════════════════
   RESET
════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  padding-top: var(--hdr-h); /* fixed header offset */
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input { font: inherit; }

/* ════════════════════════════════════════════
   LAYOUT
════════════════════════════════════════════ */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}
main > .wrap:first-child {
  padding-top: 40px;
}
@media (max-width: 768px) {
  main > .wrap:first-child { padding-top: 20px; }
  .home-wrap { padding: 5px 0 24px; }
}

/* ════════════════════════════════════════════
   HOMEPAGE: 2-COLUMN GRID (content + sidebar)
════════════════════════════════════════════ */
.home-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-rows: auto;
  column-gap: 0;
  padding: 0 0 48px;
  align-items: start; /* ← sticky үшін міндетті */
}
.home-content { min-width: 0; padding-right: 30px; box-sizing: border-box; }
.sidebar      { min-width: 0; }

/* ════════════════════════════════════════════
   HERO CARD
════════════════════════════════════════════ */
.hero-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray-1);
  margin-bottom: var(--gap);
  display: block;
}
.hero-card__img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.hero-card__body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 48px 20px 18px;
  background: linear-gradient(to top, rgba(0,0,0,.80) 0%, rgba(0,0,0,.3) 60%, transparent 100%);
}
.hero-card__cat {
  font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255,255,255,.65);
  margin-bottom: 7px;
  display: flex; align-items: center; gap: 6px;
}
.hero-card__title {
  font-size: clamp(1.1rem, 2.5vw, 1.65rem);
  font-weight: 700; line-height: 1.25; color: #fff;
}
.hero-card__title a { color: inherit; }
.hero-card__title a:hover { opacity: .88; }

/* ════════════════════════════════════════════
   POST GRID
════════════════════════════════════════════ */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  margin-bottom: 0;
}
.post-card { display: flex; flex-direction: column; }

.post-card__thumb {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--gray-1);
  aspect-ratio: 16/9;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.post-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.post-card:hover .post-card__thumb img { transform: scale(1.04); }

.post-card__cat {
  position: absolute; bottom: 8px; left: 8px;
  font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  background: var(--black); color: var(--white);
  padding: 3px 7px; border-radius: 4px;
}
.post-card__title {
  font-size: .95rem; font-weight: 600; line-height: 1.35;
  color: var(--black); margin-bottom: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card__title a:hover { text-decoration: underline; text-underline-offset: 2px; }
.post-card__meta {
  margin-top: auto;
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--gray-5);
  flex-wrap: wrap;
}
.post-card__meta .sep { color: var(--gray-3); }
.post-card__excerpt {
  font-size: 12.5px; color: var(--gray-7); line-height: 1.5;
  margin-top: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ════════════════════════════════════════════
   SECTION HEADING
════════════════════════════════════════════ */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1.5px solid var(--black);
}
.section-title {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -.02em;
  text-transform: none;
  color: var(--black);
  line-height: 1.2;
}
.see-all {
  font-size: 12px; font-weight: 600;
  color: var(--gray-5); transition: color .15s;
  white-space: nowrap;
}
.see-all:hover { color: var(--black); }
.mt-section { margin-top: 32px; }

/* ════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════ */
.currency-widget {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  margin-bottom: 18px;
}
.currency-item {
  background: var(--white); padding: 10px 10px 10px 12px;
}
.currency-item__sym  { font-size: 1.1rem; font-weight: 700; color: var(--black); }
.currency-item__prev { font-size: 10px; color: var(--gray-3); text-decoration: line-through; min-height: 14px; }
.currency-item__val  { font-size: 1rem; font-weight: 700; color: var(--black); }

.news-list-widget {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: visible;
}
.news-list-widget__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 14px;
  border-bottom: 2px solid var(--black);
  margin-bottom: 0;
}
.news-list-widget__head span {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--black);
  text-transform: none;
}
.news-list-item {
  display: block; padding: 11px 0;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.news-list-item:last-child { border-bottom: none; }
.news-list-item:hover { background: var(--gray-1); }
.news-list-item__date {
  font-size: 11px; color: var(--gray-5);
  margin-bottom: 4px;
  display: flex; align-items: center; gap: 5px;
}
.news-list-item__date svg { width: 12px; height: 12px; flex-shrink: 0; color: var(--gray-3); }
.news-list-item__title {
  font-size: 13px; font-weight: 500;
  line-height: 1.4; color: var(--black);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-list-item:hover .news-list-item__title { text-decoration: underline; text-underline-offset: 2px; }
.news-list-item.is-active .news-list-item__title { font-weight: 600; }

.ad-block {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-3);
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 18px;
}
.ad-block--300x250 { height: 250px; }
.ad-block--300x280 { height: 280px; }

/* ════════════════════════════════════════════
   SINGLE POST  (Qumash.kz стилі)
════════════════════════════════════════════ */
.post-header { margin-bottom: 24px; margin-top: 0; }

/* Breadcrumb: Басты бет › Санат · Күн — Qumash стилі */
.post-header__cat {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 400;
  color: var(--gray-5);
  margin-bottom: 14px;
  line-height: 1.4;
}
.post-header__home {
  color: var(--gray-5);
  font-weight: 400;
  font-size: 13px;
  transition: color .15s;
}
.post-header__home:hover { color: var(--black); }
.post-header__cat a {
  color: var(--hdr-bg, #4d5d9a);
  font-weight: 400;
  font-size: 13px;
  transition: color .15s;
}
.post-header__cat a:hover { opacity: .75; }
.post-header__date {
  color: var(--gray-5);
  font-size: 13px;
}
.post-header__sep {
  color: var(--gray-3);
  margin: 0 6px;
}

.post-header h1 {
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--black);
  margin-bottom: 16px;
  letter-spacing: -.01em;
}
.post-header__meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; color: var(--gray-5); flex-wrap: wrap;
}
.post-header__meta .sep { color: var(--gray-3); }

/* Featured image */
.post-thumbnail {
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

/* Caption сыртқа шығу үшін overflow жоқ */
.post-thumbnail figcaption,
.post-thumbnail__caption {
  font-size: 14px;
  color: #848484;
  line-height: 1.5;
  font-style: normal;
  text-align: left;
  margin-top: 6px;
  margin-bottom: 20px;
  padding: 0 4px;
}

/* caption — see h5 section above */
.post-thumbnail figcaption,
.wp-caption-text,
.post-content figcaption,
.post-content .wp-caption-text {
  font-size: 14px;
  color: #848484;
  line-height: 1.5;
  font-style: normal;
  text-align: left;
  margin-top: 8px;
  padding: 5px;
  border-left: none;
  background: none;
  border-radius: 0;
}

/* ── POST CONTENT (мақала мәтіні) ── */
.post-content {
  font-size: 17px;
  line-height: 1.8;
  color: #1a1a1a;
  font-family: var(--font);
}

/* Элементтер арасы */
.post-content > * { margin-bottom: 1.35rem; }
.post-content > *:last-child { margin-bottom: 0; }

/* Тақырыпшалар (h2, h3, h4) */
.post-content h2 {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--black);
  margin-top: 2.2rem;
  margin-bottom: .75rem;
  letter-spacing: -.01em;
}
.post-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--black);
  margin-top: 1.8rem;
  margin-bottom: .6rem;
}
.post-content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--black);
  margin-top: 1.5rem;
  margin-bottom: .5rem;
}
.post-content h5 {
  font-size: 17px;
  line-height: 25px;
  font-weight: 700;
  color: var(--black);
  margin-top: 1.3rem;
  margin-bottom: 1.35rem;
}

/* Сурет сипаттамасы (caption) */
/* caption styles — see line 339 */

/* Параграф */
.post-content p { margin-bottom: 1.35rem; }

/* Сілтемелер */
.post-content a {
  color: #0a21ee;
  text-decoration: none;
  border-bottom: 1px solid #0a21ee;
  transition: all .2s ease;
}
.post-content a:hover {
  color: #0815b8;
  border-bottom-color: transparent;
}

/* Пікір (blockquote) — Qumash стилі */
.post-content blockquote {
  position: relative;
  border-left: 5px solid var(--hdr-bg, #4d5d9a);
  margin: 2rem 0;
  padding: 24px 24px 24px 28px;
  background: #f7f8fc;
  border-radius: 0 8px 8px 0;
  font-style: normal;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--gray-7);
}
.post-content blockquote p { margin-bottom: 0; font-style: normal; font-weight: 600; }
.post-content blockquote cite,
.post-content blockquote footer {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  color: var(--gray-5);
}

/* Тізімдер (ul, ol, li) */
.post-content ul,
.post-content ol {
  padding-left: 0;
  margin-bottom: 1.35rem;
  list-style: none;
}
.post-content ul li,
.post-content ol li {
  position: relative;
  padding-left: 20px;
  margin-bottom: .55rem;
  line-height: 1.7;
  color: #1a1a1a;
}
/* ul: дөңгелек нүкте */
.post-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--black);
  flex-shrink: 0;
}
/* ol: нөмір */
.post-content ol {
  counter-reset: bb-ol;
}
.post-content ol li {
  counter-increment: bb-ol;
  padding-left: 28px;
}
.post-content ol li::before {
  content: counter(bb-ol) '.';
  position: absolute;
  left: 0;
  top: 0;
  font-size: .92em;
  font-weight: 700;
  color: var(--black);
  line-height: 1.7;
}

/* Суреттер */
.post-content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.6rem auto;
}
.post-content figure {
  margin: 1.6rem 0;
}
.post-content figure img { margin: 0 auto; }

/* Таблица */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 1.35rem;
}
.post-content th {
  background: var(--gray-1);
  font-weight: 700;
  padding: 9px 12px;
  border: 1px solid var(--border);
  text-align: left;
}
.post-content td {
  padding: 8px 12px;
  border: 1px solid var(--border);
  vertical-align: top;
}
.post-content tr:nth-child(even) td { background: rgba(0,0,0,.02); }

/* Бөлгіш сызық */
.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Код */
.post-content code {
  font-family: 'Courier New', monospace;
  font-size: .88em;
  background: var(--gray-1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--black);
}
.post-content pre {
  background: var(--gray-1);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 1.35rem;
}
.post-content pre code {
  background: none;
  padding: 0;
  font-size: .9em;
}

/* Mobile */
@media (max-width: 768px) {
  .post-content { font-size: 16px; line-height: 1.75; }
  .post-content h2 { font-size: 1.25rem; }
  .post-content h3 { font-size: 1.1rem; }
  .post-content blockquote { font-size: 1rem; padding: 12px 16px; }
  .post-header h1 { font-size: clamp(1.4rem, 5.5vw, 1.9rem); }
}
@media (max-width: 480px) {
  .post-content { font-size: 15.5px; }
  .post-content h2 { font-size: 1.15rem; }
}

.share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  margin: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ── Сол жақ: Жазылу батырмалары ─────────── */
.share-bar__follow {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.share-bar__follow-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  white-space: nowrap;
}

/* Grouped border buttons — скриншот стилі */
.follow-btns-group {
  display: flex;
  align-items: stretch;
}
.follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1.5px solid #222;
  border-right: none;
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .12s;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1;
}
.follow-btn:first-child { border-radius: 8px 0 0 8px; }
.follow-btn:last-child  { border-right: 1.5px solid #222; border-radius: 0 8px 8px 0; }
.follow-btn:only-child  { border-right: 1.5px solid #222; border-radius: 8px; }
.follow-btn:hover       { background: var(--gray-1); }
.follow-btn svg         { width: 16px; height: 16px; flex-shrink: 0; }
.follow-btn--tg svg     { color: #2AABEE; }
.follow-btn--ig svg     { color: #E1306C; }
.follow-btn--tt svg     { color: #010101; }
.follow-btn--fb svg     { color: #1877F2; }

/* ── Оң жақ: Сілтеме + Бөлісу ────────────── */
.share-bar__share {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-left: auto;
}

/* СІЛТЕМЕ батырмасы — bordered */
.share-btn--link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1.5px solid #222;
  border-right: none;
  border-radius: 8px 0 0 8px;
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .12s;
  white-space: nowrap;
  line-height: 1;
}
.share-btn--link:hover { background: var(--gray-1); }
.share-btn--link svg   { width: 15px; height: 15px; }

/* Бөлісу батырмасы — қара */
.share-btn--share-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  border: 1.5px solid #222;
  border-radius: 0 8px 8px 0;
  background: #222;
  color: #fff;
  cursor: pointer;
  transition: background .12s;
}
.share-btn--share-dark:hover { background: #000; }
.share-btn--share-dark svg   { width: 18px; height: 18px; }

/* Mobile */
@media (max-width: 640px) {
  .share-bar         { flex-direction: column; align-items: flex-start; gap: 14px; }
  .share-bar__share  { margin-left: 0; }
  .follow-btn        { padding: 8px 12px; font-size: 10.5px; }
  .share-btn--link   { padding: 8px 12px; font-size: 10.5px; }
}

/* ════════════════════════════════════════════
   PAGINATION
════════════════════════════════════════════ */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 5px; padding: 24px 0; flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 6px;
  font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--border);
  background: var(--white); color: var(--gray-7);
  transition: all .15s;
}
.pagination a:hover { background: var(--black); border-color: var(--black); color: #fff; }
.pagination .current { background: var(--black); border-color: var(--black); color: #fff; }



/* ════════════════════════════════════════════
   UTILITIES
════════════════════════════════════════════ */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ════════════════════════════════════════════
   HOMEPAGE BUILDER BLOCKS
════════════════════════════════════════════ */
.bb-section { margin-bottom: 30px; }

/* List item (horizontal) */
.bb-list-item {
  display: flex; gap: 12px; padding: 11px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none; transition: background .1s;
}
.bb-list-item:last-child { border-bottom: none; }
.bb-list-item:hover .bb-list-item__title { text-decoration: underline; text-underline-offset: 2px; }
.bb-list-item__thumb {
  width: 88px; height: 66px; border-radius: 6px;
  overflow: hidden; flex-shrink: 0; background: var(--gray-1);
}
.bb-list-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.bb-list-item__body { flex: 1; min-width: 0; }
.bb-list-item__cat {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  background: var(--black); color: var(--white);
  padding: 2px 6px; border-radius: 3px; margin-bottom: 4px;
}
.bb-list-item__title {
  font-size: 13.5px; font-weight: 600; color: var(--black);
  line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.bb-list-item__meta { font-size: 11.5px; color: var(--gray-5); margin-top: 4px; }

/* Ticker */
.bb-ticker {
  display: flex; align-items: center; gap: 0;
  background: var(--black); overflow: hidden;
  margin-bottom: 0;
}
.bb-ticker__label {
  font-size: 10px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  color: #fff; white-space: nowrap;
  padding: 9px 14px; flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,.15);
}
.bb-ticker__wrap { flex: 1; overflow: hidden; padding: 9px 14px; }
.bb-ticker__track {
  display: flex; gap: 40px;
  animation: bbTick 40s linear infinite;
  white-space: nowrap; will-change: transform;
}
.bb-ticker__track:hover { animation-play-state: paused; }
.bb-ticker__item { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.85); flex-shrink: 0; }
.bb-ticker__item:hover { color: #fff; }
@keyframes bbTick { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Slider */
.bb-slider { position: relative; overflow: hidden; border-radius: var(--radius); }
.bb-slider__track { display: flex; transition: transform .4s ease; }
.bb-slider__item  { min-width: 100%; }
.bb-slider__prev, .bb-slider__next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; background: rgba(255,255,255,.9);
  border: none; border-radius: 50%; font-size: 1.3rem;
  cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
}
.bb-slider__prev { left: 10px; }
.bb-slider__next { right: 10px; }
.bb-slider__dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 10;
}
.bb-slider__dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; }
.bb-slider__dot.is-active { background: #fff; }

/* Tabs */
.bb-tabs__nav {
  display: flex; border-bottom: 1px solid var(--border);
  margin-bottom: 16px; overflow-x: auto; scrollbar-width: none;
}
.bb-tabs__nav::-webkit-scrollbar { display: none; }
.bb-tabs__btn {
  font-size: 13px; font-weight: 600; color: var(--gray-5);
  padding: 9px 16px; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  background: none; cursor: pointer; white-space: nowrap; transition: all .15s;
}
.bb-tabs__btn.is-active, .bb-tabs__btn:hover { color: var(--black); border-bottom-color: var(--black); }
.bb-tabs__pane          { display: none; }
.bb-tabs__pane.is-active { display: block; }

.bb-ad-block { text-align: center; margin: 4px 0; }

/* ════════════════════════════════════════════
   SEARCH OVERLAY (old class — kept for compat)
════════════════════════════════════════════ */
.search-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 500;
  background: rgba(255,255,255,.97);
  align-items: flex-start; justify-content: center;
  padding-top: 80px;
}
.search-overlay.is-open { display: flex; }
.search-overlay form {
  display: flex; width: 100%; max-width: 640px;
  border-bottom: 2px solid var(--black);
}
.search-overlay input {
  flex: 1; font-size: 1.4rem; font-weight: 500;
  border: none; outline: none; background: none;
  padding: 10px 0; color: var(--black);
}
.search-overlay input::placeholder { color: var(--gray-3); }
.search-overlay .close-search {
  font-size: 1.8rem; color: var(--gray-5);
  padding: 0 12px; cursor: pointer;
}

/* ════════════════════════════════════════════
   RESPONSIVE  ★ MOBILE FIRST ★
════════════════════════════════════════════ */

/* ── 1024px ── */
@media (max-width: 1024px) {
  :root { --wrap: 100%; }
  .home-wrap         { grid-template-columns: minmax(0,1fr) 340px; column-gap: 0; }
  .post-grid         { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer-grid       { grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* ── 768px ── */
@media (max-width: 768px) {
  :root { --gap: 16px; --hdr-h: 60px; }

  .wrap { padding: 0 18px; }

  /* Sidebar goes BELOW content on mobile */
  .home-wrap {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px 0 24px;
  }
  /* Sidebar: horizontal currency + hide long news list */
  .sidebar { order: 2; }
  .news-list-widget { display: none; } /* hidden on mobile — content takes priority */
  .currency-widget  { margin-bottom: 12px; }

  /* Grid: 1 col on mobile */
  .post-grid { grid-template-columns: 1fr; }

  /* Hero: shorter on mobile */
  .hero-card__body { padding: 32px 14px 14px; }
  .hero-card__title { font-size: 1.1rem; }

  /* Footer */
  .footer-grid   { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Ticker: hide label on mobile */
  .bb-ticker__label { display: none; }
}

/* ── 480px ── */
@media (max-width: 480px) {
  :root { --gap: 14px; }

  .wrap { padding: 0 18px; }

  .home-wrap { padding: 24px 0 24px; }

  .hero-card__title { font-size: 1rem; }

  /* Post card: horizontal layout on mobile (thumb left, title right) */
  .post-card {
    flex-direction: row;
    gap: 12px;
  }
  .post-card:last-child { }
  .post-card__thumb {
    width: 100px;
    height: 75px;
    aspect-ratio: unset;
    flex-shrink: 0;
    margin-bottom: 0;
  }
  .post-card__cat    { bottom: 5px; left: 5px; font-size: 9px; padding: 2px 5px; }
  .post-card__title  { font-size: .88rem; -webkit-line-clamp: 3; margin-bottom: 5px; }
  .post-card__excerpt { display: none; }

  /* Grid override for small: 1 col stacked */
  .post-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .footer-grid { gap: 16px; }

  /* Pagination: smaller */
  .pagination a, .pagination span { width: 32px; height: 32px; font-size: 12px; }
}

/* ════════════════════════════════════════════
   SINGLE POST — AUTHOR CARD  (Qumash style)
════════════════════════════════════════════ */
.post-author-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 5px 0 5px;
  text-decoration: none;
  transition: opacity .15s;
}
.post-author-card:hover { opacity: .8; }

.post-author-card__avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gray-1);
  border: 2px solid var(--border);
}
.post-author-card__info {
  display: flex; flex-direction: column; gap: 3px;
}
.post-author-card__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.2;
}
.post-author-card__role {
  font-size: 13px;
  font-weight: 400;
  color: var(--gray-5);
  line-height: 1.2;
}

/* Reading time line */
.post-header__reading {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--gray-5);
  margin-top: 2px;
}

/* Thumbnail caption */
.post-thumbnail__caption {
  font-size: 14px;
  color: #848484;
  line-height: 1.5;
  font-style: normal;
  text-align: left;
  margin-top: 8px;
  padding: 5px;
}


.post-tag {
  font-size: 12px; font-weight: 600;
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--gray-7);
  transition: background .15s, color .15s, border-color .15s;
}
.post-tag:hover {
  background: var(--black); color: #fff; border-color: var(--black);
}


  .next-post-scroll__title { font-size: .9rem; }
  .post-author-card__avatar { width: 48px; height: 48px; }
}

/* ════════════════════════════════════════════
   INFINITE SCROLL
════════════════════════════════════════════ */

/* Мақалалар арасындағы бөлгіш */

/* Divider text via pseudo — use data instead */
.bb-infinite-article 
/* Жүктелу spinner */
#bb-loading-indicator svg {
  color: var(--gray-3);
}

/* Mobile */
@media (max-width: 480px) {
  .post-author-card__avatar { width: 48px; height: 48px; }
  .post-author-card__name   { font-size: 13px; }
  .post-author-card__role   { font-size: 11px; }
}

/* Override — use a simple styled HR approach */

/* ════════════════════════════════════════════
   INFINITE SCROLL
════════════════════════════════════════════ */
/* Мақалалар арасындағы жай сызық */
hr.bb-infinite-divider {
  border: none;
  border-top: 2px solid var(--border);
  margin: 48px 0 0;
}

/* Mobile author card reading time inline */
@media (max-width: 480px) {
  .post-author-card__avatar { width: 48px; height: 48px; }
}

/* ════════════════════════════════════════════
   STICKY SIDEBAR + AUTOSCROLL NEWS LIST
════════════════════════════════════════════ */

/* Sticky жұмыс жасауы үшін:
   1. Parent (home-wrap) — align-items: start ✓
   2. html/body — overflow-x: clip (hidden емес!) ✓
   3. Sidebar өзінде overflow болмауы керек ✓ */
.sidebar {
  position: sticky;
  top: calc(var(--hdr-h) + 16px);
  align-self: start;
  border-left: 1px solid var(--border);
  padding-left: 30px;
  box-sizing: border-box;
}
.sidebar::-webkit-scrollbar { display: none; }

/* Sidebar-inner де overflow болмасын */
.sidebar-inner {
  /* overflow: hidden — ЖОҚ */
}

/* Жаңалықтар widget-ті: тек биіктік шектеу + clip */
.news-list-widget {
  overflow: hidden;
  /* Биіктік JS арқылы есептелгеннен кейін wrapper translate жасайды */
}

/* Scroll wrapper */
.news-list-scroll {
  will-change: transform;
}

/* Admin bar болса — top мәнін жөндеу */
.admin-bar .sidebar {
  top: calc(var(--hdr-h) + 32px + 16px);
}
@media screen and (max-width: 782px) {
  .admin-bar .sidebar {
    top: calc(var(--hdr-h) + 46px + 16px);
  }
}

/* Мобильде sticky өшіру */
@media (max-width: 768px) {
  .sidebar {
    position: static;
    max-height: none;
    border-left: none;
    padding-left: 0;
  }
  .home-content {
    padding-right: 0;
  }
}

/* ════════════════════════════════════════════
   INFINITE SCROLL
════════════════════════════════════════════ */

/* Мақалалар арасындағы жай сызық — жоғары төмен ақ жоқ */
hr.bb-infinite-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 28px;
}

/* Жүктелу spinner */
#bb-loading-indicator svg { color: var(--gray-3); }

/* bb-infinite-wrap — .wrap-тің padding-ын мұраға алады, қосымша ақ жоқ */
.bb-infinite-wrap {
  padding-left: 0;
  padding-right: 0;
}
.bb-infinite-wrap .home-wrap {
  padding-top: 0;
}

/* Автор карточкасы (мобильде) */
@media (max-width: 480px) {
  .post-author-card__avatar { width: 48px; height: 48px; }
  .post-author-card__name   { font-size: 13px; }
  .post-author-card__role   { font-size: 11px; }
}

/* ════════════════════════════════════════════
   ARCHIVE / CATEGORY / TAG / AUTHOR  (Qumash style)
════════════════════════════════════════════ */

/* ── Archive header ── */
.arc-header {
  padding: 5px 0 20px;
  border-bottom: 1.5px solid var(--black);
  margin-bottom: 4px;
}
.arc-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--black);
  letter-spacing: -.02em;
  margin: 0 0 6px;
}
.arc-desc {
  font-size: 14px;
  color: var(--gray-5);
  margin: 6px 0 0;
  line-height: 1.5;
}
.arc-desc p { margin: 0; }
.arc-desc p + p { margin-top: 6px; }
.arc-count {
  font-size: 13px;
  color: var(--gray-5);
  margin: 6px 0 0;
}
/* Tag badge */
.arc-tag-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--black);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 10px;
}

/* ── Author card ── */
.arc-author-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px 0 28px;
  border-bottom: 1.5px solid var(--black);
  margin-bottom: 8px;
}
.arc-author-card__avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gray-1);
  box-shadow: 0 2px 16px rgba(0,0,0,.1);
}
.arc-author-card__info { flex: 1; min-width: 0; }
.arc-author-card__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--hdr-bg, #4d5d9a);
  margin: 0 0 8px;
  display: block;
}
.arc-author-card__name {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--black);
  margin: 0 0 6px;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.arc-author-card__role {
  font-size: 14px;
  color: var(--gray-5);
  margin: 0 0 10px;
  font-weight: 500;
}
.arc-author-card__bio {
  font-size: 14px;
  line-height: 1.65;
  color: var(--gray-7);
  margin: 0 0 10px;
  max-width: 560px;
}
}

/* ── Post list ── */
.arc-list {
  display: flex;
  flex-direction: column;
}

/* ── Single arc-item (Qumash: horizontal) ── */
.arc-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.arc-item:last-child { border-bottom: none; }
.arc-item:hover .arc-item__title a { text-decoration: none; color: var(--gray-7); }

/* Thumbnail */
.arc-item__thumb {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--gray-1);
  flex-shrink: 0;
}
.arc-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.arc-item:hover .arc-item__thumb img { transform: scale(1.03); }

/* Body */
.arc-item__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.arc-item__cat {
  display: none;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--hdr-bg, #4d5d9a);
  transition: opacity .15s;
}
.arc-item__cat:hover { opacity: .75; }
.arc-item__title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--black);
  margin: 0;
}
.arc-item__title a { color: inherit; text-decoration: none; transition: color .15s; }
.arc-item__excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-7);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.arc-item__meta {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--gray-5);
  margin-top: auto;
}
.arc-item__author {
  font-weight: 600;
  color: var(--black);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color .15s;
}
.arc-item__author:hover { color: var(--hdr-bg, #4d5d9a); }
.arc-item__author-role {
  font-weight: 400;
  color: var(--gray-5);
  font-size: 11.5px;
}
.arc-item__sep { color: var(--gray-3); margin: 0 6px; }
.arc-item__date { color: var(--gray-5); }

/* ── Load more ── */
.arc-loadmore-wrap {
  padding: 28px 0 0;
  text-align: center;
}
.arc-loadmore-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--white);
  border: 1.5px solid var(--black);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.arc-loadmore-btn:hover {
  background: var(--black);
  color: var(--white);
}
.arc-loadmore-btn:disabled { opacity: .5; cursor: default; }

/* Empty */
.arc-empty {
  padding: 48px 0;
  text-align: center;
  color: var(--gray-5);
  font-size: 15px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .arc-item { grid-template-columns: 140px 1fr; gap: 14px; }
  .arc-item__title { font-size: 1rem; }
  .arc-item__excerpt { -webkit-line-clamp: 2; }
  .arc-author-card { flex-direction: column; align-items: center; text-align: center; }
  .arc-author-card__bio { max-width: 100%; }
}
@media (max-width: 480px) {
  .arc-item { grid-template-columns: 110px 1fr; gap: 12px; padding: 14px 0; }
  .arc-item__title { font-size: .95rem; }
  .arc-item__excerpt { display: none; }
  .arc-author-card__avatar { width: 64px; height: 64px; }
  .arc-author-card__name { font-size: 1.2rem; }
}

/* ════════════════════════════════════════════
   POST TAGSHARE — тег жолы + бөлісу батырмалары
════════════════════════════════════════════ */
.post-tagshare {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 16px 0;
  margin: 24px 0 0;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* Тегтер — сол жақта, бар орынды алады */
.post-tagshare__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  order: 0;
}

/* Батырмалар оң жақта */
.pts-btn--copy  { order: 1; flex-shrink: 0; }
.pts-share-wrap { order: 2; flex-shrink: 0; }
.post-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-7);
  background: var(--gray-1);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 20px;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.post-tag:hover { background: var(--black); color: #fff; border-color: var(--black); }

/* Батырмалар тобы */
.post-tagshare__btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}


.pts-btn--icon svg { width: 18px; height: 18px; display: block; }
.pts-btn--icon:hover { border-color: var(--black); color: var(--black); }

/* Сілтемені көшіру батырмасы */
.pts-btn--copy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  height: 40px;
  border-radius: 20px;
  border: 1.5px solid #ddd;
  background: #fff;
  color: #555;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  white-space: nowrap;
}
.pts-btn--copy svg { width: 16px; height: 16px; flex-shrink: 0; }
.pts-btn--copy:hover { border-color: var(--black); color: var(--black); }
.pts-btn--copy.is-copied { border-color: #22c55e; color: #22c55e; background: #f0fdf4; }

/* ════════════════════════════════════════════
   SUBSCRIBE BANNER — жазылу баннері
════════════════════════════════════════════ */
.subscribe-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  margin: 18px 0 28px;
  background: var(--gray-1);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.subscribe-banner:hover {
  border-color: #bbb;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.subscribe-banner__text {
  font-size: 15px;
  font-weight: 500;
  color: var(--black);
  margin: 0;
  line-height: 1.4;
}
.subscribe-banner__btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 22px;
  border-radius: 8px;
  background: var(--sb-color, #4d5d9a);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity .15s;
}
.subscribe-banner:hover .subscribe-banner__btn { opacity: .9; }
.subscribe-banner__btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Mobile */
@media (max-width: 600px) {
  /* Тегтер + батырмалар — баған: тегтер үстінде, батырмалар астында */
  .post-tagshare {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  /* Тегтер — толық ені */
  .post-tagshare__tags {
    flex: none !important;
    width: 100%;
    order: 1;
  }
  /* Батырмалар — бір қатарда, сол жақтан */
  .post-tagshare__btns-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px;
    flex-wrap: nowrap;
    order: 2;
    width: 100%;
  }
  .pts-btn--copy,
  .pts-share-wrap { flex-shrink: 0; margin: 0 !important; }
  /* Мобильде батырма padding азайту — екеуі бір қатарға сияды */
  .pts-btn--copy,
  .pts-btn--share { padding: 0 12px !important; font-size: 12px !important; }

  .subscribe-banner { flex-direction: column; align-items: flex-start; gap: 12px; margin: 0; }
  .subscribe-banner__btn { width: 100%; justify-content: center; }
}
/* ════════════════════════════════════════════
   OҚИ ОТЫРЫҢЫЗ — related posts (Qumash style)
════════════════════════════════════════════ */
.related-posts {
  margin: 20px 0 8px;
  padding-top: 8px;
}
.related-posts__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.related-posts__title {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--black);
  white-space: nowrap;
  font-style: normal;
  letter-spacing: -.02em;
}
.related-posts__line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
}
.related-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  gap: 10px;
}
.related-card:hover .related-card__title { text-decoration: underline; text-underline-offset: 2px; }
.related-card__thumb {
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  background: var(--gray-1);
  flex-shrink: 0;
}
.related-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .3s ease;
}
.related-card:hover .related-card__thumb img { transform: scale(1.04); }
.related-card__body { flex: 1; }
.related-card__title {
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--black);
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card__meta {
  font-size: 12px;
  color: var(--gray-5);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.related-card__sep { color: var(--gray-3); }
.related-card__cat { color: #4d5d9a; font-weight: 600; }

@media (max-width: 768px) {
  .related-posts__grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (max-width: 480px) {
  .related-posts__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .related-card__title { font-size: .85rem; -webkit-line-clamp: 2; }
}


  .footer-main__inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-brand { grid-column: 1; }
  .footer-bottom__inner { flex-wrap: wrap; gap: 4px; }
}

/* ── Share dropdown (жаңа стиль) ── */
.pts-btn--share {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  height: 40px;
  border-radius: 20px;
  border: 1.5px solid #ddd;
  background: #fff;
  color: #555;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, color .15s;
  white-space: nowrap;
}
.pts-btn--share svg { width: 16px; height: 16px; flex-shrink: 0; }
.pts-btn--share:hover { border-color: #111; color: #111; }

.pts-share-wrap {
  position: relative;
}

.pts-share-drop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  min-width: 190px;
  overflow: hidden;
  z-index: 200;
  animation: pts-drop-in .15s ease;
}
@keyframes pts-drop-in {
  from { opacity:0; transform:translateY(-6px); }
  to   { opacity:1; transform:translateY(0); }
}

.pts-share-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  transition: background .1s;
  border-bottom: 1px solid var(--border);
}
.pts-share-item:last-child { border-bottom: none; }
.pts-share-item:hover { background: var(--gray-1); }

.pts-share-item__icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
}
.pts-share-item__icon svg { width: 15px; height: 15px; display: block; }

@media (max-width: 600px) {
  .pts-share-drop { right: auto; left: 0; }
}

/* Related: 3 column responsive */
@media (max-width: 600px) {
  .related-posts__grid { grid-template-columns: 1fr; gap: 16px; }
  .related-card { flex-direction: row; gap: 12px; }
  .related-card__thumb { width: 110px; height: 75px; aspect-ratio: unset; flex-shrink: 0; }
}
/* ════════════════════════════════════════════
   FOOTER — Forbes стилі
════════════════════════════════════════════ */
.site-footer {
  background: #111;
  color: rgba(255,255,255,.5);
  padding: 52px 0 0;
}

/* ── TOP: Лого + Соц желілер ── */
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  flex-wrap: wrap;
}
.footer-brand__img  { height: 32px; width: auto; display: block; filter: brightness(0) invert(1); }
.footer-brand__text { font-size: 1.4rem; font-weight: 800; letter-spacing: -.04em; color: #fff; text-decoration: none; }
.footer-brand__logo:hover { opacity: .85; }

.footer-socials { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-soc-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: color .15s;
}
.footer-soc-btn:hover { color: #fff; }
.footer-soc-btn svg { width: 20px; height: 20px; display: block; }

/* ── MID: Сайт туралы + байланыс ── */
.footer-about {
  padding: 28px 0 24px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-about__desc {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255,255,255,.4);
  max-width: 560px;
  margin: 0 0 14px;
}
.footer-about__contacts {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: rgba(255,255,255,.45);
  text-decoration: none;
  transition: color .15s;
}
.footer-contact-link:hover { color: #fff; }
.footer-contact-link svg { width: 15px; height: 15px; flex-shrink: 0; opacity: .6; }

/* ── NAV: горизонталь мәзір ── */
.footer-nav {
  padding: 24px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  list-style: none;
}
.footer-nav__list li { position: relative; }
.footer-nav__list li + li::before {
  content: '·';
  color: rgba(255,255,255,.2);
  margin: 0 10px;
}
.footer-nav__list a {
  font-size: 13px;
  color: rgba(255,255,255,.4);
  text-decoration: none;
  transition: color .15s;
  white-space: nowrap;
}
.footer-nav__list a:hover { color: #fff; }

/* ── BOTTOM: Copyright ── */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
  font-size: 12px;
  color: rgba(255,255,255,.25);
  flex-wrap: wrap;
}
.footer-bottom strong { color: rgba(255,255,255,.35); font-weight: 600; }

/* Mobile */
@media (max-width: 640px) {
  .site-footer { padding-top: 36px; }
  .footer-top { flex-direction: column; align-items: flex-start; gap: 16px; padding-bottom: 24px; }
  .footer-bottom { flex-direction: column; gap: 4px; }
  .footer-nav__list { gap: 6px 0; }
  .footer-nav__list li + li::before { margin: 0 8px; }
}

/* ════════════════════════════════════════════
   FOOTER  — бір қатар: Лого + Мәзір + Соц желілер
════════════════════════════════════════════ */
.site-footer {
  background: #111;
  color: rgba(255,255,255,.45);
  padding: 20px 0 0;
}
.footer-main { padding: 24px 0; }

/* ── Бір қатар ── */
.footer-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* Лого */
.footer-brand__img  { height: 28px; width: auto; filter: brightness(0) invert(1); display: block; }
.footer-brand__text { font-size: 1.2rem; font-weight: 800; letter-spacing: -.04em; color: #fff; text-decoration: none; }
.footer-brand__logo { flex-shrink: 0; text-decoration: none; }
.footer-brand__logo:hover { opacity: .85; }

/* Мәзір — ортасында, flex grow */
.footer-nav-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex: 1;
}
.footer-link-item {
  font-size: 15px;
  color: rgba(255,255,255,.45);
  text-decoration: none;
  padding: 4px 14px 4px 0;
  white-space: nowrap;
  transition: color .15s;
}
.footer-link-item:hover { color: #fff; }

/* Соц желілер — оң жақта */
.footer-socials { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.footer-soc-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5); text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.footer-soc-btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.35); color: #fff; }
.footer-soc-btn svg { width: 15px; height: 15px; display: block; }

/* Сайт туралы */
.footer-about {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 24px;
  margin-top: 24px;
  padding: 24px 0 0;
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: none;
  flex-wrap: wrap;
}
.footer-about__text {
  font-size: 15px; line-height: 1.6;
  color: rgba(255,255,255,.35); margin: 0; flex: 1;
}
.footer-contacts { display: flex; gap: 20px; flex-wrap: wrap; flex-shrink: 0; }
.footer-contact-item {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 15px; color: rgba(255,255,255,.45);
  text-decoration: none; transition: color .15s;
}
.footer-contact-item:hover { color: #fff; }
.footer-contact-item svg { width: 14px; height: 14px; flex-shrink: 0; opacity: .6; }

/* Bottom */
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 14px 0; }
.footer-bottom__inner {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: nowrap;
  gap: 12px; font-size: 12px; color: rgba(255,255,255,.25);
}

/* Mobile */
@media (max-width: 768px) {
  .footer-row { gap: 16px; }
  .footer-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-brand__logo { padding-bottom: 15px; }
  .footer-nav-inline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
  }
  .footer-link-item { font-size: 14px; }
  .footer-socials { width: 100%; }
  .footer-about { flex-direction: column; gap: 12px; }
  .footer-about__text { font-size: 14px; }
  .footer-contact-item { font-size: 14px; }
  .footer-bottom__inner { flex-wrap: wrap; gap: 4px; }
}

/* ════════════════════════════════════════════
   ДЕРЕККӨЗ — post source
════════════════════════════════════════════ */
.post-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #555;
  margin-top: 20px;
  padding: 0 16px;
  height: 40px;
  border-radius: 20px;
  border: 1.5px solid #ddd;
  background: #fff;
  white-space: nowrap;
}
.post-source__label {
  font-weight: 500;
  color: #555;
}
.post-source__link {
  color: var(--hdr-bg, #4d5d9a);
  text-decoration: none;
  font-weight: 600;
  transition: opacity .15s;
}
.post-source__link:hover { opacity: .75; }
.post-source__name { color: var(--gray-7); font-weight: 500; }

/* ════════════════════════════════════════════
   FULL-WIDTH (сайдбарсыз) режим
════════════════════════════════════════════ */
.home-wrap--full {
  grid-template-columns: 1fr !important;
}
.home-wrap--full .home-content {
  max-width: 780px;
  margin: 0 auto;
}

/* Журнал: .wrap ішінде қалады, толық viewport емес */
.mag-layout.home-wrap--full {
  max-width: 100% !important;
}
.mag-layout.home-wrap--full .home-content {
  max-width: 100%;
  margin: 0;
}

/* ════════════════════════════════════════════
   ЖУРНАЛ СТИЛІ (Magazine layout)
   _bb_magazine = 1 болғанда қолданылады
════════════════════════════════════════════ */

/* Header — ортада */
.post-header--mag {
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}
.post-header--mag .post-header__cat {
  justify-content: center;
}
/* Тақырып шрифтін өзгертпейміз — тек ортада */
.post-header--mag h1 {
  text-align: center;
}
/* Автор: аты ортада, лауазымы сол жақта */
.post-header--mag .post-author-card {
  display: flex;
  justify-content: center;
  text-align: left;
}
.post-header--mag .post-author-card__info {
  text-align: left;
}

/* Thumbnail — толық бет ені
   position+translateX — ата-элемент еніне тәуелді емес */
.post-thumbnail--mag {
  margin: 28px 0 0;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
}
.post-thumbnail--mag img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
.post-thumbnail--mag figcaption {
  max-width: 780px;
  margin: 8px auto 0;
  text-align: center;
}

/* Контент — 780px ортада */
.mag-article .post-content {
  max-width: 780px;
  margin: 36px auto 0;
  font-size: 18px;
  line-height: 1.85;
}

/* Контент суреттері — wrap (1200px) еніне толық жайылады */
.mag-article .post-content figure,
.mag-article .post-content .wp-block-image,
.mag-article .post-content .alignfull,
.mag-article .post-content .alignwide {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: var(--wrap, 1200px);
  max-width: var(--wrap, 1200px);
  margin-top: 32px !important;
  margin-bottom: 32px !important;
  box-sizing: border-box;
}
.mag-article .post-content figure img,
.mag-article .post-content .wp-block-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
/* p ішіндегі жай img — 780px ішінде */
.mag-article .post-content p img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Figcaption ортада */
.mag-article .post-content figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--gray-5);
  margin-top: 8px;
  padding: 0 16px;
}

/* Блоктар — 780px ортада */
.mag-article .post-tagshare,
.mag-article .subscribe-banner,
.mag-article .related-posts,
.mag-article .comments-wrap,
.mag-article .post-header--mag {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}
.mag-article .post-tagshare { margin-top: 32px; }
.mag-article .comments-wrap {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* Mobile */
@media (max-width: 768px) {
  .post-thumbnail--mag {
    margin-top: 20px;
  }
  .post-thumbnail--mag img { max-height: 56vw; }
  .mag-article .post-content { font-size: 16px; margin-top: 20px; }
  .mag-article .post-content figure,
  .mag-article .post-content .wp-block-image {
    left: 50%;
    width: 100vw;
  }
}

/* ════════════════════════════════════════════
   ПІКІРЛЕР — Comments
════════════════════════════════════════════ */
#comments {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1.5px solid var(--black);
}
.comments-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--black);
  margin: 0 0 24px;
  letter-spacing: -.02em;
}
/* Тақырып атын жасырып, тек санды қалдырамыз */
.comments-title .says { display: none; }
#comments .wp-block-heading { display: none; }

/* ── Пікір тізімі ── */
.comment-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.comment-list .children {
  list-style: none;
  margin: 0;
  padding-left: 48px;
  border-left: 2px solid var(--border);
  margin-left: 24px;
}
.comment {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.comment:last-child { border-bottom: none; }

/* Пікір header */
.comment-meta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.comment-author .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
}
.comment-author-link,
.comment-author b {
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  text-decoration: none;
}
.comment-author-link:hover { color: var(--hdr-bg); }
.comment-metadata {
  font-size: 12px;
  color: var(--gray-5);
  margin: 0;
  line-height: 1.2;
}
.comment-metadata a {
  color: var(--gray-5);
  text-decoration: none;
}
.comment-metadata a:hover { color: var(--black); }

/* Пікір мазмұны */
.comment-content {
  font-size: 15px;
  line-height: 1.65;
  color: var(--gray-7);
  padding-left: 52px;
}
.comment-content p { margin: 0 0 8px; }
.comment-content p:last-child { margin: 0; }

/* Reply сілтемесі */
.reply {
  padding-left: 52px;
  margin-top: 6px;
}
.comment-reply-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray-5);
  text-decoration: none;
  transition: color .15s;
}
.comment-reply-link:hover { color: var(--hdr-bg); }

/* Pending модерация */
.comment-awaiting-moderation {
  font-size: 12px;
  color: var(--gray-5);
  background: var(--gray-1);
  padding: 4px 10px;
  border-radius: 4px;
  margin-top: 6px;
  margin-left: 52px;
  display: inline-block;
}

/* ── Пікір жазу формасы ── */
#respond {
  margin-top: 36px;
  padding: 28px;
  background: var(--gray-1);
  border-radius: var(--radius);
  max-width: 780px;
  box-sizing: border-box;
}
.mag-article #respond { margin-left: auto; margin-right: auto; }
#reply-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--black);
  margin: 0 0 20px;
}
#reply-title small {
  font-size: 13px;
  font-weight: 400;
  margin-left: 8px;
}
#reply-title small a {
  color: var(--hdr-bg);
  text-decoration: none;
}

/* Форма өрістері */
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.comment-form-comment,
.comment-form-author,
.comment-form-email,
.comment-form-url {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.comment-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-7);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--black);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
  resize: vertical;
}
.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--hdr-bg);
}
.comment-form textarea { min-height: 100px; max-height: 240px; }

/* Жіберу батырмасы */
.comment-form .form-submit { margin: 0; }
.comment-form input[type="submit"] {
  display: inline-flex;
  align-items: center;
  padding: 11px 28px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
}
.comment-form input[type="submit"]:hover { opacity: .82; }

/* Cookies checkbox */
.comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-5);
}
.comment-form-cookies-consent input { margin-top: 2px; flex-shrink: 0; }

/* Logged-in жазба */
.comment-form .logged-in-as {
  font-size: 13px;
  color: var(--gray-5);
}
.comment-form .logged-in-as a {
  color: var(--hdr-bg);
  text-decoration: none;
}

/* Required star */
.required { color: #e53; }

/* Mobile */
@media (max-width: 600px) {
  #respond { padding: 20px 16px; }
  .comment-list .children { padding-left: 16px; margin-left: 12px; }
  .comment-content { padding-left: 0; margin-top: 10px; }
  .reply { padding-left: 0; }
  .comment-awaiting-moderation { margin-left: 0; }
}

/* ════════════════════════════════════════════
   404 — NOT FOUND PAGE
════════════════════════════════════════════ */
.not-found { padding: 0 0 56px; }

.not-found__hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: center;
  padding: 56px 0 44px;
  border-bottom: 1px solid var(--border);
}
.not-found__number {
  font-size: clamp(100px, 14vw, 180px);
  font-weight: 900;
  line-height: 1;
  color: var(--border);
  letter-spacing: -.05em;
  user-select: none;
}
.not-found__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--black);
  line-height: 1.2;
  margin-bottom: 12px;
}
.not-found__desc {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--gray-5);
  margin-bottom: 28px;
  max-width: 420px;
}
.not-found__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.not-found__btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0 22px; height: 42px; border-radius: 8px;
  font-family: var(--font); font-size: 13.5px; font-weight: 600;
  text-decoration: none; transition: opacity .15s;
  cursor: pointer; border: 1.5px solid transparent;
}
.not-found__btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.not-found__btn--primary { background: var(--black); color: #fff; border-color: var(--black); }
.not-found__btn--primary:hover { opacity: .82; }
.not-found__btn--secondary { background: transparent; color: var(--black); border-color: var(--border); }
.not-found__btn--secondary:hover { background: var(--gray-1); }

.not-found__recent { padding: 36px 0; }
.not-found__recent-head {
  display: flex; align-items: center; gap: 16px; margin-bottom: 24px;
}
.not-found__recent-title {
  font-size: 1.1rem; font-weight: 900; font-style: normal;
  color: var(--black); white-space: nowrap; letter-spacing: -.02em;
}
.not-found__recent-line { flex: 1; height: 1px; background: var(--border); }
.not-found__recent-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

/* nf-card */
.nf-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.nf-card:hover .nf-card__title { text-decoration: underline; text-underline-offset: 2px; }
.nf-card__thumb {
  aspect-ratio: 16/9; border-radius: 8px;
  background: var(--gray-1); overflow: hidden;
}
.nf-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.nf-card:hover .nf-card__thumb img { transform: scale(1.04); }
.nf-card__cat { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--hdr-bg,#4d5d9a); }
.nf-card__title { font-size: 13.5px; font-weight: 600; color: var(--black); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nf-card__date  { font-size: 11.5px; color: var(--gray-5); }

@media (max-width: 768px) {
  .not-found__hero { grid-template-columns: 1fr; gap: 8px; padding: 32px 0 28px; }
  .not-found__number { font-size: clamp(80px, 22vw, 120px); }
  .not-found__recent-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .not-found__recent-grid { grid-template-columns: 1fr; }
  .nf-card { flex-direction: row; gap: 12px; }
  .nf-card__thumb { width: 100px; height: 70px; aspect-ratio: unset; flex-shrink: 0; }
}

/* Журнал стилінде дереккөз — контент астында */
.mag-article .post-source {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  width: fit-content;
}

/* ════════════════════════════════════════════
   SKELETON LOADING — Infinite scroll
════════════════════════════════════════════ */
@keyframes bb-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.bb-skeleton {
  padding: 24px 0;
  flex: 1;
  min-width: 0;
}
.bb-skeleton__sidebar {
  width: 300px;
  flex-shrink: 0;
  padding-top: 24px;
}

/* Базалық skeleton элементі */
.bb-sk {
  border-radius: 6px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 600px 100%;
  animation: bb-shimmer 1.4s infinite linear;
  margin-bottom: 12px;
}

/* Breadcrumb */
.bb-sk--short  { height: 14px; width: 220px; }
.bb-sk--medium { height: 16px; width: 70%; }

/* Тақырып */
.bb-sk--title   { height: 36px; width: 90%; margin-bottom: 10px; border-radius: 4px; }
.bb-sk--title-2 { height: 36px; width: 65%; margin-bottom: 18px; border-radius: 4px; }

/* Автор */
.bb-sk--author {
  height: 44px; width: 200px;
  border-radius: 22px;
  margin-bottom: 20px;
}

/* Басты сурет */
.bb-sk--image {
  height: 480px;
  width: 100%;
  border-radius: 8px;
  margin-bottom: 24px;
}

/* Мәтін жолдары */
.bb-sk--line { height: 16px; width: 100%; }

/* Sidebar skeleton */
.bb-sk--sidebar-title { height: 20px; width: 60%; margin-bottom: 16px; }
.bb-sk--sidebar-item  { height: 72px; width: 100%; margin-bottom: 10px; border-radius: 8px; }

@media (max-width: 768px) {
  .bb-skeleton__sidebar { display: none; }
  .bb-sk--image { height: 220px; }
}

/* ── Sidebar news load more ── */
.news-list-widget__items { display: flex; flex-direction: column; }
.sidebar-loadmore-wrap { padding: 12px 0 4px; text-align: center; }
.sidebar-loadmore-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px; border-radius: 20px;
  border: 1.5px solid var(--border); background: var(--white);
  color: var(--gray-7); font-family: var(--font); font-size: 13px;
  font-weight: 600; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.sidebar-loadmore-btn:hover { border-color: var(--black); color: var(--black); }
.sidebar-loadmore-btn:disabled { opacity: .6; cursor: wait; }

/* ── Ыстық жаңалық (🔥) ── */
.news-list-item--hot .news-list-item__title {
  font-weight: 700;
  color: var(--black);
}
.news-list-item__hot {
  font-style: normal;
  margin-right: 3px;
  font-size: 13px;
}


/* ── Sidebar z-index — header астында болсын ── */
.sidebar,
.bb-infinite-sidebar {
  z-index: 10;
}
.site-header { z-index: 100; }

/* Infinite scroll wrap-та sidebar grid-пен бірге ── */
.bb-infinite-wrap .home-wrap {
  align-items: start;
}
.bb-infinite-wrap .sidebar {
  position: sticky;
  top: calc(var(--hdr-h) + 16px);
  overflow-y: visible;
}

/* ── News widget "Барлығы →" сілтемесі ── */
.news-list-widget__all {
  font-size: 12px;
  font-weight: 600;
  color: var(--hdr-bg, #4d5d9a);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .15s;
}
.news-list-widget__all:hover { opacity: .7; }

/* Widget border */
#bb_news_list-2,
.widget_bb_news_list {
  background: var(--gray-1, #f4f4f4);
  border-radius: 8px;
  padding: 20px;
}

/* ════════════════════════════════════════════
   HERO 4 — 1 үлкен сол + 3 кіші оң (Qumash)
════════════════════════════════════════════ */
.hero4-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: var(--radius);
}
/* 6 кіші карточка — 3 баған 2 қатар */
.hero4-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 30px;
}

/* Үлкен сол */
.hero4-main {
  position: relative;
  overflow: hidden;
  background: #111;
  border-radius: var(--radius);
}
.hero4-main__img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .4s ease;
  aspect-ratio: 16/9;
}
.hero4-main:hover .hero4-main__img { transform: scale(1.03); }
.hero4-main__body {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.1) 60%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px;
}
.hero4-main__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.hero4-main__cat {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: var(--hdr-bg); padding: 3px 10px; border-radius: 4px;
  text-decoration: none;
}
.hero4-main__date { font-size: 12px; color: rgba(255,255,255,.65); }
.hero4-main__title { font-size: clamp(1.1rem,2vw,1.5rem); font-weight: 700; line-height: 1.3; }
.hero4-main__title a { color: #fff; text-decoration: none; }
.hero4-main__title a:hover { text-decoration: underline; }
.hero4-main__excerpt { font-size: 13.5px; color: rgba(255,255,255,.75); margin-top: 6px; line-height: 1.45; }

/* 3 кіші оң */
.hero4-side {
  display: flex; flex-direction: column; gap: 4px;
  border-radius: 0 var(--radius) var(--radius) 0;
  overflow: hidden;
}
.hero4-item {
  display: grid; grid-template-columns: 130px 1fr;
  gap: 0; background: #fff; flex: 1; overflow: hidden;
}
.hero4-item__thumb { overflow: hidden; }
.hero4-item__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.hero4-item:hover .hero4-item__thumb img { transform: scale(1.05); }
.hero4-item__body { padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.hero4-item__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero4-item__cat {
  font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--hdr-bg); text-decoration: none;
}
.hero4-item__cat:hover { text-decoration: underline; }
.hero4-item__date { font-size: 11px; color: var(--gray-5); }
.hero4-item__title { font-size: 13.5px; font-weight: 600; line-height: 1.35; margin: 0; }
.hero4-item__title a { color: var(--black); text-decoration: none; }
.hero4-item__title a:hover { color: var(--gray-7); }

/* ════════════════════════════════════════════
   CAT SECTION — санат тақырыбы + 3 карточка
════════════════════════════════════════════ */
.cat-section { }
.cat-section__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--black);
  margin-bottom: 20px;
}
.cat-section__title {
  font-size: 1.25rem; font-weight: 900;
  letter-spacing: -.02em; color: var(--black); margin: 0;
}
.cat-section__title a { color: inherit; text-decoration: none; }
.cat-section__title a:hover { color: var(--gray-7); }
.cat-section__all {
  font-size: 13px; font-weight: 600;
  color: var(--hdr-bg); text-decoration: none;
  white-space: nowrap; transition: opacity .15s;
}
.cat-section__all:hover { opacity: .7; }

/* Мобильді */
@media (max-width: 900px) {
  .hero4-wrap { border-radius: 0; }
  .hero4-side { flex-direction: row; }
  .hero4-item { grid-template-columns: 100px 1fr; }
}
@media (max-width: 600px) {
  .hero4-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hero4-side { flex-direction: column; }
  .hero4-item { grid-template-columns: 90px 1fr; }
  .hero4-item__body { padding: 8px 10px; }
}

/* ════════════════════════════════════════════
   PAGE HOME LAYOUT — Страница + Builder
════════════════════════════════════════════ */

/* Hero — толық ені, sidebar жоқ */
.page-home-hero {
  margin-bottom: 32px;
}
.page-home-hero .bb-section {
  margin-bottom: 0;
}

/* Негізгі бөлім: контент + sidebar */
.page-home-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 340px;
  column-gap: 0;
  align-items: start;
}

/* Content блоктарының арасы */
.page-home-content {
  min-width: 0;
  padding-right: 30px;
  box-sizing: border-box;
}
.page-home-content .bb-section {
  margin-bottom: 30px;
  padding-bottom: 30px;
}
.page-home-content .bb-section:last-child {
  margin-bottom: 0;
}

/* Sidebar */
.page-home-sidebar {
  position: static;
  align-self: start;
  border-left: 1px solid var(--border);
  padding-left: 30px;
  box-sizing: border-box;
}

/* Mobile */
@media (max-width: 768px) {
  .page-home-layout {
    grid-template-columns: 1fr;
  }
  .page-home-content { padding-right: 0; }
  .page-home-sidebar { border-left: none; padding-left: 0; }
}

/* ════════════════════════════════════════════
   FULLWIDTH SECTION — толық ені блоктар
════════════════════════════════════════════ */
.bb-fullwidth-section {
  padding: 30px 0 40px;
  margin: 0 0 30px;
}
.bb-fullwidth-section + .bb-fullwidth-section {
  margin-top: 0;
}
.bb-fullwidth-section .bb-section {
  margin-bottom: 0;
}

/* Қара фон — ақ мәтін */
.bb-fullwidth-section--dark {
  color: #fff;
}
.bb-fullwidth-section--dark .section-title,
.bb-fullwidth-section--dark .cat-section__title,
.bb-fullwidth-section--dark .cat-section__title a,
.bb-fullwidth-section--dark .post-card__title a {
  color: #fff;
}
.bb-fullwidth-section--dark .cat-section__head {
  border-bottom-color: rgba(255,255,255,.2);
}
.bb-fullwidth-section--dark .post-card__meta time,
.bb-fullwidth-section--dark .post-card__meta span {
  color: rgba(255,255,255,.6);
}
.bb-fullwidth-section--dark .see-all,
.bb-fullwidth-section--dark .cat-section__all {
  color: rgba(255,255,255,.7);
}
.bb-fullwidth-section--dark .post-card {
  background: rgba(255,255,255,.05);
  border-radius: 8px;
  overflow: hidden;
}
.bb-fullwidth-section--dark .post-card__title a:hover {
  color: rgba(255,255,255,.75);
}

/* ════════════════════════════════════════════
   HERO 4 + ЖАҢАЛЫҚТАР ЛЕНТАСЫ (бір қатарда)
════════════════════════════════════════════ */
.hero4-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0,1fr) 340px;
  column-gap: 0;
  align-items: start;
}

.hero4-with-sidebar__main {
  padding-right: 30px;
  box-sizing: border-box;
  min-width: 0;
}
.hero4-with-sidebar__news {
  position: static !important;
  border-left: 1px solid var(--border);
  padding-left: 30px;
  box-sizing: border-box;
  min-width: 0;
}
/* news-list-widget стилі sidebar виджеттегідей */
.hero4-with-sidebar__news .news-list-widget {
  background: var(--gray-1);
  border-radius: 8px;
  padding: 20px;
  border: none;
}
.hero4-with-sidebar__news .news-list-item {
  background: transparent;
}
.hero4-with-sidebar__news .news-list-item:last-child {
  border-bottom: none;
}

@media (max-width: 900px) {
  .hero4-with-sidebar {
    grid-template-columns: 1fr;
  }
  .hero4-with-sidebar__main { padding-right: 0; }
  .hero4-with-sidebar__news {
    position: static;
    border-left: none;
    padding-left: 0;
    margin-top: 24px;
  }
}

/* Admin: sortable placeholder */

/* ── «Барлық жаңалықтар» батырмасы ── */
.news-widget-btn-wrap {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--border);
}
.news-widget-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.news-widget-btn:hover {
  border-color: var(--black);
  background: var(--gray-1);
}

/* ── Блок описание (section-desc) ── */
.section-desc {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--black);
  text-transform: none;
  margin: 0 0 16px;
  line-height: 1.3;
}
.section-desc a {
  color: var(--hdr-bg);
  text-decoration: none;
}
.section-desc a:hover { text-decoration: underline; }

/* ── Grid 2: hero4-main стиліндей overlay ── */
.bb-section--grid2 .post-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}
.bb-section--grid2 .post-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111;
  margin-bottom: 0;
}
.bb-section--grid2 .post-card__thumb {
  margin-bottom: 0;
  border-radius: 0;
  aspect-ratio: 3/2;
}
.bb-section--grid2 .post-card__thumb img {
  opacity: .75;
  transition: opacity .3s, transform .4s;
}
.bb-section--grid2 .post-card:hover .post-card__thumb img {
  opacity: .65;
  transform: scale(1.04);
}
/* Overlay body */
.bb-section--grid2 .post-card__body-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.1) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}
.bb-section--grid2 .post-card__cat-overlay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.bb-section--grid2 .post-card__cat-overlay .post-card__cat {
  position: static;
  background: var(--hdr-bg);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}
.bb-section--grid2 .post-card__cat-overlay time {
  font-size: 12px;
  color: rgba(255,255,255,.7);
}
.bb-section--grid2 .post-card__title {
  font-size: clamp(.95rem, 2vw, 1.25rem);
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  margin: 0;
  -webkit-line-clamp: 3;
}
.bb-section--grid2 .post-card__title a {
  color: #fff;
  text-decoration: none;
}
.bb-section--grid2 .post-card__title a:hover { text-decoration: underline; }
.bb-section--grid2 .post-card__meta { display: none; }

/* Mobile — grid2 overlay, see below */

/* ── МОБИЛЬДІ БЛОКТАР ── */

/* Tablet 768px */
@media (max-width: 768px) {
  .hero4-main { min-height: 240px; }
  .hero4-main__img { min-height: 240px; }
  /* Hero4 + sidebar: баған */
  .hero4-with-sidebar {
    grid-template-columns: 1fr;
  }
  .hero4-with-sidebar__main { padding-right: 0; }
  .hero4-with-sidebar__news {
    border-left: none;
    padding-left: 0;
    margin-top: 28px;
  }
  /* hero4-main биіктік */
  .hero4-main__img { aspect-ratio: 2/1; }
  /* hero4-grid: 2 баған */
  .hero4-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 16px;
  }
  /* grid3/4: 2 баған */
  .post-grid { gap: 16px; }
  .bb-section { margin-bottom: 30px; }
  .bb-fullwidth-section { padding: 28px 0; }
}

/* Phone 480px */
@media (max-width: 480px) {
  /* Барлық grid: 1 баған */
  .post-grid { grid-template-columns: 1fr !important; gap: 10px; }
  /* hero4-main биіктік */
  .hero4-main__img { aspect-ratio: 4/3; }
  /* grid2 overlay: 480px-де де 16/9 */
  /* Описание мәтін — көрінетін */
  /* Блок spacing */
  .bb-section { margin-bottom: 20px; }
  .bb-fullwidth-section { padding: 20px 0; }
  /* Sidebar phone-та жасыру */
  .hero4-with-sidebar__news { margin-top: 10px; }
  .hero4-with-sidebar__news .news-list-widget {
    padding: 14px;
    display: block !important;
  }
}

/* ── hero4-grid post-card мобильде ── */
@media (max-width: 768px) {
  .hero4-grid .post-card__thumb {
    aspect-ratio: 16/9;
  }
  .hero4-grid .post-card__title {
    font-size: .9rem;
  }
}
@media (max-width: 480px) {
  /* hero4-grid + grid3: горизонталь карточка */
  .hero4-grid,
  .bb-section--grid3 .post-grid {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }
  .hero4-grid .post-card,
  .bb-section--grid3 .post-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    grid-template-rows: auto auto;
    border-radius: 8px;
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
    min-height: 80px;
    padding-top: 0;
  }
  .hero4-grid .post-card__thumb,
  .bb-section--grid3 .post-card__thumb {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin: 0;
    border-radius: 8px;
    aspect-ratio: unset;
    overflow: hidden;
    width: 110px;
  }
  .hero4-grid .post-card__thumb img,
  .bb-section--grid3 .post-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .hero4-grid .post-card__thumb .bb-cat-tag,
  .bb-section--grid3 .post-card__thumb .bb-cat-tag { display: none; }
  .hero4-grid .post-card__title,
  .bb-section--grid3 .post-card__title {
    grid-column: 2;
    grid-row: 1;
    font-size: .85rem;
    font-weight: 600;
    padding: 5px 5px 0;
    margin: 0;
    color: var(--black);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    align-self: start;
  }
  .hero4-grid .post-card__title a,
  .bb-section--grid3 .post-card__title a { color: var(--black); }
  .hero4-grid .post-card__meta,
  .bb-section--grid3 .post-card__meta {
    grid-column: 2;
    grid-row: 2;
    padding: 0 5px 5px;
    margin: 0;
    font-size: 11px;
    color: var(--gray-5);
    align-items: center;
    align-self: start;
  }
  .hero4-grid .post-card__meta .post-card__cat,
  .bb-section--grid3 .post-card__meta .post-card__cat { display: none; }
}

@media (max-width: 600px) {
  .bb-section--grid2 .post-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }
  .bb-section--grid2 .post-card {
    min-height: 220px;
  }
  .bb-section--grid2 .post-card__thumb {
    min-height: 220px;
  }
  .bb-section--grid2 .post-card {
    position: relative !important;
    overflow: hidden !important;
    display: block !important;
  }
  .bb-section--grid2 .post-card__thumb {
    aspect-ratio: 16/9;
    margin: 0;
  }
  .bb-section--grid2 .post-card__body-overlay {
    position: absolute !important;
    inset: 0;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
  }
  .bb-section--grid2 .post-card__title {
    font-size: 1rem;
    -webkit-line-clamp: 2;
  }
}
/* ── Grid 3 — мобильді ── */
@media (max-width: 768px) {
  .bb-section--grid3 .post-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .bb-section--grid3 .post-card__title { font-size: .9rem; }
}

/* ── Басты бет блоктарында категория тегі жасырылады ── */
.bb-section .bb-cat-tag,
.bb-section .post-card__cat,
.hero4-grid .bb-cat-tag,
.page-home-content .bb-cat-tag,
.page-home-content .post-card__cat { display: none !important; }

/* ── news-list-widget мобильде көрінетін ── */
@media (max-width: 768px) {
  .hero4-with-sidebar__news { display: block !important; }
  .hero4-with-sidebar__news .news-list-widget { display: block !important; }
}

/* ── bb-grid2 мобильде overlay түзету ── */
@media (max-width: 480px) {
  .bb-section--grid2 .post-card {
    position: relative !important;
    display: block !important;
    overflow: hidden !important;
  }
  .bb-section--grid2 .post-card__thumb {
    display: block !important;
    width: 100%;
    aspect-ratio: 16/9;
    margin: 0;
  }
  .bb-section--grid2 .post-card__body-overlay {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
  }
}

/* ── Басты бет блоктарында категория жасыру ── */
.page-template-page-home .bb-cat-tag,
.page-template-page-home .post-card__cat,
.page-template-page-home .hero4-item__cat,
.page-template-page-home .hero4-main__cat { display: none; }

/* ── bb-grid2 padding override ── */
@media (max-width: 600px) {
  .bb-section--grid2 .post-card {
    padding-top: 0 !important;
  }
  .bb-section--grid2 .post-card__body-overlay {
    padding: 14px !important;
  }
}

/* section-head қара фонда */
.bb-fullwidth-section--dark .section-head {
  border-bottom-color: rgba(255,255,255,.2);
}
.bb-fullwidth-section--dark .section-title {
  color: #fff;
}
.bb-fullwidth-section--dark .see-all {
  color: rgba(255,255,255,.6);
}
.bb-fullwidth-section--dark .see-all:hover {
  color: #fff;
}
  color: rgba(255,255,255,.85);
}

/* ── Mobile: hero4-main__body + grid2 overlay gradient ── */
@media (max-width: 768px) {
  .hero4-main__body { padding: 20px; }
  .bb-section--grid2 .post-card__thumb {
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.1) 60%, transparent 100%);
  }
}

/* ── Post views ── */
.post-header__views {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--gray-5);
}
