{% extends "base.html" %}
{% set use_main_hero = True %}

{% block title %}Lanka Travel Bee - Explore Sri Lanka{% endblock %}

{% block hero_background %}/static/images/hot_air_baloon_sri_lanka.webp{% endblock %}
{% block hero_title %}Discover Sri Lanka - Your Journey, Our Expertise{% endblock %}
{% block hero_subtitle %}Embark on an unforgettable adventure with our premium car and driver hire services. From Colombo to the hidden gems of Sri Lanka, experience comfort, convenience, and local insights. <br> Let us be your guide to the wonders of this beautiful island.{% endblock %}
{% block hero_cta_text %}Start Your Adventure{% endblock %}




{% block content %}

  <!-- Search Bar -->
  <!-- <div class="mb-3">
    <div class="input-group bg-light rounded-pill">
        <span class="input-group-text bg-transparent border-0">
            <i class="bi bi-search text-muted"></i>
        </span>
        <input type="text" class="form-control bg-transparent border-0" placeholder="Search tours and vehicles">
    </div>
</div>  -->

<!-- <div class="container mt-n1">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="toolbar shadow bg-light rounded-pill mb-3 px-4 py-2 m-auto">
                <div class="d-flex justify-content-center align-items-center">
                  
                       
                        <button class="rounded-pill filter_btn"> Search Tour <span class="filter-icon"><i class="fa-solid fa-sliders"></i></span></button>
                       
                    <a href="{{ url_for('main.request_quote') }}" class="btn primary_btn rounded-pill px-3 ml-2">Request a Quote</a>
                </div>
            </div>
        </div>
    </div>
</div> -->

<!-- Filter Modal -->


<!--<section>
    <div class="container mt-5">

        <div class="row">
           
            <div class="col-md-6">
                <div class="most-popular-tours">
                 
                    <h2 class="mb-4 moblie-title">Our Most Popular Destinations</h2>
                   
                   
                  
                </div>

                <div class="intro-image"><img src="static/images/yala-sri-lanka.png" alt=""></div> 
            </div>
            <div class="col-md-6">
               
             <h2 class="h2-titels mt-4"> Discover Personalized Itineraries and Hidden Gems Across Sri Lanka with Our Expert Local Guides and Private Drivers. Let Us Craft Your Dream Journey Today!</h2>
               <p class="mt-4 d-none d-md-block">At Lanka Travel Bee, we craft personalized journeys that showcase the stunning beauty and rich cultural heritage of Sri Lanka. Our local experts create tailor-made itineraries that allow you to explore hidden gems. <br> Our tours with private drivers are designed to give you the freedom to explore the island, whether you’re seeking adventure, relaxation, or cultural discovery. <br> Lanka Travel Bee ensures each trip is uniquely designed to match your passions and desires. Discover Sri Lanka like never before—your unforgettable journey starts with us.</p>
     </div>
        </div>
       
    </div>
</section> -->


<section class="tour-categories py-4">
    <div class="container">
        <!-- Parent Categories Grid -->
        
        <!-- <h2 class=" p-2 moblie-title"><span class="bbb_title">Tour Categories</span></h2> -->
        <div class="row g-3 mt-5 mb-5">
            {% for category in parent_categories %}
            <div class="col-6 col-md-4 col-lg-3">
                <div class="category-card " data-category-id="{{ category.id }}">
                    <div class="card border-0 shadow-sm m-0">
                        <a href="{{ url_for('main.tour_packages', category_slug=category.slug) }}" 
                        class="stretched-link"></a>
                            <div class="card-body p-0 text-center d-flex justify-content-between align-items-center">
                                <div class="tour-category-title-left px-3 py-1 text-light"> <h4 class="h6 mb-2 pt-2">{{ category.name }} Tours</h4></div>
                                <div class="tour-category-title-right px-3 py-1 text-light"> {% set total_tours = namespace(count=0) %}
                                    {% for subcategory in category.subcategories %}
                                        {% set total_tours.count = total_tours.count + subcategory.tour_count %}
                                    {% endfor %}
                                    <p class="text-muted mb-0">{{ total_tours.count }} Tours</p></div>
                               
                               
                              
                            </div>
                    </div>
                </div>
            </div>
            {% endfor %}
        </div>

    
       <!-- Sub Categories Carousel -->

<h2 class=" p-2 moblie-title"><span class="bbb_title">Explore Bee Tours </span></h2>
<div class="subcategory-carousel-container">
    <div class="bbb_slider_container"> 
        <div class="owl-carousel owl-theme subcategory-carousel">
            {% for category in parent_categories %}
                {% for subcategory in category.subcategories %}
                    {% if subcategory.tour_count > 0 %}
                    <div class="item">
                        <div class="card m-0 h-100 tour-card">
                            <a href="{{ url_for('main.tour_packages', category_slug=category.slug) }}" 
                                   class="stretched-link"></a>
                            <div class="card-body p-0 d-flex justify-content-between">
                                
                                <div class="p-3"><h4 class="card-title h6 mb-1">{{ subcategory.name }}</h4>
                                    <p class="card-text small text-muted mb-1">{{ subcategory.tour_count }} tours</p>
                                    <small class="text-primary d-block">{{ category.name }}</small></div>
                                    <div class="me-2 tour-image-box"> {% if subcategory.image %}
                                        <img src="{{ url_for('static', filename='uploads/' + subcategory.image) }}" 
                                             class="card-img-top" 
                                             alt="{{ subcategory.name }}"
                                             onerror="this.src='{{ url_for('static', filename='images/default-category.jpg') }}'"
                                             style="height: 120px; object-fit: cover;">
                                        {% endif %}</div>
                                
                                
                               
                            </div>
                        </div>
                    </div>
                    {% endif %}
                {% endfor %}
            {% endfor %}
        </div>
        <div class="bbb_slider_nav">
            <div class="bbb_prev bbb_nav"><i class="fas fa-angle-left ml-auto"></i></div>
            <div class="bbb_next bbb_nav"><i class="fas fa-angle-right ml-auto"></i></div>
        </div>
    </div>
</div>
    </div>
</section>



<!-- Rent a Car with Driver Section -->
<section class="rent-car py-2">
    <div class="container">
        <div class="row">
            
            <div class="col-lg-12 mt-3">
                <h2 class=" p-2 moblie-title"><span class="bbb_title">Find your Rent a Car with Driver</span></h2>
                <div class="bbb_slider_container">
                    <div class="owl-carousel owl-theme bbb_slider">
                        {% for car in cars %}
                        <div class="item">
                            {% include 'partials/car_card.html' %}
                        </div>
                        {% endfor %}
                        
                    </div>
                    <div class="bbb_slider_nav">
                        <div class="bbb_prev bbb_nav"><i class="fas fa-angle-left ml-auto"></i></div>
                        <div class="bbb_next bbb_nav"><i class="fas fa-angle-right ml-auto"></i></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>



<div class="container py-5">
    <h2 class="mb-2 px-2 moblie-title">Explore Sri Lanka with Bee</h2>
    
    <div class="row">
        <!-- Duration Filter Sidebar -->
        <div class="col-md-12">
            <div class="col-md-3">
                <div class="duration-filter mb-4">
                    <h5 class="filter-heading">Duration</h5>
                    <select class="form-select" id="durationFilter" name="duration">
                        <option value="">All Durations</option>
                        <option value="1-day" {% if filters.duration == '1-day' %}selected{% endif %}>1 Day Tours</option>
                        <option value="2-3" {% if filters.duration == '2-3' %}selected{% endif %}>2-3 Days</option>
                        <option value="4-7" {% if filters.duration == '4-7' %}selected{% endif %}>4-7 Days</option>
                        <option value="8-14" {% if filters.duration == '8-14' %}selected{% endif %}>8-14 Days</option>
                        <option value="15+" {% if filters.duration == '15+' %}selected{% endif %}>15+ Days</option>
                    </select>
                </div>
            </div>
        
        </div>
        
        <!-- Tours Grid -->
        <div class="col-md-12">
            <div class="row gx-2" id="tourContainer">
                {% for tour in initial_tours %}
                    {% include 'partials/tour_card.html' %}
                {% endfor %}
            </div>

            <div class="text-center mt-4">
                <button id="loadMoreBtn" class="btn rounded-pill primary_btn">Load More</button>
            </div>
        </div>
    </div>
</div>





<!-- Discover Sri Lanka Section -->
<section class="discover-sl py-5">
    <div class="container">
        <div class="row justify-content-between">
            <div class="col-md-7">
                <h2>Why <span class="text-primary">Sri Lanka ? </span></h2>
                <p>Sri Lanka offers a perfect mix of adventure and tranquility. From ancient temples and wild elephants to golden beaches and vibrant cities, Sri Lanka is rich in diversity. Discover misty mountains, tea plantations, and colorful festivals that showcase the unique culture. Sri Lanka is a dream destination with endless opportunities for relaxation and unforgettable experiences.</p>

                <h2>Why <span class="text-primary">Lanka Travel Bee ? </span></h2>
               <p>At Lanka Travel Bee, our expert local knowledge and connections give you access to hidden gems and personalized itineraries. We manage every detail, from luxury stays to cultural experiences, ensuring a stress-free journey. Our trusted services, like car hire with drivers, let you explore Sri Lanka effortlessly. With a focus on quality and customization, we turn your trip into a memorable adventure.</p>
              
                
                <a href="/about" class="btn btn-link">Read More</a>
                
            </div>
            <div class="col-md-4">
                <img src="/static/images/sri-lanka-map-outline.png" class="img-fluid rounded-pill" alt="Sri Lanka Landscape">
            </div>
        </div>
    </div>
</section>


<!-- Testimonials -->
<!-- <section class="testimonials py-5">
    <div class="container">
        <h2 class="  mb-4">What Our Clients Say</h2>
        <div class="row">
            <div class="col-md-4 mb-3">
                <div class="card h-100">
                    <div class="card-body">
                        <blockquote class="blockquote">
                            <p>This is a testimonial. It's a short quote or statement that represents the opinion of the person giving it.</p>
                            <footer class="blockquote-footer">John Doe</footer>
                        </blockquote>
                    </div>
                </div>
            </div>
            <div class="col-md-4 mb-3">
                <div class="card h-100">
                    <div class="card-body">
                        <blockquote class="blockquote">
                            <p>This is a testimonial. It's a short quote or statement that represents the opinion of the person giving it.</p>
                            <footer class="blockquote-footer">Jane Doe</footer>
                        </blockquote>
                    </div>
                </div>
            </div>
            <div class="col-md-4 mb-3">
                <div class="card h-100">
                    <div class="card-body">
                        <blockquote class="blockquote">
                            <p>This is a testimonial. It's a short quote or statement that represents the opinion of the person giving it.</p>
                            <footer class="blockquote-footer">John Smith</footer>
                        </blockquote>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section> -->


<!-- Blog Section -->
<section class="blog-section py-5 bg-light">
    <div class="container">
        <h2 class="  mb-4">Latest from Our Blog</h2>
        <div class="row">
           {% for post in latest_posts %}
<div class="col-md-4 mb-4">
    <div class="card h-100">
        {% if post.feature_image %}
            <img src="{{ url_for('static', filename='uploads/' + post.feature_image) }}" class="card-img-top" alt="{{ post.title }}">
        {% else %}
            <img src="{{ url_for('static', filename='images/default-blog-image.jpg') }}" class="card-img-top" alt="Default Image">
        {% endif %}
        <div class="card-body">
            <h5 class="card-title">{{ post.title }}</h5>
            <p class="card-text">{{ post.content|truncate(100) }}</p>
            <a href="{{ url_for('main.blog_post', slug=post.slug) }}" class="btn primary_btn">Read More</a>
        </div>
    </div>
</div>
{% endfor %}
        </div>
        <div class="  mt-4">
            <a href="{{ url_for('main.blog_list') }}" class="btn primary_btn">View All Posts</a>
        </div>
    </div>
</section>
    








{% endblock %}




