/* =========================
   ВСПОМОГАТЕЛЬНЫЙ CSS ДЛЯ СТРАНИЦ
========================= */

/* SEO-заголовок: в DOM есть, визуально скрыт */
.page-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* --- Горизонтальные блоки контента --- */
.page-block {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background-color: var(--panel-bg); /* исправлено */
    padding: 24px;
    margin-bottom: 40px;
}

.page-block-center {
    text-align: center;
}

/* --- Основные направления --- */
.sections-list {
    list-style: none;
    padding-left: 0;
}

.sections-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background-color: var(--panel-bg); /* исправлено */
    margin-bottom: 16px;
}

.sections-list li strong {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sections-list li span.emoji {
    line-height: 1;
}

.sections-list li p {
    margin: 0;
    line-height: 1.4;
}

/* --- Статьи (карточки) --- */
.articles-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.article-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 14px;
    background-color: var(--panel-bg); /* исправлено */
    transition: background 0.2s, transform 0.2s;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-card:hover {
    background-color: rgba(0,0,0,0.03);
    transform: translateY(-2px);
}

/* --- Кнопка --- */
.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    background-color: var(--btn-bg);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-primary:hover {
    background-color: var(--btn-hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}

/* --- Примечание --- */
.site-note {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    background-color: var(--panel-bg); /* исправлено */
    margin-bottom: 40px;
}

/* --- Связанные статьи --- */
.articles-related {
  margin-top: 3rem;
}

.articles-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.articles-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.articles-all-btn {
  font-size: 0.9rem;
  text-decoration: none;
  opacity: 0.8;
}

.articles-all-btn:hover {
  opacity: 1;
}

.articles-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.article-row {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--panel-bg);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.article-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.article-row-link {
  display: block;
  padding: 1rem 1.2rem;
  text-decoration: none;
  color: inherit;
}

.article-row h3 {
  margin: 0 0 0.3rem 0;
  font-size: 1.05rem;
}

.article-row p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .sections-list li {
        flex-direction: column;
        align-items: flex-start;
    }
}
