/* TicketsFest Україна v9.8.3 — mobile performance / LCP helpers */
html{scroll-behavior:smooth;}
body{overflow-x:hidden;text-rendering:optimizeLegibility;}
img,svg,video,iframe{max-width:100%;height:auto;}
iframe{display:block;border:0;}

/* Keep below-the-fold sections cheap before they enter the viewport. */
.tfe-section,
.tfe-home-section,
.tfe-archive-section,
.tfe-related-events,
.tfe-performer-events,
.tfe-tour-schedule,
.tfe-seo-bottom,
.tfe-grid,
.tfe-slider-shell{
  content-visibility:auto;
  contain-intrinsic-size:1px 720px;
}

/* Hero/banner should reserve space early to reduce layout shift. */
.tftb-swiper,
.tftb-swiper .swiper,
.tftb-swiper .swiper-wrapper,
.tftb-swiper .swiper-slide{max-width:100%;}
.tftb-slide-inner{display:flex;align-items:center;justify-content:center;background:#0f172a;}
.tftb-slide-img{display:block;width:100%;height:auto;aspect-ratio:auto;object-fit:contain;object-position:center center;}
.tftb-banners--fit-cover .tftb-slide-inner{aspect-ratio:16/9;}
.tftb-banners--fit-cover .tftb-slide-img{height:100%;aspect-ratio:16/9;object-fit:cover;}

/* First screen on mobile: reduce visual cost while retaining design. */
@media (max-width: 640px){
  .tftb-slide-inner{border-radius:18px!important;margin-inline:10px!important;}
  .tfe-card-item,.tfe-card-inner{contain:layout paint style;}
  .tfe-section,
  .tfe-home-section,
  .tfe-archive-section,
  .tfe-grid,
  .tfe-slider-shell{contain-intrinsic-size:1px 560px;}
}

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.001ms!important;}
}

/* TicketsFest Україна v9.8.4 — critical mobile TBT/LCP hardening */
@media (max-width: 767px){
  html{scroll-behavior:auto;}

  /* The blurred decorative orbs are expensive on low-end mobile GPUs and are below design-critical. */
  .tfe-orb-1,
  .tfe-orb-2,
  .tfe-hero-banner-section::before,
  .tfe-sub-wrapper::before,
  .tfe-sub-wrapper::after{display:none!important;}

  /* Mobile first screen: keep paint simple and stable. */
  .tfe-hero-banner-section{padding-top:50px!important;padding-bottom:22px!important;margin-bottom:28px!important;}
  .tfe-hero-banner-section .tfe-banners-wrap{box-shadow:none!important;border-radius:18px!important;}
  .tftb-banners,.tftb-track,.tftb-slide,.tftb-slide-inner{contain:layout paint style;}

  /* Remove expensive visual effects on mobile while keeping the brand look. */
  .tfe-header,
  .tfe-sub-form,
  .tfe-advanced-filters,
  .tfe-instance .tfe-card-caption,
  .tfe-chip{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}

  .tfe-card-item,
  .tfe-card-inner,
  .tfe-artist-card,
  .tfe-view-all,
  .tfe-card-caption-cta,
  .tfe-btn-apply,
  .tfe-no-events__button{transition:none!important;animation:none!important;}

  .tfe-artist-card:hover,
  .tfe-card-inner:hover{transform:none!important;}

  /* Limit heavy shadows on mobile. */
  .tfe-card-inner,
  .tfe-artist-card,
  .tfe-advanced-filters,
  .tfe-no-events--archive{box-shadow:0 8px 24px rgba(15,23,42,.08)!important;}

  /* Stable image boxes reduce CLS. */
  .tfe-card-inner,
  .tfe-instance .tfe-card-inner{aspect-ratio:4/5;}
  .tfe-artist-cover{aspect-ratio:4/5;}

  /* Below-the-fold sections should not compete with the hero on initial mobile render. */
  .tfe-section-gap{content-visibility:auto;contain-intrinsic-size:1px 620px;}
}


/* TicketsFest Україна v9.9.20 — no-crop tour banner compatibility */
.tfe-hero-banner-section .tfe-banners-wrap{overflow:visible !important;}
.tfe-hero-banner-section .tftb-banners{overflow:hidden !important;}
.tfe-hero-banner-section .tftb-slide-inner{display:flex !important;align-items:center !important;justify-content:center !important;aspect-ratio:auto !important;background:#0f172a !important;}
.tfe-hero-banner-section .tftb-slide-img{width:100% !important;height:auto !important;max-height:none !important;object-fit:contain !important;object-position:center center !important;aspect-ratio:auto !important;}
.tfe-hero-banner-section .tftb-banners--fit-cover .tftb-slide-inner{aspect-ratio:16/9 !important;}
.tfe-hero-banner-section .tftb-banners--fit-cover .tftb-slide-img{height:100% !important;object-fit:cover !important;aspect-ratio:16/9 !important;}
@media(max-width:640px){
  .tfe-hero-banner-section .tftb-slide-inner{margin-inline:0 !important;border-radius:18px !important;}
}


/* TicketsFest Україна v9.9.21 — compact homepage banner fix.
   Prevents the tour banner slider from stretching into a tall empty dark frame. */
.tfe-hero-banner-section{
  padding:clamp(24px,4vw,42px) 0 clamp(28px,4vw,46px)!important;
}
.tfe-hero-banner-section .tfe-container{
  max-width:min(1320px,94vw)!important;
}
.tfe-hero-banner-section .tfe-banners-wrap{
  overflow:visible!important;
  background:transparent!important;
  line-height:0!important;
  height:auto!important;
  min-height:0!important;
  border-radius:22px!important;
}
.tfe-hero-banner-section .tftb-banners,
.tfe-hero-banner-section .tftb-track,
.tfe-hero-banner-section .tftb-slide,
.tfe-hero-banner-section .tftb-slide-inner{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
}
.tfe-hero-banner-section .tftb-track{
  align-items:stretch!important;
  contain:none!important;
}
.tfe-hero-banner-section .tftb-slide-inner{
  display:block!important;
  aspect-ratio:auto!important;
  background:transparent!important;
  line-height:0!important;
  border-radius:22px!important;
}
.tfe-hero-banner-section .tftb-slide-img{
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  min-height:0!important;
  object-fit:contain!important;
  object-position:center center!important;
  aspect-ratio:auto!important;
  vertical-align:top!important;
}
.tfe-hero-banner-section .tftb-nav{
  top:50%!important;
}
.tfe-hero-banner-section .tftb-dots{
  bottom:12px!important;
}
@media(max-width:640px){
  .tfe-hero-banner-section{padding-top:26px!important;padding-bottom:30px!important;margin-bottom:30px!important;}
  .tfe-hero-banner-section .tfe-container{max-width:100%!important;padding-inline:16px!important;}
  .tfe-hero-banner-section .tfe-banners-wrap{border-radius:18px!important;}
  .tfe-hero-banner-section .tftb-slide-inner{border-radius:18px!important;margin-inline:0!important;}
}


/* TicketsFest Україна v9.9.26 — keep original homepage design, fix banner ratio only */

.tfe-hero-banner-section .tfe-banners-wrap{max-width:1320px;margin:0 auto;}
.tfe-hero-banner-section .tftb-banners{height:auto!important;min-height:0!important;line-height:0;}
.tfe-hero-banner-section .tftb-track{align-items:stretch;height:auto!important;min-height:0!important;}
.tfe-hero-banner-section .tftb-slide{height:auto!important;min-height:0!important;}
.tfe-hero-banner-section .tftb-slide-inner{aspect-ratio:1600/791!important;height:auto!important;min-height:0!important;line-height:0;background:#0f172a;}
.tfe-hero-banner-section .tftb-slide-img{width:100%!important;height:100%!important;max-height:none!important;object-fit:cover!important;object-position:center center!important;aspect-ratio:1600/791!important;display:block;}
@media(max-width:767px){
  .tfe-hero-banner-section{padding-top:42px!important;padding-bottom:24px!important;margin-bottom:36px!important;}
  .tfe-hero-banner-section .tftb-slide-inner{border-radius:18px!important;margin-inline:0!important;}
}

/* v9.9.44 — only event shortcode containers need poster paint override on mobile */
@media (max-width: 768px){
  .tfe-events-page .tfe-instance .tfe-grid,
  .tfe-events-page .tfe-instance .tfe-card-item,
  .tfe-events-page .tfe-instance .tfe-card-inner,
  .tfe-events-page .tfe-slider-shell{
    content-visibility: visible !important;
    contain: none !important;
    contain-intrinsic-size: auto !important;
  }
}
