/* ================= RESET ================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', Arial, sans-serif;
  background: #ffffff;
  color: #222;
  padding-top: 80px;
  transition: background 0.6s ease, color 0.6s ease;
}

/* FIX ANCHORS */
section,
header {
  scroll-margin-top: 90px;
}

/* ================= NAVBAR ================= */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #eee;
  z-index: 1000;
  transition: background 0.6s ease, box-shadow 0.6s ease;
}

.nav-container {
  max-width: 1100px;
  margin: auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 20px;
  font-weight: 700;
}

/* ================= MENU LINKS ================= */
.nav-links {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: #222;
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3f87ff, #00e5ff);
  transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* ================= THEME BUTTON ================= */
.theme-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 6px;
  transition: transform 0.4s;
}

.theme-btn:hover {
  transform: rotate(20deg) scale(1.2);
}

/* ================= BURGER ================= */
.menu-toggle {
  width: 28px;
  height: 22px;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.menu-toggle span {
  width: 100%;
  height: 3px;
  background: #222;
  border-radius: 3px;
  transition: all 0.35s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ================= HERO ================= */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #3f87ff, #4fd1c5);
  color: #fff;
}

.hero-inner {
  max-width: 700px;
  padding: 20px;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 15px;
}

.hero p {
  font-size: 18px;
  opacity: 0.95;
}

/* ================= BUTTON ================= */
.btn {
  margin-top: 25px;
  padding: 14px 36px;
  background: #fff;
  color: #333;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

/* ================= SECTIONS ================= */
.section {
  padding: 70px 0;
}

.section.gray {
  background: #f4f6f8;
}

.container {
  max-width: 1100px;
  margin: auto;
  padding: 0 20px;
}

/* ================= DIVIDER ================= */
.divider {
  height: 40px;
  background: linear-gradient(to right, #3f87ff, #00e5ff);
  opacity: 0.15;
}

/* ================= CARDS ================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.card {
  background: #fff;
  padding: 50px 22px 22px;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card::before {
  content: "⭐";
  position: absolute;
  top: 18px;
  left: 22px;
  font-size: 22px;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

/* ================= STATS ================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  text-align: center;
}

.stats-grid strong {
  font-size: 40px;
  color: #3f87ff;
}

/* ================= FORM ================= */
.contact-form {
  max-width: 480px;
  margin-top: 25px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

/* ================= DARK MODE ================= */
body.dark {
  background: linear-gradient(180deg, #2a2f36, #1e2228);
  color: #e5f7ff;
}

body.dark .navbar {
  background: rgba(34, 38, 44, 0.95);
  box-shadow: 0 2px 15px rgba(0, 200, 255, 0.25);
}

body.dark .section.gray {
  background: rgba(255, 255, 255, 0.04);
}

body.dark .card {
  background: linear-gradient(180deg, #2f343c, #262a31);
  box-shadow: 0 10px 30px rgba(0, 200, 255, 0.15);
}

body.dark .hero {
  background: linear-gradient(135deg, #4f8cff, #00cfff);
}

body.dark .btn {
  background: linear-gradient(135deg, #00cfff, #4f8cff);
  color: #002733;
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.5);
}

body.dark .stats-grid strong {
  color: #00d9ff;
  text-shadow: 0 0 12px rgba(0, 200, 255, 0.8);
}

body.dark .menu-toggle span {
  background: #e6f7ff;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 60px;
    right: 20px;
    background: #ffffff;
    flex-direction: column;
    gap: 15px;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    display: none;
  }

  .nav-links.active {
    display: flex;
  }

  body.dark .nav-links {
    background: linear-gradient(180deg, #2f343c, #262a31);
  }
}

/* ===== FORCE VISIBLE BURGER ===== */
.menu-toggle {
  width: 32px;
  height: 24px;
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
}

.menu-toggle span {
  display: block !important;
  width: 100% !important;
  height: 4px !important;
  min-height: 4px;
  background-color: #222 !important;
  border-radius: 4px;
  opacity: 1 !important;
  visibility: visible !important;
}

body.dark .menu-toggle span {
  background-color: #e6f7ff !important;
}

/* ===== FINAL RESPONSIVE BURGER FIX ===== */

/* По умолчанию — СКРЫТ (ПК) */
.menu-toggle {
  display: none !important;
}

/* Только мобильные */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex !important;
    width: 32px;
    height: 24px;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    cursor: pointer;
    position: relative;
    z-index: 2000;
  }

  .menu-toggle span {
    display: block !important;
    width: 100% !important;
    height: 4px !important;
    background-color: #222 !important;
    border-radius: 4px;
  }

  body.dark .menu-toggle span {
    background-color: #e6f7ff !important;
  }
}
