/* main.css */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&display=swap&subset=cyrillic");

body {
  font-family: "Manrope", sans-serif;
  background: var(--bg-dark);
  color: white;
  margin: 0;
  padding: 0;
}

:root {
  --primary-color: #9BB4FF;
  --secondary-color: #00ffaa;
  --bg-dark: #0a0a0a;
  --primary-dim: rgba(16, 16, 18, 0.92);
  --primary-border: rgba(155, 180, 255, 0.15);
  --dot-grid-color: rgba(155, 180, 255, 0.12);
}

.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 30px;
  text-align: center;
}

.intro-section {
  padding: 120px 0;
}

.steps-section {
  padding: 80px 5%;
  background: var(--bg-dark);
}

.steps-container {
  display: flex;
  justify-content: space-between;
  margin-top: 50px;
  gap: 30px;
}

.step {
  flex: 1;
  text-align: center;
  padding: 30px;
  background: rgba(16, 16, 18, 0.92);
  border-radius: 10px;
  transition: transform 0.3s;
}

.step:hover {
  transform: translateY(-10px);
}

.application-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.application-card {
  background: rgba(16, 16, 18, 0.92);
  padding: 0;
  border-radius: 12px;
  text-align: left;
  transition: all 0.35s ease;
  overflow: hidden;
  border: 1px solid var(--primary-border);
}

.application-card:hover {
  border-color: rgba(155, 180, 255, 0.35);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(155, 180, 255, 0.2);
}

.application-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 0;
  margin-bottom: 0;
  display: block;
  transition: transform 0.5s ease;
}

.application-card:hover img {
  transform: scale(1.04);
}

.application-card-content {
  padding: 20px 22px 24px;
}

.application-card-content h3 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.application-card-content p {
  color: #888;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

.community-section {
  text-align: center;
  margin-bottom: 100px;
}

.community-section p {
  font-size: 1rem;
  color: #ccc;
  margin-bottom: 20px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-icons img {
  width: 40px;
  height: 40px;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.social-icons img:hover {
  opacity: 1;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  font-weight: 600;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary-color);
  color: #000;
  border: none;
}

.btn-primary:hover {
  background: #fff;
  color: #000;
}

.btn-secondary {
  background: none;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: #000;
}

.hero-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 80px 0;
  gap: 40px;
  min-height: 90vh;
  position: relative;
  background: #060606;
  width: 100vw; /* ширина на всю область просмотра */
  margin-left: calc(-50vw + 50%); /* компенсируем обрезку .page-wrapper */
  justify-content: center;
}

/* Вариант 1: Градиент с анимированными частицами */
.hero-section.bg-variant-1 {
  background: linear-gradient(135deg, #060606 0%, #0c0612 25%, #0a0d18 50%, #060c18 75%, #060606 100%);
  overflow: hidden;
}

.hero-section.bg-variant-1::before,
.hero-section.bg-variant-1::after {
  pointer-events: none; /* клики проходят к 3D модели и кнопкам */
}

.hero-section.bg-variant-1::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(155, 180, 255, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(0, 255, 170, 0.06) 0%, transparent 50%),
              radial-gradient(circle at 40% 40%, rgba(155, 180, 255, 0.04) 0%, transparent 50%);
  animation: heroGlowFloat 25s ease-in-out infinite;
}

.hero-section.bg-variant-1::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, rgba(155, 180, 255, 0.2), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(0, 255, 170, 0.15), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(155, 180, 255, 0.25), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(0, 255, 170, 0.2), transparent),
    radial-gradient(2px 2px at 160px 30px, rgba(155, 180, 255, 0.15), transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: particleMove 20s linear infinite;
}

/* Вариант 2: Анимированные волны */
.hero-section.bg-variant-2 {
  background: linear-gradient(45deg, #0a0a0a 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #0a0a0a 100%);
  overflow: hidden;
}

.hero-section.bg-variant-2::before,
.hero-section.bg-variant-2::after {
  pointer-events: none;
}

.hero-section.bg-variant-2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(90deg, transparent 0%, rgba(224, 176, 255, 0.1) 50%, transparent 100%),
    linear-gradient(0deg, transparent 0%, rgba(0, 255, 170, 0.1) 50%, transparent 100%);
  background-size: 100% 100px, 100px 100%;
  animation: waveMove 8s ease-in-out infinite;
}

.hero-section.bg-variant-2::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at center, transparent 0%, rgba(224, 176, 255, 0.05) 70%);
  animation: wavePulse 6s ease-in-out infinite;
}

/* Вариант 3: Геометрические паттерны */
.hero-section.bg-variant-3 {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0a2e 30%, #16213e 60%, #0a0a0a 100%);
  overflow: hidden;
}

.hero-section.bg-variant-3::before,
.hero-section.bg-variant-3::after {
  pointer-events: none;
}

.hero-section.bg-variant-3::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(45deg, rgba(224, 176, 255, 0.1) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0, 255, 170, 0.1) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(224, 176, 255, 0.05) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0, 255, 170, 0.05) 75%);
  background-size: 60px 60px;
  background-position: 0 0, 0 30px, 30px -30px, -30px 0px;
  animation: geometricMove 12s linear infinite;
}

.hero-section.bg-variant-3::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 25% 25%, rgba(224, 176, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(0, 255, 170, 0.1) 0%, transparent 50%);
  animation: geometricPulse 8s ease-in-out infinite;
}

/* Анимации */
/* Лёгкое «дыхание» фона без вращения — вращение давало эффект крутящегося прямоугольника */
@keyframes heroGlowFloat {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.02); }
}

@keyframes particleFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
}

@keyframes particleMove {
  0% { transform: translateX(0px); }
  100% { transform: translateX(-200px); }
}

@keyframes waveMove {
  0%, 100% { transform: translateX(0px) translateY(0px); }
  25% { transform: translateX(10px) translateY(-5px); }
  50% { transform: translateX(0px) translateY(-10px); }
  75% { transform: translateX(-10px) translateY(-5px); }
}

@keyframes wavePulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes geometricMove {
  0% { transform: translateX(0px) translateY(0px); }
  100% { transform: translateX(60px) translateY(60px); }
}

@keyframes geometricPulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.2); opacity: 0.6; }
}

.hero-section .hero-inner {
  position: relative;
  z-index: 1;
}

.hero-section > .hero-content,
.hero-section > .hero-media {
  flex: 1 1 0;
  max-width: 600px;
  padding: 0 20px;
}

.hero-content,
.hero-media {
  flex: 1 1 0;
  max-width: 600px;
  padding: 0 20px;
  box-sizing: border-box;
}

.hero-media {
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid rgba(209, 217, 221, 0.25);
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
}

.hero-media model-viewer {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
  border-radius: 0;
  background: transparent;
}

.hero-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  align-items: center;
}

.hero-content {
  flex: 1;
  max-width: 600px;
  padding: 0 5%;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: #ccc;
}

.hero-actions {
  display: flex;
  gap: 15px;
}

/* Стили для шапки */
.main-header {
  background-color: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  padding: 15px 0;
  border-bottom: 1px solid rgba(209, 217, 221, 0.25);
}

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

.logo-container {
  flex: 0 0 auto;
}

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

.logo:hover {
  transform: scale(1.05);
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: #D1D9DD;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s;
  position: relative;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #D1D9DD;
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.language-switcher {
  display: flex;
  gap: 5px;
}

.lang-btn {
  background: none;
  border: 1px solid #D1D9DD;
  color: #D1D9DD;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.8rem;
}

.lang-btn:hover {
  background: #D1D9DD;
  color: #000;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #D1D9DD;
  transition: all 0.3s;
}

/* Footer */
.main-footer {
  background: #0a0a0a;
  color: #ccc;
  padding: 40px 0;
  font-size: 0.9rem;
  border-top: 1px solid rgba(209, 217, 221, 0.25);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.footer-section h3 {
  color: #D1D9DD;
  margin-bottom: 10px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-section a {
  color: #D1D9DD;
  text-decoration: none;
  display: block;
  margin-bottom: 6px;
  opacity: 0.9;
}

.footer-section a:hover {
  color: #fff;
  opacity: 1;
}

.copyright {
  max-width: 1200px;
  margin: 30px auto 0;
  padding: 0 20px;
  text-align: center;
  color: #666;
  font-size: 0.75rem;
}

/* ==========================================
   DOT-GRID PATTERN
   ========================================== */
.dot-grid-section {
  background-image: radial-gradient(circle, var(--dot-grid-color) 1px, transparent 1px);
  background-size: 28px 28px;
  position: relative;
}

.dot-grid-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--bg-dark) 0%, transparent 15%, transparent 85%, var(--bg-dark) 100%);
  pointer-events: none;
}

/* ==========================================
   INTRO SECTION (What is Beresta?)
   ========================================== */
.intro-section {
  position: relative;
  overflow: hidden;
  padding: 80px 5%;
  display: flex;
  align-items: center;
  gap: 60px;
  min-height: 480px;
  background: #0a0a0a !important;
}

.intro-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/img/intro-bg.png') center/cover no-repeat;
  opacity: 0.35;
}

.intro-section > * {
  position: relative;
  z-index: 1;
  max-width: 520px;
}

/* ==========================================
   STEP CARDS
   ========================================== */
.step {
  flex: 1;
  text-align: center;
  padding: 32px 24px;
  background: rgba(16, 16, 18, 0.92);
  border-radius: 12px;
  border: 1px solid var(--primary-border);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.step:hover {
  transform: translateY(-8px);
  border-color: rgba(155, 180, 255, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.step img {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.9;
}

.step h3 {
  color: var(--primary-color);
  font-size: 1.05rem;
  margin-bottom: 10px;
}

/* ==========================================
   TECHNOLOGY DUAL SIGNAL SECTION
   ========================================== */
.dual-signal-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
  list-style: none;
  padding: 0;
}

.dual-signal-list li {
  background: var(--primary-dim);
  border: 1px solid var(--primary-border);
  border-radius: 10px;
  padding: 20px 24px;
  color: #ccc;
  font-size: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.5;
}

.dual-signal-list li::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  min-width: 8px;
  border-radius: 50%;
  background: var(--primary-color);
  margin-top: 6px;
  box-shadow: 0 0 8px rgba(155, 180, 255, 0.6);
}

/* ==========================================
   PARTICIPATION SECTION
   ========================================== */
.participation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
  margin-bottom: 48px;
}

.participation-card {
  background: var(--primary-dim);
  border: 1px solid var(--primary-border);
  border-radius: 10px;
  padding: 20px;
  transition: border-color 0.3s, transform 0.3s;
}

.participation-card:hover {
  border-color: rgba(155, 180, 255, 0.35);
  transform: translateY(-4px);
}

.participation-card h4 {
  color: var(--primary-color);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.participation-card p {
  color: #777;
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.5;
}

/* ==========================================
   SCIENCE SECTION
   ========================================== */
.science-quote {
  background: var(--primary-dim);
  border-left: 3px solid var(--primary-color);
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
  margin-bottom: 16px;
  color: #bbb;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section {
    flex-direction: column;
    padding-top: 50px;
  }

  .steps-container {
    flex-direction: column;
  }

  .hero-content {
    text-align: center;
  }

  .application-cards {
    grid-template-columns: 1fr;
  }

  .application-card {
    text-align: left;
  }

  .dual-signal-list {
    grid-template-columns: 1fr;
  }

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

  .intro-section {
    flex-direction: column;
    min-height: auto;
    padding: 60px 5%;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: #0a0a0a;
    padding: 20px 0;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .header-container {
    padding: 0 15px;
  }

  .logo {
    height: 35px;
  }
}

/* ==========================================
   Страница /applications/ — сетка сценариев
   ========================================== */
.applications-overview .section-description {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
  padding: 0 20px;
}

.application-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 32px;
  margin-top: 48px;
  margin-bottom: 80px;
  padding: 0 20px;
}

.application-grid .application-card {
  margin-bottom: 0;
  overflow: hidden;
}

/* Текст не прилипает к границам: паддинг у контента без .application-card-content */
.application-grid .application-card > h3,
.application-grid .application-card > p,
.application-grid .application-card > ul {
  padding-left: 24px;
  padding-right: 24px;
  margin-left: 0;
  margin-right: 0;
}

.application-grid .application-card > h3 {
  padding-top: 20px;
  padding-bottom: 10px;
  margin: 0;
}

.application-grid .application-card > p {
  padding-top: 0;
  padding-bottom: 12px;
  margin: 0;
  color: #bbb;
  font-size: 0.95rem;
  line-height: 1.6;
}

.application-grid .application-card > p + ul,
.application-grid .application-card > ul {
  padding-left: 40px;
  padding-right: 24px;
  padding-bottom: 24px;
  margin: 0 0 0 0;
  color: #888;
  font-size: 0.9rem;
  line-height: 1.65;
}

.application-grid .application-card > p + ul {
  padding-top: 0;
}

/* Фото помещается целиком, без обрезки */
.application-grid .application-card img {
  width: 100%;
  height: auto;
  min-height: 280px;
  max-height: 380px;
  object-fit: contain;
  object-position: center;
  background: rgba(10, 10, 10, 0.6);
  border-radius: 12px 12px 0 0;
}

@media (min-width: 769px) {
  .application-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}
