/* =====================================================
   TicketsFest.EU v10.1.2 — sitewide mobile event cards
   Same mobile catalogue structure on home, /events/, city/country pages, artist pages, tour pages and related events.
   Structure only; brand styling stays TicketsFest.
   ===================================================== */
@media (max-width: 767px){
  html, body{
    max-width:100%!important;
    overflow-x:hidden!important;
  }

  html body .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid,
  html body main .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid,
  html body .entry-content .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid,
  html body .site-main .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid,
  html body .tfe-page-wrapper .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid,
  html body .tfe-section .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid,
  html body .tfe-related-events .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid,
  html body .tfe-artist-events .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid,
  html body .tfe-performer-events .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid,
  html body .tfe-tour-events .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid,
  html body .tfe-events-page .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-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;
    overflow:visible!important;
    justify-content:center!important;
    justify-items:center!important;
    align-items:stretch!important;
  }

  html body .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid > .tfe-card-item{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    display:flex!important;
    flex-direction:column!important;
    justify-self:center!important;
    text-align:center!important;
  }

  html body .tfe-wrap.tfe-instance[data-layout="grid"] .tfe-card-inner{
    width:100%!important;
    height:100%!important;
    display:flex!important;
    flex-direction:column!important;
    min-width:0!important;
    background:transparent!important;
  }

  html body .tfe-wrap.tfe-instance[data-layout="grid"] .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;
    text-align:center!important;
    padding:12px 0 0!important;
    background:transparent!important;
    color:#0f172a!important;
    opacity:1!important;
    transform:none!important;
  }

  html body .tfe-wrap.tfe-instance[data-layout="grid"] .tfe-card-caption-title{
    order:1!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;
    text-align:center!important;
    display:-webkit-box!important;
    -webkit-line-clamp:2!important;
    -webkit-box-orient:vertical!important;
    overflow:hidden!important;
  }

  html body .tfe-wrap.tfe-instance[data-layout="grid"] .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 .tfe-wrap.tfe-instance[data-layout="grid"] .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 .tfe-wrap.tfe-instance[data-layout="grid"] .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 .tfe-wrap.tfe-instance[data-layout="grid"] .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;
    gap:10px!important;
    text-align:center!important;
  }

  html body .tfe-wrap.tfe-instance[data-layout="grid"] .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 .tfe-wrap.tfe-instance[data-layout="grid"] .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 grid on single-tour when shortcode is unavailable. */
  html body .tfe-events-grid:has(.tfe-event-card){
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:28px 18px!important;
    width:min(100%,620px)!important;
    margin-left:auto!important;
    margin-right:auto!important;
    padding-left:18px!important;
    padding-right:18px!important;
    box-sizing:border-box!important;
  }
  html body .tfe-events-grid:has(.tfe-event-card) .tfe-event-card,
  html body .tfe-events-grid:has(.tfe-event-card) .tfe-event-info,
  html body .tfe-events-grid:has(.tfe-event-card) .tfe-event-title,
  html body .tfe-events-grid:has(.tfe-event-card) .tfe-event-meta,
  html body .tfe-events-grid:has(.tfe-event-card) .tfe-event-footer,
  html body .tfe-events-grid:has(.tfe-event-card) .tfe-event-price{
    text-align:center!important;
    align-items:center!important;
    justify-content:center!important;
  }
  html body .tfe-events-grid:has(.tfe-event-card) .tfe-event-footer{
    flex-direction:column!important;
    gap:10px!important;
  }
  html body .tfe-events-grid:has(.tfe-event-card) .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: 360px){
  html body .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid,
  html body .tfe-events-grid:has(.tfe-event-card){
    gap:24px 14px!important;
    padding-left:14px!important;
    padding-right:14px!important;
  }
  html body .tfe-wrap.tfe-instance[data-layout="grid"] .tfe-card-caption-title{
    font-size:16px!important;
  }
}
