/* ==========================================================
   CryptoSchool — блог. Токены как на главной и в news.html
   ========================================================== */
:root {
  --bg: #050505;
  --surface: #0c0c0c;
  --accent: #f3ba2f;
  --text: #fff;
  --muted: #94a3b8;
  --dim: #64748b;
  --border: rgba(255,255,255,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.glow {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 700px; height: 350px; pointer-events: none;
  background: radial-gradient(circle, rgba(243,186,47,0.06) 0%, transparent 70%);
  z-index: -1;
}

/* ---------- Шапка ---------- */
.b-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(5,5,5,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.b-header-inner {
  max-width: 1240px; margin: 0 auto; padding: 18px 5%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.b-logo { color: #fff; text-decoration: none; font-size: 19px; font-weight: 800; letter-spacing: -0.5px; white-space: nowrap; }
.b-logo i { color: var(--accent); margin-right: 4px; }
.b-logo span { color: var(--accent); }

.b-nav { display: flex; align-items: center; gap: 26px; }
.b-nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; transition: .3s; white-space: nowrap; }
.b-nav a:hover, .b-nav a.is-current { color: var(--accent); }
.b-nav .b-login { background: var(--accent); color: #000; padding: 9px 22px; border-radius: 12px; font-weight: 800; }
.b-nav .b-login:hover { color: #000; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(243,186,47,.3); }

.b-burger-toggle { display: none; }
.b-burger { display: none; width: 28px; cursor: pointer; flex-direction: column; gap: 6px; }
.b-burger span { height: 2px; background: #fff; border-radius: 2px; transition: .3s; }

@media (max-width: 1024px) {
  .b-burger { display: flex; }
  .b-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #080808; border-bottom: 1px solid var(--border);
    padding: 10px 5% 20px; display: none;
  }
  .b-nav a { padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--border); }
  .b-nav .b-login { margin-top: 14px; text-align: center; border: 0; }
  .b-burger-toggle:checked ~ .b-nav { display: flex; }
  .b-burger-toggle:checked + .b-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .b-burger-toggle:checked + .b-burger span:nth-child(2) { opacity: 0; }
  .b-burger-toggle:checked + .b-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- Заголовок раздела ---------- */
.b-head { max-width: 1100px; margin: 0 auto; padding: 70px 5% 30px; text-align: center; }
.b-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(243,186,47,.1); border: 1px solid rgba(243,186,47,.2);
  padding: 6px 16px; border-radius: 100px; margin-bottom: 20px;
  color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
}
.b-badge::before { content: ''; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 10px var(--accent); }
.b-head h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.15; margin-bottom: 16px; }
.b-head h1 span { color: var(--accent); }
.b-head p { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0 auto; }

.b-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 32px; }
.b-tabs a {
  border: 1px solid var(--border); color: var(--muted); text-decoration: none;
  padding: 9px 22px; border-radius: 100px; font-size: 13px; font-weight: 700; transition: .3s;
}
.b-tabs a:hover { color: #fff; border-color: rgba(255,255,255,.2); }
.b-tabs a.is-current { background: var(--accent); color: #000; border-color: var(--accent); }

/* ---------- Сетка карточек ---------- */
.b-grid {
  max-width: 1240px; margin: 0 auto; padding: 20px 5% 70px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 24px;
}
.b-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 28px;
  overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: .3s;
}
.b-card:hover { border-color: rgba(243,186,47,.4); transform: translateY(-4px); }
.b-card-img { aspect-ratio: 16/9; background: linear-gradient(135deg, #15120a, #0a0a0a); overflow: hidden; position: relative; }
.b-card-img img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.b-card:hover .b-card-img img { transform: scale(1.04); }
.b-card-img .ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(243,186,47,.25); font-size: 54px; }
.b-card-body { padding: 26px 28px 30px; display: flex; flex-direction: column; flex: 1; }
.b-card h2 { font-size: 20px; font-weight: 800; line-height: 1.35; letter-spacing: -.3px; margin-bottom: 10px; }
.b-card p { color: var(--muted); font-size: 14.5px; line-height: 1.65; flex: 1; }
.b-card .b-more { color: var(--accent); font-size: 13px; font-weight: 800; margin-top: 18px; }

/* первая карточка — крупно */
.b-grid .b-card.is-lead { grid-column: 1 / -1; flex-direction: row; }
.b-card.is-lead .b-card-img { flex: 0 0 55%; aspect-ratio: auto; min-height: 340px; }
.b-card.is-lead .b-card-body { padding: 40px; justify-content: center; }
.b-card.is-lead h2 { font-size: clamp(24px, 2.6vw, 32px); }
.b-card.is-lead p { flex: 0; font-size: 16px; }
@media (max-width: 860px) {
  .b-grid .b-card.is-lead { flex-direction: column; }
  .b-card.is-lead .b-card-img { flex: none; min-height: 0; aspect-ratio: 16/9; }
  .b-card.is-lead .b-card-body { padding: 26px 28px 30px; }
}
@media (max-width: 420px) { .b-grid { grid-template-columns: 1fr; } }

.b-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; color: var(--dim); font-size: 13px; font-weight: 600; }
.b-cat {
  background: rgba(243,186,47,.1); border: 1px solid rgba(243,186,47,.25); color: var(--accent);
  font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 100px;
}
.b-cat.news { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.3); color: #10b981; }

.b-empty { max-width: 640px; margin: 20px auto 90px; text-align: center; padding: 60px 30px; border: 1px dashed rgba(255,255,255,.1); border-radius: 28px; color: var(--muted); }
.b-empty h2 { color: #fff; font-size: 22px; margin-bottom: 8px; }

.b-pager { display: flex; justify-content: center; gap: 8px; padding: 0 5% 80px; flex-wrap: wrap; }
.b-pager a, .b-pager span {
  min-width: 44px; height: 44px; padding: 0 14px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 14px;
}
.b-pager a:hover { border-color: var(--accent); color: var(--accent); }
.b-pager .is-current { background: var(--accent); color: #000; border-color: var(--accent); }

/* ---------- Запись ---------- */
.b-post { max-width: 820px; margin: 0 auto; padding: 50px 5% 40px; }
.b-crumbs { color: var(--dim); font-size: 13px; font-weight: 600; margin-bottom: 26px; }
.b-crumbs a { color: var(--muted); text-decoration: none; }
.b-crumbs a:hover { color: var(--accent); }
.b-post h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; line-height: 1.18; letter-spacing: -1.2px; margin-bottom: 20px; }
.b-post .b-lead { color: var(--muted); font-size: 19px; line-height: 1.6; margin-bottom: 30px; }
.b-cover { border-radius: 28px; overflow: hidden; margin: 10px 0 40px; border: 1px solid var(--border); }
.b-cover img { width: 100%; }

.b-prose { font-size: 17px; line-height: 1.8; color: #d6dbe3; }
.b-prose > * + * { margin-top: 1.1em; }
.b-prose h2 { font-size: 28px; line-height: 1.3; color: #fff; font-weight: 800; letter-spacing: -.5px; margin-top: 1.8em; }
.b-prose h3 { font-size: 22px; line-height: 1.35; color: #fff; font-weight: 800; margin-top: 1.6em; }
.b-prose h4 { font-size: 18px; color: #fff; font-weight: 800; margin-top: 1.4em; }
.b-prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.b-prose strong, .b-prose b { color: #fff; }
.b-prose ul, .b-prose ol { padding-left: 1.4em; }
.b-prose li + li { margin-top: .4em; }
.b-prose li::marker { color: var(--accent); }
.b-prose blockquote {
  border-left: 3px solid var(--accent); background: rgba(243,186,47,.05);
  padding: 18px 24px; border-radius: 0 16px 16px 0; color: #fff; font-style: italic;
}
.b-prose img { border-radius: 20px; margin: 1.6em auto; height: auto; }
.b-prose pre { background: #0f0f0f; border: 1px solid var(--border); border-radius: 14px; padding: 18px; overflow-x: auto; font-size: 14px; }
.b-prose code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; }
.b-prose :not(pre) > code { background: rgba(255,255,255,.07); padding: 2px 6px; border-radius: 6px; }
.b-prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.2em 0; }
.b-prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.b-prose th, .b-prose td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.b-prose th { color: #fff; background: rgba(255,255,255,.03); }
.b-prose iframe { width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: 20px; }
.b-prose .ql-align-center { text-align: center; }
.b-prose .ql-align-right { text-align: right; }
.b-prose .ql-indent-1 { padding-left: 2em; }
.b-prose .ql-indent-2 { padding-left: 4em; }

.b-share { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 50px; padding-top: 28px; border-top: 1px solid var(--border); color: var(--dim); font-size: 14px; font-weight: 700; }
.b-share a {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px;
  border: 1px solid var(--border); color: var(--muted); text-decoration: none; transition: .3s;
}
.b-share a:hover { border-color: var(--accent); color: var(--accent); }

.b-related { max-width: 1240px; margin: 0 auto; padding: 30px 0 0; }
.b-related > h2 { text-align: center; font-size: 28px; font-weight: 800; letter-spacing: -.5px; padding: 0 5%; }
.b-related .b-grid { padding-top: 30px; }

.b-preview-bar { background: var(--accent); color: #000; text-align: center; font-weight: 800; font-size: 14px; padding: 10px 5%; }
.b-preview-bar a { color: #000; }

/* ---------- CTA и подвал ---------- */
.b-cta {
  max-width: 1100px; margin: 0 auto 80px; padding: 55px 40px; text-align: center;
  background: linear-gradient(145deg, #111, #050505);
  border: 1px solid rgba(243,186,47,.2); border-radius: 40px;
}
.b-cta h3 { font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.b-cta p { color: var(--muted); max-width: 540px; margin: 0 auto 28px; font-size: 15px; }
.b-btn {
  display: inline-flex; align-items: center; gap: 10px; background: var(--accent); color: #000;
  padding: 15px 32px; border-radius: 100px; font-weight: 800; text-decoration: none; font-size: 15px; transition: .3s;
}
.b-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(243,186,47,.3); }
@media (max-width: 1150px) { .b-cta { margin-left: 5%; margin-right: 5%; } }
@media (max-width: 600px) { .b-cta { padding: 40px 24px; border-radius: 28px; } }

.b-footer { border-top: 1px solid var(--border); padding: 40px 5% 50px; }
.b-footer-inner { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.b-footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.b-footer nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.b-footer nav a:hover { color: var(--accent); }
.b-disclaimer { max-width: 1240px; margin: 26px auto 0; color: #475569; font-size: 12px; line-height: 1.6; }
