/* Версия стилей: 3.2 - Исправление видимости кнопок */

/* Современные анимации */
.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-up {
  animation: slideUp 0.8s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease-out forwards;
}

.animate-bounce-in {
  animation: bounceIn 0.8s ease-out forwards;
}

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

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes bounceIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Плавные переходы для всех элементов */
* {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Современный дизайн в стиле necargo.pro */
:root {
  /* Light theme colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #e2e8f0;
  --text-primary: #1a1a1a;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --accent-primary: #8b5cf6;
  --accent-secondary: #2d1b69;
}

[data-theme="dark"] {
  /* Dark theme colors */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #475569;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --accent-primary: #a855f7;
  --accent-secondary: #3b82f6;
}

/* Темная тема для полей ввода */
[data-theme="dark"] .input {
  background: rgba(30, 41, 59, 0.8) !important;
  border-color: rgba(71, 85, 105, 0.5) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .input:focus {
  background: rgba(30, 41, 59, 0.95) !important;
  border-color: var(--accent-secondary) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .input::placeholder {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .input:focus::placeholder {
  color: var(--text-muted) !important;
}

/* Принудительные стили для видимости текста */
.input {
  color: #1a1a1a !important;
  font-weight: 500 !important;
}

[data-theme="dark"] .input {
  color: #f1f5f9 !important;
  font-weight: 500 !important;
}

/* Дополнительные селекторы для гарантированной видимости */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"] {
  color: #1a1a1a !important;
  font-weight: 500 !important;
}

[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="number"] {
  color: #f1f5f9 !important;
  font-weight: 500 !important;
}

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Плавные переходы */
* {
  transition: all 0.3s ease;
}

/* Красивые градиенты для секций */
.gradient-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-gradient {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #1d4ed8 100%);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Красивые карточки с эффектами */
.card-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-primary);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 32px var(--shadow-color);
  color: var(--text-primary);
}

.card-hover:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.95);
}

/* Анимированные элементы */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

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

.animate-pulse-slow {
  animation: pulse 4s ease-in-out infinite;
}

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

/* Красивые кнопки с эффектами */
.btn-glow {
  position: relative;
  overflow: hidden;
}

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

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

/* Красивые тени */
.shadow-beautiful {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 1px 8px rgba(0, 0, 0, 0.1);
}

.shadow-beautiful:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Hero блок в стиле necargo.pro */
.hero-section {
  background: linear-gradient(135deg, #2d1b69 0%, #8b5cf6 30%, #a855f7 60%, #c084fc 100%);
  background-size: 400% 400%;
  animation: heroGradient 15s ease infinite;
  position: relative;
  overflow: hidden;
}

@keyframes heroGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(168, 85, 247, 0.2) 0%, transparent 50%, rgba(192, 132, 252, 0.2) 100%);
  animation: heroShimmer 8s ease-in-out infinite;
}

@keyframes heroShimmer {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* Анимированные теги */
.hero-tag {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
  animation: tagFloat 3s ease-in-out infinite;
}

.hero-tag:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

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

/* Анимированный слоган */
.hero-slogan {
  animation: sloganGlow 4s ease-in-out infinite;
}

@keyframes sloganGlow {
  0%, 100% { text-shadow: 0 0 20px rgba(255, 255, 255, 0.5); }
  50% { text-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 40px rgba(168, 85, 247, 0.4); }
}

/* Кнопки hero блока */
.hero-btn-primary {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  color: #2d1b69;
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

.hero-btn-primary:hover::before {
  left: 100%;
}

.hero-btn-primary:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 35px rgba(255, 255, 255, 0.3);
}

.hero-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #1e3a8a;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 35px rgba(255, 255, 255, 0.2);
}

/* Кнопки в стиле necargo */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.btn-secondary {
  background: #f3f4f6;
  color: #1f2937 !important;
  border: 2px solid #d1d5db;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
  color: #111827 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Профессиональные кнопки в стиле necargo.pro */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
  text-transform: none;
  letter-spacing: 0;
}

.btn-primary::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: left 0.5s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

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

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Дополнительные эффекты для кнопок */
.btn-primary:hover {
  animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(255, 107, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}

.btn-secondary:hover {
  animation: glow 0.6s ease-in-out;
}

@keyframes glow {
  0% { box-shadow: 0 0 0 0 rgba(116, 185, 255, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(116, 185, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(116, 185, 255, 0); }
}

/* Современные карточки */
.card {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  font-size: 1.1rem;
  font-weight: 500;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}


/* Современные модалки */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 50;
  animation: fadeIn 0.3s ease-out;
}

.modal-box {
  background: rgba(255, 255, 255, 0.95);
  padding: 2.5rem;
  border-radius: 1.5rem;
  max-width: 600px;
  width: 90%;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: scaleIn 0.4s ease-out;
}

/* Современные поля ввода */
.input {
  width: 100%;
  border: 2px solid rgba(209, 213, 219, 0.3);
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  font-size: 1rem;
  color: #1a1a1a !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a1a !important;
  transform: translateY(-1px);
}

.input::placeholder {
  color: rgba(107, 114, 128, 0.8);
  transition: color 0.3s ease;
}

.input:focus::placeholder {
  color: rgba(107, 114, 128, 0.5);
}

/* Мобильная оптимизация */
@media (max-width: 768px) {
  .modal-box {
    padding: 1.5rem;
    margin: 1rem;
    width: calc(100% - 2rem);
  }
  
  .card {
    padding: 1.5rem;
    margin: 0.5rem;
  }
  
  .btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .input {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}

/* Улучшенные анимации для текста */
.animate-fade-in {
  animation: fadeIn 1s ease-out forwards;
}

.animate-stagger > * {
  animation: slideUp 0.6s ease-out forwards;
}

.animate-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.4s; }

/* ===========================================
   МОБИЛЬНАЯ ОПТИМИЗАЦИЯ
   =========================================== */

/* Мобильное меню */
.mobile-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 50;
}

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

.mobile-menu a {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
  text-decoration: none;
  transition: background-color 0.2s;
}

.mobile-menu a:hover {
  background-color: #f3f4f6;
}

/* Кнопка мобильного меню */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.mobile-menu-btn span {
  width: 2rem;
  height: 0.25rem;
  background: #374151;
  border-radius: 10px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: 1px;
}

.mobile-menu-btn.active span:first-child {
  transform: rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg);
}

/* Адаптивные медиа-запросы */
@media (max-width: 768px) {
  /* Показать мобильное меню */
  .mobile-menu-btn {
    display: flex;
  }
  
  /* Скрыть десктопную навигацию */
  .desktop-nav {
    display: none;
  }
  
  /* Hero блок для мобильных */
  .hero-section {
    padding: 3rem 0;
    min-height: auto;
  }
  
  .hero-section h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  
  .hero-section p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
  }
  
  /* Теги преимуществ для мобильных */
  .hero-tag {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
  }
  
  /* Слоган для мобильных */
  .hero-slogan {
    font-size: 1.875rem;
    line-height: 1.3;
  }
  
  /* Кнопки hero для мобильных */
  .hero-btn-primary,
  .hero-btn-secondary {
    width: 100%;
    margin: 0.5rem 0;
    padding: 1rem 2rem;
    font-size: 1rem;
  }
  
  /* Карточки для мобильных */
  .card-hover {
    margin-bottom: 1rem;
  }
  
  /* Секции для мобильных */
  .py-20 {
    padding: 3rem 0;
  }
  
  /* Заголовки для мобильных */
  h2 {
    font-size: 2rem;
    line-height: 1.3;
  }
  
  /* Модальные окна для мобильных */
  .modal-box {
    margin: 1rem;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  /* Формы для мобильных */
  .input {
    font-size: 16px; /* Предотвращает зум на iOS */
  }
  
  /* Кнопки для мобильных */
  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
  }
  
  /* Footer для мобильных */
  .grid.md\\:grid-cols-4 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  /* Уменьшить анимации на мобильных */
  .animate-float {
    animation-duration: 6s;
  }
  
  .animate-pulse-slow {
    animation-duration: 4s;
  }
}

@media (max-width: 480px) {
  /* Очень маленькие экраны */
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-slogan {
    font-size: 1.5rem;
  }
  
  .hero-tag {
    font-size: 0.625rem;
    padding: 0.375rem 0.75rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .py-20 {
    padding: 2rem 0;
  }
  
  .modal-box {
    margin: 0.5rem;
    padding: 1rem;
  }
  
  /* Убрать сложные анимации на очень маленьких экранах */
  .animate-float,
  .animate-pulse-slow {
    animation: none;
  }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-section h1 {
    font-size: 3.5rem;
  }
  
  .hero-slogan {
    font-size: 2.5rem;
  }
  
  .grid.lg\\:grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Улучшения для touch устройств */
@media (hover: none) and (pointer: coarse) {
  /* Увеличить размеры кнопок для touch */
  .btn-primary,
  .btn-secondary,
  .hero-btn-primary,
  .hero-btn-secondary {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Убрать hover эффекты на touch устройствах */
  .card-hover:hover {
    transform: none;
  }
  
  .hero-btn-primary:hover,
  .hero-btn-secondary:hover {
    transform: none;
  }
}

/* Оптимизация для высоких DPI экранов */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-section::before {
    background-size: 200% 200%;
  }
}

/* Переключатель темы */
.theme-toggle-btn {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.theme-toggle-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

.theme-icon {
  position: absolute;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  stroke: var(--text-primary);
}

.sun-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.moon-icon {
  opacity: 0;
  transform: rotate(180deg) scale(0.8);
}

[data-theme="dark"] .sun-icon {
  opacity: 0;
  transform: rotate(180deg) scale(0.8);
}

[data-theme="dark"] .moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Анимация переключения */
.theme-toggle-btn.animating {
  animation: themeToggle 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes themeToggle {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.1) rotate(180deg); }
  100% { transform: scale(1) rotate(360deg); }
}

/* Темная тема для мобильных (если поддерживается) */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
  .mobile-menu {
    background: var(--bg-secondary);
    color: var(--text-primary);
  }
  
  .mobile-menu a {
    color: var(--text-secondary);
    border-bottom-color: var(--border-color);
  }
  
  .mobile-menu a:hover {
    background-color: var(--bg-tertiary);
  }
}

/* Принудительные стили для видимости кнопок */
.btn-primary {
  color: white !important;
  font-weight: 600 !important;
}

.btn-secondary {
  color: #1f2937 !important;
  font-weight: 600 !important;
  background: #f3f4f6 !important;
  border: 2px solid #d1d5db !important;
}

.btn-secondary:hover {
  color: #111827 !important;
  background: #e5e7eb !important;
}

/* Дополнительные стили для ссылок-кнопок */
a.btn-primary,
a.btn-secondary {
  text-decoration: none !important;
  display: inline-block !important;
  text-align: center !important;
}

/* Стили для модальных окон */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal.hidden {
  display: none;
}

.modal-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-box h2 {
  color: #1f2937;
  margin-bottom: 1rem;
}

.modal-box p {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

/* Анимации для модальных окон */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-box.animate-fade-in {
  animation: modalFadeIn 0.3s ease-out;
}

/* Улучшенная видимость текста */
.text-gray-800 {
  color: #1f2937 !important;
  font-weight: 500 !important;
}

.text-blue-900 {
  color: #1e3a8a !important;
  font-weight: 700 !important;
}

/* Фоновое изображение */
html {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
}

body {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
  background-image: url('/static/background.jpg') !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  min-height: 100vh !important;
}

body.min-h-screen {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
  background-image: url('/static/background.jpg') !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

/* Убеждаемся что main прозрачный */
main {
  background: transparent !important;
}

main > div {
  background: transparent !important;
}

/* Специальные стили для главной кнопки "Сделать закупку" */
button[onclick*="applyModal"] {
  position: relative;
  overflow: hidden;
  animation: pulse-glow 2s ease-in-out infinite;
}

button[onclick*="applyModal"]::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: rotate(45deg);
  animation: shine 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.5), 0 0 40px rgba(37, 99, 235, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.8), 0 0 60px rgba(37, 99, 235, 0.5);
  }
}

@keyframes shine {
  0% {
    left: -50%;
  }
  100% {
    left: 150%;
  }
}

/* Улучшенная видимость для фоновых элементов */
.bg-gradient-to-br {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(5px) !important;
}

/* Дополнительная контрастность для ссылок */
a {
  text-decoration: none !important;
  font-weight: 500 !important;
}

a:hover {
  text-decoration: underline !important;
}

/* Улучшенная видимость для модальных окон */
.modal-box h2 {
  color: #111827 !important;
  font-weight: 700 !important;
}

.modal-box p {
  color: #374151 !important;
  font-weight: 500 !important;
}

/* Улучшенная видимость для placeholder текста */
input::placeholder {
  color: #6b7280 !important;
  font-weight: 400 !important;
}

/* Улучшенная видимость для кнопок */
button {
  font-weight: 600 !important;
}

/* Улучшенная видимость для полей ввода */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"] {
  color: #111827 !important;
  font-weight: 500 !important;
  background-color: #ffffff !important;
  border: 2px solid #d1d5db !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
  outline: none !important;
}

/* Улучшенная видимость для ошибок */
.bg-red-100 {
  background-color: #fee2e2 !important;
  border-color: #fca5a5 !important;
}

.text-red-700 {
  color: #b91c1c !important;
  font-weight: 600 !important;
}

/* Специальные стили для поля Код ТН ВЭД */
#hsCode {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  background-color: #ffffff !important;
  border: 2px solid #d1d5db !important;
  color: #111827 !important;
  font-weight: 500 !important;
  width: 100% !important;
  padding: 12px 16px !important;
  border-radius: 8px !important;
  margin-bottom: 16px !important;
}

#hsCode:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
  outline: none !important;
}

#hsCode::placeholder {
  color: #6b7280 !important;
  font-weight: 400 !important;
}

/* Дополнительные стили для всех полей формы */
form input {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin-bottom: 16px !important;
}

/* Убеждаемся, что все поля видны */
input[name="product_name"],
input[name="product_link"],
input[name="quantity"],
input[name="price_cny"],
input[name="phone"],
input[name="email"],
input[name="hs_code"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  background-color: #ffffff !important;
  border: 2px solid #d1d5db !important;
  color: #111827 !important;
  font-weight: 500 !important;
  width: 100% !important;
  padding: 12px 16px !important;
  border-radius: 8px !important;
  margin-bottom: 16px !important;
}

/* Стили для label */
label {
  color: #374151 !important;
  font-weight: 600 !important;
  display: block !important;
  margin-bottom: 8px !important;
}

/* Стили для блока курса валют */
.bg-blue-50 {
  background-color: #eff6ff !important;
  border: 2px solid #bfdbfe !important;
}

.bg-blue-50 span {
  color: #1f2937 !important;
  font-weight: 600 !important;
}

#currency-rate {
  color: #111827 !important;
  font-weight: 700 !important;
  font-size: 14px !important;
}

/* Стили для блоков с уведомлениями */
.bg-green-50 {
  background-color: #f0fdf4 !important;
  border: 2px solid #bbf7d0 !important;
}

.bg-yellow-50 {
  background-color: #fefce8 !important;
  border: 2px solid #fde047 !important;
}

/* Стили для блоков расчета стоимости */
#cost-calculation {
  background-color: #f8fafc !important;
  border: 2px solid #e2e8f0 !important;
}

#cost-calculation h3 {
  color: #1f2937 !important;
  font-weight: 700 !important;
}

#cost-calculation span {
  color: #374151 !important;
}

#cost-calculation .font-semibold {
  color: #111827 !important;
  font-weight: 600 !important;
}

#cost-calculation .font-bold {
  color: #111827 !important;
  font-weight: 700 !important;
}

/* Стили для большого модального окна (расширенная форма) */
.modal-box-large {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 2rem;
  max-width: 1200px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-box-large::-webkit-scrollbar {
  width: 8px;
}

.modal-box-large::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.modal-box-large::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.modal-box-large::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Стили для секций формы */
.form-section {
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.form-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Стили для подсказок (tooltips) */
.tooltip {
  background-color: #1f2937;
  color: white;
  font-size: 0.875rem;
  line-height: 1.5;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 9999;
}

.tooltip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.tooltip-btn:hover {
  transform: scale(1.2);
}

.tooltip::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #1f2937;
}

/* Стили для select элементов */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%236b7280' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 3rem;
}

/* Стили для textarea */
textarea {
  resize: vertical;
  min-height: 60px;
}

/* Анимация для секций формы */
@keyframes sectionSlide {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-section {
  animation: sectionSlide 0.4s ease-out backwards;
}

.form-section:nth-child(1) { animation-delay: 0.05s; }
.form-section:nth-child(2) { animation-delay: 0.1s; }
.form-section:nth-child(3) { animation-delay: 0.15s; }
.form-section:nth-child(4) { animation-delay: 0.2s; }
.form-section:nth-child(5) { animation-delay: 0.25s; }
.form-section:nth-child(6) { animation-delay: 0.3s; }
.form-section:nth-child(7) { animation-delay: 0.35s; }

/* Стили для чекбоксов */
input[type="checkbox"] {
  cursor: pointer;
}

/* Адаптивность для больших форм на мобильных */
@media (max-width: 768px) {
  .modal-box-large {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    padding: 1rem;
  }
  
  .form-section {
    padding: 1rem !important;
  }
  
  .grid.md\\:grid-cols-2,
  .grid.md\\:grid-cols-3,
  .grid.md\\:grid-cols-4 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

