{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}Live in Sri Lanka{% endblock %}</title>
    <link rel="icon" type="image/png" href="{% static 'expat_life/images/favicon.png' %}">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
    <link rel="stylesheet" href="{% static 'expat_life/css/style.css' %}">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.6.2/cropper.min.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.6.2/cropper.min.js"></script>
</head>
<body>

<!-- TOP BAR -->
<div class="topbar d-none d-lg-block">
    <div class="container">
        <div class="d-flex justify-content-between align-items-center">
            <div class="topbar-left">
                <span><i class="bi bi-globe2"></i> Tropical lifestyle guidance for guests in Sri Lanka</span>
            </div>
            <div class="topbar-right d-flex align-items-center gap-3">
                <a href="{% url 'expat_life:contact_page' %}"><i class="bi bi-envelope-fill me-1"></i> Contact</a>
                <a href="{% url 'expat_life:consultation_request' %}"><i class="bi bi-calendar-check-fill me-1"></i> Consultation</a>
            </div>
        </div>
    </div>
</div>

<!-- NAVBAR -->
<nav class="navbar navbar-expand-lg premium-navbar sticky-top">
    <div class="container">
        <a class="navbar-brand premium-brand d-flex align-items-center gap-2" href="{% url 'expat_life:home' %}">
            <span class="brand-logo-circle">
                <img src="{% static 'expat_life/images/ensolanka_logo.png' %}" alt="Ensolanka Logo" class="brand-logo-img">
            </span>
            <span class="brand-text-wrap d-flex flex-column">
                <span class="brand-title">Live in Sri Lanka</span>
                <small class="brand-subtitle">Affordable Tropical Living</small>
            </span>
        </a>

        <button class="navbar-toggler premium-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#mainNav">
            <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse" id="mainNav">
            <ul class="navbar-nav ms-auto align-items-lg-center">
                <li class="nav-item">
                    <a class="nav-link premium-nav-link" href="{% url 'expat_life:home' %}">Home</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link premium-nav-link" href="{% url 'expat_life:about_sri_lanka' %}">About Sri Lanka</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link premium-nav-link" href="{% url 'expat_life:package_list' %}">Packages</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link premium-nav-link" href="{% url 'expat_life:consultation_request' %}">Consultation</a>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link premium-nav-link dropdown-toggle"
                    href="#"
                    id="localServicesDropdown"
                    role="button"
                    data-bs-toggle="dropdown"
                    aria-expanded="false">
                        Local Services
                    </a>

                    <ul class="dropdown-menu" aria-labelledby="localServicesDropdown">
                        <li>
                            <a class="dropdown-item" href="{% url 'expat_life:rental_home' %}">
                                <i class="bi bi-house-heart me-2"></i>
                                Property Rentals
                            </a>
                        </li>

                        <li>
                            <a class="dropdown-item" href="{% url 'expat_life:dating_home' %}">
                                <i class="bi bi-heart-fill me-2"></i>
                                Dating Profiles
                            </a>
                        </li>

                        <li>
                            <a class="dropdown-item" href="{% url 'expat_life:service_partner_home' %}">
                                <i class="bi bi-person-workspace me-2"></i>
                                Local Assistants
                            </a>
                        </li>
                        
                        <li>
                            <a class="dropdown-item" href="{% url 'expat_life:furniture_package_list' %}">
                                <i class="bi bi-lamp-fill me-2"></i>
                                Furniture Packages
                            </a>
                        </li>

                        <li>
                            <a class="dropdown-item" href="{% url 'expat_life:host_experiences_home' %}">
                                <i class="bi bi-calendar-heart-fill me-2"></i>
                                Event Experiences
                            </a>
                        </li>

                    </ul>
                </li>
                <li class="nav-item">
                    <a class="nav-link premium-nav-link" href="{% url 'expat_life:contact_page' %}">Contact</a>
                </li>
                {% if request.user.is_authenticated %}
                    {% if request.user.foreigner_profile %}
                        <li class="nav-item">
                            <a class="nav-link premium-nav-link" href="{% url 'expat_life:foreigner_dashboard' %}">Guest Dashboard</a>
                        </li>

                    {% elif request.user.service_partner_profile %}
                        <li class="nav-item">
                            <a class="nav-link premium-nav-link" href="{% url 'service_partner_app:service_partner_dashboard' %}">Dashboard</a>
                        </li>

                    {% elif request.user.rental_owner_profile %}
                        <li class="nav-item">
                            <a class="nav-link premium-nav-link" href="{% url 'rental_app:rental_owner_dashboard' %}">Dashboard</a>
                        </li>

                    {% elif request.user.dating_profile %}
                        <li class="nav-item">
                            <a class="nav-link premium-nav-link" href="{% url 'dating_app:dating_partner_dashboard' %}">Dashboard</a>
                        </li>
                    {% endif %}
                    <li class="nav-item ms-lg-3 mt-3 mt-lg-0">
                        <form method="post" action="{% url 'smart_logout' %}" class="d-inline">
                            {% csrf_token %}
                            <button type="submit" class="btn btn-outline-dark premium-nav-btn">
                                Sign Out
                            </button>
                        </form>
                    </li>
                {% else %}
                    <li class="nav-item ms-lg-3 mt-3 mt-lg-0">
                        <a href="{% url 'expat_life:foreigner_login' %}" class="btn btn-outline-dark premium-nav-btn me-2">
                            Guest Sign In
                        </a>
                        <a href="{% url 'expat_life:foreigner_signup' %}" class="btn btn-warning premium-nav-btn">
                            Guest Signup
                        </a>
                    </li>
                {% endif %}
            </ul>
        </div>
    </div>
</nav>

{% if messages %}
<div class="container mt-3">
    {% for message in messages %}
        <div class="alert alert-success shadow-sm">{{ message }}</div>
    {% endfor %}
</div>
{% endif %}

{% block content %}{% endblock %}

<!-- FLOATING GUEST CTA BUTTON -->
{% if is_foreigner_user %}
    <a href="{% url 'expat_life:foreigner_dashboard' %}"
       class="floating-guest-btn btn btn-warning shadow">
        <i class="bi bi-person-check-fill me-1"></i>
        My Guest Dashboard
    </a>
{% else %}
    <a href="{% url 'expat_life:foreigner_signup' %}"
       class="floating-guest-btn btn btn-warning shadow">
        <i class="bi bi-person-plus-fill me-1"></i>
        Free Guest Signup
    </a>
{% endif %}

<!-- FOOTER -->
<footer class="premium-footer">
    <div class="footer-main py-5">
        <div class="container">
            <div class="row g-4">
                <div class="col-lg-4">
                    <div class="footer-brand-block">
                        <div class="d-flex align-items-center mb-3">
                            <span class="brand-logo-circle footer-logo-circle me-3">
                                <img src="{% static 'expat_life/images/ensolanka_logo.png' %}" alt="Ensolanka Logo" class="brand-logo-img">
                            </span>
                            <div>
                                <h4 class="footer-brand-title mb-0">Live in Sri Lanka</h4>
                                <small class="footer-brand-subtitle">Affordable Tropical Living</small>
                            </div>
                        </div>
                        <p class="footer-text">
                            Helping international guests explore a more affordable, comfortable, and enjoyable lifestyle in Sri Lanka
                            through guided packages, consultation, and local support.
                        </p>

                        <!-- Secure Trust Badge -->
                        <div class="footer-secure-trust-wrap">
                            <div class="footer-secure-trust-badge">
                                <img src="{% static 'expat_life/images/secure_https_badge.png' %}"
                                    alt="Secure HTTPS SSL TLS Protected"
                                    class="footer-secure-trust-img">

                                <div class="footer-secure-trust-text">
                                    <strong>Secure HTTPS Connection</strong>
                                    <span>SSL/TLS encrypted connection protected by a trusted certificate.</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="col-6 col-lg-2">
                    <h6 class="footer-heading">Explore</h6>
                    <ul class="footer-links list-unstyled">
                        <li><a href="{% url 'expat_life:home' %}">Home</a></li>
                        <li><a href="{% url 'expat_life:about_sri_lanka' %}">About Sri Lanka</a></li>
                        <li><a href="{% url 'expat_life:package_list' %}">Packages</a></li>
                        <li><a href="{% url 'expat_life:furniture_package_list' %}">Furniture Packages</a></li>
                        <li><a href="{% url 'expat_life:consultation_request' %}">Book Consultation</a></li>
                        <li><a href="{% url 'expat_life:contact_page' %}">Contact Us</a></li>

                    </ul>
                </div>

                <div class="col-6 col-lg-2">
                    <h6 class="footer-heading">Next Steps</h6>
                    <ul class="footer-links list-unstyled">
                        {% if is_foreigner_user %}
                            <li><a href="{% url 'expat_life:foreigner_dashboard' %}">My Guest Dashboard</a></li>
                        {% else %}
                            <li><a href="{% url 'expat_life:foreigner_signup' %}">Free Guest Signup</a></li>
                        {% endif %}
                        <li><a href="{% url 'expat_life:rental_home' %}">Rentals</a></li> 
                        <li><a href="{% url 'expat_life:dating_home' %}">Dating</a></li> 
                        <li><a href="{% url 'expat_life:service_partner_home' %}">Assistants</a></li>
                        <li><a href="{% url 'expat_life:host_experiences_home' %}">Event Experiences</a></li>
                        
                        
                    </ul>
                </div>

                <div class="col-6 col-lg-2">
                    <h6 class="footer-heading">Legal & Policies</h6>
                    <ul class="footer-links list-unstyled">
                        <li><a href="{% url 'expat_life:terms' %}">Terms & Conditions</a></li>
                        <li><a href="{% url 'expat_life:privacy_policy' %}">Privacy Policy</a></li>
                        <li><a href="{% url 'expat_life:refund_payment_policy' %}">Refund & Payment Policy</a></li>
                        <li><a href="{% url 'expat_life:disclaimer' %}">Disclaimer</a></li>
                        <li><a href="{% url 'expat_life:cookie_policy' %}">Cookie Policy</a></li>
                        <li><a href="{% url 'expat_life:faq' %}">FAQ</a></li>
                    </ul>
                </div>

                <div class="col-6 col-lg-2">
                    <h6 class="footer-heading">Start Your Journey</h6>
                    <p class="footer-text small">
                        Explore our lifestyle packages and take the first step toward living in Sri Lanka.
                    </p>
                   <div class="d-grid gap-2">
                        <a href="{% url 'expat_life:package_list' %}" class="btn btn-outline-light btn-sm">View Packages</a>

                        {% if is_foreigner_user %}
                            <a href="{% url 'expat_life:foreigner_dashboard' %}" class="btn btn-warning btn-sm">My Guest Dashboard</a>
                        {% else %}
                            <a href="{% url 'expat_life:foreigner_signup' %}" class="btn btn-warning btn-sm">Free Guest Signup</a>
                        {% endif %}
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="footer-bottom py-3">
        <div class="container">
            <div class="d-flex flex-column flex-md-row justify-content-between align-items-center gap-2">
                <small>&copy; 2026 Ensolanka LLC. All rights reserved.</small>
                <small>Designed to help international guests discover better tropical living.</small>
            </div>
        </div>
    </div>
</footer>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>