{% extends 'expat_life/base.html' %}
{% load static %}
{% block title %}Guest Signup{% endblock %}

{% block content %}
<style>
    .signup-hero {
        position: relative;
        min-height: 100vh;
        padding: 6rem 0;
        background:
            radial-gradient(circle at top left, rgba(255, 193, 7, 0.12), transparent 32%),
            radial-gradient(circle at bottom right, rgba(32, 201, 151, 0.16), transparent 34%),
            linear-gradient(
                90deg,
                rgba(7, 19, 28, 0.96) 0%,
                rgba(7, 19, 28, 0.90) 34%,
                rgba(11, 61, 145, 0.78) 62%,
                rgba(15, 118, 110, 0.66) 100%
            ),
            url("{% static 'expat_life/images/guest_signup_hero.webp' %}") center/cover no-repeat;
        color: #fff;
        overflow: hidden;
    }

    .signup-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background:
            linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 35%),
            radial-gradient(circle at 82% 12%, rgba(255, 193, 7, 0.09), transparent 28%);
        pointer-events: none;
    }

    .signup-hero::after {
        content: "";
        position: absolute;
        right: -140px;
        bottom: -180px;
        width: 460px;
        height: 460px;
        background: rgba(255, 193, 7, 0.08);
        border-radius: 50%;
        pointer-events: none;
    }

    .signup-hero .container {
        position: relative;
        z-index: 2;
    }

    .section-mini-title {
        display: inline-flex;
        align-items: center;
        gap: .45rem;
        padding: .45rem .9rem;
        border-radius: 999px;
        background: rgba(255, 193, 7, 0.16);
        border: 1px solid rgba(255, 193, 7, 0.32);
        color: #ffd36b;
        font-size: .82rem;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
        margin-bottom: 1rem;
        backdrop-filter: blur(10px);
    }

    .section-mini-title::before {
        content: "\F26A";
        font-family: "bootstrap-icons";
        font-size: .95rem;
        color: #ffc107;
    }

    .signup-hero h1 {
        font-size: clamp(2.35rem, 4.5vw, 4.4rem);
        font-weight: 900;
        letter-spacing: -.045em;
        line-height: 1.05;
        color: #fff;
    }

    .signup-hero .lead {
        color: rgba(255, 255, 255, 0.86) !important;
        font-size: 1.12rem;
        line-height: 1.8;
        max-width: 620px;
    }

    .signup-info-list {
        display: grid;
        gap: .9rem;
        margin-top: 1.5rem;
    }

    .signup-info-item {
        display: flex;
        align-items: center;
        gap: .8rem;
        padding: .85rem 1rem;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.20);
        backdrop-filter: blur(8px);
        color: rgba(255, 255, 255, 0.92);
        font-weight: 600;
    }

    .signup-info-item i {
        color: #ffd36b;
        font-size: 1.15rem;
        flex: 0 0 auto;
    }

    .signup-note-box {
        display: flex;
        gap: .85rem;
        padding: 1rem 1.1rem;
        border-radius: 20px;
        background: rgba(255, 251, 235, 0.13);
        border: 1px solid rgba(255, 193, 7, 0.28);
        border-left: 4px solid #ffc107;
        color: rgba(255, 255, 255, 0.9);
        line-height: 1.65;
        backdrop-filter: blur(8px);
    }

    .signup-note-box i {
        color: #ffc107;
        font-size: 1.25rem;
        margin-top: .15rem;
        flex: 0 0 auto;
    }

    .signup-form-card {
        border-radius: 32px;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid rgba(255, 255, 255, 0.35);
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
        backdrop-filter: blur(14px);
    }

    .signup-form-header {
        padding: 2rem 2rem 1.2rem;
        background:
            radial-gradient(circle at top right, rgba(255, 193, 7, 0.12), transparent 34%),
            linear-gradient(135deg, #ffffff, #f5f9ff);
        border-bottom: 1px solid rgba(13, 110, 253, 0.10);
    }

    .signup-form-header h3 {
        color: #102033;
        letter-spacing: -.025em;
    }

    .signup-form-header p {
        color: #64748b !important;
    }

    .signup-form-body {
        padding: 2rem;
    }

    .signup-form-body .form-label {
        color: #102033;
        font-weight: 700;
        font-size: .92rem;
        margin-bottom: .45rem;
    }

    .signup-form-body input,
    .signup-form-body select,
    .signup-form-body textarea {
        border-radius: 15px !important;
        border: 1px solid #cbd5e1 !important;
        padding: .72rem .95rem !important;
        color: #102033 !important;
        background-color: #fff !important;
        box-shadow: none !important;
    }

    .signup-form-body textarea {
        min-height: 110px;
    }

    .signup-form-body input:focus,
    .signup-form-body select:focus,
    .signup-form-body textarea:focus {
        border-color: #0d6efd !important;
        box-shadow: 0 0 0 .22rem rgba(13, 110, 253, 0.12) !important;
    }

    .custom-check {
        padding: 1rem 1rem 1rem 2.7rem;
        background: #f8fbff;
        border: 1px solid rgba(13, 110, 253, 0.10);
        border-radius: 18px;
        color: #334155;
    }

    .custom-check .form-check-input {
        margin-left: -1.65rem;
        margin-top: .25rem;
        border-radius: 6px !important;
        padding: initial !important;
    }

    .custom-check .form-check-input:checked {
        background-color: #0d6efd;
        border-color: #0d6efd;
    }

    .custom-check .form-check-label {
        font-weight: 600;
        line-height: 1.55;
    }

    .signup-form-footer {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(13, 110, 253, 0.10);
    }

    .signup-form-footer .btn-dark {
        background: linear-gradient(135deg, #07131c, #0d6efd);
        border: none;
        border-radius: 999px;
        padding: .9rem 1.2rem;
        font-weight: 800;
        box-shadow: 0 18px 34px rgba(13, 110, 253, 0.22);
        transition: all .2s ease;
    }

    .signup-form-footer .btn-dark:hover {
        transform: translateY(-2px);
        box-shadow: 0 22px 42px rgba(15, 118, 110, 0.26);
        background: linear-gradient(135deg, #07131c, #0f766e);
    }

    .signup-form-footer .text-muted,
    .signup-form-body .text-muted {
        color: #64748b !important;
    }

    @media (max-width: 991.98px) {
        .signup-hero {
            padding: 4.5rem 0;
        }

        .signup-form-card {
            border-radius: 26px;
        }

        .signup-form-header,
        .signup-form-body {
            padding: 1.5rem;
        }
    }

    @media (max-width: 575.98px) {
        .signup-hero {
            padding: 3.5rem 0;
        }

        .signup-info-item,
        .signup-note-box {
            border-radius: 16px;
        }
    }
</style>
<!-- HERO -->
<section class="signup-hero py-5">
    <div class="container">
        <div class="row align-items-center g-5">
            <div class="col-lg-6">
                <span class="section-mini-title">Start Here</span>
                <h1 class="fw-bold mb-3">Free Guest Signup</h1>
                <p class="lead text-muted mb-4">
                    Tell us about your budget, travel plans, and preferred lifestyle in Sri Lanka.
                    This helps us guide you toward the most suitable package.
                </p>

                <div class="signup-info-list">
                    <div class="signup-info-item">
                        <i class="bi bi-check-circle-fill"></i>
                        <span>Free initial registration</span>
                    </div>
                    <div class="signup-info-item">
                        <i class="bi bi-check-circle-fill"></i>
                        <span>Helps us understand your preferred package</span>
                    </div>
                    <div class="signup-info-item">
                        <i class="bi bi-check-circle-fill"></i>
                        <span>No payment required at this stage</span>
                    </div>
                    <div class="signup-info-item">
                        <i class="bi bi-check-circle-fill"></i>
                        <span>Consultation can be arranged after review</span>
                    </div>
                </div>

                <div class="signup-note-box mt-4">
                    <i class="bi bi-info-circle-fill"></i>
                    <div>
                        After your signup is reviewed, we can discuss suitable locations, housing, and your preferred package before any confirmation step.
                    </div>
                </div>
            </div>

            <div class="col-lg-6">
                <div class="signup-form-card shadow-lg">
                    <div class="signup-form-header">
                        <h3 class="fw-bold mb-2">Submit Your Details</h3>
                        <p class="text-muted mb-0">
                            Fill in the form below and we will review your interest.
                        </p>
                    </div>

                    <form method="post" class="signup-form-body">
                        {% csrf_token %}

                        {% if form.non_field_errors %}
                            <div class="alert alert-danger rounded-4 mb-3">
                                {% for error in form.non_field_errors %}
                                    <div>{{ error }}</div>
                                {% endfor %}
                            </div>
                        {% endif %}

                        <div class="row g-3">
                            <div class="col-md-6">
                                <label for="{{ form.full_name.id_for_label }}" class="form-label">Full Name</label>
                                {{ form.full_name }}
                                {% for error in form.full_name.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-6">
                                <label for="{{ form.email.id_for_label }}" class="form-label">Email Address</label>
                                {{ form.email }}
                                {% for error in form.email.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-6">
                                <label for="{{ form.whatsapp_number.id_for_label }}" class="form-label">WhatsApp Number</label>
                                {{ form.whatsapp_number }}
                                {% for error in form.whatsapp_number.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-6">
                                <label for="{{ form.country.id_for_label }}" class="form-label">Current Country</label>
                                {{ form.country }}
                                {% for error in form.country.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-6">
                                <label for="{{ form.nationality.id_for_label }}" class="form-label">Nationality</label>
                                {{ form.nationality }}
                                {% for error in form.nationality.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-6">
                                <label for="{{ form.gender.id_for_label }}" class="form-label">Gender</label>
                                {{ form.gender }}
                                {% for error in form.gender.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-6">
                                <label for="{{ form.expected_arrival_date.id_for_label }}" class="form-label">Expected Arrival Date</label>
                                {{ form.expected_arrival_date }}
                                {% for error in form.expected_arrival_date.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-6">
                                <label for="{{ form.duration_of_stay.id_for_label }}" class="form-label">Duration of Stay</label>
                                {{ form.duration_of_stay }}
                                {% for error in form.duration_of_stay.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-6">
                                <label for="{{ form.monthly_budget.id_for_label }}" class="form-label">Monthly Budget</label>
                                {{ form.monthly_budget }}
                                {% for error in form.monthly_budget.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-6">
                                <label for="{{ form.interested_package.id_for_label }}" class="form-label">Interested Package</label>
                                {{ form.interested_package }}
                                {% for error in form.interested_package.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-12">
                                <div class="form-check custom-check">
                                    {{ form.remote_worker }}
                                    <label class="form-check-label" for="{{ form.remote_worker.id_for_label }}">
                                        I am a remote worker / online business owner / freelancer
                                    </label>
                                </div>
                                {% for error in form.remote_worker.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-12">
                                <label for="{{ form.message.id_for_label }}" class="form-label">Message / Notes</label>
                                {{ form.message }}
                                {% for error in form.message.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-12">
                                <div class="form-check custom-check">
                                    {{ form.is_public }}
                                    <label class="form-check-label" for="{{ form.is_public.id_for_label }}">
                                        {{ form.is_public.label }}
                                    </label>
                                </div>
                                {% if form.is_public.help_text %}
                                    <small class="text-muted d-block mt-1">{{ form.is_public.help_text }}</small>
                                {% endif %}
                                {% for error in form.is_public.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>
                        </div>

                        <div class="signup-form-footer">
                            <button type="submit" class="btn btn-dark btn-lg w-100">
                                Submit Guest Signup
                            </button>
                            <p class="small text-muted text-center mt-3 mb-0">
                                No payment is required for this free signup step.
                            </p>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</section>

<!-- WHY SIGN UP -->
<section class="py-5 bg-white">
    <div class="container">
        <div class="section-heading text-center mb-5">
            <span class="section-mini-title">Why This Step Matters</span>
            <h2 class="fw-bold">A Better Way to Guide International Guests</h2>
            <p class="text-muted">
                This signup helps us understand your lifestyle goals before recommending the right next step.
            </p>
        </div>

        <div class="row g-4">
            <div class="col-md-6 col-lg-3">
                <div class="feature-card h-100">
                    <div class="icon-wrap"><i class="bi bi-person-lines-fill"></i></div>
                    <h5>Profile Understanding</h5>
                    <p>We understand your country, travel plan, and expected lifestyle level.</p>
                </div>
            </div>

            <div class="col-md-6 col-lg-3">
                <div class="feature-card h-100">
                    <div class="icon-wrap"><i class="bi bi-cash-stack"></i></div>
                    <h5>Budget Matching</h5>
                    <p>We can guide you to a package that better matches your income and budget range.</p>
                </div>
            </div>

            <div class="col-md-6 col-lg-3">
                <div class="feature-card h-100">
                    <div class="icon-wrap"><i class="bi bi-house-check-fill"></i></div>
                    <h5>Living Guidance</h5>
                    <p>We can later discuss suitable housing, comfort level, and location options.</p>
                </div>
            </div>

            <div class="col-md-6 col-lg-3">
                <div class="feature-card h-100">
                    <div class="icon-wrap"><i class="bi bi-chat-dots-fill"></i></div>
                    <h5>Consultation Ready</h5>
                    <p>Your submitted details make the next consultation step faster and more relevant.</p>
                </div>
            </div>
        </div>
    </div>
</section>

<!-- SIMPLE PROCESS -->
<section class="py-5 light-section">
    <div class="container">
        <div class="section-heading text-center mb-5">
            <span class="section-mini-title">What Happens Next</span>
            <h2 class="fw-bold">Simple Follow-Up Process</h2>
        </div>

        <div class="row g-4">
            <div class="col-md-4">
                <div class="step-card text-center h-100">
                    <div class="step-number">01</div>
                    <h5 class="fw-bold">Submit Signup</h5>
                    <p>Fill in your details and let us know your budget, package interest, and travel plan.</p>
                </div>
            </div>

            <div class="col-md-4">
                <div class="step-card text-center h-100">
                    <div class="step-number">02</div>
                    <h5 class="fw-bold">We Review Your Details</h5>
                    <p>We review your information and prepare for the most suitable consultation or next step.</p>
                </div>
            </div>

            <div class="col-md-4">
                <div class="step-card text-center h-100">
                    <div class="step-number">03</div>
                    <h5 class="fw-bold">Consultation & Confirmation</h5>
                    <p>After discussion, you may move forward with the confirmation process if appropriate.</p>
                </div>
            </div>
        </div>
    </div>
</section>

<!-- CTA -->
<section class="final-cta-section py-5">
    <div class="container">
        <div class="final-cta-box text-center text-white">
            <h2 class="fw-bold mb-3">Need Help Before Signing Up?</h2>
            <p class="lead mb-4">
                If you have questions first, contact us or request a consultation before proceeding.
            </p>
            <div class="d-flex flex-wrap justify-content-center gap-3">
                <a href="{% url 'expat_life:contact_page' %}" class="btn btn-warning btn-lg px-4">Contact Us</a>
                <a href="{% url 'expat_life:consultation_request' %}" class="btn btn-light btn-lg px-4">Book Consultation</a>
            </div>
        </div>
    </div>
</section>

{% endblock %}