---
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: linear-gradient(45deg, var(--color-gold) 1px, transparent 1px), linear-gradient(-45deg, var(--color-gold) 1px, transparent 1px); background-size: 50px 50px;"
    ></div>
    
    <!-- Световые пятна -->
    <div class="absolute top-0 right-0 w-[500px] h-[500px] bg-[var(--color-gold)]/5 rounded-full blur-[150px]"></div>
    <div class="absolute bottom-0 left-0 w-[400px] h-[400px] bg-[var(--color-blue-primary)]/5 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-[var(--color-gold)] rotate-45"></span>
          <span class="text-[var(--color-gold)] 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-[var(--color-gold)]">НАЧАТЬ?</span>
        </h2>

        <!-- Описание -->
        <p class="text-[var(--color-gray-400)] text-lg mb-10 leading-relaxed">
          Оставьте заявку на бесплатную консультацию. Проанализирую вашу ситуацию 
          и расскажу о перспективах дела.
        </p>

        <!-- Телефон -->
        <button
          data-consultation-modal
          class="group flex items-center gap-4 p-6 bg-[var(--color-navy)] border border-[var(--color-gray-600)]/20 rounded-xl hover:border-[var(--color-gold)]/30 transition-all mb-8 cursor-pointer"
        >
          <div class="w-14 h-14 bg-[var(--color-gold)] rounded-lg flex items-center justify-center flex-shrink-0 group-hover:scale-110 transition-transform">
            <svg class="w-6 h-6 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 class="text-left">
            <div class="text-[var(--color-gray-500)] text-xs uppercase tracking-wider mb-1">Позвонить сейчас</div>
            <div class="text-2xl font-bold text-[var(--color-white)] group-hover:text-[var(--color-gold)] transition-colors">{CONTACT_CONSTANTS.phone}</div>
          </div>
        </button>

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

        <!-- Гарантия -->
        <div class="mt-10 flex items-start gap-4 p-4 bg-[var(--color-gold)]/5 border border-[var(--color-gold)]/10">
          <div class="w-10 h-10 bg-[var(--color-gold)]/10 flex items-center justify-center flex-shrink-0">
            <svg class="w-5 h-5 text-[var(--color-gold)]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
              <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"></path>
            </svg>
          </div>
          <div>
            <div class="text-[var(--color-white)] font-bold text-sm mb-1">Конфиденциальность гарантирована</div>
            <div class="text-[var(--color-gray-500)] text-xs">Вся информация защищена адвокатской тайной</div>
          </div>
        </div>
      </div>

      <!-- Правая часть - форма -->
      <div class="relative">
        <!-- Фоновое свечение -->
        <div class="absolute -inset-4 bg-[var(--color-gold)]/5 rounded-2xl blur-2xl"></div>
        
        <!-- Форма -->
        <div class="relative bg-[var(--color-navy)] border border-[var(--color-gray-600)]/10 p-8">
          <h3 class="text-2xl font-bold text-[var(--color-white)] mb-2">Заявка на консультацию</h3>
          <p class="text-[var(--color-gray-500)] text-sm mb-6">Заполните форму — перезвоню в течение 15 минут</p>

          <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-[var(--color-gold)] focus:outline-none transition-colors"
              />
            </div>
            <div>
              <input
                type="tel"
                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-[var(--color-gold)] 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-[var(--color-gold)] focus:outline-none transition-colors">
                <option value="">Выберите тип дела</option>
                <option>Договорные споры</option>
                <option>Корпоративные споры</option>
                <option>Банкротство</option>
                <option>Налоговые споры</option>
                <option>Недвижимость и земля</option>
                <option>Госзакупки</option>
                <option>Другое</option>
              </select>
            </div>
            <div>
              <textarea
                placeholder="Краткое описание ситуации"
                rows="4"
                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-[var(--color-gold)] focus:outline-none transition-colors resize-none"
              ></textarea>
            </div>

            <button
              type="submit"
              class="w-full py-4 bg-[var(--color-gold)] hover:bg-[var(--color-gold-hover)] text-[var(--color-white)] font-bold rounded-lg transition-all hover:shadow-[0_0_30px_rgba(191,155,88,0.4)] flex items-center justify-center gap-3 group"
            >
              <span>Отправить заявку</span>
              <svg class="w-5 h-5 group-hover:translate-x-1 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14 5l7 7m0 0l-7 7m7-7H3"></path>
              </svg>
            </button>

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