/* Clear filter labels without the font-dependent chevrons. */
.catalog-page :is(.catalog-filter, .catalog-sort) > span:last-child {
  display: none !important;
}

:root body.tour-page .tour-route-section {
  background: #122a24 url('/route-contours-v232.svg') center / 100% 100% no-repeat !important;
}

.tour-hero-bg .hero-photo-slide {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 650ms ease-in-out;
}

.tour-hero-bg .hero-photo-slide.is-visible {
  opacity: 1;
}

.tour-hero-bg.has-hero-slideshow .tour-wide-panorama {
  display: none !important;
}

:root body.tour-page[data-button-theme][data-button-theme] .hero-slideshow-toggle {
  display: inline-grid !important;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  min-height: 36px !important;
  padding: 0 !important;
  align-self: center;
  border: 1px solid #fff !important;
  border-radius: 50% !important;
  background: #163f32cc !important;
  color: #fff !important;
}

.hero-slideshow-toggle svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 760px) {
  :root body.tour-page .tour-thumb {
    height: 46px !important;
  }

  :root body.catalog-page .catalog-filters {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px !important;
  }

  :root body.catalog-page .catalog-filter-wrap {
    min-width: 0 !important;
    width: 100% !important;
  }

  :root body.catalog-page :is(.catalog-filter, .catalog-sort) {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    white-space: normal !important;
    overflow-wrap: normal !important;
    padding: 12px 10px !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    text-align: left;
  }

  :root body.catalog-page .catalog-toggle {
    grid-column: 1 / -1;
  }

  :root body.catalog-page [data-filter-button="duration"] {
    padding-inline: 6px !important;
    font-size: 12px !important;
  }

  :root body.catalog-page .catalog-sort-wrap {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
  }

  :root body.tour-page .tour-facts > div {
    min-width: 0 !important;
    grid-template-columns: 20px minmax(0, 1fr) !important;
    padding: 12px 10px !important;
    column-gap: 8px !important;
  }

  :root body.tour-page .tour-facts :is(b, small) {
    min-width: 0;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  /* The longest caption gets the full card width below its icon and value. */
  :root body.tour-page .tour-facts small {
    grid-column: 1 / -1 !important;
    margin-top: 5px;
  }

  :root body.school-page .school-intro {
    display: flex;
    flex-direction: column;
    padding: 0 0 24px;
  }

  :root body.school-page .school-intro > .school-spruce {
    display: none !important;
  }

  :root body.school-page .school-hero {
    order: 0;
    min-height: 0 !important;
    padding: 20px 0 0 !important;
  }

  :root body.school-page .school-hero-copy {
    max-width: none;
  }

  :root body.school-page .school-breadcrumb {
    margin: 0 0 18px !important;
    font-size: 12px !important;
  }

  :root body.school-page .school-hero h1 {
    margin: 0 0 18px !important;
    font-size: clamp(42px, 11vw, 56px) !important;
    line-height: 1.03 !important;
    letter-spacing: -.035em;
  }

  :root body.school-page :is(.school-lead, .school-hero-details) {
    max-width: none;
    margin: 0 0 12px !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
  }

  :root body.school-page .school-reward-hook {
    margin-top: 18px;
    padding: 12px !important;
    min-height: 0 !important;
    border-radius: 12px;
  }

  :root body.school-page .school-reward-hook strong {
    text-wrap: balance;
    font-size: 14px !important;
  }

  :root body.school-page .school-reward-hook small {
    font-size: 12px !important;
  }

  :root body.school-page .school-hero-photo {
    position: relative !important;
    inset: auto !important;
    order: 1;
    z-index: 0 !important;
    width: calc(100% - 32px) !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    margin: 20px 16px !important;
    border-radius: 16px;
    mask: none !important;
    -webkit-mask: none !important;
    background-size: cover !important;
    background-position: center 42% !important;
    opacity: 1 !important;
  }

  :root body.school-page .school-classes {
    order: 2;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-top: 0 !important;
  }

  :root body.school-page .school-class {
    padding: 12px !important;
    min-height: 66px !important;
    gap: 8px;
    border-radius: 12px;
  }

  :root body.school-page .school-class small {
    display: none !important;
  }

  :root body.school-page .school-class strong {
    font-size: 14px !important;
    line-height: 1.4 !important;
  }

  :root body.school-page .school-class-icon {
    flex: 0 0 24px;
    width: 24px;
  }

  :root body.school-page .school-class-groups {
    grid-column: 1 / -1;
  }
}

@media (max-width: 380px) {
  :root body.tour-page .tour-facts,
  :root body.catalog-page .catalog-filters {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tour-hero-bg .hero-photo-slide {
    transition: none;
  }
}
