@{
    ViewData["Title"] = ViewBag.Title ?? "Obrigado!";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section Head {
    <!-- Conversion tracking pixel -->
    <script>
        // Facebook Pixel
        if (typeof fbq !== 'undefined') {
            fbq('track', 'Lead');
        }

        // Google Analytics
        if (typeof gtag !== 'undefined') {
            gtag('event', 'conversion', {
                'send_to': 'AW-CONVERSION_ID/CONVERSION_LABEL',
                'value': 1.0,
                'currency': 'BRL'
            });
        }

        // Custom conversion tracking
        if (window.analytics) {
            window.analytics.sendEvent({
                event: 'conversion_page_view',
                page: 'thank-you',
                language: '@ViewBag.Language'
            });
        }
    </script>
}

<div class="thank-you-page py-5">
    <div class="container">
        <div class="row justify-content-center text-center">
            <div class="col-lg-8">
                <div class="thank-you-content" data-aos="fade-up">
                    <!-- Success Icon -->
                    <div class="success-icon mb-4">
                        <i class="fas fa-check-circle fa-5x text-success"></i>
                    </div>

                    <!-- Main Message -->
                    <h1 class="display-4 fw-bold mb-4 text-success">
                        @ViewBag.SuccessTitle
                    </h1>

                    <p class="lead mb-4">
                        @ViewBag.SuccessMessage
                    </p>

                    <!-- What Happens Next -->
                    <div class="next-steps bg-light rounded-3 p-4 mb-5" data-aos="fade-up" data-aos-delay="200">
                        <h3 class="h4 fw-bold mb-3">@ViewBag.NextStepsTitle</h3>
                        <div class="row g-4">
                            <div class="col-md-4">
                                <div class="step-item">
                                    <div class="step-icon mb-3">
                                        <i class="fas fa-phone fa-2x text-primary"></i>
                                    </div>
                                    <h5 class="fw-bold">@ViewBag.Step1Title</h5>
                                    <p class="mb-0">@ViewBag.Step1Description</p>
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="step-item">
                                    <div class="step-icon mb-3">
                                        <i class="fas fa-calendar fa-2x text-primary"></i>
                                    </div>
                                    <h5 class="fw-bold">@ViewBag.Step2Title</h5>
                                    <p class="mb-0">@ViewBag.Step2Description</p>
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="step-item">
                                    <div class="step-icon mb-3">
                                        <i class="fas fa-rocket fa-2x text-primary"></i>
                                    </div>
                                    <h5 class="fw-bold">@ViewBag.Step3Title</h5>
                                    <p class="mb-0">@ViewBag.Step3Description</p>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- Contact Information -->
                    <div class="contact-info mb-5" data-aos="fade-up" data-aos-delay="400">
                        <h3 class="h4 fw-bold mb-3">@ViewBag.ContactInfoTitle</h3>
                        <div class="row justify-content-center">
                            <div class="col-md-6">
                                <div class="contact-item d-flex align-items-center mb-3">
                                    <i class="fas fa-envelope fa-lg text-primary me-3"></i>
                                    <div>
                                        <strong>E-mail:</strong><br>
                                        <a href="mailto:@ViewBag.ContactEmail">@ViewBag.ContactEmail</a>
                                    </div>
                                </div>
                                <div class="contact-item d-flex align-items-center mb-3">
                                    <i class="fas fa-phone fa-lg text-primary me-3"></i>
                                    <div>
                                        <strong>Telefone:</strong><br>
                                        <a href="tel:@ViewBag.ContactPhone">@ViewBag.ContactPhone</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- Social Proof -->
                    <div class="social-proof mb-5" data-aos="fade-up" data-aos-delay="600">
                        <div class="d-flex justify-content-center align-items-center flex-wrap gap-3">
                            <div class="stars text-warning">
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                            </div>
                            <span class="fw-bold">@ViewBag.TestimonialsCount</span>
                        </div>
                    </div>

                    <!-- Action Buttons -->
                    <div class="action-buttons" data-aos="fade-up" data-aos-delay="800">
                        <a href="@ViewBag.HomeUrl" class="btn btn-primary btn-lg me-3">
                            <i class="fas fa-home me-2"></i>
                            @ViewBag.BackToHomeText
                        </a>

                        @if (!string.IsNullOrEmpty(ViewBag.WhatsAppNumber as string))
                        {
                            <a href="https://wa.me/@ViewBag.WhatsAppNumber" target="_blank" class="btn btn-success btn-lg">
                                <i class="fab fa-whatsapp me-2"></i>
                                @ViewBag.WhatsAppText
                            </a>
                        }
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

@section Scripts {
    <script>
        // Auto-redirect after 30 seconds (optional)
        setTimeout(() => {
            if (confirm('@ViewBag.RedirectConfirmText')) {
                window.location.href = '@ViewBag.HomeUrl';
            }
        }, 30000);
    </script>
}