{{-- resources/views/customer/agency/sections/contact.blade.php --}}
<section class="contact-section" id="contact">
    <div class="contact-background">
        <div class="gradient-circle circle-1"></div>
        <div class="gradient-circle circle-2"></div>
    </div>

    <div class="container">
        <div class="contact-grid">
            <div class="contact-info" data-aos="fade-right" data-aos-duration="800">
                @if($section->subtitle)
                    <div class="section-badge">
                        <span class="badge-icon">📧</span>
                        <span>{{ $section->subtitle }}</span>
                    </div>
                @endif

                @if($section->title)
                    <h2 class="section-title">{{ $section->title }}</h2>
                @endif

                @if($section->content)
                    <p class="section-description">{{ $section->content }}</p>
                @endif

                <div class="contact-cards">
                    @if($agency->contact_phone)
                        <div class="contact-card" data-aos="fade-up" data-aos-delay="100" data-aos-duration="600">
                            <div class="card-icon phone">
                                <i class="fas fa-phone"></i>
                            </div>
                            <div class="card-content">
                                <h4>Telefon</h4>
                                <a href="tel:{{ $agency->contact_phone }}">{{ $agency->contact_phone }}</a>
                            </div>
                        </div>
                    @endif

                    @if($agency->contact_email)
                        <div class="contact-card" data-aos="fade-up" data-aos-delay="200" data-aos-duration="600">
                            <div class="card-icon email">
                                <i class="fas fa-envelope"></i>
                            </div>
                            <div class="card-content">
                                <h4>E-posta</h4>
                                <a href="mailto:{{ $agency->contact_email }}">{{ $agency->contact_email }}</a>
                            </div>
                        </div>
                    @endif

                    @if($agency->contact_address)
                        <div class="contact-card" data-aos="fade-up" data-aos-delay="300" data-aos-duration="600">
                            <div class="card-icon address">
                                <i class="fas fa-map-marker-alt"></i>
                            </div>
                            <div class="card-content">
                                <h4>Adres</h4>
                                <p>{{ $agency->contact_address }}</p>
                            </div>
                        </div>
                    @endif
                </div>

                @if($agency->facebook_url || $agency->instagram_url || $agency->twitter_url)
                    <div class="social-links">
                        <h4>Sosyal Medya</h4>
                        <div class="social-icons">
                            @if($agency->facebook_url)
                                <a href="{{ $agency->facebook_url }}" target="_blank" class="social-icon facebook">
                                    <i class="fab fa-facebook-f"></i>
                                </a>
                            @endif
                            @if($agency->instagram_url)
                                <a href="{{ $agency->instagram_url }}" target="_blank" class="social-icon instagram">
                                    <i class="fab fa-instagram"></i>
                                </a>
                            @endif
                            @if($agency->twitter_url)
                                <a href="{{ $agency->twitter_url }}" target="_blank" class="social-icon twitter">
                                    <i class="fab fa-twitter"></i>
                                </a>
                            @endif
                        </div>
                    </div>
                @endif
            </div>

            <div class="contact-form-wrapper" data-aos="fade-left" data-aos-duration="800">
                <div class="form-card">
                    <div class="form-header">
                        <h3>Mesaj Gönderin</h3>
                        <p>Size en kısa sürede dönüş yapacağız</p>
                    </div>

                    <form action="{{ route('customer.contact.submit') }}" method="POST" class="contact-form">
                        @csrf
                        <div class="form-group">
                            <label for="name">
                                <i class="fas fa-user"></i>
                                <span>Ad Soyad</span>
                            </label>
                            <input type="text" id="name" name="name" required placeholder="Adınız ve soyadınız">
                        </div>

                        <div class="form-group">
                            <label for="email">
                                <i class="fas fa-envelope"></i>
                                <span>E-posta</span>
                            </label>
                            <input type="email" id="email" name="email" required placeholder="ornek@email.com">
                        </div>

                        <div class="form-group">
                            <label for="phone">
                                <i class="fas fa-phone"></i>
                                <span>Telefon</span>
                            </label>
                            <input type="tel" id="phone" name="phone" placeholder="5XX XXX XX XX">
                        </div>

                        <div class="form-group">
                            <label for="message">
                                <i class="fas fa-comment"></i>
                                <span>Mesajınız</span>
                            </label>
                            <textarea id="message" name="message" rows="5" required placeholder="Mesajınızı buraya yazın..."></textarea>
                        </div>

                        <button type="submit" class="submit-button">
                            <span>Mesaj Gönder</span>
                            <i class="fas fa-paper-plane"></i>
                            <div class="button-shine"></div>
                        </button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</section>

<style>
    .contact-section {
        position: relative;
        padding: 8rem 0;
        background: linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 50%, #FFFFFF 100%);
        overflow: hidden;
    }

    .contact-background {
        position: absolute;
        inset: 0;
        overflow: hidden;
        pointer-events: none;
    }

    .gradient-circle {
        position: absolute;
        border-radius: 50%;
        filter: blur(100px);
        opacity: 0.12;
        animation: floatCircle 20s ease-in-out infinite;
    }

    .circle-1 {
        width: 500px;
        height: 500px;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        top: -150px;
        left: -150px;
    }

    .circle-2 {
        width: 400px;
        height: 400px;
        background: linear-gradient(135deg, var(--secondary), var(--accent));
        bottom: -100px;
        right: -100px;
        animation-delay: 5s;
    }

    @keyframes floatCircle {
        0%, 100% { transform: translate(0, 0); }
        50% { transform: translate(30px, 30px); }
    }

    .container {
        position: relative;
        z-index: 1;
    }

    .contact-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 5rem;
        align-items: start;
    }

    .contact-info {
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
    }

    .section-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.625rem 1.25rem;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
        border-radius: 50px;
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--primary);
        width: fit-content;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

    .badge-icon {
        font-size: 1rem;
    }

    .section-title {
        font-size: 3rem;
        font-weight: 800;
        line-height: 1.2;
        color: #111827;
        margin: 0;
    }

    .section-description {
        font-size: 1.125rem;
        line-height: 1.8;
        color: #6B7280;
        margin: 0;
    }

    .contact-cards {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .contact-card {
        display: flex;
        align-items: flex-start;
        gap: 1.25rem;
        padding: 1.5rem;
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(20px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.5);
        border-radius: 16px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
        transition: all 0.3s ease;
    }

    .contact-card:hover {
        transform: translateX(8px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    }

    .card-icon {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        color: white;
        font-size: 1.375rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .card-icon.phone {
        background: linear-gradient(135deg, var(--primary), var(--secondary));
    }

    .card-icon.email {
        background: linear-gradient(135deg, var(--secondary), var(--accent));
    }

    .card-icon.address {
        background: linear-gradient(135deg, var(--accent), var(--primary));
    }

    .card-content h4 {
        font-size: 1rem;
        font-weight: 600;
        color: #111827;
        margin: 0 0 0.375rem 0;
    }

    .card-content a {
        color: var(--primary);
        font-size: 1.125rem;
        font-weight: 600;
        text-decoration: none;
        transition: color 0.3s ease;
    }

    .card-content a:hover {
        color: var(--secondary);
    }

    .card-content p {
        color: #6B7280;
        font-size: 1rem;
        line-height: 1.6;
        margin: 0;
    }

    .social-links {
        padding-top: 1rem;
    }

    .social-links h4 {
        font-size: 1.125rem;
        font-weight: 700;
        color: #111827;
        margin: 0 0 1rem 0;
    }

    .social-icons {
        display: flex;
        gap: 1rem;
    }

    .social-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.25rem;
        text-decoration: none;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .social-icon.facebook {
        background: #1877F2;
    }

    .social-icon.instagram {
        background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF);
    }

    .social-icon.twitter {
        background: #1DA1F2;
    }

    .social-icon:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    }

    .contact-form-wrapper {
        position: sticky;
        top: 100px;
    }

    .form-card {
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(20px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.5);
        padding: 3rem;
        border-radius: 24px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    }

    .form-header {
        text-align: center;
        margin-bottom: 2.5rem;
    }

    .form-header h3 {
        font-size: 2rem;
        font-weight: 800;
        color: #111827;
        margin: 0 0 0.5rem 0;
    }

    .form-header p {
        font-size: 1rem;
        color: #6B7280;
        margin: 0;
    }

    .contact-form {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .form-group {
        display: flex;
        flex-direction: column;
        gap: 0.625rem;
    }

    .form-group label {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-weight: 600;
        color: #374151;
        font-size: 0.9375rem;
    }

    .form-group label i {
        color: var(--primary);
        font-size: 1rem;
    }

    .form-group input,
    .form-group textarea {
        width: 100%;
        padding: 1rem 1.25rem;
        border: 2px solid #E5E7EB;
        border-radius: 12px;
        font-size: 1rem;
        font-family: inherit;
        transition: all 0.3s ease;
        background: white;
    }

    .form-group input:focus,
    .form-group textarea:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 10%, transparent);
    }

    .form-group textarea {
        resize: vertical;
        min-height: 120px;
    }

    .submit-button {
        position: relative;
        width: 100%;
        padding: 1.25rem;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        color: white;
        border: none;
        border-radius: 12px;
        font-weight: 700;
        font-size: 1.125rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.625rem;
        transition: all 0.3s ease;
        box-shadow: 0 4px 16px color-mix(in srgb, var(--primary) 35%, transparent);
        overflow: hidden;
        z-index: 1;
    }

    .submit-button::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, var(--secondary), var(--primary));
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: -1;
    }

    .submit-button:hover::before {
        opacity: 1;
    }

    .submit-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 45%, transparent);
    }

    .submit-button span,
    .submit-button i {
        position: relative;
        z-index: 1;
    }

    .submit-button i {
        transition: transform 0.3s ease;
    }

    .submit-button:hover i {
        transform: translateX(4px);
    }

    .button-shine {
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent
        );
        transform: translateX(-100%);
    }

    .submit-button:hover .button-shine {
        animation: shine 0.8s ease;
    }

    @keyframes shine {
        to { transform: translateX(100%); }
    }

    @media (max-width: 1024px) {
        .contact-section {
            padding: 6rem 0;
        }

        .contact-grid {
            gap: 4rem;
        }

        .section-title {
            font-size: 2.5rem;
        }

        .contact-form-wrapper {
            position: static;
        }
    }

    @media (max-width: 768px) {
        .contact-section {
            padding: 4rem 0;
        }

        .contact-grid {
            grid-template-columns: 1fr;
            gap: 3rem;
        }

        .section-title {
            font-size: 2rem;
        }

        .section-description {
            font-size: 1rem;
        }

        .form-card {
            padding: 2rem 1.5rem;
        }

        .form-header h3 {
            font-size: 1.5rem;
        }
    }
</style>

<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
    if (typeof AOS !== 'undefined') {
        AOS.init({
            once: true,
            duration: 800,
            easing: 'ease-out-cubic'
        });
    }
</script>
