/* ============================================================
   Нейро ЛАНД — стили блога и шаблона статьи
   ============================================================
   Подключается ПОСЛЕ styles.css (берёт оттуда :root-токены, шапку,
   футер, кнопки, .badge, .faq-list). Здесь — только то, что уникально
   для страниц blog.html и статей.
   ============================================================ */

/* Активный пункт меню на контентных страницах */
.main-nav a.is-active { color: var(--green-700); font-weight: 700; }

/* ---------- Общий каркас страницы ---------- */
.page-wrap { padding: 36px 0 72px; }
.page-head { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.page-head p { color: var(--muted); font-size: 1.08rem; }

/* ---------- Хлебные крошки ---------- */
.breadcrumbs { font-size: .88rem; color: var(--muted); margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--green-700); }
.breadcrumbs span[aria-hidden] { opacity: .5; }
.breadcrumbs .current { color: var(--ink); font-weight: 600; }

/* ============================================================
   КАРТОЧКИ СТАТЕЙ (сетка блога + блок перелинковки внизу статьи)
   ============================================================ */
.article-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .14s ease, box-shadow .14s ease;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.article-card a.card-cover { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.article-card .card-cover img { width: 100%; height: 100%; object-fit: cover; background: var(--tint-50); }
.article-card .card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.article-card .card-date { font-size: .82rem; color: var(--muted); }
.article-card h3, .article-card .card-title { font-size: 1.12rem; font-weight: 700; line-height: 1.3; margin: 0; }
.article-card h3 a, .article-card .card-title a { color: var(--ink); }
.article-card h3 a:hover, .article-card .card-title a:hover { color: var(--green-700); }
.article-card p { color: var(--muted); font-size: .94rem; margin: 0; flex: 1; }
.article-card .card-more { color: var(--green-700); font-weight: 700; font-size: .9rem; margin-top: 4px; }

/* ============================================================
   ШАБЛОН СТАТЬИ
   ============================================================ */
.article { max-width: 820px; margin: 0 auto; }

/* Шапка статьи: H1 + мета (автор / дата / рейтинг) */
.article-header { margin-bottom: 28px; }
.article-header h1 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: 18px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; color: var(--muted); font-size: .92rem; }
.article-author { display: inline-flex; align-items: center; gap: 10px; }
.article-author img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--tint-100); }
.article-author b { color: var(--ink); font-weight: 700; display: block; font-size: .95rem; }
.article-author span { font-size: .82rem; }
.article-meta .meta-dot { opacity: .4; }

/* Звёздный рейтинг */
.rating { display: inline-flex; align-items: center; gap: 8px; }
.rating-stars { position: relative; display: inline-block; font-size: 1.05rem; line-height: 1; font-family: Arial, sans-serif; }
.rating-stars::before { content: "★★★★★"; color: var(--line-2); }
.rating-stars i { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: #f5a623; }
.rating-stars i::before { content: "★★★★★"; }
.rating b { color: var(--ink); }
.rating span { font-size: .82rem; }

/* ---------- Содержание (TOC) ---------- */
.toc { background: var(--tint-50); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 0 0 32px; }
.toc-title { font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--green-700); margin: 0 0 12px; }
.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.toc a { color: var(--ink); }
.toc a:hover { color: var(--green-700); }
.toc a.is-active { color: var(--green-700); font-weight: 700; }

/* ---------- Текст статьи (prose) ---------- */
.prose { font-size: 1.06rem; line-height: 1.75; color: var(--ink); }
.prose > h2 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); margin: 44px 0 16px; scroll-margin-top: 90px; }
.prose > h3 { font-size: 1.25rem; margin: 30px 0 12px; scroll-margin-top: 90px; }
.prose p { margin: 0 0 18px; }
.prose a { color: var(--green-700); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--ink); font-weight: 700; }

/* Маркированный список */
.prose ul.bullets { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 12px; }
.prose ul.bullets li { position: relative; padding-left: 30px; }
.prose ul.bullets li::before {
  content: "🌿"; position: absolute; left: 0; top: 1px; font-size: .95rem;
}

/* ---------- Одно фото с подписью ---------- */
.article-figure { margin: 28px 0; }
.article-figure img { width: 100%; border-radius: var(--radius); background: var(--tint-50); aspect-ratio: 16 / 9; object-fit: cover; }
.article-figure figcaption { color: var(--muted); font-size: .9rem; margin-top: 10px; text-align: center; }

/* ---------- Блок на 2 фото ---------- */
.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.photo-pair img { width: 100%; border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; background: var(--tint-50); cursor: zoom-in; }

/* ---------- Галерея на 5 фото ---------- */
.gallery5 { display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 12px; margin: 28px 0; }
.gallery5 img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); background: var(--tint-50); cursor: zoom-in; aspect-ratio: 4 / 3; }
.gallery5 img:first-child { grid-row: span 2; aspect-ratio: auto; }

/* ---------- Врезка: автор + цитата ---------- */
.author-quote {
  display: flex; gap: 20px; align-items: flex-start; margin: 32px 0;
  background: var(--amber-bg); border: 1px solid var(--amber-bd);
  border-radius: var(--radius); padding: 24px 26px;
}
.author-quote img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #fff; box-shadow: var(--shadow); }
.author-quote blockquote { margin: 0; font-size: 1.1rem; line-height: 1.55; font-style: italic; color: var(--ink); }
.author-quote .aq-name { margin-top: 12px; font-style: normal; font-size: .9rem; color: var(--muted); }
.author-quote .aq-name b { color: var(--ink); }

/* ---------- Обычная врезка в рамке ---------- */
.callout {
  margin: 30px 0; padding: 20px 24px; border-radius: var(--radius);
  border: 1.5px solid var(--green-400); background: var(--green-50);
  position: relative;
}
.callout::before {
  content: "💡"; position: absolute; top: -14px; left: 20px; background: #fff;
  border: 1.5px solid var(--green-400); border-radius: 50%; width: 32px; height: 32px;
  display: grid; place-items: center; font-size: 1rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout p:first-child { margin-top: 4px; }

/* ---------- Видео (адаптивный 16:9) ---------- */
.video-embed { position: relative; aspect-ratio: 16 / 9; margin: 30px 0; border-radius: var(--radius); overflow: hidden; background: #0c1410; box-shadow: var(--shadow); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ============================================================
   ПРОМОБЛОКИ «СКАЧАТЬ ЛАНД» — 2 типа
   ============================================================ */
/* Тип A: горизонтальный, с картинкой проекта справа */
.promo-land {
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 28px;
  margin: 38px 0; padding: 28px 32px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--green-800), var(--green-700)); color: #fff;
  box-shadow: var(--shadow-lg);
}
.promo-land h3 { color: #fff; font-size: 1.4rem; margin-bottom: 10px; }
.promo-land p { color: #d7e8dd; margin: 0 0 18px; }
.promo-land .promo-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.promo-land .promo-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--tint-50); }

/* Тип B: компактный баннер по центру (без картинки, акцент на кнопке) */
.promo-land-band {
  margin: 38px 0; padding: 30px; border-radius: var(--radius-lg); text-align: center;
  background: var(--tint-50); border: 1.5px solid var(--green-400);
}
.promo-land-band h3 { font-size: 1.35rem; margin-bottom: 8px; }
.promo-land-band p { color: var(--muted); max-width: 540px; margin: 0 auto 18px; }

/* ---------- Врезка «Читайте также» ---------- */
.read-also {
  display: flex; gap: 16px; align-items: center; margin: 30px 0; padding: 16px 20px;
  border-left: 4px solid var(--green-500); background: var(--tint-50); border-radius: 0 var(--radius) var(--radius) 0;
}
.read-also .ra-label { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--green-700); flex-shrink: 0; }
.read-also a { font-weight: 700; color: var(--ink); }
.read-also a:hover { color: var(--green-700); }

/* ---------- FAQ в статье (стиль из styles.css, отступ) ---------- */
.article-faq { margin: 44px 0 0; }
.article-faq h2 { margin-bottom: 18px; }

/* ---------- Блок перелинковки внизу статьи ---------- */
.more-articles { margin-top: 56px; }
.more-articles h2 { text-align: center; margin-bottom: 28px; }

/* ============================================================
   ЛАЙТБОКС (увеличение фото в галерее)
   ============================================================ */
.lightbox { position: fixed; inset: 0; z-index: 300; display: none; place-items: center; background: rgba(15, 25, 19, .88); padding: 30px; }
.lightbox.is-open { display: grid; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox-close { position: absolute; top: 22px; right: 26px; background: none; border: none; color: #fff; font-size: 1.8rem; cursor: pointer; line-height: 1; }

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 900px) {
  .article-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .article-cards { grid-template-columns: 1fr; }
  .photo-pair { grid-template-columns: 1fr; }
  .gallery5 { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .gallery5 img:first-child { grid-column: span 2; grid-row: auto; aspect-ratio: 16 / 9; }
  .author-quote { flex-direction: column; }
  .promo-land { grid-template-columns: 1fr; }
  .promo-land .promo-img { order: -1; }
  .prose { font-size: 1rem; }
}

/* Рейтинг — статичный, не кликабельный (правка из релиз-листа) */
.rating, .rating * { cursor: default; user-select: none; }
.rating a { pointer-events: none; }

/* ============ Страница 404 ============ */
.error-404 { text-align: center; max-width: 560px; margin: 40px auto 60px; }
.error-404-num { font-size: clamp(5rem, 18vw, 9rem); font-weight: 800; line-height: 1; color: var(--green-700); letter-spacing: -.02em; }
.error-404 h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 8px 0 14px; }
.error-404 p { color: var(--muted); font-size: 1.05rem; margin: 0 auto 26px; max-width: 460px; }
