/* Страница «Статьи для родителей» (/blog/, templates/public/blog/index.html).
   Макеты — _lab/24-pages/blog-index: 01-hero v1, 02-list v2, 03-filter v4, 04-cta v1.
   Все классы — с префиксом bi-; общие компоненты сайта: .h-grad, .chip,
   .signup, .facts, .btn-go. */
.bi {
  --bi-shadow: 0 30px 60px -30px rgba(25, 30, 80, .28), 0 2px 6px rgba(25, 30, 80, .05);
  --bi-shadow-s: 0 18px 36px -24px rgba(25, 30, 80, .30), 0 1px 3px rgba(25, 30, 80, .05);
  --bi-blue: #1d5fd6;
  padding-bottom: clamp(24px, 4vw, 48px);
}
.bi h1, .bi h2 { margin: 0; font-weight: 800; color: var(--ink); }
.bi img { display: block; max-width: 100%; }
.bi a { color: inherit; text-decoration: none; }
.bi [hidden] { display: none !important; }

/* метки */
.bi-grade {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--pill);
  font-size: 12.5px; font-weight: 700; color: var(--bi-blue); background: #e8f1ff; white-space: nowrap;
}
.bi-glass { color: var(--ink); background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.bi-chap { font-size: 13px; font-weight: 600; color: var(--muted); }
.bi-dot { display: flex; align-items: center; gap: 8px; }
.bi-dot::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, #4d97ff, #33d0ec); }
.bi-read { font-size: 15px; font-weight: 700; color: var(--blue); white-space: nowrap; }
.bi-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13.5px; font-weight: 500; color: var(--muted); }

/* ── Первый экран: текст + наклонённая мозаика ── */
.bi-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center;
  margin-top: clamp(18px, 3vw, 34px);
}
.bi-hero-t { display: grid; gap: 22px; justify-items: start; }
.bi-kick {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  padding: 6px 13px 6px 7px; border-radius: var(--pill);
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--border);
}
.bi-kick b { padding: 3px 9px; border-radius: var(--pill); font-size: 12px; font-weight: 700; color: #fff; background: var(--ink); }
.bi-hero h1 { font-size: clamp(40px, 5.2vw, 64px); line-height: 1.02; letter-spacing: -.035em; }
.bi-lead { max-width: 600px; margin: 0; font-size: clamp(16.5px, 1.6vw, 19px); line-height: 1.55; color: var(--muted); }
.bi-nums { display: flex; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.bi-nums li { display: grid; gap: 2px; min-width: 128px; margin: 0; padding: 14px 18px; border-radius: 20px; background: var(--surface); box-shadow: var(--bi-shadow-s); }
.bi-nums b { font-size: 26px; line-height: 1.15; letter-spacing: -.02em; white-space: nowrap; }
.bi-nums span { font-size: 13.5px; font-weight: 500; color: var(--muted); }

.bi-mos { position: relative; height: 470px; border-radius: 34px; overflow: hidden; background: #e6ecfb; box-shadow: var(--bi-shadow); }
.bi-mos-in {
  position: absolute; left: 50%; top: 50%;
  display: grid; grid-template-columns: repeat(3, 250px); gap: 14px;
  transform: translate(-50%, -50%) rotate(-9deg);
}
.bi-mos-in img { width: 250px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 18px; box-shadow: 0 16px 30px -18px rgba(25, 30, 80, .45); }
.bi-mos-in > :nth-child(3n+2) { transform: translateY(-40px); }
.bi-mos::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(246, 247, 251, 0) 60%, rgba(246, 247, 251, .55)); pointer-events: none; }
.bi-mos-lab {
  position: absolute; z-index: 2; left: 20px; bottom: 20px;
  display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 18px;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.bi-mos-lab img { width: 36px; height: 36px; object-fit: contain; }

/* ── Найти статью: поиск + классы ── */
.bi-find { margin-top: clamp(56px, 7vw, 96px); }
.bi-find-hd { margin-bottom: 26px; }
.bi-find-hd h2 { font-size: clamp(28px, 3vw, 34px); line-height: 1.1; letter-spacing: -.025em; }
.bi-find-hd p { margin: 6px 0 0; font-size: 15.5px; color: var(--muted); }
.bi-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.bi-search {
  display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 10px 0 22px; border-radius: var(--pill);
  color: var(--muted); background: var(--surface); cursor: text;
  box-shadow: inset 0 0 0 2px #cfe0ff, 0 18px 36px -24px rgba(31, 123, 255, .5);
}
.bi-search:focus-within { box-shadow: inset 0 0 0 2px #8fb6ff, 0 18px 36px -24px rgba(31, 123, 255, .6); }
.bi-search svg { flex: none; }
.bi-search input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; padding: 0;
  font: 600 18px var(--font); color: var(--ink); background: transparent;
}
.bi-search input::placeholder { color: #9a9db6; font-weight: 500; }
.bi-search input::-webkit-search-cancel-button { display: none; }
.bi-x {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  font: 500 18px/1 var(--font); color: var(--muted); background: var(--surface-2); cursor: pointer;
}
.bi-x:hover { color: var(--ink); }
.bi-seg { display: flex; gap: 4px; padding: 6px; border-radius: var(--pill); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--border); }
.bi-seg button {
  flex: none; height: 46px; padding: 0 16px; border: 0; border-radius: var(--pill);
  font: 600 14.5px var(--font); color: var(--ink-2); background: transparent; cursor: pointer; white-space: nowrap;
}
.bi-seg button:hover { background: var(--surface-2); }
.bi-seg button[aria-pressed="true"] { color: #fff; background: var(--ink); }
.bi-seg button:focus-visible, .bi-sugg button:focus-visible, .bi-x:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }
.bi-sugg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.bi-sugg button {
  height: 32px; padding: 0 12px; border: 0; border-radius: var(--pill);
  font: 600 13.5px var(--font); color: var(--ink-2); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--border); cursor: pointer;
}
.bi-sugg button:hover { box-shadow: inset 0 0 0 1.5px #c9d8ff; }
.bi-res { margin-top: 26px; padding: 8px; border-radius: 30px; background: var(--surface); box-shadow: var(--bi-shadow); }
.bi-cnt { padding: 14px 18px 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.bi-it { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 12px; border-radius: 22px; }
.bi-it + .bi-it::before { content: ""; position: absolute; left: 184px; right: 18px; top: 0; height: 1px; background: var(--border-2); }
.bi-it:hover { background: var(--surface-2); }
.bi-it img { width: 150px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; background: #dfe6fb; }
.bi-it-m { display: grid; gap: 6px; min-width: 0; }
.bi-it h3 { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.2; letter-spacing: -.015em; }
.bi-it p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.bi-res mark { padding: 0 2px; border-radius: 5px; color: inherit; background: #d9f7ea; }
.bi-empty { padding: 10px 18px 26px; font-size: 15.5px; line-height: 1.5; color: var(--muted); }
.bi-empty a { color: var(--blue); font-weight: 600; }

/* ── Журнал ── */
.bi-list { margin-top: clamp(56px, 7vw, 96px); }
.bi-find:not([hidden]) + .bi-list { margin-top: 32px; }
.bi-cov { position: relative; overflow: hidden; background: #dfe6fb; }
.bi-cov img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.bi-list a:hover .bi-cov img { transform: scale(1.04); }
.bi-cov .bi-grade { position: absolute; left: 14px; top: 14px; }
.bi-list > a, .bi-two > a, .bi-three > a { transition: box-shadow .2s; }
.bi-list a:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 3px; }

.bi-feat {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 8px;
  padding: 12px; border-radius: 32px; background: var(--surface); box-shadow: var(--bi-shadow);
}
.bi-feat .bi-cov { min-height: 420px; border-radius: 24px; }
.bi-feat .bi-cov .bi-grade { left: 18px; top: 18px; height: 30px; padding: 0 13px; font-size: 13.5px; }
.bi-feat .bi-bd { display: flex; flex-direction: column; gap: 16px; padding: 26px 26px 18px 30px; }
.bi-feat h2 { font-size: clamp(28px, 2.6vw, 36px); line-height: 1.08; letter-spacing: -.025em; }
.bi-feat p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--muted); }
.bi-toc { display: grid; gap: 10px; margin: 0; padding: 16px 18px; border-radius: 18px; background: var(--surface-2); list-style: none; counter-reset: s; }
.bi-toc li { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--ink-2); counter-increment: s; }
.bi-toc li::before {
  content: counter(s); flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font-size: 12px; font-weight: 700; color: var(--bi-blue); background: #fff; box-shadow: inset 0 0 0 1.5px #d6e4ff;
}
.bi-feat-ft { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; }
.bi-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none; height: 48px; padding: 0 24px; border-radius: var(--pill);
  font-size: 15.5px; font-weight: 600; color: #fff; background: var(--ink); white-space: nowrap; transition: background .15s;
}
.bi-feat:hover .bi-btn { background: #2a3050; }

.bi-two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.bi-wide {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; align-items: stretch;
  padding: 10px; border-radius: 28px; background: var(--surface); box-shadow: var(--bi-shadow);
}
.bi-wide .bi-cov { min-height: 200px; border-radius: 20px; }
.bi-wide .bi-bd { display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 10px 0; }
.bi-wide h2 { font-size: 22px; line-height: 1.2; letter-spacing: -.015em; }
.bi-wide p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.bi-wide .bi-read { margin-top: auto; }

.bi-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.bi-card { display: flex; flex-direction: column; border-radius: 28px; overflow: hidden; background: var(--surface); box-shadow: var(--bi-shadow); }
.bi-card .bi-cov { aspect-ratio: 16 / 10; }
.bi-card .bi-bd { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 22px 26px; }
.bi-card h2 { flex: 1; font-size: 23px; line-height: 1.2; letter-spacing: -.015em; }
.bi-card-ft {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--border-2); font-size: 13.5px; color: var(--muted);
}
.bi-feat:hover, .bi-wide:hover, .bi-card:hover { box-shadow: 0 0 0 1px var(--border), 0 34px 64px -28px rgba(25, 30, 80, .34); }

/* ── Финальный призыв: светлый баннер на мозаике ── */
.bi-cta { margin-top: clamp(64px, 8vw, 110px); }
.bi-cta-box {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; justify-items: center; gap: 22px;
  padding: 84px 40px 72px; border-radius: 40px; text-align: center;
  background: #eef2fb; box-shadow: var(--bi-shadow);
}
.bi-cta-mos {
  position: absolute; inset: -140px -80px; z-index: -2;
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 16px;
  transform: rotate(-8deg);
}
.bi-cta-mos img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 18px; }
.bi-cta-box::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(52% 70% at 50% 50%, rgba(246, 247, 251, .97) 40%, rgba(246, 247, 251, .72) 75%, rgba(246, 247, 251, .45));
}
.bi-cta h2 { max-width: 760px; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.06; letter-spacing: -.035em; text-wrap: balance; }
.bi-cta-lead { max-width: 600px; margin: 0; font-size: 17px; line-height: 1.55; color: var(--muted); }
.bi-cta .signup { margin: 6px 0 0; text-align: left; }
.bi-cta .signup .btn::after { content: "→" / ""; margin-left: 2px; font-weight: 500; }
.bi-cta .facts { justify-content: center; margin: 0; font-size: 14.5px; }
.bi-cta .facts li::before { width: 16px; height: 16px; background-size: 16px; }

@media (max-width: 1180px) {
  .bi-hero { grid-template-columns: 1fr; gap: 40px; }
  .bi-tools { grid-template-columns: 1fr; }
  .bi-seg { justify-self: start; max-width: 100%; }
  .bi-feat, .bi-two { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .bi-three { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .bi-hero { gap: 32px; }
  .bi-nums { flex-wrap: wrap; }
  .bi-nums li { flex: 1 1 0; min-width: 0; padding: 12px 14px; }
  .bi-nums b { font-size: 22px; }
  .bi-nums span { font-size: 12.5px; white-space: nowrap; }
  .bi-nums li:last-child { flex-grow: 1.2; }
  .bi-mos { height: 280px; border-radius: 26px; }
  .bi-mos-in { grid-template-columns: repeat(3, 160px); gap: 10px; }
  .bi-mos-in img { width: 160px; border-radius: 12px; }
  .bi-mos-lab { left: 12px; right: 12px; bottom: 12px; font-size: 13px; }

  .bi-search { height: 54px; padding-left: 16px; }
  .bi-search input { font-size: 16px; }
  .bi-seg { overflow-x: auto; scrollbar-width: none; }
  .bi-seg::-webkit-scrollbar { display: none; }
  .bi-seg button { height: 40px; padding: 0 12px; font-size: 13.5px; }
  .bi-res { padding: 4px; border-radius: 24px; }
  .bi-it { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 10px; align-items: start; }
  .bi-it img { width: 84px; aspect-ratio: 1; border-radius: 14px; }
  .bi-it + .bi-it::before { left: 108px; right: 10px; }
  .bi-it h3 { font-size: 17px; }
  .bi-it p, .bi-it > .bi-read { display: none; }

  .bi-feat { padding: 8px; border-radius: 26px; }
  .bi-feat .bi-cov { min-height: 0; aspect-ratio: 16 / 10; border-radius: 20px; }
  .bi-feat .bi-bd { padding: 18px 10px 10px; gap: 14px; }
  .bi-feat h2 { font-size: 26px; }
  .bi-feat p { font-size: 15.5px; }
  .bi-toc li { font-size: 14.5px; }
  .bi-feat-ft { flex-direction: column; align-items: stretch; }
  .bi-two, .bi-three { gap: 16px; margin-top: 16px; }
  .bi-three { grid-template-columns: 1fr; }
  .bi-wide { grid-template-columns: 104px minmax(0, 1fr); gap: 14px; padding: 8px; border-radius: 24px; }
  .bi-wide .bi-cov { min-height: 0; aspect-ratio: 1; border-radius: 16px; align-self: start; }
  .bi-wide .bi-cov .bi-grade { display: none; }
  .bi-wide .bi-bd { padding: 6px 6px 6px 0; gap: 8px; }
  .bi-wide h2 { font-size: 18px; }
  .bi-wide p { display: none; }
  .bi-card { border-radius: 24px; }
  .bi-card .bi-cov { aspect-ratio: 16 / 8; }
  .bi-card .bi-bd { padding: 18px; }
  .bi-card h2 { font-size: 21px; }

  .bi-cta-box { padding: 44px 18px 40px; border-radius: 26px; gap: 18px; }
  .bi-cta-mos { inset: -60px -220px; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
  .bi-cta-mos img { border-radius: 10px; }
  .bi-cta-box::before { background: radial-gradient(90% 60% at 50% 50%, rgba(246, 247, 251, .97) 0, rgba(246, 247, 251, .92) 60%, rgba(246, 247, 251, .55) 100%); }
  .bi-cta-lead { font-size: 16px; }
  .bi-cta .facts { gap: 8px 16px; font-size: 13.5px; }
}
