<section id="contact" class="py-32 bg-gradient-to-br from-gray-50 to-white">
  <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
    <div class="text-center mb-20" data-aos="fade-up">
      <h2 class="text-5xl font-bold text-gray-900 mb-6">
        {{ sections.contact.title }}
      </h2>
      <p class="text-xl text-gray-600 max-w-3xl mx-auto">
        {{ sections.contact.subtitle }}
      </p>
    </div>
    
    <div class="grid lg:grid-cols-2 gap-16">
      <div class="space-y-8" data-aos="fade-right">
        {% if sections.contact.contactMethods %}
        <div class="space-y-6">
          {% for method in sections.contact.contactMethods %}
          <div class="group flex items-start gap-6 p-6 bg-white rounded-2xl shadow-sm hover:shadow-md transition-all duration-300 border border-gray-100">
            <div class="w-14 h-14 bg-gradient-to-br from-primary to-secondary rounded-xl flex items-center justify-center shadow-lg group-hover:scale-110 transition-transform duration-300">
              <i class="{{ method.icon | default('ri-phone-line') }} text-white text-xl"></i>
            </div>
            
            <div>
              <h3 class="text-lg font-bold text-gray-900 mb-1">{{ method.title }}</h3>
              <p class="text-gray-600 mb-2">{{ method.description }}</p>
              <div class="font-semibold text-primary">{{ method.value }}</div>
            </div>
          </div>
          {% endfor %}
        </div>
        {% endif %}
        
        {% if sections.contact.info %}
        <div class="grid gap-6">
          {% for info in sections.contact.info %}
          <div class="p-6 bg-white rounded-2xl shadow-sm border border-gray-100 hover:shadow-md transition-shadow duration-300" data-aos="zoom-in" data-aos-delay="{{ loop.index0 * 100 }}">
            <div class="flex items-start gap-4">
              <div class="w-12 h-12 bg-primary/10 rounded-xl flex items-center justify-center">
                <i class="{{ info.icon | default('ri-map-pin-line') }} text-primary text-lg"></i>
              </div>
              
              <div>
                <h3 class="font-bold text-gray-900 mb-2">{{ info.title }}</h3>
                {% for detail in info.details %}
                <p class="text-gray-600 text-sm">{{ detail }}</p>
                {% endfor %}
              </div>
            </div>
          </div>
          {% endfor %}
        </div>
        {% endif %}
      </div>
      
      <div data-aos="fade-left">
        <div class="relative">
          <div class="absolute -inset-4 bg-gradient-to-r from-primary/20 to-secondary/20 blur-2xl opacity-30"></div>
          
          <div class="relative bg-white p-10 rounded-3xl shadow-xl border border-gray-100">
            <h3 class="text-2xl font-bold text-gray-900 mb-8">Get in Touch</h3>
            
            {% if sections.contact.form %}
            <form class="space-y-6">
              {% for field in sections.contact.form.fields %}
              <div>
                <label for="{{ field.name }}" class="block text-sm font-semibold text-gray-700 mb-2">
                  {{ field.label }}{% if field.required %} <span class="text-red-500">*</span>{% endif %}
                </label>
                
                {% if field.type == 'textarea' %}
                <textarea 
                  id="{{ field.name }}" 
                  name="{{ field.name }}" 
                  rows="4" 
                  class="w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:ring-4 focus:ring-primary/20 focus:border-primary transition-all duration-300 bg-gray-50 focus:bg-white"
                  placeholder="{{ field.placeholder }}"
                  {% if field.required %}required{% endif %}
                  {% if field.maxLength %}maxlength="{{ field.maxLength }}"{% endif %}></textarea>
                
                {% elif field.type == 'select' %}
                <select 
                  id="{{ field.name }}" 
                  name="{{ field.name }}" 
                  class="w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:ring-4 focus:ring-primary/20 focus:border-primary transition-all duration-300 bg-gray-50 focus:bg-white"
                  {% if field.required %}required{% endif %}>
                  {% for option in field.options %}
                  <option value="{{ option.value }}">{{ option.label }}</option>
                  {% endfor %}
                </select>
                
                {% else %}
                <input 
                  type="{{ field.type }}" 
                  id="{{ field.name }}" 
                  name="{{ field.name }}" 
                  class="w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:ring-4 focus:ring-primary/20 focus:border-primary transition-all duration-300 bg-gray-50 focus:bg-white"
                  placeholder="{{ field.placeholder }}"
                  {% if field.required %}required{% endif %}>
                {% endif %}
              </div>
              {% endfor %}
              
              <button type="submit" 
                      class="w-full bg-gradient-to-r from-primary to-secondary text-white py-4 rounded-xl font-bold shadow-lg hover:shadow-xl transform hover:scale-105 transition-all duration-300">
                {{ sections.contact.form.submitText }}
              </button>
            </form>
            {% endif %}
          </div>
        </div>
      </div>
    </div>
  </div>
</section>