{% extends 'expat_life/base.html' %}
{% load static %}
{% block title %}Sri Lanka Digital Nomad Visa | Live and Work Remotely{% endblock %}

{% block content %}
<style>
    /* =========================================================
       DIGITAL NOMAD VISA PAGE - LIVE IN SRI LANKA PREMIUM THEME
       Cinematic Navy + Premium Blue + Tropical Teal + Warm Gold
       ========================================================= */

    .visa-language-box {
        background:
            radial-gradient(circle at top right, rgba(255, 193, 7, 0.10), transparent 34%),
            linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
        border: 1px solid rgba(13, 110, 253, 0.12);
        border-left: 5px solid #0f766e;
        border-radius: 22px;
        padding: 1rem 1.1rem;
        box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
    }

    .visa-language-icon {
        width: 46px;
        height: 46px;
        border-radius: 16px;
        background: linear-gradient(135deg, #0f766e, #0d6efd);
        color: #ffffff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        flex-shrink: 0;
        box-shadow: 0 14px 28px rgba(13, 110, 253, 0.18);
    }

    .visa-language-box h6 {
        color: #102033;
        letter-spacing: -0.01em;
    }

    .visa-language-box p {
        color: #64748b !important;
        line-height: 1.6;
    }

    .visa-language-box .btn-dark {
        background: linear-gradient(135deg, #07131c, #0d6efd);
        border: none;
        font-weight: 800;
        box-shadow: 0 12px 24px rgba(13, 110, 253, 0.20);
    }

    .visa-language-box .btn-dark:hover {
        background: linear-gradient(135deg, #07131c, #0f766e);
        transform: translateY(-1px);
    }

    /* =========================================================
       HERO SECTION
       Targets the first section without changing HTML structure
       ========================================================= */

    .py-5.bg-light.border-bottom:first-of-type {
        position: relative;
        overflow: hidden;
        background:
            radial-gradient(circle at top left, rgba(255, 193, 7, 0.12), transparent 30%),
            radial-gradient(circle at 88% 18%, rgba(13, 110, 253, 0.10), transparent 32%),
            linear-gradient(180deg, #f5f9ff 0%, #ffffff 100%) !important;
        border-bottom: 1px solid rgba(13, 110, 253, 0.10) !important;
    }

    .py-5.bg-light.border-bottom:first-of-type::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 310px;
        background:
            radial-gradient(circle at top right, rgba(32, 201, 151, 0.14), transparent 34%),
            linear-gradient(135deg, rgba(7, 19, 28, 0.06), rgba(13, 110, 253, 0.06));
        pointer-events: none;
    }

    .py-5.bg-light.border-bottom:first-of-type .container {
        position: relative;
        z-index: 2;
    }

    .py-5.bg-light.border-bottom:first-of-type .badge.bg-success-subtle {
        display: inline-flex;
        align-items: center;
        gap: .45rem;
        background: rgba(15, 118, 110, 0.10) !important;
        border: 1px solid rgba(15, 118, 110, 0.16);
        color: #0f766e !important;
        font-weight: 900;
        letter-spacing: .07em;
        text-transform: uppercase;
    }

    .py-5.bg-light.border-bottom:first-of-type .badge.bg-success-subtle::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #ffc107;
        box-shadow: 0 0 0 5px rgba(255, 193, 7, 0.14);
    }

    .py-5.bg-light.border-bottom:first-of-type h1 {
        color: #102033;
        font-weight: 950;
        letter-spacing: -0.045em;
        line-height: 1.05;
    }

    .py-5.bg-light.border-bottom:first-of-type .lead {
        color: #64748b !important;
        line-height: 1.82;
    }

    .py-5.bg-light.border-bottom:first-of-type p {
        color: #475569;
        line-height: 1.75;
    }

    .py-5.bg-light.border-bottom:first-of-type .badge.bg-primary-subtle {
        background: rgba(13, 110, 253, 0.10) !important;
        color: #0d6efd !important;
        border: 1px solid rgba(13, 110, 253, 0.14);
        font-weight: 800;
    }

    .py-5.bg-light.border-bottom:first-of-type .badge.bg-info-subtle {
        background: rgba(15, 118, 110, 0.10) !important;
        color: #0f766e !important;
        border: 1px solid rgba(15, 118, 110, 0.14);
        font-weight: 800;
    }

    .py-5.bg-light.border-bottom:first-of-type .badge.bg-warning-subtle {
        background: rgba(255, 193, 7, 0.16) !important;
        color: #6c4a00 !important;
        border: 1px solid rgba(255, 193, 7, 0.24);
        font-weight: 800;
    }

    .py-5.bg-light.border-bottom:first-of-type .badge.bg-secondary-subtle {
        background: #f8fbff !important;
        color: #334155 !important;
        border: 1px solid rgba(13, 110, 253, 0.12);
        font-weight: 800;
    }

    .py-5.bg-light.border-bottom:first-of-type .card {
        position: relative;
        border-radius: 32px !important;
        box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18) !important;
        border: 1px solid rgba(255, 255, 255, 0.60) !important;
        overflow: hidden;
    }

    .py-5.bg-light.border-bottom:first-of-type .card::before {
        content: "";
        position: absolute;
        inset: -16px;
        border-radius: 36px;
        background:
            linear-gradient(135deg, rgba(255, 193, 7, 0.28), rgba(13, 110, 253, 0.20), rgba(32, 201, 151, 0.18));
        z-index: -1;
    }

    .py-5.bg-light.border-bottom:first-of-type img {
        min-height: 390px;
        object-fit: cover;
    }

    /* =========================================================
       CONTENT SECTIONS
       ========================================================= */

    section.py-5:not(.bg-light) {
        background:
            radial-gradient(circle at top left, rgba(255, 193, 7, 0.07), transparent 28%),
            radial-gradient(circle at 88% 20%, rgba(13, 110, 253, 0.06), transparent 30%),
            linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    }

    section.py-5 .card {
        border-radius: 28px !important;
        border: 1px solid rgba(13, 110, 253, 0.10) !important;
        background: rgba(255, 255, 255, 0.97);
        box-shadow: 0 22px 50px rgba(15, 23, 42, 0.08) !important;
        overflow: hidden;
        transition: all .24s ease;
    }

    section.py-5 .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 30px 72px rgba(15, 23, 42, 0.13) !important;
        border-color: rgba(13, 110, 253, 0.22) !important;
    }

    section.py-5 .card-body {
        position: relative;
    }

    section.py-5 .col-lg-8 .card .card-body::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 5px;
        background: linear-gradient(90deg, #ffc107, #0f766e, #0d6efd);
    }

    section.py-5 h2,
    section.py-5 h4,
    section.py-5 h5 {
        color: #102033;
        letter-spacing: -0.025em;
    }

    section.py-5 h2 {
        font-weight: 950;
    }

    section.py-5 h5 {
        font-weight: 850;
    }

    section.py-5 p,
    section.py-5 li {
        color: #475569;
        line-height: 1.78;
    }

    section.py-5 strong {
        color: #102033;
    }

    section.py-5 ul {
        padding-left: 1.25rem;
    }

    section.py-5 ul li::marker {
        color: #0f766e;
    }

    /* =========================================================
       TABLE
       ========================================================= */

    .table {
        border: 1px solid rgba(13, 110, 253, 0.10);
        border-radius: 18px;
        overflow: hidden;
    }

    .table thead {
        background: linear-gradient(135deg, #07131c, #0d6efd);
        color: #ffffff;
    }

    .table thead th {
        border-bottom: none;
        font-weight: 850;
        padding: 1rem;
    }

    .table tbody td {
        padding: 1rem;
        color: #475569;
        border-color: rgba(13, 110, 253, 0.08);
    }

    /* =========================================================
       SIDEBAR CARDS
       ========================================================= */

    .col-lg-4 .card {
        position: relative;
    }

    .col-lg-4 .card:not(.bg-primary)::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 5px;
        background: linear-gradient(90deg, #ffc107, #0f766e, #0d6efd);
    }

    .col-lg-4 .card h4 {
        color: #102033;
        font-weight: 950;
    }

    .col-lg-4 .card ul li {
        padding-bottom: .85rem;
        margin-bottom: .85rem !important;
        border-bottom: 1px solid rgba(13, 110, 253, 0.10);
    }

    .col-lg-4 .card ul li:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .col-lg-4 .card ul li strong,
    .col-lg-4 .card p strong {
        color: #0d6efd;
    }

    .col-lg-4 .card.bg-primary {
        background:
            radial-gradient(circle at top right, rgba(255, 193, 7, 0.18), transparent 34%),
            linear-gradient(135deg, #07131c 0%, #0b3d91 58%, #0f766e 100%) !important;
        color: #ffffff;
        box-shadow: 0 28px 70px rgba(15, 23, 42, 0.20) !important;
    }

    .col-lg-4 .card.bg-primary h4 {
        color: #ffffff;
    }

    .col-lg-4 .card.bg-primary p {
        color: rgba(255, 255, 255, 0.86);
    }

    .col-lg-4 .card.bg-primary .btn-light {
        border-radius: 999px;
        font-weight: 850;
        color: #07131c;
        background: #ffffff;
        border: none;
        box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
    }

    .col-lg-4 .card.bg-primary .btn-light:hover {
        background: #ffc107;
        color: #231707;
        transform: translateY(-2px);
    }

    /* =========================================================
       RESPONSIVE
       ========================================================= */

    @media (max-width: 991.98px) {
        .py-5.bg-light.border-bottom:first-of-type {
            text-align: center;
        }

        .py-5.bg-light.border-bottom:first-of-type .lead {
            margin-left: auto;
            margin-right: auto;
        }

        .py-5.bg-light.border-bottom:first-of-type img {
            min-height: 300px;
        }

        .visa-language-box {
            text-align: left;
        }
    }

    @media (max-width: 575.98px) {
        .py-5.bg-light.border-bottom:first-of-type img {
            min-height: 240px;
        }

        section.py-5 .card,
        .visa-language-box {
            border-radius: 22px !important;
        }

        section.py-5 .card-body {
            padding: 1.45rem !important;
        }
    }
</style>
<section class="py-5 bg-light border-bottom">
    <div class="container">
        <div class="row align-items-center g-4">
            <div class="col-lg-7">
                <span class="badge bg-success-subtle text-success px-3 py-2 rounded-pill mb-3">
                    Remote Living in Sri Lanka
                </span>

                <h1 class="display-5 fw-bold mb-3">Sri Lanka Digital Nomad Visa</h1>

                <p class="lead text-muted mb-4">
                    Live in tropical Sri Lanka while working remotely for your overseas employer,
                    clients, or business. The Digital Nomad Visa offers eligible international applicants a
                    simple long-stay option with annual renewal possibilities.
                </p>

                <div class="d-flex flex-wrap gap-2 mb-4">
                    <span class="badge bg-primary-subtle text-primary px-3 py-2">1 Year Stay</span>
                    <span class="badge bg-info-subtle text-info px-3 py-2">Renewable Annually</span>
                    <span class="badge bg-warning-subtle text-dark px-3 py-2">Foreign Income Only</span>
                    <span class="badge bg-secondary-subtle text-secondary px-3 py-2">Family Eligible</span>
                </div>

                <p class="mb-4">
                    Sri Lanka offers a unique combination of tropical beaches, hill country,
                    city convenience, and a lower-cost lifestyle that appeals to remote workers,
                    freelancers, and global business owners.
                </p>

                <!-- Compact Multilingual Visa Resources Notice -->
                <div class="visa-language-box">
                    <div class="d-flex align-items-center gap-3 flex-wrap">
                        <div class="visa-language-icon">
                            <i class="bi bi-translate"></i>
                        </div>

                        <div class="flex-grow-1">
                            <h6 class="fw-bold mb-1">Prefer the visa process in your language?</h6>
                            <p class="small text-muted mb-0">
                                Read, download, or listen to the Digital Nomad Visa process guide in major languages.
                            </p>
                        </div>

                        <a href="{% url 'expat_life:marketing_resources' %}"
                           class="btn btn-dark btn-sm rounded-pill px-3">
                            <i class="bi bi-folder2-open me-1"></i>
                            Open Visa Resources
                        </a>
                    </div>
                </div>
            </div>

            <div class="col-lg-5">
                <div class="card shadow-sm border-0 rounded-4 overflow-hidden">
                    <img src="{% static 'expat_life/images/sri_lanka_digital_nomad_visa.webp' %}"
                         alt="Sri Lanka tropical lifestyle for digital nomads"
                         class="img-fluid w-100">
                </div>
            </div>
        </div>
    </div>
</section>

<section class="py-5">
    <div class="container">
        <div class="row g-4">

            <div class="col-lg-8">
                <div class="card shadow-sm border-0 rounded-4 mb-4">
                    <div class="card-body p-4 p-lg-5">
                        <h2 class="fw-bold mb-3">Overview</h2>
                        <p>
                            Sri Lanka’s Digital Nomad Visa is intended for foreign nationals who wish
                            to stay in Sri Lanka while continuing remote work or business activities
                            based outside the country. This visa is suitable for remote employees,
                            freelancers, and overseas business owners who earn from foreign sources.
                        </p>
                        <p class="mb-0">
                            The visa is granted for <strong>1 year</strong> and may be
                            <strong>renewed annually</strong> if the applicant continues to satisfy
                            the required conditions.
                        </p>
                    </div>
                </div>

                <div class="card shadow-sm border-0 rounded-4 mb-4">
                    <div class="card-body p-4 p-lg-5">
                        <h2 class="fw-bold mb-3">Who Can Apply?</h2>
                        <ul class="mb-0">
                            <li>Foreign nationals aged 18 or above</li>
                            <li>Remote employees working for overseas companies</li>
                            <li>Freelancers with foreign clients</li>
                            <li>Business owners with businesses based outside Sri Lanka</li>
                            <li>Spouse and dependent children of the main applicant</li>
                        </ul>
                    </div>
                </div>

                <div class="card shadow-sm border-0 rounded-4 mb-4">
                    <div class="card-body p-4 p-lg-5">
                        <h2 class="fw-bold mb-3">Eligibility Criteria</h2>
                        <ul class="mb-0">
                            <li>The applicant must be at least <strong>18 years old</strong>.</li>
                            <li>Income must come <strong>exclusively from foreign sources</strong>.</li>
                            <li>The main applicant must show a minimum monthly income of <strong>USD 2,000</strong>.</li>
                            <li>For more than two dependents, an additional <strong>USD 500 per month</strong> per extra dependent is required.</li>
                            <li>The applicant must not take up local employment in Sri Lanka.</li>
                            <li>A clean police record and compliance with Sri Lankan laws are expected.</li>
                        </ul>
                    </div>
                </div>

                <div class="card shadow-sm border-0 rounded-4 mb-4">
                    <div class="card-body p-4 p-lg-5">
                        <h2 class="fw-bold mb-3">Required Documents</h2>
                        <div class="row">
                            <div class="col-md-6">
                                <ul>
                                    <li>Completed visa application form</li>
                                    <li>Request letter from the applicant</li>
                                    <li>Passport copy valid for at least 6 months</li>
                                    <li>Two recent passport-sized photographs</li>
                                    <li>Medical clearance report</li>
                                    <li>Police clearance certificate issued within 3 months</li>
                                </ul>
                            </div>
                            <div class="col-md-6">
                                <ul>
                                    <li>International health insurance</li>
                                    <li>Proof of foreign income/remittance</li>
                                    <li>Security clearance form</li>
                                    <li>Marriage certificate for spouse</li>
                                    <li>Birth certificates for dependents</li>
                                    <li>Recommendation from the Ministry of Digital Economy</li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="card shadow-sm border-0 rounded-4 mb-4">
                    <div class="card-body p-4 p-lg-5">
                        <h2 class="fw-bold mb-3">Application Process</h2>

                        <div class="mb-4">
                            <h5 class="fw-semibold">Step 1 – Prepare Documents</h5>
                            <p class="mb-0">
                                Gather all required documents, including proof of foreign income,
                                health insurance, police clearance, and the recommendation from the
                                Ministry of Digital Economy.
                            </p>
                        </div>

                        <div class="mb-4">
                            <h5 class="fw-semibold">Step 2 – Submit Application</h5>
                            <p class="mb-0">
                                Submit the full document set to the Department of Immigration and
                                Emigration – Residence Visa Division.
                            </p>
                        </div>

                        <div>
                            <h5 class="fw-semibold">Step 3 – Evaluation and Issuance</h5>
                            <p class="mb-0">
                                After evaluation and approval, the visa endorsement is issued on the
                                passport. Renewal is possible each year if the applicant remains eligible.
                            </p>
                        </div>
                    </div>
                </div>

                <div class="card shadow-sm border-0 rounded-4 mb-4">
                    <div class="card-body p-4 p-lg-5">
                        <h2 class="fw-bold mb-3">Fees</h2>
                        <div class="table-responsive">
                            <table class="table align-middle mb-0">
                                <thead>
                                    <tr>
                                        <th>Applicant Type</th>
                                        <th>Fee</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>Main Applicant</td>
                                        <td>USD 500 / year</td>
                                    </tr>
                                    <tr>
                                        <td>Spouse</td>
                                        <td>USD 500 / year</td>
                                    </tr>
                                    <tr>
                                        <td>Each Dependent</td>
                                        <td>USD 500 / year</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        <p class="text-muted mt-3 mb-0">
                            Additional personal costs may include medical reports, insurance,
                            police certificates, translations, and similar supporting expenses.
                        </p>
                    </div>
                </div>

                <div class="card shadow-sm border-0 rounded-4 mb-4">
                    <div class="card-body p-4 p-lg-5">
                        <h2 class="fw-bold mb-3">Benefits</h2>
                        <ul class="mb-0">
                            <li>Legally stay in Sri Lanka for up to 1 year</li>
                            <li>Annual renewal option</li>
                            <li>Open personal bank accounts</li>
                            <li>Rent apartments, villas, or houses</li>
                            <li>Access internet, utilities, and co-working spaces</li>
                            <li>Enroll dependent children in suitable schools</li>
                            <li>Enjoy Sri Lanka’s beaches, hill country, and lifestyle while working remotely</li>
                        </ul>
                    </div>
                </div>

                <div class="card shadow-sm border-0 rounded-4">
                    <div class="card-body p-4 p-lg-5">
                        <h2 class="fw-bold mb-3">Renewal and Important Conditions</h2>
                        <ul>
                            <li>The visa may be renewed every year if eligibility continues.</li>
                            <li>Renewal may require proof of tax registration with the Inland Revenue Department.</li>
                            <li>Visa holders must notify relevant authorities of major changes such as employment, income, or dependents.</li>
                            <li>Violation of visa conditions can result in cancellation of the visa.</li>
                            <li>Local employment in Sri Lanka is not permitted under this category.</li>
                        </ul>
                        <p class="mb-0">
                            Rules and procedures may change from time to time, so applicants should always
                            verify the latest official requirements before submission.
                        </p>
                    </div>
                </div>
            </div>

            <div class="col-lg-4">
                <div class="card shadow-sm border-0 rounded-4 mb-4">
                    <div class="card-body p-4">
                        <h4 class="fw-bold mb-3">Quick Summary</h4>
                        <ul class="list-unstyled mb-0">
                            <li class="mb-3"><strong>Visa Type:</strong><br>Digital Nomad Residence Visa</li>
                            <li class="mb-3"><strong>Stay Period:</strong><br>1 Year</li>
                            <li class="mb-3"><strong>Renewal:</strong><br>Available annually</li>
                            <li class="mb-3"><strong>Minimum Income:</strong><br>USD 2,000 per month</li>
                            <li class="mb-3"><strong>Dependents:</strong><br>Spouse and children can apply under main applicant</li>
                            <li class="mb-0"><strong>Local Employment:</strong><br>Not allowed</li>
                        </ul>
                    </div>
                </div>

                <div class="card shadow-sm border-0 rounded-4 mb-4">
                    <div class="card-body p-4">
                        <h4 class="fw-bold mb-3">Where to Apply</h4>
                        <p class="mb-2">
                            Department of Immigration and Emigration<br>
                            Residence Visa Division<br>
                            “Suhurupaya”, Battaramulla, Sri Lanka
                        </p>
                        <p class="mb-2">
                            <strong>Email:</strong> contvisa@immigration.gov.lk
                        </p>
                        <p class="mb-0">
                            <strong>Phone:</strong> 0094 11 2101540
                        </p>
                    </div>
                </div>

                <div class="card shadow-sm border-0 rounded-4 bg-primary text-white">
                    <div class="card-body p-4">
                        <h4 class="fw-bold mb-3">Need Guidance?</h4>
                        <p>
                            We can help you understand the process, required documents,
                            and practical preparation steps before you apply.
                        </p>
                        <a href="{% url 'expat_life:consultation_request' %}" class="btn btn-light fw-semibold">
                            Contact for Consultation
                        </a>
                    </div>
                </div>
            </div>

        </div>
    </div>
</section>
{% endblock %}