/* Korrto 2026: блог (ИБ 15) — список и статья, includes/blog_view.php. Цвета и шрифты — переменные из assets/css/site.css.
 * Форма как на всём сайте: фото — прямые углы, кнопки и чипы — капсулы, один акцент — красный. */

/* ---------- общее ---------- */
.bl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 14px; font-size: 12.5px; color: var(--ink-3); }
.bl-meta > * + *::before { content: ""; display: inline-block; width: 3px; height: 3px; margin-right: 14px; border-radius: 50%; background: var(--line-strong); vertical-align: middle; }
.bl-tag { color: var(--red); font-weight: 560; text-transform: uppercase; letter-spacing: .06em; }
a.bl-tag:hover { color: var(--red-dk); }

/* ---------- /blog/ ---------- */
.bl-lhead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 64px; align-items: end; padding: 28px 0 clamp(28px, 3vw, 40px); border-bottom: 2px solid var(--ink); }
.bl-lhead__title { font-size: clamp(72px, 11vw, 168px); line-height: .82; }
.bl-lhead__lead { margin: 0; font-size: clamp(17px, 1.35vw, 19px); line-height: 1.5; color: var(--ink-2); }
.bl-chips { margin: 24px 0 0; }

.bl-feat { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 64px); align-items: center; margin: clamp(28px, 3vw, 40px) 0 0; padding-bottom: clamp(40px, 5vw, 72px); border-bottom: 1px solid var(--line); }
.bl-feat__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--stone); }
.bl-feat__img img, .bl-card__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; transition: transform .8s var(--ease); }
.bl-feat__img img { object-position: 50% 8%; }
.bl-feat:hover .bl-feat__img img, .bl-card:hover .bl-card__img img { transform: scale(1.035); }
.bl-feat__t { font-size: clamp(36px, 3.6vw, 60px); line-height: .94; margin: 0 0 18px; }
.bl-feat__t a:hover, .bl-card__t a:hover { color: var(--red); }
.bl-feat__p { margin: 0 0 28px; font-size: 17px; line-height: 1.6; color: var(--ink-2); }

.bl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(36px, 4vw, 56px) clamp(20px, 2vw, 32px); padding: clamp(40px, 5vw, 64px) 0 0; }
.bl-card { min-width: 0; }
.bl-card__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; margin: 0 0 18px; background: var(--stone); }
.bl-card .bl-meta { margin-bottom: 10px; }
.bl-card__t { margin: 0 0 10px; font-size: clamp(20px, 1.6vw, 23px); font-weight: 640; line-height: 1.22; letter-spacing: -.005em; }
.bl-card__p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bl-empty { padding: 48px 0 0; color: var(--ink-3); }
.bl-list { padding-bottom: clamp(64px, 8vw, 112px); }
[data-topic].is-off { display: none; }

/* ---------- статья ---------- */
.bl-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 3px; pointer-events: none; }
.bl-progress span { display: block; height: 100%; background: var(--red); transform: scaleX(0); transform-origin: left; }

.bl-hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: center; padding: clamp(24px, 3vw, 40px) 0 clamp(40px, 5vw, 72px); }
.bl-hero__title { font-size: clamp(42px, 4.6vw, 74px); line-height: .92; margin: 0 0 24px; }
.bl-hero__lead { margin: 0 0 28px; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; color: var(--ink-2); }
.bl-hero__img { margin: 0; aspect-ratio: 4 / 5; max-height: 680px; overflow: hidden; background: var(--stone); }
.bl-hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.bl-hero--wide { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; row-gap: clamp(20px, 2.4vw, 36px); }
.bl-hero--wide .bl-hero__img { grid-column: 1 / -1; aspect-ratio: 2 / 1; max-height: none; }
.bl-hero--wide .bl-hero__img img { object-position: 50% 62%; }
.bl-hero--wide .bl-hero__text { display: contents; }
.bl-hero--wide .bl-meta { grid-column: 1 / -1; margin: 0 0 -8px; }
.bl-hero--wide .bl-hero__title { grid-column: 1; margin: 0; }
.bl-hero--wide .bl-hero__lead { grid-column: 2; margin: 0; }
.bl-hero--wide .bl-hero__go { display: none; }

.bl-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr) 300px; gap: clamp(32px, 4vw, 64px); align-items: start; padding: clamp(32px, 4vw, 48px) 0 0; border-top: 2px solid var(--ink); }
.bl-layout--notoc { grid-template-columns: minmax(0, 1fr) 300px; }
.bl-toc, .bl-rail { position: sticky; top: calc(var(--head-h) + 28px); }
.bl-toc__k { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.bl-toc ol, .bl-toc-m ol { margin: 0; padding: 0; list-style: none; }
.bl-toc a, .bl-toc-m a { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.35; color: var(--ink-2); transition: color .2s; }
.bl-toc a .mono, .bl-toc-m a .mono { font-size: 12px; color: var(--ink-3); padding-top: 1px; }
.bl-toc a:hover { color: var(--ink); }
.bl-toc a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.bl-toc a[aria-current="true"] .mono { color: var(--red); }
.bl-toc .bl-share { margin-top: 24px; }
.bl-toc .bl-share .mono { flex-basis: 100%; margin: 0 0 4px; }

.bl-share { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.bl-share .mono { margin-right: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.bl-share a, .bl-share button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); transition: border-color .2s, color .2s, background-color .2s; }
.bl-share a:hover, .bl-share button:hover { border-color: var(--ink); color: var(--ink); }
.bl-share svg { width: 17px; height: 17px; }
.bl-share__vk { font: 700 12px/1 var(--f-sans); letter-spacing: .02em; }

.bl-body { min-width: 0; }
.bl-toc-m { display: none; }

/* текст статьи */
.bl-text { font-size: 17.5px; line-height: 1.72; color: var(--ink-2); counter-reset: blol; }
.bl-text > p:first-child { margin-top: 0; font-size: clamp(19px, 1.5vw, 21px); line-height: 1.6; color: var(--ink); }
.bl-text p { margin: 0 0 18px; }
.bl-text strong { color: var(--ink); font-weight: 640; }
.bl-text a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color .2s, text-decoration-color .2s; }
.bl-text a:hover { color: var(--red); text-decoration-color: var(--red); }
.bl-text h2 { display: grid; gap: 10px; margin: clamp(48px, 5vw, 72px) 0 20px; padding-top: 20px; border-top: 1px solid var(--line); font-family: var(--f-sans); font-weight: 680; font-variation-settings: "wdth" 52, "opsz" 144; text-transform: uppercase; font-size: clamp(30px, 2.7vw, 42px); line-height: .96; color: var(--ink); scroll-margin-top: calc(var(--head-h) + 24px); }
.bl-text h2 .bl-n { font-size: 13px; font-weight: 500; letter-spacing: .04em; text-transform: none; color: var(--red); }
.bl-text h3 { margin: 32px 0 10px; font-size: 20px; font-weight: 660; line-height: 1.3; color: var(--ink); }
.bl-text ul { margin: 0 0 22px; padding: 0; list-style: none; }
.bl-text ul li { position: relative; padding: 0 0 0 26px; margin: 0 0 10px; }
.bl-text ul li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 12px; height: 2px; background: var(--red); }
.bl-text ol { margin: 0 0 26px; padding: 0; list-style: none; border-top: 1px solid var(--line); counter-reset: blol; }
.bl-text ol li { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); counter-increment: blol; }
.bl-text ol li::before { content: counter(blol, decimal-leading-zero); font-family: var(--f-mono); font-size: 13px; color: var(--red); }
.art-table { margin: 8px 0 28px; overflow-x: auto; }
.bl-text table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; }
.bl-text th { padding: 0 16px 12px 0; text-align: left; font-family: var(--f-mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); border-bottom: 2px solid var(--ink); }
.bl-text td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.bl-text td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
.bl-text td:last-child { font-family: var(--f-mono); color: var(--ink); white-space: nowrap; }
.bl-text img { max-width: 100%; height: auto; }

.bl-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; margin: clamp(40px, 5vw, 64px) 0 0; padding: 24px 0 0; border-top: 2px solid var(--ink); }

/* правая колонка: КП */
.bl-cta { padding: 28px 26px 26px; background: var(--night); color: var(--on-night); }
.bl-cta__k { margin: 0 0 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--on-night-2); }
.bl-cta__t { margin: 0 0 14px; font-size: 32px; line-height: .95; color: #fff; }
.bl-cta p { margin: 0 0 22px; font-size: 15px; line-height: 1.55; color: var(--on-night-2); }
.bl-cta .btn { width: 100%; justify-content: center; }
.bl-cta__tel { display: block; margin: 18px 0 4px; font-size: 18px; color: #fff; }
.bl-cta__tel:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.bl-cta .bl-cta__note { margin: 0; font-size: 13.5px; }

/* под статьёй */
.bl-products { margin-top: clamp(24px, 3vw, 40px); }
.bl-products .pd-rail { margin-top: clamp(64px, 7vw, 104px); }
.bl-more { padding: clamp(72px, 8vw, 120px) var(--gut) clamp(72px, 8vw, 112px); }
.bl-more .bl-grid { padding-top: 0; }
.bl-more .sec-head { align-items: center; }

/* полоса КП: последней на странице — вплотную к подвалу */
main:has(> .bl-band:last-child) { padding-bottom: 0; }
.bl-band { background: var(--night); color: var(--on-night); }
.bl-band__in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: center; padding-top: clamp(56px, 7vw, 104px); padding-bottom: clamp(56px, 7vw, 104px); }
.bl-band__t { font-size: clamp(40px, 4.4vw, 72px); color: #fff; margin: 0 0 20px; }
.bl-band__lead { margin: 0 0 32px; font-size: 17px; line-height: 1.6; color: var(--on-night-2); }
.bl-band__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.bl-band__facts { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-night); }
.bl-band__facts li { display: grid; gap: 6px; padding: 20px 20px 20px 0; border-bottom: 1px solid var(--line-night); }
.bl-band__facts li:nth-child(odd) { border-right: 1px solid var(--line-night); }
.bl-band__facts li:nth-child(even) { padding-left: 20px; }
.bl-band__facts b { font-size: 17px; font-weight: 640; color: #fff; }
.bl-band__facts span { font-size: 14px; line-height: 1.5; color: var(--on-night-2); }

/* ---------- адаптив ---------- */
@media (max-width: 1240px) {
  .bl-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .bl-toc { display: none; }
  .bl-toc-m { display: block; margin: 0 0 32px; border: 1px solid var(--line); }
  .bl-toc-m summary { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; font-weight: 560; }
  .bl-toc-m summary::-webkit-details-marker { display: none; }
  .bl-toc-m summary .mono { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
  .bl-toc-m summary svg { width: 18px; height: 18px; margin-left: auto; transition: transform .25s var(--ease); }
  .bl-toc-m[open] summary svg { transform: rotate(180deg); }
  .bl-toc-m ol { padding: 0 18px 8px; }
  .bl-toc-m li:last-child a { border-bottom: 0; }
}
@media (max-width: 960px) {
  .bl-lhead, .bl-feat, .bl-hero, .bl-band__in { grid-template-columns: 1fr; }
  .bl-hero__img { aspect-ratio: 4 / 3; max-height: none; order: -1; }
  .bl-hero--wide .bl-hero__img { order: 0; aspect-ratio: 3 / 2; }
  .bl-hero--wide .bl-hero__title, .bl-hero--wide .bl-hero__lead { grid-column: 1; }
  .bl-hero--wide .bl-meta { margin: 0; }
  .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bl-layout, .bl-layout--notoc { grid-template-columns: 1fr; }
  .bl-rail { position: static; }
}
@media (max-width: 600px) {
  .bl-chips { flex-wrap: nowrap; overflow-x: auto; margin: 20px calc(-1 * var(--gut)) 0; padding: 0 var(--gut); scrollbar-width: none; }
  .bl-chips::-webkit-scrollbar { display: none; }
  .bl-chips button { flex: none; }
  .bl-grid { grid-template-columns: 1fr; }
  .bl-hero { padding-top: 16px; }
  .bl-hero__img { margin: 0 calc(-1 * var(--gut)); }
  .bl-text { font-size: 17px; }
  .bl-text td:first-child, .bl-text td:last-child { white-space: normal; }
  .bl-band__facts { grid-template-columns: 1fr; }
  .bl-band__facts li:nth-child(odd) { border-right: 0; }
  .bl-band__facts li:nth-child(even) { padding-left: 0; }
  .bl-band__btns .btn { flex: 1 1 100%; justify-content: center; }
  .bl-feat .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .bl-feat__img img, .bl-card__img img { transition: none; }
}
