<% featured_art = @weather_arts.first %>
<% if featured_art&.image&.attached? %>
<%= image_tag featured_art.webp_image.processed, class: "w-full h-full object-cover" %>
<% end %>

<%= t("arts.title") %>

<%= t("arts.subtitle") %>

<% if featured_art %>
<%= "#{t("text.latest_from")} #{featured_art.city.full_name}" %> <%= featured_art.formatted_time(:date) %>
<% end %>
<%= "#{t("text.showing")} #{@weather_arts.total_count} #{t("text.weather_arts")} " %> <% if @current_region %> from <%= @current_region.localized_name %> <% end %>
<% @weather_arts.each do |art| %>
<% if art.image.attached? %> <%= image_tag art.preview_image.processed, class: "w-full h-full object-cover transform group-hover:scale-105 transition-transform duration-500" %>

<%= art.city.name %>

<%= "#{art.city&.country&.emoji + " " || ""}#{art.city&.country&.localized_name}" %>

<%= art.description %>
<% end %>

<%= art.city.name %>

<%= art.formatted_time(:date, true) %>

<%= art.temperature %>°C
<%= art.humidity %>% humidity
<%= link_to city_weather_art_path(art.city, art), class: "btn btn-primary btn-sm w-full" do %> <%= t("button.view_detail") %> <% end %>
<% end %>
<%= render 'shared/pagination', collection: @weather_arts, collection_name: 'weather arts' %>