/* ===== MODERN NEWS THEME ===== */
:root {
  --primary: #1a365d;
  --primary-dark: #153060;
  --secondary: #2b6cb0;
  --accent: #e53e3e;
  --accent-hover: #c53030;
  --text: #2d3748;
  --text-light: #718096;
  --background: #f7fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --success: #38a169;
  --gradient: linear-gradient(135deg, #2b6cb0 0%, #1a365d 100%);
  --gradient-accent: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --transition: all 0.3s ease;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === ШАПКА САЙТА === */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 5%;
  background: var(--card-bg);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.98);
}

.header-content {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.site-title {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.site-title a {
  color: var(--primary);
  text-decoration: none;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: var(--transition);
}

.site-title a:hover {
  letter-spacing: 0;
}

.site-description {
  margin: 0;
  color: var(--text-light);
  font-style: italic;
  font-size: 1.1rem;
}

/* === МЕНЮ НАВИГАЦИИ === */
.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 1.8rem;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--gradient);
  transition: var(--transition);
  border-radius: 2px;
}

.main-navigation a:hover {
  color: var(--secondary);
}

.main-navigation a:hover::after {
  width: 100%;
}

/* === КОНТЕНТ И САЙДБАР === */
.content-area {
  display: flex;
  max-width: 1280px;
  margin: 2.5rem auto;
  gap: 2.5rem;
  padding: 0 1.5rem;
}

.main-content {
  flex: 2;
}

/* ———— ПРИЛИПАЮЩИЙ САЙДБАР ———— */
.sidebar {
  flex: 1;
  position: sticky;
  top: 100px;
  align-self: flex-start;
  height: fit-content;
}

.widget {
  margin-bottom: 2.2rem;
  padding: 1.8rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.widget:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.widget-title {
  margin: 0 0 1.2rem;
  font-size: 1.3rem;
  color: var(--primary);
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--border);
  position: relative;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--gradient);
}

/* === СЕТКА НОВОСТЕЙ === */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.news-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
}

.news-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.news-thumbnail {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.news-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-item:hover .news-thumbnail img {
  transform: scale(1.05);
}

.thumbnail-gradient {
  width: 100%;
  height: 100%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-style: italic;
  position: relative;
  overflow: hidden;
}

.thumbnail-gradient::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0)
  );
  transform: rotate(45deg);
  animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) rotate(45deg);
  }
}

.news-content {
  padding: 1.8rem;
}

.news-content h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  line-height: 1.3;
}

.news-content h2 a {
  color: var(--text);
  text-decoration: none;
  transition: var(--transition);
  background-image: linear-gradient(var(--secondary), var(--secondary));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: left bottom;
  padding-bottom: 2px;
}

.news-content h2 a:hover {
  color: var(--secondary);
  background-size: 100% 2px;
}

.news-meta {
  display: flex;
  gap: 1.2rem;
  margin: 1rem 0;
  font-size: 0.95rem;
  color: var(--text-light);
}

.news-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.news-meta span::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--secondary);
  border-radius: 50%;
  margin-right: 0.5rem;
}

.news-excerpt {
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  color: var(--secondary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.read-more::after {
  content: '→';
  margin-left: 0.5rem;
  transition: var(--transition);
}

.read-more:hover {
  color: var(--primary);
}

.read-more:hover::after {
  transform: translateX(4px);
}

.pagination {
  margin-top: 3.5rem;
  text-align: center;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  margin: 0 0.3rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
  font-weight: 600;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--gradient);
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* === СТРАНИЦА ОДНОЙ СТАТЬИ === */
.single-content {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  line-height: 1.7;
}

.entry-title {
  margin: 0 0 1.8rem;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--primary);
}

.featured-image {
  margin-bottom: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.single-content .news-meta {
  margin: 1.5rem 0;
}

.single-content .news-content {
  padding: 0;
}

.single-content .news-content p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.single-content .news-content h2 {
  font-size: 1.8rem;
  margin: 2.2rem 0 1.2rem;
  color: var(--primary);
}

.single-content .news-content h3 {
  font-size: 1.5rem;
  margin: 1.8rem 0 1rem;
  color: var(--primary);
}

.single-content .news-content blockquote {
  border-left: 4px solid var(--secondary);
  padding-left: 1.5rem;
  margin: 1.8rem 0;
  font-style: italic;
  color: var(--text-light);
}

.single-content .news-content a {
  color: var(--secondary);
  text-decoration: none;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.single-content .news-content a:hover {
  color: var(--primary);
  border-bottom-color: var(--secondary);
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.nav-previous a,
.nav-next a {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius);
  background-color: var(--background);
}

.nav-previous a:hover,
.nav-next a:hover {
  color: var(--secondary);
  background-color: rgba(43, 108, 176, 0.1);
  transform: translateY(-2px);
}

.nav-previous a::before {
  content: '←';
  margin-right: 0.5rem;
}

.nav-next a::after {
  content: '→';
  margin-left: 0.5rem;
}

/* === КОММЕНТАРИИ === */
.comments-area {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.comments-title {
  font-size: 1.8rem;
  margin-bottom: 1.8rem;
  font-weight: 700;
  color: var(--primary);
}

.comment-list {
  list-style: none;
  margin-bottom: 2.5rem;
}

.comment {
  margin-bottom: 1.8rem;
  padding: 1.8rem;
  background-color: var(--background);
  border-radius: var(--radius);
  transition: var(--transition);
}

.comment:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.comment-meta {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}

.comment-author {
  font-weight: 700;
  color: var(--text);
}

.comment-metadata {
  font-size: 0.9rem;
  color: var(--text-light);
}

.comment-content {
  margin-top: 1rem;
  line-height: 1.6;
}

.comment-reply-link {
  display: inline-block;
  margin-top: 0.8rem;
  color: var(--secondary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.comment-reply-link:hover {
  color: var(--primary);
}

.comment-respond {
  margin-top: 2.5rem;
  padding: 2rem;
  background-color: var(--background);
  border-radius: var(--radius);
}

.comment-reply-title {
  margin: 0 0 1.2rem;
  font-size: 1.5rem;
  color: var(--primary);
}

.comment-form {
  margin-top: 1.2rem;
}

.comment-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  margin-bottom: 1.2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1);
}

.comment-form textarea {
  min-height: 150px;
  resize: vertical;
}

.comment-form input[type="submit"] {
  background: var(--gradient);
  color: white;
  border: none;
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.comment-form input[type="submit"]:hover {
  background: var(--gradient-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* === ФУТЕР === */
.site-footer {
  background: var(--primary);
  color: white;
  padding: 3rem 5%;
  text-align: center;
  margin-top: 4rem;
}

.site-footer a {
  color: white;
  text-decoration: none;
  transition: var(--transition);
}

.site-footer a:hover {
  color: #a0aec0;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 1024px) {
  .news-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
  
  .content-area {
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }
  
  .header-content {
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
  }
  
  .content-area {
    flex-direction: column;
    padding: 0 1rem;
  }
  
  .main-navigation ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .site-title {
    font-size: 1.8rem;
  }

  .site-description {
    font-size: 1rem;
  }

  .entry-title {
    font-size: 2rem;
  }

  body {
    font-size: 17px;
  }

  .sidebar {
    position: static;
    top: auto;
  }
  
  .single-content {
    padding: 1.8rem;
  }
  
  .post-navigation {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-previous, 
  .nav-next {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .news-thumbnail {
    height: 180px;
  }
  
  .news-content {
    padding: 1.5rem;
  }
  
  .news-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .news-meta span::before {
    display: none;
  }
  
  .widget {
    padding: 1.5rem;
  }
  
  .comments-title {
    font-size: 1.5rem;
  }
}

/* Анимация появления контента */
.content-loop {
  animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Стили для выделения текста */
::selection {
  background-color: rgba(43, 108, 176, 0.2);
}

/* Улучшенный фокус для доступности */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* Темная тема (опционально) */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #ebf4ff;
    --text: #e2e8f0;
    --text-light: #a0aec0;
    --background: #1a202c;
    --card-bg: #2d3748;
    --border: #4a5568;
  }
  
  .site-header {
    background-color: rgba(45, 55, 72, 0.98);
  }
}