/* ========================================
   Цифровой кочевник - Хайтек дизайн
   Современный минималистичный стиль
   ======================================== */

/* CSS Custom Properties */
:root {
  --primary-color: #4A90E2;
  --primary-dark: #357ABD;
  --secondary-color: #6c757d;
  --success-color: #FFD700;
  --info-color: #87CEEB;
  --warning-color: #FFA500;
  --danger-color: #dc3545;
  --dark-color: #1a2332;
  --darker-color: #0f1419;
  --light-color: #f8f9fa;
  --muted-color: #6c757d;
  
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Базовые стили
   ======================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: linear-gradient(135deg, #0f1419 0%, #1a2332 50%, #2c3e50 100%);
  color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ========================================
   Утилиты
   ======================================== */

.text-gradient {
  background: linear-gradient(135deg, var(--primary-color) 0%, #00cc6a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-dark {
  background: linear-gradient(135deg, #1a2332 0%, #0f1419 100%);
}

.min-vh-75 {
  min-height: 75vh;
}

/* ========================================
   Skip Link
   ======================================== */

.skip-link:focus {
  transform: translateY(0) !important;
}

/* ========================================
   Навигация
   ======================================== */

.navbar {
  backdrop-filter: blur(10px);
  background: rgba(13, 17, 23, 0.95) !important;
  border-bottom: 1px solid rgba(0, 255, 136, 0.2);
}

.navbar-brand {
  font-weight: 700;
  transition: var(--transition);
}

.navbar-brand:hover {
  transform: translateY(-1px);
}

.brand-icon {
  transition: var(--transition);
}

.navbar-brand:hover .brand-icon {
  transform: rotate(360deg);
}

.nav-link {
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #4A90E2;
  transition: var(--transition);
}

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

.nav-link:hover {
  color: #4A90E2 !important;
}

/* ========================================
   Кнопки
   ======================================== */

.btn {
  font-weight: 600;
  border-radius: var(--border-radius);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition);
}

.btn:hover::before {
  left: 100%;
}

.btn-success {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
  color: #000 !important;
}

.btn-success:hover {
  background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
  color: #000 !important;
}

.btn-outline-light {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--light-color);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-outline-success {
  border: 1px solid #4A90E2;
  color: #4A90E2;
}

.btn-outline-success:hover {
  background: #4A90E2;
  color: #ffffff;
}

/* ========================================
   Hero секция
   ======================================== */

.hero-section {
  background: linear-gradient(135deg, #0f1419 0%, #1a2332 30%, #2c3e50 70%, #34495e 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(74, 144, 226, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.tech-grid {
  background-image: 
    linear-gradient(rgba(74, 144, 226, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 144, 226, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.3;
}

.floating-card {
  animation: float 6s ease-in-out infinite;
  backdrop-filter: blur(10px);
  background: rgba(13, 17, 23, 0.8) !important;
}

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

.status-dot {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.gradient-orb {
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ========================================
   Hero Illustration
   ======================================== */

.hero-illustration {
  min-height: 400px;
}

.hero-illustration i {
  filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.3));
}

.hero-illustration h4 {
  color: #6c757d !important;
  font-weight: 500;
}

/* ========================================
   Tech Demo Container
   ======================================== */

.tech-demo-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#techCanvas {
  border-radius: var(--border-radius-lg);
  background: linear-gradient(135deg, rgba(74, 144, 226, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(74, 144, 226, 0.3);
  box-shadow: 0 0 30px rgba(74, 144, 226, 0.2);
}


/* ========================================
   Карточки
   ======================================== */

.hover-card {
  transition: var(--transition);
  background: rgba(13, 17, 23, 0.8) !important;
  backdrop-filter: blur(10px);
}

.hover-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 255, 136, 0.1);
  border-color: var(--primary-color) !important;
}

.card {
  border-radius: var(--border-radius-lg);
  background: rgba(13, 17, 23, 0.8) !important;
  backdrop-filter: blur(10px);
}

.card-title {
  font-weight: 600;
  color: #ffffff !important;
}

.text-light {
  color: #ffffff !important;
}

.text-muted {
  color: #adb5bd !important;
}

.badge {
  font-weight: 500;
  border-radius: var(--border-radius);
}

/* ========================================
   Секции
   ======================================== */

.section {
  position: relative;
}

.feature-card {
  transition: var(--transition);
  padding: 2rem 1rem;
  border-radius: var(--border-radius-lg);
}

.feature-card:hover {
  transform: translateY(-5px);
  background: rgba(0, 255, 136, 0.05);
}

.feature-icon {
  transition: var(--transition);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

/* ========================================
   Футер
   ======================================== */

footer {
  background: linear-gradient(135deg, #0f1419 0%, #1a2332 100%);
}

.contact-item {
  transition: var(--transition);
}

.contact-item:hover {
  transform: translateX(5px);
}

.social-links a {
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--primary-color) !important;
  transform: translateY(-2px);
}

/* ========================================
   Анимации и эффекты
   ======================================== */

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

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

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ========================================
   Адаптивность
   ======================================== */

@media (max-width: 768px) {
  .hero-section .display-4 {
    font-size: 2.5rem;
  }
  
  .floating-card {
    margin-top: 2rem;
  }
  
  .feature-card {
    margin-bottom: 2rem;
  }
}

@media (max-width: 576px) {
  .hero-section .display-4 {
    font-size: 2rem;
  }
  
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}

/* ========================================
   Дополнительные утилиты
   ======================================== */

.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glow-effect {
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

/* ========================================
   Кастомные скроллбары
   ======================================== */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--darker-color);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ========================================
   Выделение текста
   ======================================== */

::selection {
  background: var(--primary-color);
  color: var(--dark-color);
}

::-moz-selection {
  background: var(--primary-color);
  color: var(--dark-color);
}

/* ========================================
   Улучшение видимости текста
   ======================================== */

.lead {
  color: #e9ecef !important;
}

h1, h2, h3, h4, h5, h6 {
  color: #ffffff !important;
}

.display-4 {
  color: #ffffff !important;
}

.hero-title {
  color: #ffffff !important;
}

.section-title {
  color: #ffffff !important;
}

.navbar-brand {
  color: #ffffff !important;
  white-space: nowrap !important;
  min-width: 200px !important;
}

.nav-link {
  color: #ffffff !important;
}

.nav-link:hover {
  color: #4A90E2 !important;
}

.btn-outline-light {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
  color: var(--dark-color) !important;
  background-color: #ffffff;
  border-color: #ffffff;
}

/* ========================================
   Language Switcher
   ======================================== */

.dropdown-menu-dark {
  background: rgba(13, 17, 23, 0.98) !important;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(74, 144, 226, 0.5) !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4) !important;
  min-width: 200px;
  padding: 0.5rem 0;
  z-index: 1050 !important;
}

.dropdown-menu-dark.show {
  display: block !important;
}

.dropdown-item {
  color: #ffffff !important;
  transition: all 0.3s ease;
  padding: 0.75rem 1rem;
  font-weight: 500;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-item:hover {
  background: rgba(74, 144, 226, 0.3) !important;
  color: #4A90E2 !important;
  transform: translateX(5px);
}

.dropdown-item:active {
  background: rgba(74, 144, 226, 0.4) !important;
  color: #87CEEB !important;
}

.dropdown-item:focus {
  background: rgba(74, 144, 226, 0.2) !important;
  color: #4A90E2 !important;
  outline: none;
}

/* Кнопка переключателя языков */
#languageDropdown {
  position: relative;
  overflow: visible;
  min-width: 80px;
}

#languageDropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgba(74, 144, 226, 0.5);
  opacity: 0;
  transition: all 0.3s ease;
}

#languageDropdown[aria-expanded="true"]::after {
  opacity: 1;
}

/* Улучшенная видимость dropdown */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1050 !important;
  min-width: 10rem;
  padding: 0.5rem 0;
  margin: 0.125rem 0 0;
  font-size: 1rem;
  color: #212529;
  text-align: left;
  list-style: none;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.375rem;
}

.dropdown-menu.show {
  display: block !important;
}

/* Анимации */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-menu.show {
  animation: fadeInDown 0.3s ease-out;
}

/* Дополнительные стили для лучшей видимости */
.dropdown-toggle::after {
  margin-left: 0.5em;
  vertical-align: 0.255em;
  content: "";
  border-top: 0.3em solid;
  border-right: 0.3em solid transparent;
  border-bottom: 0;
  border-left: 0.3em solid transparent;
}

.dropdown-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

/* Принудительное отображение dropdown */
.dropdown-menu-dark {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  z-index: 9999 !important;
  display: none;
  float: left;
  min-width: 10rem;
  padding: 0.5rem 0;
  margin: 0.125rem 0 0;
  font-size: 1rem;
  color: #212529;
  text-align: left;
  list-style: none;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.375rem;
}

.dropdown-menu-dark.show {
  display: block !important;
}

/* Исправление позиционирования для навбара */
.navbar .dropdown {
  position: relative;
}

.navbar .dropdown-menu {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  z-index: 9999 !important;
  transform: none !important;
  will-change: auto !important;
}

/* Дополнительные стили для исправления позиционирования */
.dropdown-menu-dark {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  z-index: 9999 !important;
  display: none;
  background: rgba(13, 17, 23, 0.98) !important;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(74, 144, 226, 0.5) !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4) !important;
  min-width: 200px;
  padding: 0.5rem 0;
  margin: 0.125rem 0 0;
  font-size: 1rem;
  color: #ffffff;
  text-align: left;
  list-style: none;
  border-radius: 0.375rem;
}

.dropdown-menu-dark.show {
  display: block !important;
}

/* Убираем overflow hidden с навбара */
.navbar {
  overflow: visible !important;
}

.navbar .container {
  overflow: visible !important;
}

.navbar .navbar-collapse {
  overflow: visible !important;
}

/* ========================================
   Text Language Switcher
   ======================================== */

.navbar-text {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}

.lang-text {
  color: #6c757d;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-weight: 500;
  user-select: none;
}

.lang-text:hover {
  color: #4A90E2;
  background: rgba(74, 144, 226, 0.1);
  transform: translateY(-1px);
}

.lang-text.active {
  color: #4A90E2;
  background: rgba(74, 144, 226, 0.2);
  font-weight: 600;
}

.lang-separator {
  color: #6c757d;
  font-weight: 300;
}

/* Адаптивность для мобильных */
@media (max-width: 991px) {
  .navbar-text {
    margin-top: 1rem;
    margin-bottom: 1rem;
    justify-content: center;
  }
}

/* Простая защита от переноса */
.navbar-brand {
  white-space: nowrap !important;
  min-width: 200px !important;
}

/* Стили для hero заголовка с переносом */
#hero-title {
  line-height: 1.2;
}

#hero-title div {
  display: block;
  margin: 0;
  padding: 0;
}

#hero-title div:first-child {
  margin-bottom: 0.5rem;
}

/* Адаптивность для hero заголовка */
@media (max-width: 768px) {
  #hero-title {
    font-size: 1.5rem !important;
  }
}

