/* Создано: 2025-12-12, GRM */
/* Лицензия: Проприетарная. Любое распространение запрещено. */

:root {
  /* Цветовая схема */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #10b981;
  --accent: #f59e0b;
  --dark: #1e293b;
  --light: #f8fafc;
  --gray: #64748b;
  --light-gray: #e2e8f0;
  --danger: #ef4444;

  /* Тени */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --neomorph: 8px 8px 16px rgba(0, 0, 0, 0.1),
    -8px -8px 16px rgba(255, 255, 255, 0.7);

  /* Переходы */
  --transition: all 0.3s ease;
}

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

html {
  scroll-padding-top: 96px;
}

html.public-nav-open,
html.public-nav-open body {
  overflow: hidden;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background-color: #f1f5f9;
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Общие стили */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  border: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

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

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  color: var(--dark);
}

.section-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--primary);
  margin: 0.5rem auto;
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.25rem;
  text-align: center;
  color: var(--gray);
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.neomorph {
  background: #f1f5f9;
  border-radius: 16px;
  box-shadow: var(--neomorph);
}

/* Навигация */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--dark);
}

.logo-icon {
  color: var(--primary);
  margin-right: 10px;
  font-size: 1.8rem;
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-item {
  margin-left: 2rem;
  position: relative;
}

.nav-link {
  text-decoration: none;
  color: var(--gray);
  font-weight: 500;
  transition: var(--transition);
  padding: 8px 0;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-buttons {
  display: flex;
  gap: 1rem;
}

.nav-item-mobile-only {
  display: none;
}

.nav-link-cta {
  color: var(--primary);
  font-weight: 600;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--dark);
  cursor: pointer;
  padding: 0.35rem;
  line-height: 1;
}

/* Страницы */
.page-content {
  padding: 120px 0 80px;
  min-height: 100vh;
}

/* Главная страница */
.hero {
  padding: 160px 0 100px;
  text-align: center;
  background: linear-gradient(135deg, #f0f9ff 0%, #e6f7ff 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(37, 99, 235, 0.1) 0%,
    rgba(37, 99, 235, 0) 70%
  );
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--dark);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--gray);
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.hero-image {
  max-width: 100%;
  margin-top: 3rem;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.features {
  padding: 100px 0;
  background: white;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  text-align: center;
  padding: 2rem;
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: var(--light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
  background: var(--primary);
  color: white;
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--dark);
}

/* Формы */
.form-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 2.5rem;
}

.form-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--dark);
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--dark);
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--light-gray);
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
  background: white;
}

.form-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.form-hint {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 0.5rem;
}

.form-hint i {
  margin-right: 8px;
}

.password-toggle {
  position: absolute;
  right: 15px;
  top: 42px;
  cursor: pointer;
  color: var(--gray);
}

.form-footer {
  text-align: center;
  margin-top: 2rem;
}

/* Стили для Django форм */
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--light-gray);
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
  background: white;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Стили для ошибок */
.invalid-feedback {
  display: block;
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.alert-danger {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

/* Ссылки в формах */
.text-link {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

.text-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Страница с тарифами */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.pricing-card {
  text-align: center;
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  border: 1px solid var(--light-gray);
}

.pricing-card.popular {
  border: 2px solid var(--primary);
  transform: scale(1.05);
  z-index: 1;
}

.pricing-card.popular::before {
  content: "Популярный";
  position: absolute;
  top: 15px;
  right: -30px;
  background: var(--primary);
  color: white;
  padding: 5px 30px;
  font-size: 0.8rem;
  font-weight: 600;
  transform: rotate(45deg);
}

.pricing-header {
  padding: 2rem;
  background: var(--light);
}

.pricing-name {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.pricing-period {
  color: var(--gray);
  font-size: 0.9rem;
}

.pricing-features {
  padding: 2rem;
  background: white;
}

.pricing-feature {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--light-gray);
}

.pricing-feature:last-child {
  border-bottom: none;
}

.pricing-footer {
  padding: 0 2rem 2rem;
  background: white;
}

/* Страница контактов (удалена) */

/* Поддержка */
.faq-container {
  max-width: 800px;
  margin: 3rem auto 0;
}

.faq-item {
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  background: white;
  padding: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.faq-question:hover {
  background: var(--light);
}

.faq-question i {
  transition: var(--transition);
}

.faq-answer {
  background: var(--light);
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item.active .faq-question {
  background: var(--light);
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-item.active .faq-answer {
  padding: 1.5rem;
  max-height: 1000px;
}

/* Футер */
.footer {
  background: var(--dark);
  color: white;
  padding: 5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-title {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
  padding-left: 5px;
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Адаптивность */
@media (max-width: 992px) {
  .nav-buttons-desktop {
    display: none;
  }

  .nav-item-mobile-only {
    display: list-item;
  }

  .navbar-container {
    position: relative;
  }

  .nav-menu {
    position: fixed;
    top: 72px;
    left: 0;
    background: white;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 0 1.5rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-150%);
    transition: var(--transition);
    z-index: 999;
    visibility: hidden;
    pointer-events: none;
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
  }

  .nav-menu.active {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav-item {
    margin: 0;
  }

  .nav-link {
    display: block;
    padding: 0.85rem 1.5rem;
  }

  .nav-link::after {
    display: none;
  }

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

  .hero-title {
    font-size: 2.8rem;
  }

  .section-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.1rem;
  }

  .hero-title br {
    display: none;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .landing-section,
  .landing-cta,
  .features {
    padding: 64px 0;
  }

  .footer {
    padding: 3rem 0 1.5rem;
  }

  .footer-grid {
    gap: 2rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 16px;
  }

  .form-container {
    padding: 1.5rem;
  }

  .hero {
    padding: 120px 0 64px;
  }

  .page-content {
    padding: 100px 0 48px;
  }

  .hero-title {
    font-size: 1.85rem;
  }

  .section-title {
    font-size: 1.65rem;
  }
}
