:root {
  --primary: #034819;
  --secondary: #4a6b2a;
  --accent: #ffa500;
  --success: #4f7942;
  --warning: #daa520;
  --text-primary: #2f4f4f;
  --text-secondary: #5a5a5a;
  --glass: rgba(255, 255, 255, 0.92);
  --glass-light: rgba(255, 248, 220, 0.85);
  --glass-dark: rgba(47, 79, 79, 0.9);
  --glass-header: rgba(255, 255, 255, 0.98);
  --overlay: rgba(240, 248, 255, 0.85);
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --border-radius: 16px;
  --safe-area-inset-top: env(safe-area-inset-top, 0px);
  --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-inset-left: env(safe-area-inset-left, 0px);
  --safe-area-inset-right: env(safe-area-inset-right, 0px);
}

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

body {
  font-family: "Roboto", sans-serif;
  color: var(--text-primary);
  background-color: #f9f9f9;
  background-image: url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80");
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center center;
  line-height: 1.6;
  position: relative;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  padding-top: 70px;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay);
  z-index: -1;
}

/* Основное содержимое */
.main-content {
  opacity: 0;
  animation: fadeIn 0.8s ease-in-out forwards;
  animation-delay: 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 max(15px, var(--safe-area-inset-left));
  box-sizing: border-box;
}

/* Шапка */
.glass-header {
  background: var(--glass-header);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: calc(10px + var(--safe-area-inset-top)) 0 10px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--primary);
}

.logo img {
  height: 60px;
  width: auto;
  transition: all 0.3s;
}

/* Навигация */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  padding: 10px;
  z-index: 1100;
  cursor: pointer;
}

.nav {
  display: flex;
  gap: 10px;
}

.nav-link {
  position: relative;
  color: var(--text-primary);
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 10px 15px;
  border-radius: var(--border-radius);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  z-index: 1;
}

.nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(3, 72, 25, 0.1),
    rgba(74, 107, 42, 0.05)
  );
  z-index: -1;
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}

.nav-link:hover::before {
  transform: translateX(0);
}

.nav-link i {
  font-size: 1rem;
  color: var(--primary);
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(3, 72, 25, 0.1);
}

.nav-link:hover i {
  transform: scale(1.2) rotate(5deg);
  color: var(--accent);
}

.nav-link.active {
  background: rgba(3, 72, 25, 0.1);
  color: var(--primary);
}

.nav-link.active i {
  color: var(--accent);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: calc(100% - 30px);
}

/* Секции */
.section {
  padding: 40px 0;
}

.section-title {
  font-family: "Montserrat", sans-serif;
  font-size: 24px;
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary);
  position: relative;
  font-weight: 600;
  line-height: 1.3;
  padding: 0 15px;
}

.section-title:after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--secondary);
  margin: 15px auto 0;
  border-radius: 2px;
}

/* Герой-секция */
.hero-section {
  background: linear-gradient(rgba(58, 95, 11, 0.2), rgba(255, 248, 220, 0.3));
  padding: calc(40px + var(--safe-area-inset-top)) 0 40px; /* Уменьшили верхний отступ */
  text-align: center;
  margin-top: 60px; /* Добавляем отступ сверху, равный высоте шапки */
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 25px;
  background: var(--glass);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-content h1 {
  font-family: "Montserrat", sans-serif;
  font-size: 28px;
  margin-bottom: 15px;
  color: var(--primary);
  font-weight: 600;
  line-height: 1.3;
}

.hero-content .lead {
  font-size: 16px;
  margin-bottom: 25px;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Блок о нас */
/* Анимации и стили для блока "О нас" */
.about-grid {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.4s;
}

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

.about-text {
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center bottom;
}

.about-text:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.image-card {
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.image-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.image-card:hover img {
  transform: scale(1.03);
}

.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(107, 142, 35, 0.03) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

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

/* Адаптация для планшетов и десктопов */
@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-text {
    padding: 50px !important;
  }

  ul {
    columns: 2 !important;
  }

  .image-card {
    height: 400px;
  }
}

/* Эффекты для декоративных элементов */
.bg-circle {
  animation: float 12s ease-in-out infinite alternate;
}

@keyframes float {
  0% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(20px, 20px);
  }

  100% {
    transform: translate(-10px, -10px);
  }
}

/* Блок видео */
/* Стили для списка */
.text-half ul li {
  position: relative;
}

/* Горизонтальное расположение на десктопах */
@media (min-width: 768px) {
  .innovation-row {
    flex-direction: row !important;
    min-height: 300px !important;
  }

  .video-half {
    width: 50% !important;
    aspect-ratio: unset !important;
    height: auto !important;
  }

  .text-half {
    width: 50% !important;
    padding: 40px !important;
  }

  .text-half h2 {
    font-size: 28px !important;
    margin: 0 0 20px 0 !important;
  }

  .text-half p {
    font-size: 18px !important;
  }

  .text-half ul li {
    font-size: 16px !important;
    margin-bottom: 10px !important;
  }
}

/* Убираем элементы управления видео */
video::-webkit-media-controls {
  display: none !important;
}

/* Фикс для мобильных устройств */
.video-half {
  overflow: hidden;
}

/* Анимация модального окна */
.modal-content {
  animation: modalFadeIn 0.4s ease-out;
  display: flex;
  flex-direction: column;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
  .modal-body {
    padding: 20px !important;
  }

  .modal-content {
    max-height: 85vh;
  }

  /* Переносим кнопку закрытия вниз на мобильных */
  .close-modal {
    position: static !important;
    margin-top: 20px;
    width: 100%;
  }

  .modal-footer {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 15px;
    text-align: center;
    border-top: 1px solid #eee;
  }
}

/* Стили для главного баннера */
.main-banner {
  position: relative;
  width: 100%;
  height: 70vh;
  max-height: 600px;
  overflow: hidden;
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgb(3 72 25 / 33%) 0%,
    rgba(58, 95, 11, 0.5) 100%
  );
}

.banner-content {
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  color: white;
  max-width: 500px;
  padding: 20px;
}

/* Анимация кнопки в баннере */
.banner-btn {
  position: relative;
  overflow: hidden;
}

.banner-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
  transition: all 0.6s ease;
}

.banner-btn:hover::after {
  transform: scale(50, 50) translate(-50%);
  opacity: 1;
  transition: all 0.8s ease;
}

.banner-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  color: #2f4f4f !important;
}

.banner-btn .btn-animate {
  transition: transform 0.6s ease;
}

.banner-btn:hover .btn-animate {
  transform: translateX(100%);
}

/* Анимация пульсации */
@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.banner-btn {
  animation: pulse 2s infinite 3s;
}

.banner-btn:hover {
  animation: none;
}

@media (max-width: 768px) {
  .main-banner {
    height: 50vh;
  }

  .banner-content {
    left: 5%;
    max-width: 90%;
  }

  .banner-content h1 {
    font-size: 24px !important;
  }

  .banner-content p {
    font-size: 16px !important;
  }
}

/* Карточки */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 0 15px;
}

.card {
  background: var(--glass);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(6px);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(58, 95, 11, 0.1) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border-color: rgba(107, 142, 35, 0.6);
}

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

.card-icon {
  font-size: 36px;
  margin-bottom: 20px;
  color: var(--success);
  transition: all 0.3s ease;
}

.card:hover .card-icon {
  transform: scale(1.1);
  color: var(--accent);
}

.card h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 20px;
  margin-bottom: 15px;
  font-weight: 600;
  position: relative;
  display: inline-block;
}

.card h3::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.card:hover h3::after {
  width: 100%;
}

.card .btn {
  transform: translateY(5px);
  opacity: 0.9;
  transition: all 0.3s ease;
}

.card:hover .btn {
  transform: translateY(0);
  opacity: 1;
  background: var(--primary);
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--border-radius);
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 15px;
  box-sizing: border-box;
  width: 100%;
  max-width: 280px;
  margin: 10px auto;
}

.btn-primary {
  background: var(--success);
  color: white;
  box-shadow: var(--shadow);
  border: none;
}

.btn-outline {
  border: 2px solid var(--secondary);
  color: var(--success);
  background: transparent;
}

/* Статистика */
.stats-section {
  background: rgb(13 71 161 / 8%);
  padding: 40px 0;
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  text-align: center;
  padding: 0 15px;
}

.stat-item {
  padding: 20px;
}

.stat-number {
  font-family: "Montserrat", sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 10px;
}

.stat-label {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* CTA секция */
.cta-section {
  position: relative;
  overflow: hidden;
  padding: 60px 0;
  text-align: center;
}

.cta-section .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-subtitle {
  text-align: center;
  font-size: 18px;
  margin-bottom: 30px;
  max-width: 600px;
  width: 100%;
  position: relative;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: 50px;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  background: white;
  color: var(--secondary);
  border: 2px solid white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  z-index: 1;
  margin: 0 auto;
}

.cta-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, #6b8e23, #ffbc00);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  color: white;
  border-color: transparent;
}

.cta-btn:hover::before {
  opacity: 1;
}

.cta-btn i {
  transition: transform 0.3s ease;
}

.cta-btn:hover i {
  transform: translateX(5px);
}

/* Lazy loading изображений */
img[loading="lazy"] {
  transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Списки */
ul {
  columns: 1;
  margin: 15px 0;
  padding-left: 20px;
}

ul li {
  margin-bottom: 8px;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
  body {
    padding-top: 60px;
  }

  .glass-header {
    padding: calc(8px + var(--safe-area-inset-top)) 0 8px;
  }

  .mobile-menu-btn {
    display: block;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--glass-header);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    flex-direction: column;
    gap: 0;
    padding: 80px 20px 20px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1050;
  }

  .nav.active {
    right: 0;
  }

  .nav-link {
    padding: 15px 20px;
    border-radius: 0;
    border-left: 4px solid transparent;
    transition: none;
  }

  .nav-link:hover {
    transform: none;
    box-shadow: none;
  }

  .nav-link::before {
    background: linear-gradient(to right, rgba(3, 72, 25, 0.1), transparent);
  }

  .nav-link:hover::before {
    transform: translateX(0);
  }

  .nav-link.active {
    border-left: 4px solid var(--accent);
    background: linear-gradient(to right, rgba(3, 72, 25, 0.05), transparent);
  }

  .hero-section {
    padding: calc(60px + var(--safe-area-inset-top)) 0 40px;
  }

  .hero-content h1 {
    font-size: 24px;
  }

  .hero-content .lead {
    font-size: 16px;
  }

  .section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 24px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    margin: 60px auto 15px;
    max-height: 85vh;
  }

  .modal-body {
    padding: 20px;
  }

  .close-modal-bottom {
    padding: 10px 20px;
    max-width: 160px;
  }

  .cta-section {
    padding: 40px 0;
  }

  .cta-btn {
    padding: 12px 24px;
    font-size: 14px;
  }

  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
  }

  .overlay.active {
    opacity: 1;
    visibility: visible;
  }
}

/* Адаптация для планшетов */
@media (min-width: 600px) {
  .hero-section {
    padding: calc(80px + var(--safe-area-inset-top)) 0 60px;
  }

  .hero-content h1 {
    font-size: 32px;
  }

  .hero-content .lead {
    font-size: 18px;
  }

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

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

  ul {
    columns: 2;
  }
}

/* Адаптация для десктопов */
@media (min-width: 900px) {
  .hero-section {
    padding: calc(100px + var(--safe-area-inset-top)) 0 80px;
  }

  .hero-content {
    padding: 40px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .hero-content .lead {
    font-size: 20px;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 36px;
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .btn {
    width: auto;
    padding: 14px 28px;
  }
}

/* Особые стили для iPhone X и подобных */
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
  .hero-section {
    padding-top: calc(100px + var(--safe-area-inset-top));
  }

  .section {
    padding: 50px 0;
  }
}

/* Поддержка устройств с вырезом (notch) */
@supports (padding: max(0px)) {
  .container {
    padding-left: max(15px, var(--safe-area-inset-left));
    padding-right: max(15px, var(--safe-area-inset-right));
  }

  .hero-section {
    padding-top: calc(60px + var(--safe-area-inset-top));
  }
}

@media (max-width: 480px) {
  .logo span {
    display: none;
  }

  .logo img {
    height: 40px;
  }

  .modal-content {
    margin: 50px auto 10px;
    max-height: 90vh;
    border-radius: 0;
  }

  .modal {
    padding: 0;
  }
}
