#scrollTopBtn {
  display: none;
  /* Скрыта по умолчанию */
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 1000;
  background-color: #3f6d35;
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  opacity: 0.8;
  transition: opacity 0.3s, transform 0.3s;
}

#scrollTopBtn:hover {
  opacity: 1;
  transform: scale(1.1);
}



body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: #1e2d1b;
  color: white;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* тянем на всю высоту экрана */

}

.leaf {
  position: absolute;
  pointer-events: none;
  width: 30px;
  z-index: 300;
  animation: fall linear forwards;
}

@keyframes fall {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translate(var(--x-end), var(--y-end)) rotate(360deg);
    opacity: 0;
  }
}

/* Верхнее меню */
/* Общий стиль шапки */
header {
  background: #0f160d;
  display: flex;
  justify-content: center;
  /* центрируем навигацию */
  align-items: center;
  padding: 20px;
  position: relative;
  z-index: 600;
  color: white;
}

.nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

/* Бургер в правом верхнем углу */
.burger {
  position: absolute;
  top: 5px;
  right: 20px;
  cursor: pointer;
  z-index: 1000;
  /* выше остальных элементов */
}

/* Скрываем список по умолчанию */
.burger .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  /* под картинкой */
  right: 0;
  /* выравнивание по правому краю */
  background: #0f160d;
  list-style: none;
  padding: 10px 0;
  margin: 0;
  border-radius: 5px;
  min-width: 150px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Ссылки */
.burger .dropdown li a {
  display: block;
  padding: 10px 15px;
  color: white;
  text-decoration: none;
}

.burger .dropdown li a:hover {
  background: #3f6d35;
  border-radius: 3px;
}

/* На ПК прячем бургер, показываем nav */
@media (min-width: 769px) {
  .burger {
    display: none;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 12px;
    /* смартфон */
  }
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0f160d;
    flex-direction: column;
    align-items: center;
  }

  .nav ul {
    flex-direction: column;
    gap: 20px;
    padding: 50px 50px;
  }

  .burger {
    display: flex;
  }

  /* Класс для открытия меню */
  .nav.active {
    display: flex;
  }
}

nav {
  display: flex;
  gap: 20px;
  background: #0f160d;
  padding: 10px 20px;
  border-radius: 8px;
}

nav a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  background: #1d2b19;
  transition: background 0.3s;
}

nav a:hover {
  background: #2a3c25;
}

main {
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

.content {
  background: #3f6d35;
  width: 75%;
  min-height: 90%;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  font-size: 24px;
  z-index: 500;
  box-sizing: border-box;

}

/* Адаптив для мобильных */
@media (max-width: 480px) {
  .content {
    margin-left: 20px;  /* примерно 0.5 см */
    margin-right: 20px; /* примерно 0.5 см */
    width: auto;        /* убираем фиксированную ширину */
    max-width: calc(100% - 40px); /* учитываем поля */
  }

  /* Полосы можно уменьшить или скрыть на мобильных */
  .vine-left,
  .vine-right {
    display: none;
  }
}

.vine-left,
.vine-right {
  position: fixed;
  top: 0;

  width: 130px;
  /* 3 раза меньше, если исходная 90px */
  height: 100%;
  background-image: url('../img/vine.png');
  background-repeat: repeat-y;
  /* повтор по вертикали */
  background-size: contain;
  /* чтобы уменьшить изображение */
  z-index: 0;
  pointer-events: none;
}

.vine-left {
  left: 50px;

}

.vine-right {
  right: 50px;
}

@keyframes sway {
  0% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(4deg);
  }

  75% {
    transform: rotate(-4deg);
  }

  100% {
    transform: rotate(-2deg);
  }

  /* можно плавно уйти к небольшому значению */
}

.vine-left,
.vine-right {
  animation: sway 4s ease-in-out infinite alternate;
  transform-origin: top center;
}

/* Контент с отступами, чтобы не перекрывался лозами */


main {
  flex: 1;
  /* отталкивает футер вниз */
}

footer {
  background: #0f160d;
  color: white;
  text-align: center;
  padding: 15px 10px;
  font-size: 14px;
  border-top: 2px solid #3f6d35;
}

footer a {
  color: #9fd39f;
  /* зелёный акцент */
  text-decoration: none;
  transition: color 0.3s;
}

footer a:hover {
  color: #c2ffc2;
}

.footer-container p {
  margin: 8px 0;
  font-size: 16px;
}

.info-card {
  background: #3f6d35;
  color: white;
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s, box-shadow 0.3s;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 5px;
  /* Чтобы сетка не вылезала */
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;

}

@media (max-width: 480px) {
  .grid-container {
    grid-template-columns: 1fr;
    /* всегда одна колонка */
    padding: 0 10px;
    /* немного внутреннего отступа */
  }
}


.card {
  background: #3f6d35;
  color: white;
  padding: 20px;
  border-radius: 12px;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.gradient-card {
  background: linear-gradient(135deg, #3f6d35, #1e2d1b);
  color: white;
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.accordion {
  background: #3f6d35;
  color: white;
  border-radius: 1px;
  margin: 2px 0;
  overflow: hidden;
  cursor: pointer;

  transition: background 0.3s;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion.active+.accordion-content {
  max-height: 500px;
  /* или auto с JS */
}

#scrollTopBtn {
  display: none;
  /* Скрыта по умолчанию */
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 1000;
  background-color: #3f6d35;
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  opacity: 0.8;
  transition: opacity 0.3s, transform 0.3s;
}

#scrollTopBtn:hover {
  opacity: 1;
  transform: scale(1.1);
}


/* Базовый размер текста */
.info-card,
.outlined-card,
.card,
.gradient-card,
.accordion,
footer,
.accordion-content,
header,
main {
  font-size: 1.5rem;
  /* примерно 16px */
  line-height: 1.5;
}

/* Для планшетов (до 768px ширины) */
@media (max-width: 768px) {

  .info-card,
  .outlined-card,
  .accordion-content,
  .card,
  .gradient-card,
  .accordion,
  footer,
  header,
  main {
    font-size: 0.9rem;
    /* примерно 14px */
  }
}

/* Для телефонов (до 480px ширины) */
@media (max-width: 480px) {

  .info-card,
  .outlined-card,
  .accordion-content,
  .card,
  .img-text-box,
  .gradient-card,
  .accordion,
  footer,
  header,
  .text,
  main {
    font-size: 0.9rem;
    /* примерно 13px */
  }
}

.img-text-box {
  display: flex;
  align-items: flex-start; /* выравнивание по верхнему краю */
  gap: 10px;
  flex-wrap: wrap; /* на маленьких экранах перенос */
}

/* Картинка слева */
.img-text-box img {
  max-width: 250px; /* фиксируем ширину */
  width: 100%;
  height: auto;
  flex-shrink: 1; /* не даём сжиматься */
  border-radius: 8px;
}

/* Текст справа */
.img-text-box .text {
  flex: 1; /* занимает всю оставшуюся ширину */
  min-width: 200px; /* чтобы не схлопывался */
  text-align: left;
  word-wrap: break-word; /* перенос слов */
  overflow-wrap: break-word; /* дополнительный перенос */
}

/* Адаптив для смартфона */
@media (max-width: 600px) {
  .img-text-box {
    flex-direction: column; /* картинка сверху, текст снизу */
    align-items: center;
  }

  .img-text-box img {
    max-width: 100%; /* фото растянется по ширине блока */
    margin-bottom: 15px;
  }

  .img-text-box .text {
    min-width: auto;
    width: 100%;
  }
}



/* 📱 Смартфон */
@media (max-width: 480pxpx) {
  .img-text-box {
    flex-direction: column;
    text-align: center;
  }

  .img-text-box img {
    max-width: 100%;     /* 🔹 фото сжимается по ширине экрана */
  }

  .img-text-box .text {
    min-width: auto;
  }
}

@media (max-width: 600px) {
  .grid-container {
    display: flex;
    flex-direction: column; /* блоки идут последовательно */
    gap: 0;                 /* без промежутков, если нужно */
  }

  .info-card {
    box-shadow: none;       /* убираем тень */
    border-top: 2px solid #004d00; /* можно добавить полоску для разделения */
    border-radius: 0;       /* убираем скругления, если нужно */
    margin: 0;
  }

  .info-card:first-child {
    border-top: none; /* первая карточка без полосы сверху */
  }

  .info-card img {
    max-width: 100%;
    height: auto;
  }
}
.img-text-box.img-large img {
  max-width: 250px;
}

@media (max-width: 600px) {
  .img-text-box.img-large img {
    max-width: 100%; /* на телефоне не вылезает */
  }
}


/* Контейнер для полноэкранного режима */
#fullscreen-view {
  display: none; /* по умолчанию скрыт */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

/* Изображение в fullscreen */
#fullscreen-view img {
  max-width: 95%;
  max-height: 95%;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.7);
  cursor: zoom-out;
}

/* Чтобы картинка в карточке имела курсор */
.expandable {
  cursor: zoom-in;
  transition: transform 0.2s ease-in-out;
}

.expandable:hover {
  transform: scale(1.02);
}
html {
  scroll-behavior: smooth;
}
a {
  color: rgb(20, 36, 20);      /* Цвет текста ссылки */
  text-decoration: none; /* Убирает подчёркивание */
}

a:hover {
  color: #1e2d1b;       /* Цвет при наведении */
  text-decoration: underline; /* Можно оставить подсветку при наведении */
}
.decorated-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px; /* расстояние между точками и текстом */
}



.decorated-title .dots {
  font-size: 22px;       /* размер точек */
  font-weight: bold;     /* жирные точки */
  color: #1e2d1b;      /* тёмно-зелёные */
}
.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* автоматически подстраивает количество колонок */
  gap: 15px;
}

.photo-card {
  text-align: center;
  max-width: 220px; /* ограничение ширины карточки */
}

.photo-card img {
  width: 100%;
  border-radius: 8px;
}

.caption {
  margin-top: 5px;
  font-size: 14px;
  color: #064d2b; /* тёмно-зелёный */
  font-weight: bold;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.photo-card {
  border-radius: 8px;
  overflow: hidden; /* сохраняем скруглённые углы даже при scale */
  
  transition: transform 0.3s;
}

.photo-card img {
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  display: block; /* убирает лишние отступы */
}


.photo-card img:hover {
  transform: scale(1.05);
}
/* ---------- Адаптивная сетка изображений (надёжно) ---------- */
.img-grid, .photo-grid {
  display: grid; /* обязательно */
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* уменьшил минимум до 120px */
  gap: 12px;
  align-items: start;
  box-sizing: border-box;
  width: 100%;
}

/* Позволяем элементам уменьшаться внутри сетки (избегает overflow) */
.img-grid > * {
  min-width: 0;
}

/* Карточка фото */
.photo-card {
  text-align: center;
  overflow: visible;
  box-sizing: border-box;
  /* не даём фиксированных ширин, чтобы браузер сам распределял */
}

/* Картинка — не обрезается, занимает всю ширину карточки */
.photo-card img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain; /* если не хотите кадрирование; можно cover для обрезки */
}

/* Подпись: переносим длинные строки */
.caption {
  margin-top: 6px;
  font-size: 0.9rem;
  word-break: break-word; /* переносит длинные слова */
  hyphens: auto;
}

/* Фолбек для браузеров без grid (очень старые) */
@supports not (display: grid) {
  .img-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  .photo-card {
    flex: 1 1 150px; /* растёт, сжимается, базовая ширина 150px */
    max-width: 33.333%; /* пример для ПК; медиазапросы ниже переработают */
  }
}

/* Медиазапросы для точного поведения */
@media (max-width: 900px) {
  .img-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

@media (max-width: 480px) {
  .img-grid { grid-template-columns: 1fr; gap: 10px; }
  .content { margin-left: 18px; margin-right: 18px; } /* чтобы не прилипало к краям */
}








