/* Общие настройки */
body {
  margin: 0;
  padding: 40px;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: #f4f6f9;
  color: #222;
}

h1 {
  margin-bottom: 20px;
  font-size: 26px;
}

/* Основная сетка */
.layout {
  display: grid;
  grid-template-columns: 2fr 1.3fr;
  grid-template-areas:
    "articles posts"
    "resources resources";
  gap: 40px;
}

/* Области */
.articles { grid-area: articles; }
.posts { grid-area: posts; }
.resources { grid-area: resources; }

/* Карточки */
.article,
.post,
.urls {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article:hover,
.post:hover,
.urls:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

/* Статьи */
.article_all {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.article img {
  width: 100%;
  border-radius: 10px;
  margin: 10px 0;
  object-fit: cover;
}

/* Презентации */
.post_all {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post a {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 14px;
  background: #3b82f6;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
}

.post a:hover {
  background: #2563eb;
}

/* Ресурсы */
.urls_all {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.urls a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}

.urls a:hover {
  text-decoration: underline;
}

/* Дата */
.date {
  font-size: 13px;
  color: #777;
  margin-top: 10px;
}

/* Адаптив */
@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "articles"
      "posts"
      "resources";
  }
}
/* Навигация */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #e5e7eb;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 18px;
  color: #111827;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  color: #374151;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: #3b82f6;
  transition: width 0.25s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Плавный скролл */
html {
  scroll-behavior: smooth;
}

/* Мобильная версия */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 10px;
  }

  .nav-links {
    gap: 16px;
  }
}

/* Страница статьи */
.article-page {
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;
}

.article-detail {
  background: #ffffff;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.article-title {
  font-size: 34px;
  margin-bottom: 20px;
  line-height: 1.3;
}

.article-cover {
  width: 100%;
  border-radius: 14px;
  margin: 30px 0;
  object-fit: cover;
}

.article-meta {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 30px;
}

.article-content {
  font-size: 17px;
  line-height: 1.7;
  color: #1f2937;
}

.article-content p {
  margin-bottom: 18px;
}

.article-content h2,
.article-content h3 {
  margin-top: 32px;
  margin-bottom: 16px;
}

.article-back {
  margin-top: 40px;
}

.article-back a {
  text-decoration: none;
  font-weight: 500;
  color: #3b82f6;
}

.article-back a:hover {
  text-decoration: underline;
}
/* Ссылка на источник */
.article-source {
  margin-top: 50px;
  padding: 20px 24px;
  background: #f1f5f9;
  border-left: 4px solid #3b82f6;
  border-radius: 10px;
  font-size: 15px;
}

.article-source span {
  font-weight: 600;
  margin-right: 6px;
  color: #1f2937;
}

.article-source a {
  color: #2563eb;
  text-decoration: none;
  word-break: break-all;
}

.article-source a:hover {
  text-decoration: underline;
}
