/* Блог: статьи для поиска. Основа — portal.css (шрифт Onest, бирюза, кнопки-«пилюли»). */

.header-nav a.nav-cta { background: var(--teal); color: #fff; box-shadow: 0 12px 26px -12px rgba(13,115,119,.6); }
.header-nav a.nav-cta:hover { background: var(--teal-900); color: #fff; }

.article-wrap { width: min(820px, calc(100% - 32px)); margin: 0 auto; padding: 40px 0 90px; flex: 1; }
.blog-hero { width: auto; padding: 32px 0 32px; }
.blog-hero h1 { font-size: clamp(34px, 5vw, 56px); }

.alert--warn { background: #fff4d6; color: #7a5600; }

.crumbs { font-size: 15px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--teal); text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { margin: 0 6px; opacity: .6; }

.article h1 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; color: var(--ink); }
.byline { display: flex; align-items: center; gap: 14px; margin: 26px 0 34px; padding-bottom: 26px; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.4; color: var(--muted); }
.byline img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; }
.byline b { color: var(--ink); }
.byline time { margin-left: auto; white-space: nowrap; }

.article-body { font-size: 19px; line-height: 1.7; color: var(--text); }
.article-body > * + * { margin-top: 18px; }
.article-body h2 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); margin-top: 48px; }
.article-body h3 { font-size: 22px; font-weight: 700; line-height: 1.25; color: var(--ink); margin-top: 32px; }
.article-body ul, .article-body ol { padding-left: 26px; }
.article-body li + li { margin-top: 8px; }
.article-body li::marker { color: var(--teal); font-weight: 700; }
.article-body a { color: var(--teal); font-weight: 600; text-underline-offset: 3px; }
.article-body strong { color: var(--ink); }
.article-body figure { margin: 30px 0; }
.article-body figure img { width: 100%; height: auto; border-radius: 22px; background: var(--pale); }
.article-body figcaption { font-size: 15px; line-height: 1.5; color: var(--muted); margin-top: 10px; }
.article-body .lead { font-size: 21px; color: var(--muted); }
.article-body .note { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--teal-300); border-radius: 18px; padding: 20px 24px; }
.article-body .note--warn { border-left-color: var(--bad); }
.article-body .note > :first-child { margin-top: 0; }
.article-body .note p + p, .article-body .note ul { margin-top: 10px; }
.article-body .toc { background: var(--pale); border-radius: 18px; padding: 20px 24px; font-size: 17px; }
.article-body .toc b { display: block; margin-bottom: 8px; color: var(--ink); }
.article-body .toc ol { margin: 0; }
.article-body .toc a { font-weight: 500; text-decoration: none; }
.article-body .toc a:hover { text-decoration: underline; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; background: #fff; border-radius: 16px; overflow: hidden; display: block; overflow-x: auto; }
.article-body th, .article-body td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.article-body th { background: var(--pale); color: var(--ink); font-weight: 700; }

.vet-cta { margin-top: 56px; display: flex; flex-direction: column; gap: 22px; align-items: flex-start; padding: 36px; border-radius: 32px; color: #fff; background: var(--grad); box-shadow: 0 40px 80px -50px rgba(6,47,49,.6); }
.vet-cta-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--mint); }
.vet-cta h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; margin: 8px 0 12px; }
.vet-cta p { font-size: 18px; line-height: 1.55; opacity: .92; }
.vet-cta .btn { background: #fff; color: var(--teal-900); box-shadow: 0 16px 36px -16px rgba(0,0,0,.45); }
.vet-cta .btn:hover { background: var(--pale); color: var(--teal-900); }

.post-list { display: grid; gap: 18px; }
.post-card { display: grid; grid-template-columns: 180px 1fr; gap: 22px; align-items: center; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 16px; transition: transform .25s, box-shadow .25s; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 30px 60px -36px rgba(6,47,49,.4); }
.post-card img { width: 180px; height: 130px; object-fit: cover; border-radius: 16px; }
.post-card h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; color: var(--ink); }
.post-card p { font-size: 16px; line-height: 1.5; color: var(--muted); margin-top: 6px; }

@media (max-width: 760px) {
  .article-wrap { padding-top: 24px; }
  .article-body { font-size: 18px; }
  .article-body table { display: table; font-size: 15px; }
  .article-body th, .article-body td { padding: 10px; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
  .byline { flex-wrap: wrap; }
  .byline time { margin-left: 62px; }
  .vet-cta { padding: 26px 22px; border-radius: 26px; }
  .vet-cta .btn { width: 100%; }
  .post-card { grid-template-columns: 1fr; }
  .post-card img { width: 100%; height: 180px; }
  .header-nav a:not(.nav-cta):not(.nav-all) { display: none; }
  .header-nav a.nav-all { font-size: 14px; padding: 8px 10px; }
}

/* Подписка на статьи */
.subscribe { margin-top: 32px; padding: 32px 36px; border-radius: 32px; background: #fff; border: 1px solid var(--line); }
.subscribe h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); }
.subscribe > p { margin-top: 8px; font-size: 17px; line-height: 1.55; color: var(--muted); }
.subscribe-form { margin-top: 20px; }
.subscribe-row { display: flex; gap: 12px; }
.subscribe-row input { flex: 1; min-width: 0; font: inherit; font-size: 17px; padding: 14px 20px; border-radius: 100px; border: 1px solid var(--line); background: var(--bg, #f5f9f8); color: var(--ink); }
.subscribe-row input:focus { outline: 2px solid var(--teal-300); outline-offset: 1px; }
.subscribe-row .btn { flex: none; }
.subscribe-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.subscribe-consent input { margin-top: 3px; flex: none; width: 18px; height: 18px; accent-color: var(--teal); }
.subscribe-consent a { color: var(--teal); }
.subscribe-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.message-page { padding: 40px 0; }
.message-page h1 { font-size: clamp(30px, 4.2vw, 44px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); }
.message-page p { margin-top: 18px; font-size: 19px; line-height: 1.6; color: var(--text); }
.message-page form { margin-top: 22px; }
@media (max-width: 760px) {
  .subscribe { padding: 24px 20px; border-radius: 26px; }
  .subscribe-row { flex-direction: column; }
  .subscribe-row .btn { width: 100%; }
}
.subscribe-role { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 14px; font-size: 16px; color: var(--ink); }
.subscribe-role label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.subscribe-role input { width: 18px; height: 18px; accent-color: var(--teal); }

/* Кнопки мессенджеров */
.popup-social { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; font-size: 15px; color: var(--muted); }
.popup-social span { flex-basis: 100%; }
.social-btn { display: inline-flex; align-items: center; padding: 10px 20px; border-radius: 100px; font-weight: 700; font-size: 15px; text-decoration: none; color: #fff; }
.social-btn--tg { background: #229ed9; }
.social-btn--max { background: linear-gradient(135deg, #3d5afe, #8e2de2); }
.social-btn:hover { filter: brightness(1.08); }

/* Всплывающее окно в статье */
.blog-popup { position: fixed; right: 24px; bottom: 24px; z-index: 50; width: min(440px, calc(100% - 32px)); max-height: calc(100vh - 48px); overflow-y: auto;
  background: #fff; border-radius: 28px; padding: 28px 26px 24px; box-shadow: 0 40px 90px -30px rgba(6,47,49,.55), 0 0 0 1px rgba(6,47,49,.06);
  opacity: 0; transform: translateY(24px); transition: opacity .25s, transform .25s; }
.blog-popup.open { opacity: 1; transform: none; }
.blog-popup[hidden] { display: none; }
.blog-popup-close { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--pale); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.blog-popup-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.blog-popup h2 { margin-top: 6px; padding-right: 30px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); }
.blog-popup-text { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.blog-popup .subscribe-form { margin-top: 16px; }
.blog-popup .subscribe-role { font-size: 14px; gap: 6px 16px; }
.blog-popup .subscribe-row { flex-direction: column; gap: 10px; }
.blog-popup .subscribe-row input { font-size: 16px; padding: 12px 18px; }
.blog-popup .subscribe-row .btn { width: 100%; padding: 15px 24px; font-size: 16px; }
.blog-popup .subscribe-consent { font-size: 12.5px; margin-top: 10px; }
.blog-popup .popup-social { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.blog-popup .popup-subscribe + .popup-social { }
@media (max-width: 760px) {
  .blog-popup { right: 0; bottom: 0; width: 100%; max-height: 88vh; border-radius: 26px 26px 0 0; padding: 24px 20px 20px; transform: translateY(100%); }
  .blog-popup.open { transform: none; }
}

/* Поделиться статьёй: плавающая кнопка с меню */
.share-fab { position: fixed; right: 24px; bottom: 24px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; transition: opacity .2s, transform .2s; }
.share-fab.behind-popup { opacity: 0; pointer-events: none; transform: scale(.8); }
.share-fab-btn { width: 56px; height: 56px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--teal); color: #fff; box-shadow: 0 16px 34px -12px rgba(13,115,119,.7), 0 0 0 1px rgba(255,255,255,.4) inset; transition: transform .2s, background .2s; }
.share-fab-btn:hover { background: var(--teal-900); transform: translateY(-2px); }
.share-fab.open .share-fab-btn { background: var(--teal-900); }
.share-menu { width: 248px; padding: 10px; border-radius: 22px; background: #fff; box-shadow: 0 30px 70px -24px rgba(6,47,49,.5), 0 0 0 1px rgba(6,47,49,.07); }
.share-menu[hidden] { display: none; }
.share-menu-title { padding: 8px 12px 6px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.share-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 14px; background: none;
  font: 600 16px/1.2 'Onest', sans-serif; color: var(--ink); text-decoration: none; text-align: left; cursor: pointer; }
.share-item[hidden] { display: none; }
.share-item:hover { background: var(--pale); }
.share-item i { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--line); }
.share-item--telegram i { background: #229ed9; }
.share-item--max i { background: linear-gradient(135deg, #3d5afe, #8e2de2); }
.share-item--whatsapp i { background: #25a35a; }
.share-item--vk i { background: #0077ff; }
.share-item--copy i { background: var(--teal); }
.share-toast { position: absolute; right: 0; bottom: 70px; width: max-content; max-width: 260px; padding: 10px 14px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; line-height: 1.35; }
.share-toast[hidden] { display: none; }
@media (max-width: 760px) {
  .share-fab { right: 16px; bottom: 16px; }
  .share-fab-btn { width: 52px; height: 52px; }
}

.byline span a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.byline span a:hover { color: var(--teal); text-decoration-color: currentColor; }
.byline > div { flex: 1; min-width: 0; }

/* Автор: ссылка в подписи, строка-источник, страница автора */
.byline-name { color: inherit; text-decoration: none; }
.byline-name:hover b { color: var(--teal); }
.source-note { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.55; color: var(--muted); }
.source-note a { color: var(--teal); }
.author-head { display: flex; gap: 26px; align-items: center; margin-bottom: 28px; }
.author-head img { width: 160px; height: 192px; object-fit: cover; border-radius: 24px; background: var(--pale); flex: none; }
.author-job { margin-top: 10px; font-size: 18px; line-height: 1.5; color: var(--muted); }
.author-page .article-body table th { white-space: nowrap; width: 1%; }
@media (max-width: 760px) {
  .author-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .author-head img { width: 120px; height: 144px; }
}

/* Переход к списку статей */
.all-posts { margin-top: 22px; }
.all-posts a { font-weight: 700; color: var(--teal); text-decoration: none; }
.all-posts a:hover { text-decoration: underline; }
.post-card--nocover { grid-template-columns: 1fr; padding: 22px 24px; }
