{% extends 'rental_app/base_rental.html' %}
{% load static %}

{% block title %}Contact Us | Rent in Sri Lanka{% endblock %}

{% block content %}

<style>
    /* =========================================================
       RENTAL CONTACT PAGE - PREMIUM THEME
    ========================================================= */

    .rental-contact-hero {
        position: relative;
        min-height: 720px;
        display: flex;
        align-items: center;
        overflow: hidden;
        background-color: #0d1b2a;
    }

    .rental-contact-hero-bg {
        position: absolute;
        inset: 0;
        background:
            linear-gradient(
                90deg,
                rgba(8, 20, 32, 0.94) 0%,
                rgba(8, 20, 32, 0.84) 40%,
                rgba(8, 20, 32, 0.68) 70%,
                rgba(8, 20, 32, 0.60) 100%
            ),
            url("{% static 'expat_life/images/rental_hero.webp' %}") center center / cover no-repeat;
        transform: scale(1.03);
        z-index: 0;
    }

    .rental-contact-hero::after {
        content: "";
        position: absolute;
        inset: 0;
        background:
            radial-gradient(circle at 18% 35%, rgba(255, 193, 7, 0.18), transparent 34%),
            radial-gradient(circle at 82% 65%, rgba(13, 110, 253, 0.18), transparent 35%);
        z-index: 1;
        pointer-events: none;
    }

    .rental-contact-hero-content {
        position: relative;
        z-index: 2;
        width: 100%;
        padding-top: 90px;
        padding-bottom: 90px;
    }

    .rental-contact-badge {
        display: inline-block;
        background: rgba(255, 193, 7, 0.18);
        color: #ffc107;
        border: 1px solid rgba(255, 193, 7, 0.38);
        padding: 8px 16px;
        border-radius: 50px;
        font-weight: 700;
        font-size: 0.85rem;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        backdrop-filter: blur(10px);
    }

    .rental-contact-hero h1 {
        color: #ffffff;
        line-height: 1.1;
    }

    .rental-contact-hero .lead {
        color: rgba(255, 255, 255, 0.88);
    }

    .rental-contact-hero-copy {
        color: rgba(255, 255, 255, 0.80);
        font-size: 1.03rem;
    }

    .rental-contact-info-list {
        display: grid;
        gap: 14px;
        margin-top: 28px;
    }

    .rental-contact-info-item {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 15px 16px;
        color: #fff;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.11);
        border: 1px solid rgba(255, 255, 255, 0.16);
        backdrop-filter: blur(8px);
    }

    .rental-contact-info-item i {
        color: #ffc107;
        font-size: 1.2rem;
        margin-top: 1px;
    }

    .rental-contact-note-box {
        display: flex;
        align-items: flex-start;
        gap: 14px;
        padding: 18px;
        border-radius: 20px;
        margin-top: 24px;
        background: rgba(255, 193, 7, 0.14);
        border: 1px solid rgba(255, 193, 7, 0.34);
        color: #fff;
        backdrop-filter: blur(8px);
    }

    .rental-contact-note-box i {
        color: #ffc107;
        font-size: 1.35rem;
        margin-top: 2px;
    }

    .rental-contact-form-card {
        border-radius: 30px;
        background: rgba(255, 255, 255, 0.98);
        overflow: hidden;
        box-shadow: 0 28px 65px rgba(0, 0, 0, 0.28);
        border: 1px solid rgba(255, 255, 255, 0.42);
    }

    .rental-contact-form-header {
        padding: 30px 32px 24px;
        background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    }

    .rental-contact-form-header p {
        color: rgba(17, 24, 39, 0.78) !important;
    }

    .rental-contact-form-body {
        padding: 32px;
    }

    .rental-contact-form-body .form-label {
        font-weight: 700;
        color: #111827;
        margin-bottom: 8px;
    }

    .rental-contact-form-body input,
    .rental-contact-form-body textarea,
    .rental-contact-form-body select {
        width: 100%;
        border-radius: 16px;
        border: 1px solid #d9e2ec;
        padding: 0.82rem 1rem;
        background: #f8fafc;
        transition: all 0.22s ease;
    }

    .rental-contact-form-body input:focus,
    .rental-contact-form-body textarea:focus,
    .rental-contact-form-body select:focus {
        border-color: #0d6efd;
        background: #fff;
        box-shadow: 0 0 0 0.22rem rgba(13, 110, 253, 0.12);
        outline: none;
    }

    .rental-contact-form-body textarea {
        min-height: 145px;
        resize: vertical;
    }

    .rental-contact-form-footer {
        margin-top: 28px;
    }

    .rental-contact-submit-btn {
        background: linear-gradient(135deg, #0d1b2a 0%, #0d6efd 100%);
        color: #fff;
        border: none;
        border-radius: 18px;
        padding: 0.95rem 1.4rem;
        font-weight: 700;
        transition: 0.25s ease;
    }

    .rental-contact-submit-btn:hover {
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 16px 34px rgba(13, 110, 253, 0.22);
    }

    /* CONTACT DETAIL CARDS */
    .rental-contact-details-section {
        background: #f4f7fb;
    }

    .rental-contact-detail-card {
        height: 100%;
        background: #fff;
        border-radius: 24px;
        padding: 28px;
        box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
        border: 1px solid rgba(15, 23, 42, 0.05);
        transition: 0.25s ease;
    }

    .rental-contact-detail-card:hover {
        transform: translateY(-4px);
    }

    .rental-detail-icon {
        width: 58px;
        height: 58px;
        border-radius: 18px;
        background: #eaf3ff;
        color: #0d6efd;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.55rem;
        margin-bottom: 18px;
    }

    .rental-contact-detail-card h5 {
        font-weight: 800;
        margin-bottom: 12px;
    }

    .rental-contact-detail-card a {
        text-decoration: none;
    }

    .rental-contact-detail-card a:hover {
        text-decoration: underline;
    }

    .rental-social-btn {
        border-radius: 999px;
        padding-left: 1.2rem;
        padding-right: 1.2rem;
        font-weight: 600;
    }

    /* WHY CONTACT */
    .rental-reason-card {
        height: 100%;
        background: #fff;
        border-radius: 24px;
        padding: 30px;
        box-shadow: 0 15px 35px rgba(15, 23, 42, 0.07);
        transition: 0.25s ease;
    }

    .rental-reason-card:hover {
        transform: translateY(-4px);
    }

    .rental-reason-icon {
        width: 62px;
        height: 62px;
        border-radius: 20px;
        background: linear-gradient(135deg, #eaf3ff 0%, #fff2c7 100%);
        color: #0d6efd;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.65rem;
        margin-bottom: 18px;
    }

    /* OTHER OPTIONS */
    .rental-path-card {
        height: 100%;
        background: #fff;
        border-radius: 24px;
        padding: 34px 28px;
        box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
        transition: 0.25s ease;
    }

    .rental-path-card:hover {
        transform: translateY(-4px);
    }

    .rental-path-number {
        width: 58px;
        height: 58px;
        margin: 0 auto 18px;
        border-radius: 50%;
        background: #0d6efd;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 1.05rem;
    }

    /* FINAL CTA */
    .rental-contact-final-section {
        background: #fff;
    }

    .rental-contact-final-box {
        border-radius: 32px;
        padding: 58px 36px;
        background:
            linear-gradient(
                135deg,
                rgba(13, 27, 42, 0.96) 0%,
                rgba(13, 110, 253, 0.92) 100%
            );
        box-shadow: 0 30px 65px rgba(13, 27, 42, 0.20);
    }

    @media (max-width: 991px) {
        .rental-contact-hero {
            min-height: auto;
        }

        .rental-contact-hero-content {
            padding-top: 70px;
            padding-bottom: 70px;
        }

        .rental-contact-form-card {
            margin-top: 10px;
        }
    }

    @media (max-width: 767px) {
        .rental-contact-form-header,
        .rental-contact-form-body {
            padding: 24px;
        }

        .rental-contact-final-box {
            padding: 42px 22px;
        }
    }
</style>


<!-- =========================================================
     HERO / CONTACT FORM
========================================================= -->
<section class="rental-contact-hero">
    <div class="rental-contact-hero-bg"></div>

    <div class="container rental-contact-hero-content">
        <div class="row align-items-center g-5">

            <!-- LEFT CONTENT -->
            <div class="col-lg-6">
                <span class="rental-contact-badge mb-3">
                    Property Partner Support
                </span>

                <h1 class="display-5 fw-bold mb-3">
                    Contact the Rent in Sri Lanka Team
                </h1>

                <p class="lead mb-3">
                    Have questions about listing your property, rental partner onboarding,
                    featured visibility, or the next step in working with Ensolanka?
                </p>

                <p class="rental-contact-hero-copy mb-4">
                    Send us a message and our team will guide you with the information you need
                    to move forward confidently as a Sri Lankan property partner.
                </p>

                <div class="rental-contact-info-list">
                    <div class="rental-contact-info-item">
                        <i class="bi bi-check-circle-fill"></i>
                        <span>Ask how to register as a Property Partner and list your rental</span>
                    </div>

                    <div class="rental-contact-info-item">
                        <i class="bi bi-check-circle-fill"></i>
                        <span>Get clarity on long-stay international guest opportunities</span>
                    </div>

                    <div class="rental-contact-info-item">
                        <i class="bi bi-check-circle-fill"></i>
                        <span>Discuss property approval, verification, and featured listing options</span>
                    </div>

                    <div class="rental-contact-info-item">
                        <i class="bi bi-check-circle-fill"></i>
                        <span>Start the conversation before creating or managing your listing</span>
                    </div>
                </div>

                <div class="rental-contact-note-box">
                    <i class="bi bi-info-circle-fill"></i>
                    <div>
                        Already registered as a rental owner? You can also continue through your
                        Owner Dashboard to manage listings, view interested guests, and access your payment center.
                    </div>
                </div>
            </div>


            <!-- CONTACT FORM -->
            <div class="col-lg-6">
                <div class="rental-contact-form-card">

                    <div class="rental-contact-form-header">
                        <h3 class="fw-bold mb-2">Send a Message</h3>
                        <p class="mb-0">
                            Tell us how we can help with your property partner journey.
                        </p>
                    </div>

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

                        <div class="row g-3">
                            <div class="col-md-6">
                                <label for="{{ form.name.id_for_label }}" class="form-label">
                                    Your Name
                                </label>
                                {{ form.name }}
                            </div>

                            <div class="col-md-6">
                                <label for="{{ form.email.id_for_label }}" class="form-label">
                                    Email Address
                                </label>
                                {{ form.email }}
                            </div>

                            <div class="col-md-12">
                                <label for="{{ form.subject.id_for_label }}" class="form-label">
                                    Subject
                                </label>
                                {{ form.subject }}
                            </div>

                            <div class="col-md-12">
                                <label for="{{ form.message.id_for_label }}" class="form-label">
                                    Message
                                </label>
                                {{ form.message }}
                            </div>
                        </div>

                        <div class="rental-contact-form-footer">
                            <button type="submit" class="btn rental-contact-submit-btn btn-lg w-100">
                                <i class="bi bi-send-fill me-2"></i>
                                Send Message
                            </button>

                            <p class="small text-muted text-center mt-3 mb-0">
                                We will review your message and get back to you as soon as possible.
                            </p>
                        </div>
                    </form>
                </div>
            </div>

        </div>
    </div>
</section>


<!-- =========================================================
     CONTACT DETAILS
========================================================= -->
<section class="py-5 rental-contact-details-section">
    <div class="container">

        <div class="section-heading text-center mb-5">
            <span class="section-mini-title">Contact Details</span>
            <h2 class="fw-bold">Reach Ensolanka Directly</h2>
            <p class="text-muted">
                Multiple ways to connect with our team for property partner support.
            </p>
        </div>

        <div class="row g-4">

            <!-- USA Office -->
            <div class="col-md-6 col-lg-3">
                <div class="rental-contact-detail-card">
                    <div class="rental-detail-icon">
                        <i class="bi bi-building"></i>
                    </div>

                    <h5>USA Registered Address</h5>

                    <p class="text-muted small mb-0">
                        Ensolanka LLC<br>
                        30 N Gould St Ste R,<br>
                        Sheridan, WY 82801, USA
                    </p>
                </div>
            </div>

            <!-- Sri Lanka Office -->
            <div class="col-md-6 col-lg-3">
                <div class="rental-contact-detail-card">
                    <div class="rental-detail-icon">
                        <i class="bi bi-geo-alt-fill"></i>
                    </div>

                    <h5>Asia Regional Office</h5>

                    <p class="text-muted small mb-0">
                        Ensolanka Holdings (Pvt) Ltd<br>
                        No. 190/1/3/B, Bank Building,<br>
                        Main Road, Wennappuwa,<br>
                        Sri Lanka
                    </p>
                </div>
            </div>

            <!-- Phone & WhatsApp -->
            <div class="col-md-6 col-lg-3">
                <div class="rental-contact-detail-card">
                    <div class="rental-detail-icon">
                        <i class="bi bi-telephone-fill"></i>
                    </div>

                    <h5>Phone &amp; WhatsApp</h5>

                    <p class="text-muted small mb-0">
                        <strong>WhatsApp (USA)</strong><br>
                        <a href="https://wa.me/13072182541" target="_blank" class="text-dark">
                            +1 307 218-2541
                        </a>

                        <br><br>

                        <strong>WhatsApp (Asia)</strong><br>
                        <a href="https://wa.me/94716978355" target="_blank" class="text-dark">
                            +94 71 697 8355
                        </a>
                    </p>
                </div>
            </div>

            <!-- Email -->
            <div class="col-md-6 col-lg-3">
                <div class="rental-contact-detail-card">
                    <div class="rental-detail-icon">
                        <i class="bi bi-envelope-fill"></i>
                    </div>

                    <h5>Email</h5>

                    <p class="text-muted small mb-0">
                        <a href="mailto:info@ensolanka.com" class="text-dark d-block mb-2">
                            info@ensolanka.com
                        </a>

                        <a href="mailto:ds@ensolanka.com" class="text-dark d-block mb-2">
                            ds@ensolanka.com
                        </a>

                        <a href="mailto:support@ensolanka.com" class="text-dark d-block">
                            support@ensolanka.com
                        </a>
                    </p>
                </div>
            </div>

        </div>


        <!-- SOCIAL MEDIA -->
        <div class="text-center mt-5">
            <p class="text-muted mb-3">Follow Ensolanka on social media</p>

            <div class="d-flex justify-content-center gap-3 flex-wrap">
                <a href="https://web.facebook.com/ensolanka" target="_blank"
                   class="btn btn-outline-dark rental-social-btn" aria-label="Facebook">
                    <i class="bi bi-facebook me-2"></i>Facebook
                </a>

                <a href="https://www.youtube.com/@ensolanka/" target="_blank"
                   class="btn btn-outline-dark rental-social-btn" aria-label="YouTube">
                    <i class="bi bi-youtube me-2"></i>YouTube
                </a>

                <a href="https://www.linkedin.com/company/ensolanka-llc/" target="_blank"
                   class="btn btn-outline-dark rental-social-btn" aria-label="LinkedIn">
                    <i class="bi bi-linkedin me-2"></i>LinkedIn
                </a>

                <a href="https://www.instagram.com/ensolanka/" target="_blank"
                   class="btn btn-outline-dark rental-social-btn" aria-label="Instagram">
                    <i class="bi bi-instagram me-2"></i>Instagram
                </a>

                <a href="https://x.com/ensolanka_com" target="_blank"
                   class="btn btn-outline-dark rental-social-btn" aria-label="X / Twitter">
                    <i class="bi bi-twitter-x me-2"></i>X
                </a>

                <a href="https://www.tiktok.com/@ensolanka.com" target="_blank"
                   class="btn btn-outline-dark rental-social-btn" aria-label="TikTok">
                    <i class="bi bi-tiktok me-2"></i>TikTok
                </a>
            </div>
        </div>

    </div>
</section>


<!-- =========================================================
     WHY CONTACT US
========================================================= -->
<section class="py-5 bg-white">
    <div class="container">

        <div class="section-heading text-center mb-5">
            <span class="section-mini-title">Why Contact Us</span>
            <h2 class="fw-bold">A Helpful First Step for Property Owners</h2>
            <p class="text-muted">
                Before signing up, listing a property, or making decisions, you may want a few things clarified.
            </p>
        </div>

        <div class="row g-4">

            <div class="col-md-6 col-lg-3">
                <div class="rental-reason-card">
                    <div class="rental-reason-icon">
                        <i class="bi bi-chat-left-text-fill"></i>
                    </div>

                    <h5 class="fw-bold">General Questions</h5>
                    <p class="text-muted mb-0">
                        Ask how the rental partner model works and what Ensolanka helps manage.
                    </p>
                </div>
            </div>

            <div class="col-md-6 col-lg-3">
                <div class="rental-reason-card">
                    <div class="rental-reason-icon">
                        <i class="bi bi-house-check-fill"></i>
                    </div>

                    <h5 class="fw-bold">Property Suitability</h5>
                    <p class="text-muted mb-0">
                        Clarify whether your room, annex, apartment, villa, or house fits the program.
                    </p>
                </div>
            </div>

            <div class="col-md-6 col-lg-3">
                <div class="rental-reason-card">
                    <div class="rental-reason-icon">
                        <i class="bi bi-globe2"></i>
                    </div>

                    <h5 class="fw-bold">International Guest Demand</h5>
                    <p class="text-muted mb-0">
                        Understand the long-stay resident guest approach and global-market positioning.
                    </p>
                </div>
            </div>

            <div class="col-md-6 col-lg-3">
                <div class="rental-reason-card">
                    <div class="rental-reason-icon">
                        <i class="bi bi-arrow-right-circle-fill"></i>
                    </div>

                    <h5 class="fw-bold">Next-Step Guidance</h5>
                    <p class="text-muted mb-0">
                        Find out whether signup, listing creation, or dashboard action should come next.
                    </p>
                </div>
            </div>

        </div>
    </div>
</section>


<!-- =========================================================
     OTHER USEFUL OPTIONS
========================================================= -->
<section class="py-5 rental-contact-details-section">
    <div class="container">

        <div class="section-heading text-center mb-5">
            <span class="section-mini-title">Other Useful Options</span>
            <h2 class="fw-bold">Choose the Property Partner Path That Fits You</h2>
        </div>

        <div class="row g-4">

            <div class="col-md-4">
                <div class="rental-path-card text-center">
                    <div class="rental-path-number">01</div>

                    <h5 class="fw-bold">Explore Rental Listings</h5>

                    <p class="text-muted">
                        View how properties are presented to guests through the public rental listing experience.
                    </p>

                    <a href="{% url 'rental_app:public_rental_list' %}"
                       class="btn btn-outline-dark mt-3">
                        Browse Public Rentals
                    </a>
                </div>
            </div>


            <div class="col-md-4">
                <div class="rental-path-card text-center">
                    <div class="rental-path-number">02</div>

                    {% if request.user.is_authenticated and request.user.rental_owner_profile %}
                        <h5 class="fw-bold">My Owner Dashboard</h5>

                        <p class="text-muted">
                            Open your dashboard to manage your profile, listings, interests, and next actions.
                        </p>

                        <a href="{% url 'rental_app:rental_owner_dashboard' %}"
                           class="btn btn-outline-dark mt-3">
                            My Owner Dashboard
                        </a>
                    {% else %}
                        <h5 class="fw-bold">Property Partner Signup</h5>

                        <p class="text-muted">
                            Create your property partner account and begin the process of listing your rental.
                        </p>

                        <a href="{% url 'rental_app:rental_owner_signup' %}"
                           class="btn btn-outline-dark mt-3">
                            Become a Property Partner
                        </a>
                    {% endif %}
                </div>
            </div>


            <div class="col-md-4">
                <div class="rental-path-card text-center">
                    <div class="rental-path-number">03</div>

                    {% if request.user.is_authenticated and request.user.rental_owner_profile %}
                        <h5 class="fw-bold">Add a New Property</h5>

                        <p class="text-muted">
                            Submit a property listing with images, rent details, location, and facilities.
                        </p>

                        <a href="{% url 'rental_app:rental_listing_create' %}"
                           class="btn btn-outline-dark mt-3">
                            Add Property
                        </a>
                    {% else %}
                        <h5 class="fw-bold">Owner Sign In</h5>

                        <p class="text-muted">
                            Already registered? Sign in to continue managing your rental partner account.
                        </p>

                        <a href="{% url 'rental_app:rental_owner_login' %}"
                           class="btn btn-outline-dark mt-3">
                            Owner Sign In
                        </a>
                    {% endif %}
                </div>
            </div>

        </div>
    </div>
</section>


<!-- =========================================================
     FINAL CTA
========================================================= -->
<section class="py-5 rental-contact-final-section">
    <div class="container">
        <div class="rental-contact-final-box text-center text-white">

            <h2 class="fw-bold mb-3">
                Ready to Present Your Property to a Global Audience?
            </h2>

            <p class="lead mb-4">
                Contact us, register as a Property Partner, or sign in to continue your journey with
                Rent in Sri Lanka by Ensolanka.
            </p>

            <div class="d-flex flex-wrap justify-content-center gap-3">

                {% if request.user.is_authenticated and request.user.rental_owner_profile %}
                    <a href="{% url 'rental_app:rental_owner_dashboard' %}"
                       class="btn btn-warning btn-lg px-4">
                        My Owner Dashboard
                    </a>

                    <a href="{% url 'rental_app:rental_listing_create' %}"
                       class="btn btn-light btn-lg px-4">
                        Add New Property
                    </a>
                {% else %}
                    <a href="{% url 'rental_app:rental_owner_signup' %}"
                       class="btn btn-warning btn-lg px-4">
                        Become a Property Partner
                    </a>

                    <a href="{% url 'rental_app:rental_owner_login' %}"
                       class="btn btn-light btn-lg px-4">
                        Owner Sign In
                    </a>
                {% endif %}

                <a href="{% url 'rental_app:public_rental_list' %}"
                   class="btn btn-outline-light btn-lg px-4">
                    Browse Rentals
                </a>

            </div>
        </div>
    </div>
</section>

{% endblock %}