/* Блог «Ай Свадьба». Шапка, футер, .container, .crumbs, .btn — из /css/style.css каталога;
   здесь только своё, с префиксом b*, чтобы не пересекаться с классами каталога. */

.bindex, .bpost { padding-bottom: 72px; }
.bindex h1, .bpost h1 { font-size: 40px; line-height: 1.15; letter-spacing: -.02em; margin: 6px 0 14px; color: var(--green); }
.bindex__lead { font-size: 17px; color: var(--muted); max-width: 720px; margin: 0 0 32px; }

/* карточки (как лента Дзена) */
.bcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.bcard { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.bcard:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(31,42,38,.05), 0 16px 40px rgba(31,42,38,.10); }
.bcard__img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.bcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.bcard:hover .bcard__img img { transform: scale(1.03); }
.bcard__body { padding: 18px 20px 22px; }
.bcard__body time { font-size: 13px; color: var(--muted); }
.bcard__body h3 { font-size: 18px; line-height: 1.3; margin: 6px 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcard__body p { font-size: 14px; color: var(--muted); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* статья: текст слева, справа липкая колонка с оглавлением и подбором */
.bpost__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; align-items: start; }
.bpost__main { max-width: 820px; }
.bpost__meta { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.bpost__body { font-size: 17px; line-height: 1.7; }
.bpost__body p, .bpost__body ul { margin: 0 0 16px; }
.bpost__body ul { padding-left: 22px; } .bpost__body li { margin: 6px 0; } .bpost__body li::marker { color: var(--gold); }
.bpost__body h2 { font-size: 28px; line-height: 1.25; letter-spacing: -.01em; margin: 44px 0 14px; color: var(--green); scroll-margin-top: 140px; }
.bpost__body h3 { font-size: 20px; line-height: 1.3; margin: 28px 0 10px; }
.bpost__body a { color: var(--green); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; font-weight: 500; }
.bpost__body strong { font-weight: 500; }
.bpost__body hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0 26px; }
.bfig, .bgal { margin: 24px 0 28px; }
.bfig img { width: 100%; height: auto; border-radius: var(--radius); }
.bfig figcaption, .bgal figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; text-align: center; }
.bfig__src { display: block; margin-top: 4px; font-size: 12px; }
.bfig__src a { color: inherit; font-weight: 400; }
.bgal__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bgal__grid a { display: block; border-radius: 14px; overflow: hidden; cursor: zoom-in; }
.bgal__grid img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .4s; }
.bgal__grid a:hover img { transform: scale(1.04); }
.g2 .bgal__grid { grid-template-columns: repeat(2, 1fr); }

.bpost__side { position: sticky; top: 130px; display: flex; flex-direction: column; gap: 20px; margin-top: 8px; }
.btoc { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
.btoc__t { font-weight: 500; margin-bottom: 10px; }
.btoc ol { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.45; }
.btoc li { margin: 7px 0; } .btoc li::marker { color: var(--gold); }
.btoc a:hover { color: var(--green); text-decoration: underline; }
.bcta { background: var(--green-soft); border-radius: var(--radius); padding: 24px 22px; display: flex; flex-direction: column; gap: 10px; }
.bcta__t { font-size: 19px; font-weight: 500; line-height: 1.3; color: var(--green); }
.bcta p { margin: 0 0 6px; color: var(--muted); font-size: 14px; }

.brel { margin-top: 72px; }
.brel h2 { font-size: 26px; color: var(--green); margin: 0 0 20px; }

/* просмотр фото */
.blb { position: fixed; inset: 0; z-index: 1000; background: rgba(20,26,24,.92); display: flex; align-items: center; justify-content: center; padding: 24px; }
.blb[hidden] { display: none; }
.blb img { max-height: 92vh; max-width: 92vw; border-radius: 12px; }
.blb button { position: absolute; top: 14px; right: 20px; color: #fff; font-size: 44px; line-height: 1; }

@media (max-width: 1100px) {
  .bpost__grid { grid-template-columns: 1fr; gap: 0; }
  .bpost__side { position: static; margin-top: 40px; }
  .btoc { display: none; }
}
@media (max-width: 960px) { .bcards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .bindex h1, .bpost h1 { font-size: 28px; }
  .bpost__body { font-size: 16.5px; } .bpost__body h2 { font-size: 23px; }
  .bcards { grid-template-columns: 1fr; } .bgal__grid { gap: 8px; }
}
