/* ============================================
   ARTICLE PAGES — Premium Reading Experience
   Читабельный, современный дизайн статей
   ============================================ */

:root {
  --art-bg: #0c0c0f;
  --art-bg-subtle: #0f0f13;
  --art-surface: #16161c;
  --art-surface-2: #1c1c24;
  --art-surface-hover: #22222c;
  --art-text: #f0f0f4;
  --art-text-body: #c8c8d0;
  --art-text-muted: #8888a0;
  --art-accent: #ff006e;
  --art-accent-soft: rgba(255, 0, 110, 0.12);
  --art-accent-border: rgba(255, 0, 110, 0.35);
  --art-border: rgba(255, 255, 255, 0.06);
  --art-border-strong: rgba(255, 255, 255, 0.1);
  --art-radius: 16px;
  --art-radius-sm: 10px;
  --art-radius-lg: 24px;
  --art-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --art-line-height: 1.8;
  --art-line-height-tight: 1.4;
}

/* === BASE === */
.article-page {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg,
    #0a0a0f 0%,
    #15151b 25%,
    #1a0d1f 50%,
    #15151b 75%,
    #0a0a0f 100%);
  background-attachment: fixed;
  background-size: 400% 400%;
  animation: articleGradientShift 15s ease infinite;
  color: var(--art-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

@keyframes articleGradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Акцентные пятна — как на главной */
.article-page::before {
  content: '';
  position: fixed;
  top: -50%;
  right: -20%;
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(255, 0, 110, 0.28) 0%, rgba(255, 0, 110, 0.12) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: articlePulse 15s ease-in-out infinite;
}

.article-page::after {
  content: '';
  position: fixed;
  bottom: -30%;
  left: -20%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.25) 0%, rgba(124, 58, 237, 0.1) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: articlePulse 18s ease-in-out infinite reverse;
}

@keyframes articlePulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.article-page .container,
.article-page .article-nav-wrap {
  position: relative;
  z-index: 1;
}

/* === NAV BAR === */
.article-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 12, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--art-border);
}

.article-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.article-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--art-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}

.article-nav-logo img {
  height: 32px;
  width: auto;
  display: block;
}

.article-nav-logo:hover {
  opacity: 0.9;
}

.article-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.article-nav-links a {
  color: var(--art-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 6px 12px;
  border-radius: var(--art-radius-sm);
  transition: color 0.2s, background 0.2s;
}

.article-nav-links a:hover {
  color: var(--art-text);
  background: var(--art-surface);
}

#langSwitcherPlaceholder {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.article-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--art-accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--art-radius-sm);
  background: var(--art-accent-soft);
  border: 1px solid var(--art-accent-border);
  transition: all 0.2s;
}

.article-nav-back:hover {
  background: rgba(255, 0, 110, 0.2);
  color: #ff1a7e;
}

/* === ARTICLE LAYOUT === */
.article-page .container {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

/* === BREADCRUMB === */
.article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--art-text-muted);
  margin-bottom: 24px;
}

.article-breadcrumb a {
  color: var(--art-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.article-breadcrumb a:hover {
  color: var(--art-accent);
}

.article-breadcrumb span {
  color: var(--art-text-muted);
  opacity: 0.6;
}

.article-breadcrumb .current {
  color: var(--art-text);
  font-weight: 500;
}

/* === RELATED ARTICLES === */
.related-articles {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--art-border);
}

.related-articles h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--art-text);
  margin-bottom: 20px;
}

.related-articles-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-articles-list a {
  display: block;
  padding: 14px 18px;
  background: var(--art-surface);
  border: 1px solid var(--art-border);
  border-radius: var(--art-radius-sm);
  color: var(--art-text);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.related-articles-list a:hover {
  background: var(--art-surface-2);
  border-color: var(--art-accent-border);
  color: var(--art-accent);
}

/* === HERO / HEADER === */
.article-header {
  margin-bottom: 40px;
}

.article-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--art-accent);
  margin-bottom: 16px;
  padding: 6px 12px;
  background: var(--art-accent-soft);
  border-radius: 6px;
  border: 1px solid var(--art-accent-border);
}

.article-page h1 {
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 800;
  color: var(--art-text);
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.article-date {
  font-size: 0.95rem;
  color: var(--art-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-date::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--art-accent);
  border-radius: 50%;
}

/* === LEAD BLOCK === */
.article-lead {
  background: linear-gradient(135deg, rgba(255, 0, 110, 0.06) 0%, var(--art-surface) 50%, var(--art-surface-2) 100%);
  border: 1px solid var(--art-accent-border);
  border-left: 5px solid var(--art-accent);
  border-radius: var(--art-radius);
  padding: 32px 32px;
  margin-bottom: 44px;
  color: var(--art-text);
  font-size: 1.15rem;
  line-height: 1.85;
  font-weight: 500;
  box-shadow: var(--art-shadow), 0 0 40px rgba(255, 0, 110, 0.06);
}

/* === CONTENT === */
.article-content {
  color: var(--art-text-body);
  font-size: 1.08rem;
  line-height: 1.85;
  max-width: 65ch;
}

.article-content p {
  margin-bottom: 1.4em;
}

.article-content p:last-child {
  margin-bottom: 0;
}

/* Section headings — prominent, scannable */
.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--art-text);
  margin: 2.4em 0 1em;
  padding: 0 0 0 20px;
  border-left: 4px solid var(--art-accent);
  position: relative;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.article-content h2::before {
  display: none;
}

.article-content h2:first-child {
  margin-top: 0;
}

/* Info blocks */
.article-block {
  background: var(--art-surface);
  border: 1px solid var(--art-border);
  border-radius: var(--art-radius);
  padding: 24px 28px;
  margin: 1.8em 0;
  box-shadow: var(--art-shadow);
}

.article-block h2 {
  margin-top: 0;
  border-left: none;
  padding-left: 0;
  padding-bottom: 0;
}

.article-block h2::before {
  display: none;
}

.article-block h2:not(:first-child) {
  margin-top: 1.5em;
}

/* Tip / highlight block */
.article-tip {
  background: var(--art-accent-soft);
  border: 1px solid var(--art-accent-border);
  border-radius: var(--art-radius);
  padding: 22px 26px;
  margin: 1.8em 0;
  color: var(--art-text);
  box-shadow: 0 0 0 1px rgba(255, 0, 110, 0.05);
}

.article-tip strong {
  color: var(--art-accent);
}

/* Lists — card-style */
.article-content ul {
  margin: 1.4em 0 1.8em;
  padding: 0;
  list-style: none;
}

.article-content ul li {
  position: relative;
  padding: 16px 20px 16px 52px;
  margin-bottom: 10px;
  background: var(--art-surface);
  border: 1px solid var(--art-border);
  border-radius: var(--art-radius-sm);
  transition: background 0.2s, border-color 0.2s;
}

.article-content ul li:hover {
  background: var(--art-surface-2);
  border-color: var(--art-border-strong);
}

.article-content ul li::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--art-accent);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 0, 110, 0.4);
}

.article-content ul li strong {
  color: var(--art-text);
}

/* Accent links in content */
.article-content a {
  color: var(--art-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.article-content a:hover {
  border-bottom-color: var(--art-accent);
}

/* CTA button */
.article-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  padding: 14px 24px;
  background: var(--art-surface);
  border: 1px solid var(--art-border);
  border-radius: var(--art-radius-sm);
  color: var(--art-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.article-cta:hover {
  background: var(--art-accent-soft);
  border-color: var(--art-accent-border);
  color: #ff1a7e;
}

/* Footer section */
.article-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--art-border);
}

.article-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.article-footer-links a {
  color: var(--art-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: var(--art-radius-sm);
  background: var(--art-surface);
  border: 1px solid var(--art-border);
  transition: all 0.2s;
}

.article-footer-links a:hover {
  color: var(--art-text);
  border-color: var(--art-border-strong);
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .article-page .container {
    padding: 28px 18px 48px;
  }

  .article-page h1 {
    font-size: 1.55rem;
  }

  .article-lead,
  .article-block,
  .article-tip {
    padding: 20px 20px;
  }

  .article-content ul li {
    padding: 14px 16px 14px 44px;
  }

  .article-content ul li::before {
    left: 16px;
  }

  .article-nav-inner {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .article-nav-links {
    display: none;
  }
}
