{{-- resources/views/customer/agency/sections/cta.blade.php --}}
<section class="cta-section" id="cta">
    <div class="cta-background">
        <div class="gradient-mesh"></div>
        <div class="animated-shapes">
            <div class="shape shape-1"></div>
            <div class="shape shape-2"></div>
            <div class="shape shape-3"></div>
            <div class="shape shape-4"></div>
        </div>
        <div class="pattern-overlay"></div>
    </div>

    <div class="container">
        <div class="cta-content" data-aos="fade-up" data-aos-duration="1000">
            @if($section->getConfig('icon'))
                <div class="cta-icon-wrapper">
                    <div class="icon-pulse"></div>
                    <div class="icon-circle">
                        <i class="{{ $section->getConfig('icon') }}"></i>
                    </div>
                </div>
            @endif

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

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

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

            <div class="cta-buttons">
                @if($section->getConfig('primary_button_text'))
                    <a href="{{ $section->getConfig('primary_button_url') ?? '#' }}" class="cta-button primary">
                        <span>{{ $section->getConfig('primary_button_text') }}</span>
                        <i class="fas fa-arrow-right"></i>
                        <div class="button-shine"></div>
                    </a>
                @endif

                @if($section->getConfig('secondary_button_text'))
                    <a href="{{ $section->getConfig('secondary_button_url') ?? '#' }}" class="cta-button secondary">
                        <span>{{ $section->getConfig('secondary_button_text') }}</span>
                        <i class="fas fa-phone"></i>
                    </a>
                @endif
            </div>

            @if($section->getConfig('show_stats', true))
                <div class="cta-stats" data-aos="fade-up" data-aos-delay="200" data-aos-duration="1000">
                    <div class="stat-item">
                        <div class="stat-value">{{ $section->getConfig('stat1_value', '500+') }}</div>
                        <div class="stat-label">{{ $section->getConfig('stat1_label', 'Mutlu Müşteri') }}</div>
                    </div>
                    <div class="stat-divider"></div>
                    <div class="stat-item">
                        <div class="stat-value">{{ $section->getConfig('stat2_value', '50+') }}</div>
                        <div class="stat-label">{{ $section->getConfig('stat2_label', 'Tur Rotası') }}</div>
                    </div>
                    <div class="stat-divider"></div>
                    <div class="stat-item">
                        <div class="stat-value">{{ $section->getConfig('stat3_value', '20+') }}</div>
                        <div class="stat-label">{{ $section->getConfig('stat3_label', 'Yıllık Tecrübe') }}</div>
                    </div>
                </div>
            @endif
        </div>
    </div>
</section>

<style>
    .cta-section {
        position: relative;
        padding: 10rem 0;
        overflow: hidden;
        background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
    }

    .cta-background {
        position: absolute;
        inset: 0;
        overflow: hidden;
    }

    .gradient-mesh {
        position: absolute;
        inset: 0;
        background:
            radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
            radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
            radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
        animation: gradientShift 15s ease-in-out infinite;
    }

    @keyframes gradientShift {
        0%, 100% { opacity: 1; transform: scale(1); }
        50% { opacity: 0.8; transform: scale(1.1); }
    }

    .animated-shapes {
        position: absolute;
        inset: 0;
    }

    .shape {
        position: absolute;
        border-radius: 50%;
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
        filter: blur(40px);
        animation: floatShape 20s ease-in-out infinite;
    }

    .shape-1 {
        width: 400px;
        height: 400px;
        top: -100px;
        left: -100px;
        animation-delay: 0s;
    }

    .shape-2 {
        width: 300px;
        height: 300px;
        top: 50%;
        right: -50px;
        animation-delay: 5s;
    }

    .shape-3 {
        width: 250px;
        height: 250px;
        bottom: -50px;
        left: 30%;
        animation-delay: 10s;
    }

    .shape-4 {
        width: 350px;
        height: 350px;
        top: 20%;
        left: 50%;
        animation-delay: 15s;
    }

    @keyframes floatShape {
        0%, 100% { transform: translate(0, 0) scale(1); }
        33% { transform: translate(50px, -50px) scale(1.1); }
        66% { transform: translate(-50px, 50px) scale(0.9); }
    }

    .pattern-overlay {
        position: absolute;
        inset: 0;
        background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23ffffff" fill-opacity="0.03"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
        opacity: 0.3;
    }

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

    .cta-content {
        text-align: center;
        max-width: 900px;
        margin: 0 auto;
        color: white;
    }

    .cta-icon-wrapper {
        position: relative;
        width: 120px;
        height: 120px;
        margin: 0 auto 2.5rem;
    }

    .icon-pulse {
        position: absolute;
        inset: 0;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--accent), var(--primary));
        opacity: 0.3;
        animation: pulse 2s ease-in-out infinite;
    }

    @keyframes pulse {
        0%, 100% { transform: scale(1); opacity: 0.3; }
        50% { transform: scale(1.3); opacity: 0; }
    }

    .icon-circle {
        position: relative;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, var(--accent), var(--primary));
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 20px 60px rgba(245, 158, 11, 0.4);
        animation: iconFloat 3s ease-in-out infinite;
    }

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

    .icon-circle i {
        font-size: 3rem;
        color: white;
    }

    .cta-title {
        font-size: 3.5rem;
        font-weight: 900;
        line-height: 1.2;
        margin: 0 0 1.5rem 0;
        background: linear-gradient(135deg, #FFFFFF, #E0E7FF);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .cta-subtitle {
        font-size: 1.5rem;
        font-weight: 600;
        opacity: 0.95;
        margin: 0 0 1rem 0;
        color: var(--accent);
    }

    .cta-description {
        font-size: 1.125rem;
        line-height: 1.8;
        opacity: 0.85;
        margin: 0 0 3rem 0;
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }

    .cta-buttons {
        display: flex;
        gap: 1.5rem;
        justify-content: center;
        flex-wrap: wrap;
        margin-bottom: 5rem;
    }

    .cta-button {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 0.75rem;
        padding: 1.25rem 3rem;
        border-radius: 50px;
        font-weight: 700;
        font-size: 1.125rem;
        text-decoration: none;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
        z-index: 1;
    }

    .cta-button.primary {
        background: linear-gradient(135deg, var(--accent), var(--primary));
        color: white;
        box-shadow: 0 10px 40px rgba(245, 158, 11, 0.4);
    }

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

    .cta-button.primary:hover::before {
        opacity: 1;
    }

    .cta-button.primary:hover {
        transform: translateY(-4px);
        box-shadow: 0 15px 50px rgba(245, 158, 11, 0.5);
    }

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

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

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

    .cta-button.secondary {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 2px solid rgba(255, 255, 255, 0.3);
        color: white;
    }

    .cta-button.secondary:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.5);
        transform: translateY(-4px);
        box-shadow: 0 10px 40px rgba(255, 255, 255, 0.2);
    }

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

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

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

    .cta-stats {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 3rem;
        padding-top: 3rem;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        flex-wrap: wrap;
    }

    .stat-item {
        text-align: center;
    }

    .stat-value {
        font-size: 3rem;
        font-weight: 900;
        background: linear-gradient(135deg, var(--accent), var(--primary));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 0.5rem;
        line-height: 1;
    }

    .stat-label {
        font-size: 1.125rem;
        opacity: 0.85;
        font-weight: 500;
    }

    .stat-divider {
        width: 1px;
        height: 60px;
        background: linear-gradient(180deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent
        );
    }

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

        .cta-title {
            font-size: 3rem;
        }

        .cta-subtitle {
            font-size: 1.25rem;
        }
    }

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

        .cta-icon-wrapper {
            width: 90px;
            height: 90px;
        }

        .icon-circle i {
            font-size: 2.25rem;
        }

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

        .cta-subtitle {
            font-size: 1.125rem;
        }

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

        .cta-buttons {
            flex-direction: column;
            align-items: stretch;
            gap: 1rem;
            margin-bottom: 3rem;
        }

        .cta-button {
            justify-content: center;
        }

        .cta-stats {
            flex-direction: column;
            gap: 2rem;
        }

        .stat-divider {
            width: 60px;
            height: 1px;
            background: linear-gradient(90deg,
                transparent,
                rgba(255, 255, 255, 0.3),
                transparent
            );
        }

        .stat-value {
            font-size: 2.5rem;
        }

        .stat-label {
            font-size: 1rem;
        }
    }
</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: 1000,
            easing: 'ease-out-cubic'
        });
    }
</script>
