/* ===== CSS Variables & Reset ===== */
:root {
  --primary: #00ff88;
  --primary-rgb: 0, 255, 136;
  --accent: #00aaff;
  --accent-rgb: 0, 170, 255;
  --bg: #0a0a0a;
  --surface: #1a1a1a;
  --surface-light: #2a2a2a;
  --text: #ffffff;
  --text-secondary: #b5b5b5;
  --text-muted: #888888;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 25px rgba(var(--primary-rgb), 0.3);
  --transition: all 0.3s ease;
  --transition-fast: all 0.15s ease;
  --header-height: 80px;
  --container-max: 1200px;
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 1.8rem);
}

h4 {
  font-size: 1.4rem;
}

h5 {
  font-size: 1.2rem;
}

h6 {
  font-size: 1.1rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary);
}

/* ===== Layout Components ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  flex: 1;
}

/* Header & Navigation */
.header {
  padding: 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.logo {
  font-weight: 800;
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  z-index: 1001;
}

/* Desktop Navigation */
.main-nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav-link {
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), 0.1), transparent);
  transition: left 0.5s;
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  transform: translateY(-1px);
}

.nav-link.active {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.15);
}

/* Mobile Navigation */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--text);
  border-radius: 3px;
  transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== Hero Sections ===== */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 800px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.hero-title {
  font-size: clamp(2.3rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 2rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

/* ===== Card Components ===== */
.card {
  border-radius: var(--radius-lg);
  padding: 2rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(var(--primary-rgb), 0.3);
}

.card:hover::before {
  opacity: 1;
}

.news-card {
  border-radius: var(--radius);
  padding: 1.8rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(var(--primary-rgb), 0.3);
}

.news-card h3 {
  margin-bottom: 0.8rem;
  font-size: 1.3rem;
}

.news-card h3 a {
  color: var(--text);
  transition: var(--transition-fast);
}

.news-card h3 a:hover {
  color: var(--primary);
}

.news-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.9rem;
}

.news-card-meta time {
  color: var(--text-muted);
}

/* ===== Grid Systems ===== */
.grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: stretch;
}

.news-grid {
  display: grid;
  gap: 1.8rem;
  grid-template-columns: 1fr;
}

/* ===== Content Sections ===== */
.content-section {
  padding: 2rem 0;
}

.content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.article-meta {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.article-meta time {
  font-weight: 500;
}

.article-meta span {
  color: var(--primary);
  font-weight: 500;
}

/* ===== Donate Specific Styles ===== */
.donate-cards {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin: 3rem 0;
}

.donate-card {
  text-align: center;
  padding: 2.5rem 2rem;
}

.donate-card h3 {
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}

.donate-amount {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 1rem 0;
  color: var(--primary);
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 3rem 0 1rem;
  flex-wrap: wrap;
}

.pagination .nav-link {
  padding: 0.7rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination .nav-link:hover {
  border-color: var(--primary);
}

.pagination span {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== Back Link ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin: 2rem 0;
  padding: 0.8rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  transition: var(--transition);
}

.back-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.05);
  transform: translateX(-5px);
}

/* ===== Footer ===== */
.footer {
  margin-top: 4rem;
  padding: 3rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer::before {
  content: '';
  display: block;
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  margin: 0 auto 2rem;
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in[data-delay] {
  transition-delay: var(--delay, 0s);
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.px-1 { padding-left: 1rem; padding-right: 1rem; }
.px-2 { padding-left: 2rem; padding-right: 2rem; }

.hidden { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Media Queries ===== */
@media (min-width: 768px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero {
    padding: 5rem 0 4rem;
  }
}

@media (max-width: 767px) {
  .container {
    padding: 0 1rem;
  }
  
  .header {
    padding: 0.8rem 0;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--surface);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    transition: var(--transition);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }
  
  .main-nav.active {
    right: 0;
  }
  
  .nav-link {
    width: 100%;
    padding: 1rem 0;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 1.1rem;
  }
  
  .nav-link:last-child {
    border-bottom: none;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .card, .news-card {
    padding: 1.5rem;
  }
  
  .hero {
    padding: 3rem 0 2rem;
  }
  
  .donate-cards {
    grid-template-columns: 1fr;
  }
  
  .pagination {
    flex-direction: column;
    gap: 0.8rem;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.5rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .card, .news-card {
    padding: 1.2rem;
  }
  
  .news-card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ===== Print Styles ===== */
@media print {
  .header, .footer, .menu-toggle {
    display: none;
  }
  
  body {
    background: white;
    color: black;
    font-size: 12pt;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
  
  .card, .news-card {
    border: 1px solid #ddd;
    box-shadow: none;
    break-inside: avoid;
  }
}
/* ===== ДОБАВЛЕННЫЕ СТИЛИ ДЛЯ УНИФИКАЦИИ СТРАНИЦ ===== */

/* Стили для статистики с главной страницы */
.stats-section {
    margin-top: 4rem;
    display: flex;
    gap: 2rem;
    justify-content: space-around;
    text-align: center;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1;
    min-width: 150px;
}

.stat-number {
    font-size: 2rem;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

.stat-label {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Улучшенные hover эффекты для donate карточек */
.donate-card {
    position: relative;
    overflow: hidden;
}

.donate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: var(--transition);
}

.donate-card:hover::before {
    opacity: 1;
}

.donate-amount {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 1rem 0;
    color: var(--primary);
}

/* Дополнительная адаптивность */
@media (max-width: 767px) {
    .stats-section {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .stat-item {
        min-width: auto;
    }
}