:root {
  --neon: #00ffcc;
  --neon-dim: rgba(0, 255, 204, 0.2);
  --bg: #030305;
  --surface: rgba(25, 25, 30, 0.4);
  --text: #f0f0f0;
  --text-muted: #888;
}

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

/* Этот класс будет прятать системную мышь, только когда JS работает */
body.custom-cursor-active * {
  cursor: none !important;
}
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  overflow-x: hidden;
}

/* LENIS SMOOTH SCROLL */
html.lenis {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
::-webkit-scrollbar {
  width: 0px;
}

/* ПРЕЛОАДЕР */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Syncopate", sans-serif;
  font-size: clamp(1.5rem, 5vw, 4rem);
  color: var(--text);
  letter-spacing: 5px;
}

/* КУРСОР */
.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
}
.cursor-dot {
  width: 6px;
  height: 6px;
  background-color: var(--neon);
}
.cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid var(--neon-dim);
  transition:
    width 0.3s,
    height 0.3s,
    background-color 0.3s;
}
@media (max-width: 1024px) {
  * {
    cursor: auto !important;
  }
  .cursor-dot,
  .cursor-outline {
    display: none;
  }
}

/* WEBGL */
#webgl-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
}
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, transparent 0%, var(--bg) 100%);
  z-index: -1;
  pointer-events: none;
}

/* НАВИГАЦИЯ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(3, 3, 5, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 100;
}

/* ЛОГОТИП */
a.logo,
a.logo:visited,
a.logo:active,
a.logo:focus {
  font-family: "Syncopate", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 2px;
  text-decoration: none !important;
  color: var(--text) !important;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  z-index: 102; /* Поверх мобильного меню */
}
a.logo span {
  color: var(--neon) !important;
}

/* ОБЕРТКА И ССЫЛКИ (ПК) */
.nav-wrapper {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}
.nav-links > li > a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s;
}
.nav-links > li > a:hover {
  color: var(--neon);
}

/* ДРОПДАУНЫ (ОБЩЕЕ ПК) */
.dropdown {
  position: relative;
  padding: 10px 0;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: -20px;
  min-width: 240px;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(15px);
  border: 1px solid var(--neon-dim);
  border-radius: 8px;
  list-style: none;
  padding: 1rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
/* Для ПК: hover открывает меню */
@media (min-width: 1025px) {
  .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}
.dropdown-menu li a {
  display: block;
  padding: 0.8rem 1.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.3s;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.dropdown-menu li a:hover,
.dropdown-menu li a.active {
  color: var(--neon);
  background: rgba(0, 255, 204, 0.05);
  padding-left: 2rem;
  border-left: 2px solid var(--neon);
}

/* СПЕЦИФИКА ДРОПДАУНА ЯЗЫКОВ */
.lang-dropdown {
  margin-left: auto;
}
.lang-current {
  font-family: "Syncopate", sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
  letter-spacing: 1px;
}
.lang-current:hover {
  color: var(--neon);
}
.lang-menu {
  left: auto;
  right: 0;
  min-width: 200px;
} /* Открывается влево, чтобы не вылезти за экран */

/* --- АДАПТИВНОЕ МЕНЮ (МОБИЛЬНЫЕ УСТРОЙСТВА) --- */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 102;
  padding: 10px;
}
.menu-toggle span {
  display: block;
  width: 30px;
  height: 2px;
  background: var(--text);
  transition: 0.3s ease;
}
/* Анимация крестика */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  background: var(--neon);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  background: var(--neon);
}

@media (max-width: 1024px) {
  .menu-toggle {
    display: flex;
  }

  .nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 3, 5, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 101;
    padding: 2rem;
    overflow-y: auto;
  }
  .nav-wrapper.active {
    opacity: 1;
    visibility: visible;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
  }
  .nav-links > li > a {
    font-size: 1.5rem;
  }

  .lang-dropdown {
    margin-left: 0;
    margin-top: 2rem;
    text-align: center;
  }
  .lang-current {
    font-size: 1.2rem;
  }

  /* Сброс стилей Dropdown для мобильных (Аккордеон) */
  .dropdown {
    padding: 0;
    width: 100%;
    text-align: center;
  }
  .dropdown-menu {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none; /* Скрыто по умолчанию */
    background: transparent;
    border: none;
    min-width: 100%;
    padding: 1rem 0 0 0;
  }
  .dropdown.mobile-open .dropdown-menu {
    display: block;
    animation: fadeIn 0.3s ease forwards;
  }
  .dropdown-menu li a {
    justify-content: center;
    text-align: center;
    font-size: 1rem;
    padding: 1rem;
  }
  .dropdown-menu li a:hover,
  .dropdown-menu li a.active {
    padding-left: 1rem;
    border-left: none;
    color: var(--neon);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* КНОПКА ВВЕРХ */
.scroll-top-btn {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: var(--surface);
  border: 1px solid var(--neon-dim);
  color: var(--neon);
  font-size: 1.2rem;
  border-radius: 50%;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s ease;
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}
.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top-btn:hover {
  background: var(--neon);
  color: var(--bg);
  box-shadow: 0 0 15px var(--neon-dim);
}

/* БАЗОВЫЕ СЕКЦИИ */
section {
  min-height: 100vh;
  padding: 120px 5vw 5vw 5vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* HERO */
.hero {
  align-items: flex-start;
  text-align: left;
}
.hero-content {
  max-width: 800px;
}
.hero h1 {
  font-family: "Syncopate", sans-serif;
  font-size: clamp(3rem, 10vw, 8rem);
  line-height: 0.9;
  letter-spacing: -2px;
  text-transform: uppercase;
}
.hero h1 span {
  color: var(--neon);
}
.hero p {
  margin-top: 2rem;
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.6;
  color: var(--text-muted);
  opacity: 0;
}
.btn {
  display: inline-block;
  margin-top: 3rem;
  padding: 1.2rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  text-transform: uppercase;
  font-family: "Syncopate", sans-serif;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 2px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--neon);
  transition: all 0.4s ease;
  z-index: -1;
}
.btn:hover::before {
  left: 0;
}
.btn:hover {
  color: var(--bg);
  border-color: var(--neon);
}

/* КУРСЫ GRID */
.section-header {
  margin-bottom: 4rem;
  text-align: center;
}
.section-header h2 {
  font-family: "Syncopate", sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
}
.section-header h2 span {
  color: var(--neon);
}
.section-header p {
  color: var(--text-muted);
  margin-top: 1rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  width: 100%;
}
a.course-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2.5rem;
  border-radius: 16px;
  backdrop-filter: blur(5px);
  transition:
    transform 0.4s ease,
    border-color 0.4s ease,
    background 0.4s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
a.course-card:hover {
  transform: translateY(-10px);
  border-color: var(--neon-dim);
  background: rgba(30, 30, 35, 0.6);
}
.card-lang {
  font-family: "Syncopate", sans-serif;
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.05);
  position: absolute;
  top: 10px;
  right: 20px;
  transition: color 0.4s ease;
}
a.course-card:hover .card-lang {
  color: var(--neon-dim);
}
.course-card h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}
.badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.3rem 0.8rem;
  background: var(--neon-dim);
  color: var(--neon);
  font-size: 0.7rem;
  text-transform: uppercase;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}
.course-card p {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 2rem;
  flex-grow: 1;
}
.card-link {
  color: var(--text);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s;
  align-self: flex-start;
}
a.course-card:hover .card-link {
  color: var(--neon);
}

/* МЕТОДОЛОГИЯ */
.methodology {
  align-items: center;
  text-align: center;
}
.methodology-content h2 {
  font-family: "Syncopate", sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 4rem;
}
.methodology-content h2 span {
  color: var(--neon);
}
.features-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 800px;
  text-align: left;
  margin: 0 auto;
}
.feature-item h4 {
  font-family: "Syncopate", sans-serif;
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 1rem;
}
.feature-item p {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 1.1rem;
}

/* ЛОКАЦИИ */
.locations {
  min-height: 60vh;
  background: radial-gradient(
    circle at center,
    rgba(0, 255, 204, 0.03),
    transparent 60%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}
.locations-content {
  display: flex;
  align-items: center;
  gap: 4rem;
  max-width: 1000px;
  flex-wrap: wrap;
  justify-content: center;
  text-align: left;
}
.stat-number {
  font-family: "Syncopate", sans-serif;
  font-size: clamp(8rem, 20vw, 15rem);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 2px var(--neon);
  line-height: 1;
  opacity: 0.8;
  text-shadow: 0 0 20px rgba(0, 255, 204, 0.2);
}
.stat-text {
  flex: 1;
  min-width: 300px;
}
.stat-text h2 {
  font-family: "Syncopate", sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}
.stat-text h2 span {
  color: var(--neon);
}
.stat-text p {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 1.1rem;
}
@media (max-width: 768px) {
  .locations-content {
    text-align: center;
    gap: 1rem;
  }
}

/* ФУТЕР */
.footer {
  padding: 3rem 5vw;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  background: rgba(3, 3, 5, 0.8);
  z-index: 1;
  position: relative;
  backdrop-filter: blur(10px);
}
.footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}
.footer a {
  color: var(--neon);
  text-decoration: none;
  font-weight: bold;
  transition: text-shadow 0.3s;
}
.footer a:hover {
  text-shadow: 0 0 10px var(--neon);
}
