/* ====================== Базовые сбросы и переменные============================ */
:root {
  --primary-color: #d9383a; /* Акцентный красный для кнопок и фокуса */
  --dark-color: #2c3e50; /* Основной темный цвет текста */
  --light-bg: #f8f9fa; /* Светлый фон секций */
  --white: #ffffff;
  --text-muted: #7f8c8d;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  color: var(--dark-color);
  line-height: 1.6;
  background-color: var(--white);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  text-decoration: underline;
}

/* ===============   Шапка и Меню   ===================== */
.main-header {
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo a {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--dark-color);
}

.main-nav ul {
  display: flex;
  list-style: none;
}

.main-nav ul li {
  margin-left: 20px;
}

.main-nav ul li a {
  color: var(--dark-color);
  font-weight: 600;
  font-size: 16px;
  padding: 5px 0;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
  color: var(--primary-color);
  text-decoration: none;
}

/* ==========================================================================
   Анимированный CSS-слайдер (CSS-only Fade Animation)
   ========================================================================== */
.hero-slider {
  position: relative;
  width: 100%;
  height: 450px;
  overflow: hidden;
  background-color: #000;
}

.slide-item {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeSlider 16s infinite ease-in-out; /* Круг анимации 16 секунд */
}

/* Заглушки для фото (замените на свои пути к картинкам) */
.slide-1 {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("https://unsplash.com");
  animation-delay: 0s;
}

.slide-2 {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("https://unsplash.com");
  animation-delay: 8s;
  /* Начинает проявляться через половину цикла */
}

.slide-content {
  text-align: center;
  color: var(--white);
  max-width: 800px;
  padding: 0 20px;
}

.slide-content h1 {
  font-size: 36px;
  margin-bottom: 15px;
  font-weight: 700;
}

.slide-content p {
  font-size: 18px;
  margin-bottom: 25px;
}

@keyframes fadeSlider {
  0% {
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  45% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
/* =================Кнопки и компоненты============ */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}
.btn-primary:hover {
  background-color: #bd2d2f;
  text-decoration: none;
}
.btn-secondary {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}
.btn-secondary:hover {
  background-color: var(--white);
  color: var(--dark-color);
  text-decoration: none;
}
.responsive-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
.styled-list {
  list-style: none;
  margin-top: 10px;
}
.styled-list li {
  margin-bottom: 8px;
}
/* ================Секции контента====================== */
.mission-section {
  padding: 60px 0 30px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.mission-section h2 {
  font-size: 28px;
  margin-bottom: 15px;
}
.current-case {
  padding: 40px 0 60px;
}
.section-title {
  font-size: 26px;
  margin-bottom: 30px;
  border-left: 5px solid var(--primary-color);
  padding-left: 15px;
}
/* Сетка для вывода кейса (Grid) */
.case-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 40px;
}
.case-media .video-placeholder {
  background: #e9ecef;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  border-radius: 6px;
  border: 2px dashed var(--text-muted);
}
.case-info h3 {
  font-size: 24px;
  margin-bottom: 5px;
}
.case-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.case-text p {
  margin-bottom: 15px;
  text-align: justify;
}
.case-links {
  background-color: var(--light-bg);
  padding: 20px;
  border-radius: 6px;
  margin: 25px 0;
}
.donation-block {
  border: 2px solid #e2e8f0;
  padding: 25px;
  border-radius: 6px;
}
.requisites {
  background-color: #fff9f9;
  border-left: 4px solid var(--primary-color);
  padding: 15px;
  margin-top: 15px;
  font-family: monospace;
  font-size: 14px;
}
/* =============Подвал================ */
.main-footer {
  background-color: #1a252f;
  color: #ecf0f1;
  padding: 40px 0;
  margin-top: 60px;
  font-size: 14px;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-content a {
  color: var(--white);
  text-decoration: underline;
}
/* ==============Адаптивность (Медиа-запросы под мобильные)=================== */
@media (max-width: 768px) {
  .header-flex {
    flex-direction: column;
    text-align: center;
  }
  .main-nav {
    margin-top: 15px;
  }
  .main-nav ul li {
    margin: 0 10px;
  }
  .hero-slider {
    height: 350px;
  }
  .slide-content h1 {
    font-size: 26px;
  }
  .case-grid {
    grid-template-columns: 1fr;
    /* На мобилках колонки встают друг под друга */
    gap: 20px;
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}
/* ==========================================================================
   Стили для Страницы Архива Историй (Grid-плитка)
   ========================================================================== */
.page-title-section {
  background-color: var(--light-bg);
  padding: 50px 0;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}

.page-title-section h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

.page-title-section p {
  color: var(--text-muted);
  font-size: 16px;
}

.archive-container {
  padding: 50px 20px;
}

/* Сетка карточек: 3 колонки на ПК, 2 на планшетах, 1 на телефонах */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.story-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #edf2f7;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.story-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-image-box {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.card-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Фото заполнит блок без искажений */
}

/* Бейджи статусов поверх фото */
.badge {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  color: var(--white);
}

.badge-active {
  background-color: var(--primary-color);
}
.badge-success {
  background-color: #2ecc71;
} /* Зеленый цвет для побед */

.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Чтобы кнопки всегда были на одном уровне снизу */
}

.category-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 8px;
  display: inline-block;
}

.card-content h3 {
  font-size: 18px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.card-excerpt {
  font-size: 14px;
  color: #555;
  margin-bottom: 20px;
  text-align: justify;
  flex-grow: 1;
}

.btn-read {
  font-weight: 600;
  font-size: 14px;
  color: var(--primary-color);
}

.btn-read:hover {
  text-decoration: underline;
}
/* ==========================================================================
   Стили для Страницы "О проекте" (about.html)
   ========================================================================== */
.about-container {
  padding: 60px 20px;
}

/* Манифест */
.manifesto-section {
  margin-bottom: 70px;
}

.manifesto-content {
  max-width: 900px;
  margin: 0 auto;
}

.lead-text {
  font-size: 19px;
  line-height: 1.7;
  color: #1a252f;
  margin-bottom: 20px;
  border-left: 4px solid var(--primary-color);
  padding-left: 20px;
}

.manifesto-content p {
  font-size: 16px;
  margin-bottom: 20px;
  text-align: justify;
}

/* Сетка принципов */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.principle-item {
  background: var(--light-bg);
  padding: 25px;
  border-radius: 6px;
  border-top: 3px solid var(--primary-color);
}

.principle-item h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--dark-color);
}

.principle-item p {
  font-size: 14px;
  color: #555;
  margin-bottom: 0;
}

/* Команда */
.team-section {
  margin-top: 40px;
}

.team-intro {
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 16px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
}

.team-member {
  text-align: center;
  background: var(--white);
}

.member-photo {
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
  border-radius: 50%; /* Делаем фото круглыми */
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-member h3 {
  font-size: 20px;
  margin-bottom: 5px;
}

.member-role {
  font-size: 14px;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 15px;
}

.member-bio {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}
/* ==========================================================================
   ИСПРАВЛЕННЫЕ Стили для Страницы Контактов и Формы (contacts.html)
   ========================================================================== */
.contacts-container {
  padding: 60px 20px;
}

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr; /* Две колонки на ПК */
  gap: 50px;
  align-items: start;
}

.contacts-info h2,
.form-wrapper h2 {
  font-size: 24px;
  margin-bottom: 15px;
}

.contacts-intro {
  color: #555;
  margin-bottom: 25px;
}

.contacts-list {
  list-style: none;
  margin-bottom: 40px;
}

.contacts-list li {
  margin-bottom: 15px;
  padding: 15px;
  background-color: var(--light-bg);
  border-radius: 4px;
  font-size: 15px;
}

.security-notice {
  border: 1px dashed #bdc3c7;
  padding: 20px;
  border-radius: 6px;
  background-color: #fafbfc;
}

.security-notice h4 {
  color: var(--dark-color);
  margin-bottom: 8px;
  font-size: 16px;
}

.security-notice p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Стили формы */
.form-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 25px;
}

.feedback-form .form-group {
  margin-bottom: 20px;
}

.feedback-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
}

.feedback-form input[type="text"],
.feedback-form input[type="email"],
.feedback-form input[type="url"],
.feedback-form select,
.feedback-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 15px;
  background-color: #fff;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.feedback-form input:focus,
.feedback-form select:focus,
.feedback-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(217, 56, 58, 0.1);
}

/* Чекбокс согласия */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  margin-top: 4px;
  transform: scale(1.1);
  cursor: pointer;
}

.checkbox-group label {
  font-weight: normal;
  font-size: 13px;
  color: #555;
  line-height: 1.4;
  cursor: pointer;
}

.btn-block {
  width: 100%;
  text-align: center;
  border: none;
  font-size: 16px;
}

/* Адаптация формы под мобильные устройства (медиазапрос перенесен вниз) */
@media (max-width: 900px) {
  .contacts-grid {
    grid-template-columns: 1fr; /* На смартфонах колонки встают в один ряд */
    gap: 40px;
  }
}
/* ==========================================================================
   Адаптивность и Мобильное бургер-меню
   ========================================================================== */

/* На компьютерах кнопку бургера не показываем */
.burger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  z-index: 110;
}

.burger-btn span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--dark-color);
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
}

@media (max-width: 768px) {
  /* Включаем отображение кнопки бургера */
  .burger-btn {
    display: flex;
  }

  /* Анимация превращения бургера в крестик при открытии */
  .burger-btn.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .burger-btn.open span:nth-child(2) {
    opacity: 0;
  }
  .burger-btn.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* Превращаем навигацию в скрытую выезжающую панель */
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%; /* Изначально меню спрятано за экраном справа */
    width: 70%;
    height: 100vh;
    background-color: var(--white);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    padding: 100px 40px;
    transition: right 0.4s ease-in-out;
    z-index: 105;
  }

  /* Когда добавляется класс .open, меню выезжает */
  .main-nav.open {
    right: 0;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav ul li {
    margin: 0 0 25px 0;
  }

  .main-nav ul li a {
    font-size: 20px; /* Увеличиваем размер ссылок для удобного нажатия пальцем */
  }

  /* Остальные адаптивные стили контента */
  .hero-slider {
    height: 350px;
  }

  .slide-content h1 {
    font-size: 26px;
  }

  .case-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}
