﻿:root {
  --bg-color: #f4f6f9;
  --card-bg: #ffffff;
  --text-main: #2c3e50;
  --text-muted: #7f8c8d;
  --accent: #0066cc;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
}

/* -----------------------------------
   Общие блоки и Макет (Layout)
----------------------------------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Шапка сайта */
header {
  background-color: var(--card-bg);
  padding: 25px 0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 30px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.logo {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
}

/* Навигация (Главная страница) */
nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

nav a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--accent);
}

/* Ссылка «Назад» (Страница статьи) */
.back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--accent);
}

.meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* -----------------------------------
   Главная страница (index.html)
----------------------------------- */

/* Главная новость дня */
.hero-news {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 40px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-news:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.hero-news:hover .hero-title {
  color: var(--accent);
}

.hero-img {
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
}

.hero-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-title {
  font-size: 24px;
  margin-bottom: 15px;
  transition: color 0.2s;
}

/* Сетка новостей */
.section-title {
  font-size: 22px;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

/* Карточки в сетке */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card:hover .card-title {
  color: var(--accent);
}

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 18px;
  margin-bottom: 10px;
  transition: color 0.2s;
	font-weight: bold;
	text-decoration: none;
	color: black;
}

.card-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 15px;
  flex-grow: 1;
}

/* -----------------------------------
   Страница статьи (article.html)
----------------------------------- */
.article-wrapper {
  margin-bottom: 60px;
}

.article-wrapper .meta {
  font-size: 15px;
  margin-bottom: 15px;
}

.article-title {
  font-size: 38px;
  line-height: 1.25;
  font-weight: 800;
  margin-bottom: 30px;
  color: #1a202c;
}

.main-image {
  width: 100%;
  height: auto;
  max-height: 550px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 35px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.article-body {
  max-width: 100%;
}

.article-body p {
  margin-bottom: 22px;
  font-size: 19px;
  color: #334155;
  line-height: 1.7;
}

.quote-box {
  border-left: 4px solid var(--accent);
  background-color: #ffffff;
  padding: 24px 30px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 35px 0;
  font-style: italic;
  font-size: 20px;
  color: #1e293b;
  box-shadow: var(--shadow);
}

/* -----------------------------------
   Подвал
----------------------------------- */
footer {
  background-color: var(--card-bg);
  border-top: 1px solid #e2e8f0;
  padding: 30px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* -----------------------------------
   Адаптивность (Media Queries)
----------------------------------- */
@media (min-width: 768px) {
  .hero-news {
    grid-template-columns: 1.2fr 1fr;
  }
}

@media (max-width: 768px) {
  header {
    margin-bottom: 20px;
  }
  
  .article-title {
    font-size: 26px;
  }

  .article-body p {
    font-size: 17px;
  }
}