/* ============================================================
   content.css — стили для блога, кейсов и статей VectroLab
   Подключается ВМЕСТЕ со styles.css (база: reset, container,
   header, footer, nav, btn, CSS-переменные).
   ============================================================ */

/* ===== БАЗА КОНТЕНТ-СТРАНИЦЫ ===== */
body.content-page {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.82);
}

/* ===== МЕССЕНДЖЕРЫ В ШАПКЕ (как на главной) ===== */
.header-messengers { display: flex; align-items: center; gap: 8px; }
.header-msg-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.header-msg-link:hover { color: #CAFF00; border-color: rgba(202, 255, 0, 0.4); background: rgba(202, 255, 0, 0.07); }
@media (max-width: 767px) { .header-msg-link { width: 32px; height: 32px; } }
.content-main {
  padding: clamp(6.5rem, 12vw, 9rem) 0 clamp(3rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}
.content-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(202, 255, 0, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: 0;
}
.content-wrap {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}
.content-wrap--wide { max-width: 1180px; }

/* ===== ХЛЕБНЫЕ КРОШКИ ===== */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--small);
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}
.breadcrumbs a {
  color: var(--text-secondary);
  transition: color 0.25s ease;
}
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { opacity: 0.4; }
.breadcrumbs [aria-current] { color: var(--text-primary); }

/* ===== ШАПКА СТАТЬИ ===== */
.article-head { margin-bottom: 2rem; }
.content-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(202, 255, 0, 0.1);
  border: 1px solid rgba(202, 255, 0, 0.2);
  padding: 5px 12px;
  border-radius: 6px;
  margin-bottom: 1.1rem;
}
.content-badge--case { color: var(--accent); }
.content-badge--guide {
  color: #00D4FF;
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.25);
}
.article-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.12;
  color: var(--text-primary);
  margin-bottom: 1.1rem;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.1rem;
  font-size: var(--small);
  color: var(--text-secondary);
}
.article-meta .am-author { color: var(--text-primary); font-weight: 600; }
.article-meta .am-item { display: inline-flex; align-items: center; gap: 0.4rem; }
.article-meta svg { width: 15px; height: 15px; opacity: 0.7; }

/* ===== ОБЛОЖКА ===== */
.article-cover {
  margin: 2rem 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.article-cover img { display: block; width: 100%; height: auto; }

/* ===== TL;DR / КОРОТКИЙ ОТВЕТ (GEO) ===== */
.tldr {
  background: linear-gradient(135deg, rgba(202, 255, 0, 0.07), rgba(0, 212, 255, 0.04));
  border: 1px solid rgba(202, 255, 0, 0.18);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.tldr-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.tldr p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.02rem;
  line-height: 1.65;
}

/* ===== ОГЛАВЛЕНИЕ ===== */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.toc-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.toc li { counter-increment: toc; }
.toc a {
  display: flex;
  gap: 0.6rem;
  color: var(--text-secondary);
  font-size: var(--small);
  transition: color 0.25s ease;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  opacity: 0.7;
}
.toc a:hover { color: var(--text-primary); }

/* ===== ОСНОВНОЙ ТЕКСТ (PROSE) ===== */
.prose { font-size: 1.05rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.15rem; }
.prose h2 {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  color: var(--text-primary);
  margin-top: 2.75rem;
  scroll-margin-top: 90px;
}
.prose h3 {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  color: var(--text-primary);
  margin-top: 2rem;
  scroll-margin-top: 90px;
}
.prose p { color: rgba(255, 255, 255, 0.82); }
.prose strong { color: var(--text-primary); font-weight: 700; }
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(202, 255, 0, 0.4);
  transition: text-decoration-color 0.25s ease;
}
.prose a:hover { text-decoration-color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.4rem; color: rgba(255, 255, 255, 0.82); }
.prose ul { list-style: none; padding-left: 0; }
.prose ul li {
  position: relative;
  padding-left: 1.6rem;
  margin-top: 0.5rem;
}
.prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}
.prose ol { display: flex; flex-direction: column; gap: 0.5rem; }
.prose li { line-height: 1.65; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.75rem 0;
  color: var(--text-primary);
  font-size: 1.15rem;
  font-style: italic;
}
.prose figure { margin: 2rem 0; }
.prose figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
  cursor: zoom-in;
}
.prose figcaption {
  margin-top: 0.6rem;
  font-size: var(--small);
  color: var(--text-secondary);
  text-align: center;
}

/* ===== ТАБЛИЦЫ (ИИ любят извлекать) ===== */
.prose .table-scroll { overflow-x: auto; margin: 1.75rem 0; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--small);
  min-width: 460px;
}
.prose th, .prose td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}
.prose thead th {
  color: var(--accent);
  font-weight: 700;
  background: rgba(202, 255, 0, 0.05);
}
.prose tbody td { color: rgba(255, 255, 255, 0.82); }
.prose tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* ===== KPI / БОЛЬШИЕ МЕТРИКИ КЕЙСА ===== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.kpi {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}
.kpi-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.kpi-label { font-size: var(--small); color: var(--text-secondary); line-height: 1.4; }

/* ===== СРАВНЕНИЕ ДО/ПОСЛЕ ===== */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}
.compare-col {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
}
.compare-col--before { border-top: 3px solid #ff6464; }
.compare-col--after { border-top: 3px solid var(--accent); }
.compare-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.compare-col--before .compare-label { color: #ff6464; }
.compare-col--after .compare-label { color: var(--accent); }
.compare ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.compare li { font-size: var(--small); color: rgba(255, 255, 255, 0.82); line-height: 1.5; padding-left: 1.3rem; position: relative; }
.compare-col--before li::before { content: '✕'; position: absolute; left: 0; color: #ff6464; font-size: 11px; top: 0.2em; }
.compare-col--after li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-size: 11px; top: 0.2em; }

/* ===== FAQ (GEO: FAQPage schema) ===== */
.faq { margin: 2.5rem 0; }
.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  background: var(--bg-card);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.02rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-size: 1.4rem;
  line-height: 1;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 1.4rem 1.2rem; color: rgba(255, 255, 255, 0.8); line-height: 1.7; }
.faq-answer p { margin: 0; }

/* ===== CTA-БЛОК ===== */
.article-cta {
  margin: 3rem 0 1rem;
  background: linear-gradient(135deg, rgba(202, 255, 0, 0.08), rgba(0, 212, 255, 0.05));
  border: 1px solid rgba(202, 255, 0, 0.18);
  border-radius: var(--radius-card);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  text-align: center;
}
.article-cta h2 {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.article-cta p { color: var(--text-secondary); margin-bottom: 1.5rem; max-width: 460px; margin-left: auto; margin-right: auto; }
.article-cta .btn { margin: 0 auto; }

/* ===== АВТОР / E-E-A-T ===== */
.author-box {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
}
.author-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: var(--bg-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.author-name { font-weight: 700; color: var(--text-primary); }
.author-role { font-size: var(--small); color: var(--text-secondary); }

/* ===== СВЯЗАННЫЕ МАТЕРИАЛЫ ===== */
.related { margin-top: 3rem; }
.related-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* ===== ХАБ: ЛЕНТА БЛОГА / КЕЙСОВ ===== */
.hub-head { text-align: center; margin-bottom: clamp(2rem, 4vw, 3rem); }
.hub-head .article-title { margin-left: auto; margin-right: auto; }
.hub-head p { color: var(--text-secondary); max-width: 560px; margin: 0.5rem auto 0; }

.hub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.hub-filter {
  font-size: var(--small);
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  padding: 8px 18px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.hub-filter:hover { border-color: rgba(202, 255, 0, 0.4); color: var(--text-primary); }
.hub-filter.active { background: var(--accent); color: var(--bg-dark); border-color: var(--accent); }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), border-color 0.3s ease;
}
.post-card:hover { transform: translateY(-5px); border-color: rgba(202, 255, 0, 0.25); }
.post-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1a1a2e;
  position: relative;
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.5s ease; }
.post-card:hover .post-thumb img { transform: scale(1.04); }
.post-thumb .content-badge { position: absolute; top: 12px; left: 12px; margin: 0; }
.post-body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-card-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}
.post-excerpt { font-size: var(--small); color: var(--text-secondary); line-height: 1.55; margin-bottom: 1rem; flex: 1; }
.post-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.9rem;
}
.post-readmore { color: var(--accent); font-weight: 600; display: inline-flex; gap: 4px; transition: gap 0.25s ease; }
.post-card:hover .post-readmore { gap: 8px; }
.post-card[hidden] { display: none; }

/* ===== ПУСТОЕ СОСТОЯНИЕ ===== */
.hub-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 3rem 1rem;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-card);
}

/* ===== АДАПТИВ ===== */
@media (max-width: 600px) {
  .compare { grid-template-columns: 1fr; }
  .article-meta { gap: 0.4rem 0.9rem; }
  .prose { font-size: 1rem; }
}
