/* ========== Сброс и базовая настройка ========== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(145deg, #e5ebe4, #d4dad0);
  color: #1c1c1c;
  height: 100%;
  -webkit-font-smoothing: antialiased;
}

main {
  padding-top: 80px;
}

/* ========== Навигация ========== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: #cdf1ce50;
  padding: 10px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  text-align: center;
}

#nav-menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.burger {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
}

.nav-btn {
  padding: 10px 15px;
  margin: 5px 10px;
  background-color: #2e7d32;
  color: white;
  border-radius: 5px;
  text-decoration: none;
  transition: transform 0.2s, background-color 0.2s;
  display: inline-block;
}

.nav-btn:hover {
  transform: scale(1.1);
  background-color: #388e3c;
}

.nav-btn.active {
  background-color: #66bb6a;
}

/* =================== Общий контейнер =================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* =================== Кавер =================== */
.t-cover {
  position: relative;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}

.t-cover__filter {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}

.t-cover__wrapper {
  position: relative;
  width: 100%;
  text-align: center;
}

.t-cover__content img,
.logo-img {
  width: 100%;
  max-width: 1000px;
  height: auto;
}

@media (max-width: 768px) {
  .logo-img {
    max-width: 80%;
  }
}

@media (max-width: 480px) {
  .logo-img {
    max-width: 70%;
  }
}

/* =================== Цитата =================== */
.section-quote {
  padding: 60px 0;
  background-color: #f0fdf0;
}

.section-quote__inner {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-quote__text {
  flex: 1;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #222;
}

.section-quote__text p {
  margin: 0 0 20px;
}

.quote-text {
  font-size: 18px;
  font-weight: bold;
  line-height: 1.6;
  color: #222;
}

.quote-author {
  font-size: 20px;
  font-weight: bold;
  text-align: right;
  color: #2e3d2f;
}

.section-quote__image {
  flex: 1;
  min-height: 300px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
}

/* Галерея из 4 фото */
.section-quote__gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 20px;
}

.section-quote__gallery img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
}

/* Главная страница - сетка 4 фото квадратом */
.home-post-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.home-post-image {
  padding-top: 100%; /* квадрат */
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  cursor: pointer;
}

/* =================== Контакты =================== */
.section-contacts {
  position: relative;
  min-height: 100vh;
  background-color: #4caf50;
  background-size: cover;
  background-position: center;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  text-align: center;
  overflow: hidden;
}

.section-contacts__filter {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: transparent;  /*rgba(0,0,0,0.7); темный фон*/ 
  z-index: 1;
}

.contacts-content {
  position: relative;
  z-index: 2;
  padding-top: 300px; /* смещение вниз */
}

.contacts-content h1 {
  font-size: 48px;
  margin-bottom: 20px;
}

.contacts-content p {
  font-size: 20px;
  margin: 10px 0;
}

/* =================== Партнёры =================== */
.section-partners {
  padding: 60px 0;
  background-color: #e0f2e9;
  text-align: center;
}

.partners-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
}

.partner-card {
  width: 200px;
  text-decoration: none;
  color: #333;
  transition: transform 0.3s ease;
}

.partner-card:hover {
  transform: scale(1.05);
}

.partner-card img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  background-color: white;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.partner-card span {
  display: block;
  margin-top: 10px;
  font-weight: bold;
  font-size: 16px;
}

/* =================== Пожертвования =================== */
.section-donation {
  padding: 60px 0;
  background-color: #d9f3d2;
  text-align: center;
}

.donation-button {
  display: inline-block;
  margin: 20px 0;
  padding: 15px 30px;
  background-color: #4caf50;
  color: #fff;
  font-weight: bold;
  font-size: 18px;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.donation-button:hover {
  background-color: #43a047;
}

.donation-info {
  margin-top: 20px;
  font-size: 16px;
  color: #444;
  line-height: 1.6;
}

/* ========== Команда (карточки) ========== */
.team-section {
  padding: 60px 20px;
  text-align: center;
  color: #4caf50;
}

.team-header h1 {
  font-size: 40px;
  color: #2e3d2f;
  margin-bottom: 10px;
  text-shadow: 1px 1px 2px #000;
}

.team-header p {
  font-size: 18px;
  color: #36472b;
}

.team-card-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.team-card {
  background-color: #f5fdf0;
  color: #2e3d2f;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  text-align: left;
  width: 100%;
  max-width: 400px;
  transition: transform 0.2s ease;
}

.team-card:hover {
  transform: scale(1.02);
}

.card-title {
  font-size: 20px;
  font-weight: bold;
  color: #4caf50;
  margin-bottom: 8px;
}

.card-subtitle {
  font-size: 16px;
  color: #2e3d2f;
}

/* ========== Блог ========== */
article {
  background: #f5fdf0;
  padding: 20px;
  margin: 20px auto;
  max-width: 900px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  color: #2e3d2f;
}

article h2 {
  color: #4caf50;
  margin-top: 0;
}

article small {
  color: #aaa;
  font-size: 0.9em;
}

.post-date {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 0.5rem;
}

#load-more-btn {
  display: block;
  margin: 2rem auto;
  padding: 10px 20px;
  font-size: 16px;
}

.fab {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 60px;
  height: 60px;
  background: #007bff;
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 60px;
  font-size: 36px;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: background 0.3s ease;
  z-index: 999;
}

.fab:hover {
  background: #0056b3;
}

.post-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.post-images-scroll {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 10px;
  scrollbar-width: thin; /* Firefox */
}

.post-images-scroll .post-image {
  flex: 0 0 auto;
  width: 200px;
  height: 150px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  cursor: pointer;
}

.post-image {
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  cursor: pointer;
  aspect-ratio: 1/1;
  transition: transform 0.3s;
}

.post-image:hover {
  transform: scale(1.02);
}


/* ========== Картинки и модалка ========== */
.post-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 48%;
}

.post-image {
  width: 100%;
  aspect-ratio: 1 / 1; /* квадрат */
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s;
}

.post-image:hover {
  transform: scale(1.05);
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
}

.modal-content {
  max-width: 90%;
  max-height: 80%;
  box-shadow: 0 0 20px rgba(255,255,255,0.4);
  border-radius: 8px;
}

.modal-close {
  position: absolute;
  top: 30px;
  right: 45px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1000;
}

/* Для доступности */
.modal-close[aria-label] {
  outline: none;
}

.modal.show {
  display: flex;
}

/* ========== Кнопка (универсальная) ========== */
.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #4caf50;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  transition: background 0.3s ease;
  cursor: pointer;
}

.button:hover {
  background-color: #388e3c;
}

/* ========== Анимации ========== */
.animate-fade-in {
  animation: fadeIn 1.5s ease-in;
}

.animate-slide-up {
  animation: slideUp 1.2s ease-out;
}

@keyframes fadeIn {
  0% { opacity: 0; transform: scale(0.98); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
  0% { transform: translateY(40px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ========== Адаптивность ========== */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: center;
  }

  .burger {
    display: block;
  }

  #nav-menu {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  #nav-menu.hidden {
    display: none;
  }

  .nav-btn {
    width: 90%;
    margin: 8px 0;
    text-align: center;
  }

  .team-card {
    max-width: 100%;
  }

  .post-layout {
    flex-direction: column;
  }

  .post-images,
  .post-text {
    width: 100%;
  }

  .post-images {
    grid-template-columns: repeat(2, 1fr);
  }

  .post-text {
    padding: 10px;
  }

  .post-text h2 {
    font-size: 1.5rem;
    text-align: center;
  }

  .post-text p {
    font-size: 0.95rem;
    text-align: justify;
  }

  .section-quote__inner {
    flex-direction: column;
    padding: 20px;
  }

  .section-quote__gallery {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .section-quote__gallery {
    grid-template-columns: 1fr;
  }

  .post-images {
    grid-template-columns: 1fr;
  }

  .burger {
    font-size: 32px;
  }
}
