---
import { CONTACT_CONSTANTS } from "@constants/constants.ts";
import SocialIcons from "@components/base/SocialIcons.astro";
---

<section id="contact" class="py-24 bg-[var(--color-navy-dark)] relative overflow-hidden">
  <!-- Декоративные элементы -->
  <div class="absolute inset-0">
    <!-- Градиент -->
    <div class="absolute inset-0 bg-gradient-to-br from-[var(--color-navy)] via-[var(--color-navy)]/95 to-[var(--color-navy-dark)]"></div>
    
    <!-- Сетка -->
    <div 
      class="absolute inset-0 opacity-[0.02]"
      style="background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, var(--color-gold) 2px, transparent 3px); background-size: 80px 80px;"
    ></div>
    
    <!-- Световые пятна -->
    <div class="absolute top-0 right-0 w-[600px] h-[600px] bg-gradient-to-bl from-red-900/20 to-transparent rounded-full blur-[150px]"></div>
    <div class="absolute bottom-0 left-0 w-[500px] h-[500px] bg-gradient-to-tr from-[var(--color-gold)]/5 to-transparent rounded-full blur-[120px]"></div>
  </div>

  <div class="container mx-auto px-4 md:px-8 lg:px-16 relative z-10">
    <div class="grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-20 items-center">
      
      <!-- Левая часть - заголовок и контакты -->
      <div>
        <!-- Бейдж с пульсацией -->
        <div class="inline-flex items-center gap-3 mb-8">
          <span class="w-3 h-3 bg-red-600 rotate-45 animate-pulse"></span>
          <span class="text-red-500 text-xs font-bold uppercase tracking-[0.2em]">
            Круглосуточно
          </span>
        </div>

        <!-- Заголовок -->
        <h2 class="text-4xl md:text-5xl lg:text-6xl font-bold text-[var(--color-white)] mb-6 leading-[0.95]">
          НУЖНА<br />
          <span class="text-red-500">СРОЧНАЯ</span><br />
          ПОМОЩЬ?
        </h2>

        <!-- Описание -->
        <p class="text-[var(--color-gray-400)] text-lg mb-10 leading-relaxed">
          В уголовном процессе время работает против вас. 
          Каждый час может повлиять на исход дела.
        </p>

        <!-- Телефон с акцентом -->
        <a
          href={CONTACT_CONSTANTS.phoneHref}
          class="group flex items-center gap-4 p-6 bg-red-600/10 border border-red-600/30 hover:border-red-600/50 transition-all mb-8 rounded-xl"
        >
          <div class="w-16 h-16 bg-red-600 rounded-lg flex items-center justify-center flex-shrink-0 group-hover:scale-110 transition-transform">
            <svg class="w-7 h-7 text-[var(--color-white)]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
              <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"></path>
            </svg>
          </div>
          <div>
            <div class="text-red-400 text-xs uppercase tracking-wider mb-1">Телефон доверия 24/7</div>
            <div class="text-2xl font-bold text-[var(--color-white)] group-hover:text-red-400 transition-colors">{CONTACT_CONSTANTS.phone}</div>
          </div>
        </a>

        <!-- Преимущества -->
        <div class="space-y-4 mb-8">
          <div class="flex items-center gap-3">
            <svg class="w-5 h-5 text-red-500 flex-shrink-0" fill="currentColor" viewBox="0 0 24 24">
              <path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/>
            </svg>
            <span class="text-[var(--color-gray-400)] text-sm">Выезд в СИЗО, ИВС, суд — круглосуточно</span>
          </div>
          <div class="flex items-center gap-3">
            <svg class="w-5 h-5 text-red-500 flex-shrink-0" fill="currentColor" viewBox="0 0 24 24">
              <path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/>
            </svg>
            <span class="text-[var(--color-gray-400)] text-sm">Конфиденциальность гарантирована</span>
          </div>
          <div class="flex items-center gap-3">
            <svg class="w-5 h-5 text-red-500 flex-shrink-0" fill="currentColor" viewBox="0 0 24 24">
              <path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/>
            </svg>
            <span class="text-[var(--color-gray-400)] text-sm">Оплата поэтапно — без риска</span>
          </div>
        </div>

        <!-- Мессенджеры -->
        <div class="flex items-center gap-4">
          <span class="text-[var(--color-gray-500)] text-sm">Или напишите:</span>
          <SocialIcons variant="messenger" />
        </div>
      </div>

      <!-- Правая часть - форма -->
      <div class="relative">
        <!-- Фоновое свечение -->
        <div class="absolute -inset-4 bg-red-600/10 rounded-2xl blur-2xl"></div>
        
        <!-- Форма -->
        <div class="relative bg-[var(--color-navy)] border border-red-600/20 p-8 rounded-xl">
          <!-- Заголовок формы -->
          <div class="flex items-center gap-3 mb-6">
            <div class="w-10 h-10 bg-red-600/10 rounded-lg flex items-center justify-center">
              <svg class="w-5 h-5 text-red-500 animate-pulse" fill="currentColor" viewBox="0 0 24 24">
                <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>
              </svg>
            </div>
            <div>
              <h3 class="text-xl font-bold text-[var(--color-white)]">Экстренная консультация</h3>
              <p class="text-[var(--color-gray-500)] text-xs">Перезвоню в течение 5 минут</p>
            </div>
          </div>

          <form class="space-y-4" onsubmit="event.preventDefault(); alert('Заявка отправлена!');">
            <div>
              <input
                type="text"
                placeholder="Ваше имя"
                class="w-full px-4 py-4 bg-[var(--color-navy-dark)] border border-[var(--color-gray-600)]/20 rounded-lg text-[var(--color-white)] placeholder-[var(--color-gray-600)] focus:border-red-600 focus:outline-none transition-colors"
              />
            </div>
            <div>
              <input
                type="tel"
                placeholder="Телефон *"
                required
                class="w-full px-4 py-4 bg-[var(--color-navy-dark)] border border-[var(--color-gray-600)]/20 rounded-lg text-[var(--color-white)] placeholder-[var(--color-gray-600)] focus:border-red-600 focus:outline-none transition-colors"
              />
            </div>
            <div>
              <select class="w-full px-4 py-4 bg-[var(--color-navy-dark)] border border-[var(--color-gray-600)]/20 rounded-lg text-[var(--color-gray-400)] focus:border-red-600 focus:outline-none transition-colors">
                <option value="">Ситуация</option>
                <option>Задержание</option>
                <option>Допрос</option>
                <option>Обыск</option>
                <option>Предъявлено обвинение</option>
                <option>Суд</option>
                <option>Другое</option>
              </select>
            </div>
            <div>
              <textarea
                placeholder="Кратко опишите ситуацию (необязательно)"
                rows="3"
                class="w-full px-4 py-4 bg-[var(--color-navy-dark)] border border-[var(--color-gray-600)]/20 rounded-lg text-[var(--color-white)] placeholder-[var(--color-gray-600)] focus:border-red-600 focus:outline-none transition-colors resize-none"
              ></textarea>
            </div>

            <button
              type="submit"
              class="w-full py-4 bg-red-600 hover:bg-red-700 text-[var(--color-white)] font-bold rounded-lg transition-all hover:shadow-[0_0_30px_rgba(220,38,38,0.5)] flex items-center justify-center gap-3 group"
            >
              <svg class="w-5 h-5 group-hover:scale-110 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path>
              </svg>
              <span>Срочный вызов адвоката</span>
            </button>

            <p class="text-xs text-[var(--color-gray-600)] text-center">
              Нажимая кнопку, вы соглашаетесь с политикой конфиденциальности
            </p>
          </form>

          <!-- Гарантия -->
          <div class="mt-6 pt-6 border-t border-[var(--color-gray-600)]/20 flex items-center gap-3">
            <svg class="w-5 h-5 text-red-500 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
              <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path>
            </svg>
            <span class="text-[var(--color-gray-500)] text-xs">Адвокатская тайна гарантирована</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>
