/* =====================================================
   TicketsFest.EU v10.1.4 — single tour schedule mobile grid
   Applies the catalogue card structure to the tour schedule block.
   Overrides older single-tour rules that forced 1 column under 390px.
   ===================================================== */
@media (max-width: 767px){
  body.single-tour #tour-schedule,
  body.single-tour #tour-schedule .tfe-section,
  body.single-tour #tour-schedule .tfe-wrap,
  body.single-tour #tour-schedule .tfe-instance{
    width:100%!important;
    max-width:100%!important;
    overflow:visible!important;
    contain:none!important;
    content-visibility:visible!important;
    box-sizing:border-box!important;
  }

  html body.single-tour #tour-schedule .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid,
  html body.single-tour #tour-schedule .tfe-instance[data-layout="grid"] > .tfe-grid,
  html body.single-tour #tour-schedule .tfe-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-auto-flow:row!important;
    flex-direction:initial!important;
    flex-wrap:initial!important;
    gap:28px 18px!important;
    width:min(100%,620px)!important;
    max-width:100%!important;
    margin-left:auto!important;
    margin-right:auto!important;
    padding-left:18px!important;
    padding-right:18px!important;
    box-sizing:border-box!important;
    overflow:visible!important;
    justify-content:center!important;
    justify-items:center!important;
    align-items:stretch!important;
    scroll-snap-type:none!important;
    touch-action:auto!important;
  }

  html body.single-tour #tour-schedule .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid > .tfe-card-item,
  html body.single-tour #tour-schedule .tfe-instance[data-layout="grid"] > .tfe-grid > .tfe-card-item{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    flex:initial!important;
    flex-shrink:1!important;
    scroll-snap-align:none!important;
    justify-self:center!important;
    align-self:stretch!important;
    display:flex!important;
    flex-direction:column!important;
    text-align:center!important;
  }

  html body.single-tour #tour-schedule .tfe-card-inner{
    width:100%!important;
    height:100%!important;
    min-width:0!important;
    display:flex!important;
    flex-direction:column!important;
    background:transparent!important;
    overflow:visible!important;
    box-shadow:none!important;
  }

  html body.single-tour #tour-schedule img.tfe-poster,
  html body.single-tour #tour-schedule .tfe-card-inner > img,
  html body.single-tour #tour-schedule .tfe-card-link img{
    width:100%!important;
    aspect-ratio:4/5!important;
    height:auto!important;
    min-height:0!important;
    object-fit:cover!important;
    object-position:center top!important;
    border-radius:18px!important;
    display:block!important;
  }

  html body.single-tour #tour-schedule .tfe-card-caption{
    position:static!important;
    display:flex!important;
    flex:1 1 auto!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:100%!important;
    min-height:0!important;
    padding:12px 0 0!important;
    background:transparent!important;
    color:#0f172a!important;
    text-align:center!important;
    opacity:1!important;
    transform:none!important;
    box-sizing:border-box!important;
  }

  html body.single-tour #tour-schedule .tfe-card-caption-title{
    order:1!important;
    width:100%!important;
    min-height:calc(2 * 1.14em)!important;
    height:calc(2 * 1.14em)!important;
    margin:0 0 8px!important;
    color:#0f172a!important;
    font-size:17px!important;
    line-height:1.14!important;
    font-weight:900!important;
    text-align:center!important;
    display:-webkit-box!important;
    -webkit-line-clamp:2!important;
    -webkit-box-orient:vertical!important;
    overflow:hidden!important;
  }

  html body.single-tour #tour-schedule .tfe-card-caption-top{
    order:2!important;
    width:100%!important;
    min-height:1.35em!important;
    height:1.35em!important;
    margin:0 0 7px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
  }

  html body.single-tour #tour-schedule .tfe-card-caption-date{
    display:block!important;
    width:100%!important;
    background:transparent!important;
    color:#334155!important;
    padding:0!important;
    box-shadow:none!important;
    font-size:13px!important;
    font-weight:800!important;
    line-height:1.35!important;
    text-align:center!important;
  }

  html body.single-tour #tour-schedule .tfe-card-caption-meta{
    order:3!important;
    width:100%!important;
    min-height:calc(2 * 1.32em)!important;
    height:calc(2 * 1.32em)!important;
    margin:0 0 9px!important;
    color:#334155!important;
    font-size:13px!important;
    line-height:1.32!important;
    text-align:center!important;
    display:-webkit-box!important;
    -webkit-line-clamp:2!important;
    -webkit-box-orient:vertical!important;
    overflow:hidden!important;
  }

  html body.single-tour #tour-schedule .tfe-card-caption-row{
    order:4!important;
    width:100%!important;
    margin-top:auto!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:10px!important;
    text-align:center!important;
  }

  html body.single-tour #tour-schedule .tfe-card-caption-price{
    width:100%!important;
    min-height:1.3em!important;
    height:1.3em!important;
    margin:0!important;
    overflow:hidden!important;
    color:#0f172a!important;
    font-size:13px!important;
    font-weight:900!important;
    text-align:center!important;
  }

  html body.single-tour #tour-schedule .tfe-card-caption-cta{
    width:100%!important;
    min-height:40px!important;
    height:40px!important;
    border-radius:999px!important;
    margin-left:auto!important;
    margin-right:auto!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
  }

  /* Fallback markup when [display_events] is unavailable. */
  html body.single-tour #tour-schedule .tfe-events-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:28px 18px!important;
    width:min(100%,620px)!important;
    max-width:100%!important;
    margin-left:auto!important;
    margin-right:auto!important;
    padding-left:18px!important;
    padding-right:18px!important;
    box-sizing:border-box!important;
  }

  html body.single-tour #tour-schedule .tfe-event-card,
  html body.single-tour #tour-schedule .tfe-event-info,
  html body.single-tour #tour-schedule .tfe-event-title,
  html body.single-tour #tour-schedule .tfe-event-meta,
  html body.single-tour #tour-schedule .tfe-event-footer,
  html body.single-tour #tour-schedule .tfe-event-price{
    text-align:center!important;
    align-items:center!important;
    justify-content:center!important;
  }

  html body.single-tour #tour-schedule .tfe-event-title{
    min-height:calc(2 * 1.15em)!important;
    height:calc(2 * 1.15em)!important;
    display:-webkit-box!important;
    -webkit-line-clamp:2!important;
    -webkit-box-orient:vertical!important;
    overflow:hidden!important;
  }

  html body.single-tour #tour-schedule .tfe-event-meta{
    min-height:calc(2 * 1.32em)!important;
    height:calc(2 * 1.32em)!important;
    overflow:hidden!important;
  }

  html body.single-tour #tour-schedule .tfe-event-footer{
    margin-top:auto!important;
    flex-direction:column!important;
    gap:10px!important;
  }

  html body.single-tour #tour-schedule .tfe-event-btn{
    width:100%!important;
    min-height:40px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:999px!important;
  }
}

@media (max-width: 390px){
  html body.single-tour #tour-schedule .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid,
  html body.single-tour #tour-schedule .tfe-instance[data-layout="grid"] > .tfe-grid,
  html body.single-tour #tour-schedule .tfe-grid,
  html body.single-tour #tour-schedule .tfe-events-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:24px 14px!important;
    padding-left:14px!important;
    padding-right:14px!important;
  }
}

@media (max-width: 340px){
  html body.single-tour #tour-schedule .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid,
  html body.single-tour #tour-schedule .tfe-instance[data-layout="grid"] > .tfe-grid,
  html body.single-tour #tour-schedule .tfe-grid,
  html body.single-tour #tour-schedule .tfe-events-grid{
    gap:22px 12px!important;
    padding-left:12px!important;
    padding-right:12px!important;
  }
  html body.single-tour #tour-schedule .tfe-card-caption-title{
    font-size:15px!important;
  }
  html body.single-tour #tour-schedule .tfe-card-caption-date,
  html body.single-tour #tour-schedule .tfe-card-caption-meta,
  html body.single-tour #tour-schedule .tfe-card-caption-price{
    font-size:12px!important;
  }
  html body.single-tour #tour-schedule .tfe-card-caption-cta{
    min-height:38px!important;
    height:38px!important;
    font-size:13px!important;
  }
}
