

/* NAV — на страницах статей: sticky, всегда в «scrolled» состоянии */
body.article-page .nav {
  position: sticky;
}
body.article-page .nav-backdrop {
  opacity: 1;
}

/* MAIN LAYOUT */
.art-main {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 32px 96px;
}

/* BREADCRUMB */
.art-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 40px;
}
.art-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.art-breadcrumb a:hover { color: var(--accent); }
.art-breadcrumb span:last-child { color: var(--text); }

/* ARTICLE HEADER */
.art-body { max-width: 780px; }

.art-tag {
  font-family: 'Unbounded', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.art-title {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 20px;
}

.art-lead {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 24px;
  max-width: 680px;
}

.art-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--light);
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.art-meta-author { color: var(--accent); font-weight: 500; }

.art-cover {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
  margin-bottom: 48px;
  border-radius: 2px;
}

/* ARTICLE CONTENT */
.art-content {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}

.art-content h1 {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(19px, 2.4vw, 26px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin: 52px 0 18px;
  padding-top: 8px;
}

.art-content h2 {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin: 48px 0 16px;
  padding-top: 8px;
}

.art-content h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 10px;
}

.art-content p {
  margin-bottom: 18px;
  color: #2c2c2c;
}

.art-content strong { color: var(--text); font-weight: 600; }

.art-content ul {
  margin: 0 0 18px 0;
  padding-left: 20px;
}
.art-content li {
  margin-bottom: 8px;
  color: #2c2c2c;
}

/* BLOCKQUOTE */
.art-quote {
  border-left: 3px solid var(--accent);
  margin: 40px 0;
  padding: 20px 28px;
  background: var(--cream);
  font-size: 17px;
  font-style: italic;
  line-height: 1.6;
  color: var(--text);
}

/* TAKEAWAY BOX */
.art-takeaway {
  background: var(--dark);
  color: var(--cream);
  padding: 32px 36px;
  margin: 48px 0 0;
  border-left: 3px solid var(--accent);
}
.art-takeaway-label {
  font-family: 'Unbounded', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.art-takeaway ul {
  margin: 0;
  padding-left: 20px;
}
.art-takeaway li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--cream);
  margin-bottom: 8px;
}

/* CTA BLOCK */
.art-cta-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: var(--cream);
  border: 1px solid var(--border);
  padding: 40px 48px;
  margin: 64px 0 32px;
}
.art-cta-text .label { margin-bottom: 8px; }
.art-cta-text h2 {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}
.art-cta-text h2 span { color: var(--accent); }
.art-cta-text p { font-size: 14px; color: var(--muted); margin: 0; }

/* Reuse btn-primary from main.css */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--dark);
  font-family: 'Unbounded', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 14px 28px;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--accent-d); transform: translateY(-1px); }

/* ЧИТАЙТЕ ТАКЖЕ */
.art-related { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--border); }
.art-related-heading {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 700;
  margin: 0 0 24px;
}
.art-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.art-related-card { display: block; text-decoration: none; color: inherit; }
.art-related-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--cream);
}
.art-related-media img, .art-related-media svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-related-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--dark); color: var(--accent2);
  font-family: 'Unbounded', sans-serif; font-size: 9px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 6px 12px;
}
.art-related-date { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.art-related-card-title {
  font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color 0.2s;
}
.art-related-card:hover .art-related-card-title { color: var(--accent-d); }
@media (max-width: 768px) {
  .art-related-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* Блоки из редактора Adminka (выделения, кнопка, таблица, фото) */
.callout {
  position: relative;
  border-radius: 4px;
  padding: 16px 20px 16px 46px;
  margin: 28px 0;
  font-size: 15px;
  line-height: 1.6;
}
.callout::before { position: absolute; left: 18px; top: 16px; font-size: 16px; font-weight: 700; }
.callout-info { background: var(--cream); border-left: 3px solid var(--blue); color: var(--text); }
.callout-info::before { content: "ℹ"; color: var(--blue); }
.callout-warning { background: var(--cream); border-left: 3px solid var(--accent); color: var(--text); }
.callout-warning::before { content: "⚠"; color: var(--accent-d); }
.callout-success { background: var(--cream); border-left: 3px solid var(--green); color: var(--text); }
.callout-success::before { content: "✓"; color: var(--green); }
.callout-danger { background: var(--cream); border-left: 3px solid var(--red); color: var(--text); }
.callout-danger::before { content: "⛔"; color: var(--red); }

.cms-btn-embed { display: inline-block; margin: 12px 0; }
.cms-btn {
  display: inline-flex; align-items: center;
  background: var(--accent); color: var(--dark);
  font-family: 'Unbounded', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 1px;
  padding: 14px 28px; text-decoration: none; transition: background 0.2s, transform 0.15s;
}
.cms-btn:hover { background: var(--accent-d); transform: translateY(-1px); }

.cms-table-embed { margin: 28px 0; overflow-x: auto; }
.cms-table-embed table { border-collapse: collapse; width: 100%; font-size: 14px; }
.cms-table-embed td, .cms-table-embed th { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }

.cms-image-embed { display: block; margin: 28px 0; }
.cms-image-embed img { max-width: 100%; border-radius: 4px; display: block; }

.art-gallery-grid { display: grid; gap: 10px; margin: 28px 0; }
/* width + max-height — без этого вертикальное фото (2:3 и уже) при полной ширине
   растягивает кадр на весь экран (max-height без явной width заставляет кадр
   вместо этого сужаться, а стрелки слайдера остаются у краёв широкого контейнера,
   не у краёв самого кадра). */
.art-gallery-frame { width: 100%; overflow: hidden; border-radius: 4px; background: var(--cream); max-height: 520px; }
.art-gallery-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-gallery-frame.ratio-16-9 { aspect-ratio: 16 / 9; }
.art-gallery-frame.ratio-1-1 { aspect-ratio: 1 / 1; }
.art-gallery-frame.ratio-2-3 { aspect-ratio: 2 / 3; }
.art-gallery-caption { font-size: 13px; color: var(--text-muted, #8a8a8a); margin-top: 8px; }
@media (max-width: 640px) {
  .art-gallery-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
/* Вложенный грид внутри слайда (пагинация вертикальных фото группами) — без
   собственного отступа, слайдер уже отбит от соседних абзацев своим margin. */
.art-gallery-slide .art-gallery-grid { margin: 0; }

/* Слайдер галереи (1 колонка) — стрелки и точки всегда включены. Стрелки вынесены
   ЗА пределы фото (в боковые поля слайдера) — на узких экранах места под поля
   нет, там стрелки возвращаются поверх фото. */
.art-gallery-slider { position: relative; margin: 28px 0; padding: 0 52px; }
.art-gallery-slide { display: none; }
.art-gallery-slide.active { display: block; }
.art-gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(20, 20, 20, .55); color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0; z-index: 2;
}
.art-gallery-arrow:hover { background: rgba(20, 20, 20, .75); }
.art-gallery-arrow.prev { left: 0; }
.art-gallery-arrow.next { right: 0; }
@media (max-width: 640px) {
  .art-gallery-slider { padding: 0; }
  .art-gallery-arrow.prev { left: 8px; }
  .art-gallery-arrow.next { right: 8px; }
}
.art-gallery-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.art-gallery-dot { width: 8px; height: 8px; border-radius: 50%; border: 0; background: var(--border); padding: 0; cursor: pointer; }
.art-gallery-dot.active { background: var(--accent); }

/* BACK LINK */
.art-back { margin-top: 16px; }
.art-back-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.art-back-link:hover { color: var(--accent); }

/* FOOTER */
.art-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 64px;
  border-top: 1px solid var(--border);
  background: var(--white);
}
.art-footer .footer-brand {
  font-family: 'Unbounded', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.art-footer .footer-brand span { color: var(--accent); }
.art-footer .footer-copy { font-size: 12px; color: var(--light); }

/* ARTICLES INDEX PAGE */
.art-index-header {
  margin-bottom: 48px;
}
.art-index-header .section-sub { margin-top: 12px; }

.art-index-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.art-index-note {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
}

.articles-note {
  font-size: 13px;
  color: var(--muted);
}
.articles-note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
}
.articles-note a:hover {
  color: var(--accent2);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .art-main { padding: 32px 20px 72px; }
  .art-cta-block { flex-direction: column; align-items: flex-start; padding: 28px 24px; }
  .art-footer { padding: 24px 24px; flex-direction: column; gap: 8px; text-align: center; }
  .art-index-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .art-cover { aspect-ratio: 16 / 9; height: auto; }
  .art-index-grid { grid-template-columns: 1fr; }
}
