<% page_title @page_title %>
<%= render '/pwb/meta_tags' %>

<%# Bologna Theme - Modern Landing Page %>
<%# Clean, airy design with generous whitespace %>

<%# Hero / Dynamic Page Content %>
<div class="bologna-landing">
  <% @page.ordered_visible_page_contents.each do |page_content| %>
    <%= page_part page_content %>
  <% end %>
</div>

<%# Featured Properties - For Sale %>
<% if @properties_for_sale.length > 0 %>
  <%= render partial: '/pwb/welcome/single_property_row',
             locals: {
               properties: @properties_for_sale,
               rent_or_sale: 'for_sale',
               title_key: 'propertyForSale',
               subtitle: t('pwb.home.featured_sale_subtitle', default: 'Discover your next home')
             } %>
<% end %>

<%# Featured Properties - For Rent %>
<% if @properties_for_rent.length > 0 %>
  <%= render partial: '/pwb/welcome/single_property_row',
             locals: {
               properties: @properties_for_rent,
               rent_or_sale: 'for_rent',
               title_key: 'propertyForRent',
               subtitle: t('pwb.home.featured_rent_subtitle', default: 'Find your perfect rental')
             } %>
<% end %>

<%# Call to Action Section %>
<section class="py-20 bg-gradient-to-br from-terra-50 via-white to-olive-50">
  <div class="container mx-auto px-6">
    <div class="max-w-4xl mx-auto text-center">
      <span class="inline-block px-4 py-2 bg-terra-100 text-terra-600 text-sm font-medium rounded-pill mb-6">
        <%= t('pwb.home.cta_pretitle', default: 'Start Your Search') %>
      </span>
      <h2 class="font-display text-3xl md:text-4xl font-bold text-warm-gray-900 mb-6">
        <%= t('pwb.home.cta_title', default: 'Ready to Find Your Dream Property?') %>
      </h2>
      <p class="text-lg text-warm-gray-600 mb-10 max-w-2xl mx-auto">
        <%= t('pwb.home.cta_description', default: 'Browse our collection of properties or get in touch with our team for personalized assistance.') %>
      </p>
      <div class="flex flex-col sm:flex-row items-center justify-center gap-4">
        <a href="<%= localized_buy_path %>"
           class="inline-flex items-center px-8 py-4 bg-terra-500 text-white font-medium rounded-pill hover:bg-terra-600 transition-all duration-300 shadow-soft hover:shadow-medium">
          <%= icon(:search, size: :sm, class: "mr-2") %>
          <%= t('pwb.home.browse_properties', default: 'Browse Properties') %>
        </a>
        <a href="<%= localized_contact_path %>"
           class="inline-flex items-center px-8 py-4 bg-white text-warm-gray-700 font-medium rounded-pill border-2 border-warm-gray-200 hover:border-terra-300 hover:text-terra-600 transition-all duration-300">
          <%= icon(:chat, size: :sm, class: "mr-2") %>
          <%= t('pwb.home.contact_us', default: 'Contact Us') %>
        </a>
      </div>
    </div>
  </div>
</section>
