/* =============================================================================
   _lxHomeTourFiltering.css
   Luxe Home Tours Filtering — Filterable Archive
   =============================================================================

   HOW THIS FILE IS ORGANISED:
     1.  Reset / Base
     2.  Section wrapper & Container
     3.  Heading
     4.  Toolbar (filter bar row)
     5.  Filter buttons (left-side triggers)
     6.  Filter dropdown panels
     7.  Checkbox grid inside dropdowns
     8.  Search input
     9.  Date dropdown & Calendar
     10. Sort dropdown
     11. Selected filter pills
     12. Loading spinner
     13. Posts grid
     14. Article card
     15. Image wrapper, badges, gold flag
     16. Category label & dot separator
     17. Article title
     18. No-results message
     19. Load More button
     20. Responsive breakpoints
   ============================================================================= */

/* =============================================================================
   1. RESET / BASE
   ============================================================================= */
.lx-home-tours-filtering-acf-section *,
.lx-home-tours-filtering-acf-section *::before,
.lx-home-tours-filtering-acf-section *::after {
  box-sizing: border-box;
}

/* =============================================================================
   2. SECTION WRAPPER & CONTAINER
   ============================================================================= */
.lx-home-tours-filtering-acf-section {
  margin: 0;
  padding: 64px 0;
  font-family: "Instrument Sans", sans-serif;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
}

.lx-home-tours-filtering-acf-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
}

/* =============================================================================
   3. HEADING
   ============================================================================= */
.lx-home-tours-filtering-acf-heading-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}


.lx-home-tours-filtering-acf-subheading {
  font-family: "Libre Caslon Display", serif;
  font-size: 64px;
  line-height: 72px;
  font-weight: 400;
  margin: 0;
  padding: 0;
}

/* =============================================================================
   4. TOOLBAR
   ============================================================================= */
.lx-home-tours-filtering-acf-selection-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 16px;
}

.lx-home-tours-filtering-acf-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lx-home-tours-filtering-acf-toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.lx-home-tours-filtering-acf-toolbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* =============================================================================
   5. FILTER BUTTONS (Architecture / Home Services / Products / Regions triggers)
   ============================================================================= */
.lx-home-tours-filtering-acf-filter-btn {
  font-family: "Instrument Sans", sans-serif;
  font-size: 16px;
  font-weight: normal;
  letter-spacing: initial;
  line-height: 24px;
  color: #1a1a1a;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  transition: color 0.2s;
}

.lx-home-tours-filtering-acf-filter-btn:hover {
  color: #555;
}

.lx-home-tours-filtering-acf-filter-btn svg {
  transition: transform 0.25s ease;
  transform-origin: center;
  flex-shrink: 0;
}

.lx-home-tours-filtering-acf-filter-btn.open svg {
  transform: rotate(180deg);
}

/* =============================================================================
   6. FILTER DROPDOWN PANELS
   Width is set dynamically by JavaScript to match the grid width.
   All dropdowns anchor from the same left edge (.toolbar-left).
   ============================================================================= */
.lx-home-tours-filtering-acf-filter-wrap {
  position: static;
}

.lx-home-tours-filtering-acf-filter-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background-color: #fff;
  box-shadow: rgba(0, 0, 0, 0.12) 0px 4px 48px 0px;
  z-index: 200;
  padding: 24px;
  width: 1280px;           /* overridden by JS to match grid width */
  max-width: calc(100vw - 48px);
}

.lx-home-tours-filtering-acf-filter-dropdown.active {
  display: block;
}

.lx-home-tours-filtering-acf-filter-dropdown-inner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.lx-home-tours-filtering-acf-filter-dropdown-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  transition: color 0.2s;
}

.lx-home-tours-filtering-acf-filter-dropdown-close:hover {
  color: #555;
}

/* =============================================================================
   7. CHECKBOX GRID INSIDE DROPDOWNS
   4-column layout; accent-color makes checkboxes black when checked.
   ============================================================================= */
.lx-home-tours-filtering-acf-dropdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  flex: 1;
}

.lx-home-tours-filtering-acf-dropdown-grid label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Instrument Sans", sans-serif;
  font-size: 16px;
  font-weight: normal;
  line-height: 24px;
  color: #000;
  cursor: pointer;
  letter-spacing: initial;
}

.lx-home-tours-filtering-acf-dropdown-grid input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: #000;
  flex-shrink: 0;
}

/* =============================================================================
   8. SEARCH INPUT
   ============================================================================= */
.lx-home-tours-filtering-acf-search-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  padding-right: 4px;
}

.lx-home-tours-filtering-acf-search-input {
  font-family: "Instrument Sans", sans-serif;
  font-size: 16px;
  font-weight: normal;
  line-height: 24px;
  color: #000;
  background: none;
  border: none;
  border-bottom: 1px solid #ccc;
  outline: none;
  padding: 4px 0;
  width: 180px;
  transition: border-color 0.2s;
}

.lx-home-tours-filtering-acf-search-input:focus {
  border-bottom: 2px solid #000;
  padding-bottom: 3px;
}

.lx-home-tours-filtering-acf-search-input::placeholder {
  color: transparent;
}

.lx-home-tours-filtering-acf-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  color: #000;
  transition: color 0.2s;
}

.lx-home-tours-filtering-acf-search-btn:hover {
  color: #555;
}

/* =============================================================================
   9. DATE DROPDOWN & CALENDAR
   ============================================================================= */
.lx-home-tours-filtering-acf-date-wrap,
.lx-home-tours-filtering-acf-sort-wrap {
  position: relative;
}

.lx-home-tours-filtering-acf-sort-btn {
  font-family: "Instrument Sans", sans-serif;
  font-size: 16px;
  font-weight: normal;
  letter-spacing: initial;
  line-height: 24px;
  color: #1a1a1a;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  transition: color 0.2s;
}

.lx-home-tours-filtering-acf-sort-btn:hover {
  color: #555;
}

/* Date dropdown panel */
.lx-home-tours-filtering-acf-date-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background-color: #fff;
  box-shadow: rgba(0, 0, 0, 0.12) 0px 4px 48px 0px;
  z-index: 200;
  padding: 24px;
  width: 340px;
  font-family: "Instrument Sans", sans-serif;
}

.lx-home-tours-filtering-acf-date-dropdown.active {
  display: block;
}

/* Preset list */
.lx-home-tours-filtering-acf-date-presets {
  list-style: none;
  padding: 0;
  margin: 0 0 0 0;
}

.lx-home-tours-filtering-acf-date-presets li {
  font-size: 16px;
  font-weight: normal;
  line-height: 24px;
  padding: 10px 0;
  cursor: pointer;
  color: #000;
  letter-spacing: initial;
}

.lx-home-tours-filtering-acf-date-presets li:hover {
  color: #555;
}

/* Custom date range */
.lx-home-tours-filtering-acf-date-custom-label {
  font-size: 16px;
  font-weight: normal;
  line-height: 24px;
  color: #000;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e5e5;
}

.lx-home-tours-filtering-acf-date-range-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.lx-home-tours-filtering-acf-date-range-col {
  flex: 1;
}

.lx-home-tours-filtering-acf-date-range-col span {
  display: block;
  font-size: 14px;
  font-weight: normal;
  line-height: 20px;
  color: #888;
  margin-bottom: 6px;
}

.lx-home-tours-filtering-acf-date-range-btn {
  font-family: "Instrument Sans", sans-serif;
  font-size: 14px;
  font-weight: normal;
  line-height: 20px;
  color: #000;
  background: #fff;
  border: 1px solid #000;
  border-radius: 24px;
  padding: 6px 20px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.lx-home-tours-filtering-acf-date-range-btn:hover {
  background: #f5f5f5;
}

.lx-home-tours-filtering-acf-date-range-btn.active {
  background: #000;
  color: #fff;
}

/* Calendar */
.lx-home-tours-filtering-acf-calendar {
  width: 100%;
  position: relative;
}

.lx-home-tours-filtering-acf-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.lx-home-tours-filtering-acf-calendar-month-label {
  font-size: 16px;
  font-weight: normal;
  line-height: 24px;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-family: "Instrument Sans", sans-serif;
  padding: 0;
}

.lx-home-tours-filtering-acf-calendar-month-label svg {
  width: 10px;
  height: 10px;
}

.lx-home-tours-filtering-acf-calendar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lx-home-tours-filtering-acf-calendar-nav button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 16px;
  font-family: "Instrument Sans", sans-serif;
}

.lx-home-tours-filtering-acf-calendar-nav button:hover {
  color: #555;
}

.lx-home-tours-filtering-acf-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  gap: 2px 0;
}

.lx-home-tours-filtering-acf-calendar-day-label {
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  color: #888;
  padding: 4px 0 8px;
}

.lx-home-tours-filtering-acf-calendar-day {
  font-size: 14px;
  font-weight: normal;
  line-height: 20px;
  color: #000;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  background: none;
  font-family: "Instrument Sans", sans-serif;
  padding: 0;
  transition: background 0.15s;
}

.lx-home-tours-filtering-acf-calendar-day:hover {
  background: #f0f0f0;
}

.lx-home-tours-filtering-acf-calendar-day.today {
  background: #e0e0e0;
  color: #000;
  font-weight: 500;
}

.lx-home-tours-filtering-acf-calendar-day.selected {
  background: #000;
  color: #fff;
  font-weight: 500;
}

.lx-home-tours-filtering-acf-calendar-day.other-month {
  color: #ccc;
}

/* Month/Year picker overlay */
.lx-home-tours-filtering-acf-calendar-picker-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 10;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.lx-home-tours-filtering-acf-calendar-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.lx-home-tours-filtering-acf-calendar-picker-header button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Instrument Sans", sans-serif;
  font-size: 16px;
  color: #000;
  padding: 4px;
  display: flex;
  align-items: center;
}

.lx-home-tours-filtering-acf-calendar-picker-header button:hover {
  color: #555;
}

.lx-home-tours-filtering-acf-calendar-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  flex: 1;
  overflow-y: auto;
  max-height: 240px;
}

.lx-home-tours-filtering-acf-calendar-picker-item {
  font-family: "Instrument Sans", sans-serif;
  font-size: 14px;
  padding: 8px 4px;
  text-align: center;
  cursor: pointer;
  border: none;
  background: none;
  border-radius: 4px;
  color: #000;
}

.lx-home-tours-filtering-acf-calendar-picker-item:hover {
  background: #f0f0f0;
}

.lx-home-tours-filtering-acf-calendar-picker-item.active {
  background: #000;
  color: #fff;
}

/* =============================================================================
   10. SORT DROPDOWN
   ============================================================================= */
.lx-home-tours-filtering-acf-sort-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background-color: #fff;
  box-shadow: rgba(0, 0, 0, 0.12) 0px 4px 48px 0px;
  z-index: 200;
  padding: 8px 24px 16px;
  min-width: 160px;
}

.lx-home-tours-filtering-acf-sort-dropdown.active {
  display: block;
}

.lx-home-tours-filtering-acf-sort-dropdown-item {
  font-family: "Instrument Sans", sans-serif;
  font-size: 16px;
  font-weight: normal;
  line-height: 24px;
  color: #000;
  letter-spacing: initial;
  padding: 10px 0;
  cursor: pointer;
  text-underline-offset: 4px;
}

.lx-home-tours-filtering-acf-sort-dropdown-item:hover {
  color: #555;
}

.lx-home-tours-filtering-acf-sort-dropdown-item.active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* =============================================================================
   11. SELECTED FILTER PILLS
   ============================================================================= */
.lx-home-tours-filtering-acf-selected-filters {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.lx-home-tours-filtering-acf-selected-filters.active {
  display: flex;
}

.lx-home-tours-filtering-acf-selected-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Instrument Sans", sans-serif;
  font-size: 14px;
  font-weight: normal;
  line-height: 20px;
  color: #000;
  background: #fff;
  border: 1px solid #999;
  border-radius: 24px;
  padding: 6px 16px;
  white-space: nowrap;
}

.lx-home-tours-filtering-acf-selected-pill-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  transition: color 0.2s;
}

.lx-home-tours-filtering-acf-selected-pill-close:hover {
  color: #555;
}

.lx-home-tours-filtering-acf-selected-clear-all {
  font-family: "Instrument Sans", sans-serif;
  font-size: 14px;
  font-weight: normal;
  line-height: 20px;
  color: #000;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
  margin-left: 4px;
}

.lx-home-tours-filtering-acf-selected-clear-all:hover {
  color: #555;
}

/* =============================================================================
   12. LOADING SPINNER
   The spinner overlays the grid centred while AJAX is running.
   Cards dim behind it so the spinner is clearly visible.
   ============================================================================= */

/* Original in-grid spinner element — kept in DOM but stays hidden */
.lx-htf-acf-spinner {
  display: none;
}

.lx-htf-acf-spinner-ring {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e5e5;
  border-top-color: #000;
  border-radius: 50%;
  animation: lx-htf-acf-spin 0.75s linear infinite;
}

@keyframes lx-htf-acf-spin {
  to { transform: rotate(360deg); }
}

/* Grid loading state: dim cards */
.lx-home-tours-filtering-acf-grid.lx-htf-acf-loading {
  opacity: 0.35;
  pointer-events: none;
  transition: opacity 0.2s;
}

/* Wrapper that provides the positioning context for the overlay */
.lx-home-tours-filtering-acf-grid-wrap {
  position: relative;
}

/* Overlay — absolutely centred over the grid; hidden by default */
.lx-htf-acf-overlay-spinner {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 50;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  /* ensure it is tall enough to be visible even with few cards */
  min-height: 120px;
}

/* Show the overlay whenever the wrapper carries the loading class */
.lx-home-tours-filtering-acf-grid-wrap.lx-htf-acf-loading .lx-htf-acf-overlay-spinner {
  display: flex;
}

/* =============================================================================
   13. POSTS GRID
   ============================================================================= */
.lx-home-tours-filtering-acf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  transition: opacity 0.2s;
}

/* =============================================================================
   14. ARTICLE CARD
   ============================================================================= */
.lx-home-tours-filtering-acf-article {
  cursor: pointer;
}

.lx-home-tours-filtering-acf-article:hover .lx-home-tours-filtering-acf-article-image-wrapper img {
  transform: scale(1.03);
}

/* =============================================================================
   15. IMAGE WRAPPER, BADGES, GOLD FLAG
   ============================================================================= */
.lx-home-tours-filtering-acf-article-image-wrapper {
  position: relative;
  overflow: hidden;
  background-color: #e5e5e5;
  margin: 0;
  padding: 0;
  margin-bottom: 24px;
}

.lx-home-tours-filtering-acf-article-image-link {
  display: block;
  width: 100%;
  text-decoration: none;
  overflow: hidden;
}

.lx-home-tours-filtering-acf-article-image-wrapper img {
  width: 100%;
  height: auto;
  max-height: 312px;
  min-height: 312px;
  object-fit: cover;
  display: block;
  margin: 0;
  padding: 0;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Badges overlaid on image */
.lx-home-tours-filtering-acf-article-image-badges {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lx-home-tours-filtering-acf-article-image-badge {
  background-color: #ffffff;
  padding: 8px 20px;
  font-family: "Instrument Sans", sans-serif;
  font-size: 13px;
  font-weight: 400;
  border-radius: 20px;
  display: inline-block;
  color: #000;
  line-height: 16px;
  white-space: nowrap;
}

/* "Preferred Partner" badge — white background, same as regular tag badges */
.lx-home-tours-filtering-acf-article-image-badge.lx-badge-home-tour {
  background-color: #ffffff;
  color: #000;
}

/* =============================================================================
   16. CATEGORY LABEL & DOT SEPARATOR
   ============================================================================= */
.lx-home-tours-filtering-acf-article-categories {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin: 0;
  padding: 0;
  margin-bottom: 16px;
  flex-wrap: wrap;
  font-family: "Instrument Sans", sans-serif;
  font-size: 12px;
  font-weight: normal;
  letter-spacing: 1.8px;
  line-height: 16px;
  text-transform: uppercase;
  color: #000;
}

.lx-home-tours-filtering-acf-article-categories a,
.lx-home-tours-filtering-acf-article-categories span,
.lx-home-tours-filtering-acf-region-filter-btn {
  font-family: "Instrument Sans", sans-serif;
  font-size: 12px;
  font-weight: normal;
  letter-spacing: 1.8px;
  line-height: 16px;
  text-transform: uppercase;
  color: #000;
  display: inline-block;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lx-home-tours-filtering-acf-article-categories a,
.lx-home-tours-filtering-acf-region-filter-btn {
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

/* Reset button chrome so it looks identical to the old <a> */
.lx-home-tours-filtering-acf-region-filter-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.lx-home-tours-filtering-acf-article-categories a:hover,
.lx-home-tours-filtering-acf-region-filter-btn:hover {
  color: #555;
}

.lx-home-tours-filtering-acf-article-category-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  line-height: 16px;
  color: #000;
}

/* =============================================================================
   17. ARTICLE TITLE
   ============================================================================= */
.lx-home-tours-filtering-acf-article-title {
  font-family: "Libre Caslon Display", serif;
  font-size: 32px;
  line-height: 40px;
  font-weight: 400;
  color: #000;
  margin: 0;
  padding: 0;
  margin-bottom: 0;
}

.lx-home-tours-filtering-acf-article-title a {
  font-family: "Libre Caslon Display", serif;
  font-size: 32px;
  line-height: 40px;
  font-weight: 400;
  color: #000;
  text-decoration: none;
  display: block;
  transition: color 0.2s;
}

.lx-home-tours-filtering-acf-article-title a:hover {
  color: #555;
}

/* =============================================================================
   18. NO-RESULTS MESSAGE
   ============================================================================= */
.lx-home-tours-filtering-acf-no-results {
  grid-column: 1 / -1;
  padding: 48px 0;
  text-align: center;
  font-family: "Instrument Sans", sans-serif;
  font-size: 16px;
  color: #888;
}

/* =============================================================================
   19. LOAD MORE BUTTON
   ============================================================================= */
.lx-home-tours-filtering-acf-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.lx-home-tours-filtering-acf-load-more-btn {
  font-family: "Instrument Sans", sans-serif;
  font-size: 14px;
  font-weight: normal;
  letter-spacing: 1.8px;
  line-height: 16px;
  text-transform: uppercase;
  color: #000;
  background: #fff;
  border: 1px solid #000;
  padding: 0 32px;
  height: 48px;
  min-width: 64px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s, color 0.3s;
}

.lx-home-tours-filtering-acf-load-more-btn:hover {
  background: #000;
  color: #fff;
}

/* Loading state on button */
.lx-home-tours-filtering-acf-load-more-btn.lx-htf-acf-loading-btn {
  opacity: 0.6;
  cursor: wait;
  pointer-events: none;
}

/* Hidden state (when no more posts) */
.lx-home-tours-filtering-acf-load-more-btn.lx-htf-acf-hidden,
.lx-htf-acf-hidden {
  display: none !important;
}

/* =============================================================================
   20. RESPONSIVE BREAKPOINTS
   ============================================================================= */

/* Large desktop */
@media (min-width: 1280px) {
  .lx-home-tours-filtering-acf-selection-wrapper {
    margin-bottom: 32px;
  }
}

/* Tablet range */
@media (min-width: 768px) and (max-width: 1279px) {
  .lx-home-tours-filtering-acf-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lx-home-tours-filtering-acf-article-image-wrapper img {
    max-height: 400px;
    min-height: 400px;
  }

  .lx-home-tours-filtering-acf-subheading {
    font-size: 48px;
    line-height: 56px;
  }
}

@media (max-width: 1024px) {
  .lx-home-tours-filtering-acf-section {
    padding: 32px 0;
  }

  .lx-home-tours-filtering-acf-subheading {
    font-size: 48px;
    line-height: 56px;
  }
}

/* Dropdown grid collapses to 2 cols at medium width */
@media (max-width: 992px) {
  .lx-home-tours-filtering-acf-dropdown-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 767px) {
  .lx-home-tours-filtering-acf-container {
    padding: 0;
  }

  .lx-home-tours-filtering-acf-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .lx-home-tours-filtering-acf-toolbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .lx-home-tours-filtering-acf-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .lx-home-tours-filtering-acf-article-image-wrapper img {
    max-height: 400px;
    min-height: 400px;
  }

  /* Align date/sort dropdowns to left on mobile */
  .lx-home-tours-filtering-acf-date-dropdown,
  .lx-home-tours-filtering-acf-sort-dropdown {
    right: auto;
    left: 0;
  }
}

/* Small screens */
@media (max-width: 600px) {
  .lx-home-tours-filtering-acf-dropdown-grid {
    grid-template-columns: 1fr;
  }

  .lx-home-tours-filtering-acf-toolbar-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
  }

  .lx-home-tours-filtering-acf-filter-dropdown {
    max-width: calc(100vw - 24px);
  }
}

/* Very small screens */
@media (max-width: 500px) {
  .lx-home-tours-filtering-acf-toolbar-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
  }

  .lx-home-tours-filtering-acf-date-wrap,
  .lx-home-tours-filtering-acf-sort-wrap {
    width: 100%;
  }

  .lx-home-tours-filtering-acf-filter-dropdown,
  .lx-home-tours-filtering-acf-sort-dropdown,
  .lx-home-tours-filtering-acf-date-dropdown {
    position: relative;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    margin-top: 8px;
  }

  .lx-home-tours-filtering-acf-dropdown-grid {
    grid-template-columns: 1fr;
  }

  .lx-home-tours-filtering-acf-search-input {
    width: 100%;
  }
}
/* =============================================================================
   21. EDITOR PARITY (Gutenberg block editor only)
   =============================================================================
   The block editor injects its own defaults (underlined links, boxed inputs,
   its own typography and block-gap margins) via .editor-styles-wrapper
   selectors, which override the block styles above inside the editor iframe.
   These rules re-assert the frontend appearance with editor-level specificity
   so the editor preview always matches the frontend. They have no effect on
   the frontend because .editor-styles-wrapper never exists there.
   ============================================================================= */

/* Section base typography */
.editor-styles-wrapper .lx-home-tours-filtering-acf-section {
  font-family: "Instrument Sans", sans-serif !important;
  color: #1a1a1a !important;
  margin: 0 !important;
  /* padding intentionally not forced here — it comes from the per-instance
     <style> block printed by render.php (ACF padding fields). */
}

/* Heading */
.editor-styles-wrapper .lx-home-tours-filtering-acf-subheading {
  font-family: "Libre Caslon Display", serif !important;
  font-size: 64px !important;
  line-height: 72px !important;
  font-weight: 400 !important;
  margin: 0 !important;
  text-decoration: none !important;
}

/* Kill the editor's default link underline / colors inside the block */
.editor-styles-wrapper .lx-home-tours-filtering-acf-section a,
.editor-styles-wrapper .lx-home-tours-filtering-acf-section a:visited,
.editor-styles-wrapper .lx-home-tours-filtering-acf-section a:focus {
  text-decoration: none !important;
  color: inherit !important;
  box-shadow: none !important;
}

/* Article title */
.editor-styles-wrapper .lx-home-tours-filtering-acf-article-title,
.editor-styles-wrapper .lx-home-tours-filtering-acf-article-title a {
  font-family: "Libre Caslon Display", serif !important;
  font-size: 32px !important;
  line-height: 40px !important;
  font-weight: 400 !important;
  color: #000 !important;
  text-decoration: none !important;
  margin: 0 !important;
}
.editor-styles-wrapper .lx-home-tours-filtering-acf-article-title a {
  display: block !important;
}

/* Category / region labels on cards */
.editor-styles-wrapper .lx-home-tours-filtering-acf-article-categories,
.editor-styles-wrapper .lx-home-tours-filtering-acf-region-filter-btn,
.editor-styles-wrapper .lx-home-tours-filtering-acf-article-category-other {
  font-family: "Instrument Sans", sans-serif !important;
}
.editor-styles-wrapper .lx-home-tours-filtering-acf-region-filter-btn {
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: #000 !important;
  font-size: 12px !important;
  letter-spacing: 1.8px !important;
  text-transform: uppercase !important;
  text-decoration: underline !important;
  text-underline-offset: 4px !important;
  cursor: pointer !important;
}

/* Toolbar buttons (Regions / Date / Sort) — strip editor button chrome */
.editor-styles-wrapper .lx-home-tours-filtering-acf-filter-btn,
.editor-styles-wrapper .lx-home-tours-filtering-acf-sort-btn,
.editor-styles-wrapper .lx-home-tours-filtering-acf-search-btn,
.editor-styles-wrapper .lx-home-tours-filtering-acf-filter-dropdown-close,
.editor-styles-wrapper .lx-home-tours-filtering-acf-load-more-btn {
  font-family: "Instrument Sans", sans-serif !important;
  background: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #000 !important;
}
.editor-styles-wrapper .lx-home-tours-filtering-acf-filter-btn,
.editor-styles-wrapper .lx-home-tours-filtering-acf-sort-btn,
.editor-styles-wrapper .lx-home-tours-filtering-acf-search-btn,
.editor-styles-wrapper .lx-home-tours-filtering-acf-filter-dropdown-close {
  border: none !important;
}
.editor-styles-wrapper .lx-home-tours-filtering-acf-load-more-btn {
  border: 1px solid #000 !important;
}

/* Search input — bottom border only, no editor box styling */
.editor-styles-wrapper .lx-home-tours-filtering-acf-search-input {
  font-family: "Instrument Sans", sans-serif !important;
  font-size: 16px !important;
  line-height: 24px !important;
  color: #000 !important;
  background: none !important;
  border: none !important;
  border-bottom: 1px solid #ccc !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 4px 0 !important;
  width: 180px !important;
  min-height: 0 !important;
}
.editor-styles-wrapper .lx-home-tours-filtering-acf-search-input:focus {
  border-bottom: 2px solid #000 !important;
  padding-bottom: 3px !important;
}

/* Neutralise editor block-gap margins injected between elements */
.editor-styles-wrapper .lx-home-tours-filtering-acf-section > *,
.editor-styles-wrapper .lx-home-tours-filtering-acf-container > * {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}
.editor-styles-wrapper .lx-home-tours-filtering-acf-heading-wrapper {
  margin-bottom: 32px !important;
}
.editor-styles-wrapper .lx-home-tours-filtering-acf-selection-wrapper {
  margin-bottom: 32px !important;
}
.editor-styles-wrapper .lx-home-tours-filtering-acf-load-more-wrap {
  margin-top: 48px !important;
}

/* Let the block span the editor canvas like the frontend container */
.editor-styles-wrapper .wp-block[data-type="acf/home-tours-filtering"] {
  max-width: 1280px !important;
}