/* Offer listings (/oferti and the category pages): only what paging needs.
   Layout stays the template's (.grid-featured-tours-item, .pagination). */

/* cards beyond the current page (listing.js); without JS every card stays visible */
html.w-mod-js .ih-page-hidden { display: none; }

/* the Previous button sits in the template's empty first pagination cell */
.pagination .w-pagination-previous { display: block; }
.pagination .w-pagination-previous .w-pagination-previous-icon { margin-right: 4px; }

/* cards of a newly opened page fade up like the template's load animation */
@keyframes ih-card-in {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: none; }
}
.ih-page-in { animation: ih-card-in .7s cubic-bezier(.22, .61, .36, 1) both; animation-delay: calc(var(--ih-i, 0) * 80ms); }
@media (prefers-reduced-motion: reduce) { .ih-page-in { animation: none; } }

/* „Календар” (link to the departures calendar, /kalendar): the template's small light button at the right end of the
   filter row. Absolutely placed, so the title, the chips and the cards stay exactly where they were. From 1280px up
   it sits level with the chips (at least ~60px clear of them); on narrower laptop windows the chips leave no room
   there, so it moves up level with the „Филтрирай:” title. Tablets and phones: centred under the chips. */
.ih-cal-link.button-black { flex: none; align-self: center; grid-column-gap: var(--gap--gap-4); grid-row-gap: var(--gap--gap-4); padding: .1875rem .1875rem .1875rem 1.125rem; }
.ih-cal-link .defult-title, .ih-cal-link .hover-title { font-size: var(--_typography---body--body-md); }
.ih-cal-link .icon-wrapper { width: 36px; height: 36px; }
@media screen and (min-width: 992px) {
  .tours-section .tours-category-wrapper { position: relative; }
  .ih-cal-link.button-black { position: absolute; right: 0; bottom: -1px; }
}
@media screen and (min-width: 992px) and (max-width: 1279px) {
  .ih-cal-link.button-black { bottom: auto; top: -9px; }
}

/* subcategories (categories.json "subcategories"): a second row of the same chips under the categories, on the
   category page and on its subcategory pages (/<category>/<sub>) */
.tours-category-wrap.ih-sub-chips { margin-top: calc(var(--gap--gap-4) - var(--gap--gap-6)); }
/* a city page's description (destinations.mjs, listing-style): the offer page's text style, centred over the chips */
.ih-list-about { max-width: 50rem; margin-left: auto; margin-right: auto; text-align: center; }
.ih-list-about p:first-child { margin-top: 0; }

/* ===== phones & tablets: listing =====
   Every rule below sits in a ≤ 991 / 767 px query: laptops and desktops never see them. */
@media screen and (max-width: 991px) {
  /* „Календар”, centred under the chips: a 44 px tap target */
  .ih-cal-link.button-black { min-height: 44px; }
}
@media screen and (max-width: 767px) {
  /* chips: one swipeable row from the left edge (the row spans the container; theme.css .ih-scroll-row) */
  .tours-category-wrap.ih-scroll-row { justify-content: flex-start; align-self: stretch; }
  .tours-category-wrap.ih-scroll-row .grid-tours-category { flex-wrap: nowrap; justify-content: flex-start; }
  .tours-category-wrap.ih-scroll-row .w-dyn-item { flex: none; }
}
