body.page-template-tpl-upcoming-tours .tours-grid-with-course-layout,
body.page-template-tpl-custom-tours .tours-grid-with-course-layout {
  padding-bottom: 56px;
}

.tours-grid-with-course-layout .tour-page-intro,
.tours-grid-with-course-layout .page-content-custom-tour {
  margin-bottom: 32px;
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  color: #24241e;
  font-size: 16px;
  line-height: 1;
}

.tours-grid-with-course-layout .tour-page-intro a:hover,
.tours-grid-with-course-layout .page-content-custom-tour a:hover {
  text-decoration: underline;
}

.tours-grid-with-course-layout .tour-page-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px 24px;
  margin-bottom: 38px;
  padding: 18px 0 0;
  border-top: 1px solid #d9d9d9;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.tours-grid-with-course-layout .tour-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  flex: 1 1 auto;
  align-self: center;
  order: 1;
}

.tours-grid-with-course-layout .tour-category-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 24px;
  border: 1px solid #dddddd;
  border-radius: 4px;
  background: #fff;
  color: #24241e;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  transition: 300ms;
  text-align: center;
}

.tours-grid-with-course-layout .tour-category-link:hover,
.tours-grid-with-course-layout .tour-category-link.is-active {
  background: #0a6848;
  border-color: #0a6848;
  color: #fff;
}

.tours-grid-with-course-layout .events-filter-header.is-tour-layout {
  margin-bottom: 0;
  flex: 0 0 auto;
  align-self: center;
  order: 2;
}

.tours-grid-with-course-layout .events-filter-header.is-tour-layout .filters {
  width: auto;
}

.tours-grid-with-course-layout .events-filter-header.is-tour-layout form {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.tours-grid-with-course-layout .tour-filter-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tours-grid-with-course-layout .tour-filter-group--date {
  margin-left: 0;
}

.tours-grid-with-course-layout
  .events-filter-header.is-tour-layout
  .filter-label {
  margin-left: 0;
  min-width: auto;
  font-size: 18px;
  white-space: nowrap;
}

.tours-grid-with-course-layout .events-filter-header.is-tour-layout select {
  min-width: 280px;
  height: 42px;
  border-radius: 4px;
  border-color: #d6d6d6;
  background: #fff;
  font-size: 18px;
  padding: 0 18px;
}

.tours-grid-with-course-layout
  .tours-by-date-grid.events-content-grid.is-course-grid {
  margin-top: 0;
}

.tours-grid-with-course-layout .tours-by-date {
  margin-top: 0;
}

.tours-grid-with-course-layout .tours-by-date-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: stretch;
  gap: 28px 24px;
  direction: rtl;
}

.tours-grid-with-course-layout .tours-by-date-grid .tour-item {
  width: calc(50% - 12px);
  margin-bottom: 0;
  padding-bottom: 50px;
}

.tours-grid-with-course-layout .tours-by-date-grid .thumb {
  height: 240px;
  margin-bottom: 15px;
  /* overflow: hidden; */
  background: #f1eee7;
}

.tours-grid-with-course-layout .tours-by-date-grid .thumb a {
  display: block;
  width: 100%;
  height: 100%;
}

.tours-grid-with-course-layout .tours-by-date-grid .thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tours-grid-with-course-layout .tours-by-date-grid .thumb.thumb--placeholder a {
  background: linear-gradient(135deg, #f4f0e8 0%, #ebe5d7 100%);
}

.tours-grid-with-course-layout .tours-by-date-load-more {
  margin-top: 32px;
  text-align: center;
}

.tours-grid-with-course-layout .page-content-custom-tour p,
.tours-grid-with-course-layout .tour-page-intro p {
  margin-bottom: 0.5em;
}

.tours-grid-with-course-layout .custom-tour-sidebar-form {
  margin-top: 56px;
}

@media (max-width: 992px) {
  .tours-grid-with-course-layout .tour-page-controls {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 0 0;
  }

  .tours-grid-with-course-layout .tour-category-link {
    font-size: 18px;
  }

  .tours-grid-with-course-layout .events-filter-header.is-tour-layout form {
    justify-content: flex-start;
  }

  .tours-grid-with-course-layout .events-filter-header.is-tour-layout,
  .tours-grid-with-course-layout .tour-category-links {
    align-self: stretch;
    order: initial;
  }

  .tours-grid-with-course-layout .tour-filter-group--date {
    margin-left: 0;
  }

  .tours-grid-with-course-layout .tours-by-date-grid {
    gap: 24px 20px;
  }

  .tours-grid-with-course-layout .tours-by-date-grid .thumb {
    height: 220px;
  }
}

@media (max-width: 781px) {
  .tours-grid-with-course-layout .tour-page-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .tours-grid-with-course-layout .events-filter-header.is-tour-layout form {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .tours-grid-with-course-layout .tour-filter-group {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .tours-grid-with-course-layout .events-filter-header.is-tour-layout select {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }

  .tours-grid-with-course-layout .tour-category-links {
    gap: 8px;
    justify-content: flex-start;
  }

  .tours-grid-with-course-layout .tour-category-link {
    width: 100%;
    font-size: 17px;
  }

  .tours-grid-with-course-layout .tours-by-date-grid {
    gap: 20px;
  }

  .tours-grid-with-course-layout .tours-by-date-grid .tour-item {
    width: 100%;
  }

  .tours-grid-with-course-layout .tours-by-date-grid .thumb {
    height: 210px;
  }
}
