/* TicketsFest Україна v9.9.31 — Stability Layout Fix
   Purpose: stabilize non-home pages after global design patches without redesigning the site.
   Scope: layout wrappers, readable section titles, hero overflow, shortcode/plugin compatibility. */

:root{
  --tfe-stable-bg:#f8fafc;
  --tfe-stable-text:#0f172a;
  --tfe-stable-muted:#64748b;
  --tfe-stable-border:#e2e8f0;
  --tfe-stable-blue:#2563eb;
  --tfe-stable-container:min(1240px, calc(100vw - 40px));
}

html,body{overflow-x:hidden;}
#page,.site-content,.site-main{background:var(--tfe-stable-bg);}
.site-main{display:block;width:100%;min-height:70vh;}
.site-main > main,
.site-main > .tfe-page-wrapper,
.site-main > .tfe-events-page,
.site-main > .tfe-simple-page{width:100%;max-width:100%;}

/* Keep homepage controlled by home.css/banner plugin. This file must not redesign it. */
body.home .site-main,
body.page-template-page-home-dots .site-main{background:inherit;}

/* Generic container safety. */
body:not(.home):not(.page-template-page-home-dots) .tfe-container,
body:not(.home):not(.page-template-page-home-dots) .tf-container,
body:not(.home):not(.page-template-page-home-dots) .ticketsfest-container{
  width:var(--tfe-stable-container);
  max-width:var(--tfe-stable-container);
  margin-left:auto;
  margin-right:auto;
  box-sizing:border-box;
}
@media(max-width:640px){
  body:not(.home):not(.page-template-page-home-dots) .tfe-container,
  body:not(.home):not(.page-template-page-home-dots) .tf-container,
  body:not(.home):not(.page-template-page-home-dots) .ticketsfest-container{
    width:calc(100vw - 28px);
    max-width:calc(100vw - 28px);
    padding-left:0;
    padding-right:0;
  }
}

/* Section titles are not hero titles. Prevent white/huge headings inside white cards. */
body:not(.home):not(.page-template-page-home-dots) .tfe-section-title,
body:not(.home):not(.page-template-page-home-dots) .tfe-section-heading,
body:not(.home):not(.page-template-page-home-dots) .tfe-events-section-title{
  color:var(--tfe-stable-text)!important;
  -webkit-text-fill-color:var(--tfe-stable-text)!important;
  background:none!important;
  font-size:clamp(24px,3vw,38px)!important;
  line-height:1.12!important;
  letter-spacing:-.025em!important;
  margin-top:0!important;
  max-width:none!important;
}
body:not(.home):not(.page-template-page-home-dots) .tfe-hero .tfe-section-title,
body:not(.home):not(.page-template-page-home-dots) .tfe-premium-hero .tfe-section-title,
body:not(.home):not(.page-template-page-home-dots) .tfe-page-hero .tfe-section-title{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

/* Keep the Artists / Concert Tours premium direction, but stop oversized heroes. */
body:not(.home):not(.page-template-page-home-dots) .tfe-hero,
body:not(.home):not(.page-template-page-home-dots) .tfe-page-hero,
body:not(.home):not(.page-template-page-home-dots) .tfe-premium-hero{
  margin-top:0!important;
  margin-bottom:clamp(22px,4vw,40px)!important;
  padding-top:clamp(58px,8vw,92px)!important;
  padding-bottom:clamp(44px,6vw,70px)!important;
  min-height:auto!important;
}
body:not(.home):not(.page-template-page-home-dots) .tfe-hero-title{
  font-size:clamp(34px,6vw,68px)!important;
  line-height:1.02!important;
  letter-spacing:-.035em!important;
}
body:not(.home):not(.page-template-page-home-dots) .tfe-hero-desc{
  font-size:clamp(15px,1.7vw,18px)!important;
  line-height:1.65!important;
  max-width:720px!important;
}
body.single-event .tfe-hero,
body.single-tour .tfe-hero,
body.single-performer .tfe-hero{overflow:visible!important;}

/* Page wrappers: prevent double backgrounds, excessive side padding and broken nested-main effects. */
body:not(.home):not(.page-template-page-home-dots) .tfe-page-wrapper,
body:not(.home):not(.page-template-page-home-dots) .tfe-events-page,
body:not(.home):not(.page-template-page-home-dots) .tfe-tours-page,
body:not(.home):not(.page-template-page-home-dots) .tfe-artists-page,
body:not(.home):not(.page-template-page-home-dots) .tfe-contact-page{
  background:var(--tfe-stable-bg)!important;
  overflow-x:clip;
}

/* Archive/event pages: keep shortcode areas aligned and readable. */
.tfe-events-archive-section,
.tfe-premium-section--event-archive,
.tfe-events-featured-section,
.tfe-events-seo-block{
  width:var(--tfe-stable-container);
  max-width:var(--tfe-stable-container);
  margin-left:auto;
  margin-right:auto;
  box-sizing:border-box;
}
.tfe-events-archive-shell,
.tfe-events-archive-shell--flush{
  width:100%!important;
  max-width:100%!important;
  padding-left:0!important;
  padding-right:0!important;
}
@media(max-width:640px){
  .tfe-events-archive-section,
  .tfe-premium-section--event-archive,
  .tfe-events-featured-section,
  .tfe-events-seo-block{
    width:calc(100vw - 28px);
    max-width:calc(100vw - 28px);
  }
}

/* Cards/shortcode plugin compatibility. */
.tfe-grid,
.tfe-events-grid,
.tfe-tours-grid,
.tfe-artists-grid,
.tfe-related-events,
.tfe-performer-events,
.tfe-tour-schedule,
.tfe-slider-shell,
.tfe-slider-safe-area{
  max-width:100%;
  overflow:visible;
}
.tfe-card,
.tfe-panel,
.tfe-event-card,
.tfe-tour-card,
.tfe-artist-card,
.tfe-info-card,
.tfe-faq-item,
.tfe-sub-widget{
  box-sizing:border-box;
}

/* Single event/tour content blocks: stable white cards on light background. */
.tfe-single-layout .tfe-section,
.single-event .tfe-single-layout .tfe-section,
.single-tour .tfe-layout .tfe-section{
  box-sizing:border-box;
}
.single-event .tfe-content,
.single-tour .tfe-content{
  color:#334155;
  line-height:1.75;
}
.single-event .tfe-content h1,
.single-event .tfe-content h2,
.single-event .tfe-content h3,
.single-tour .tfe-content h1,
.single-tour .tfe-content h2,
.single-tour .tfe-content h3{
  color:#0f172a;
}

/* Header/footer should not be affected by page-level fixes. */
.tfe-header-outer,
.tfe-header-wrap,
.site-footer{max-width:100%;}
.tfe-mobile-overlay{box-sizing:border-box;}

/* External sliders used by connected plugins. */
.logo-partners-slider,
.lps-wrapper,
.lps-swiper,
.tftb-banners,
.tftb-track,
.tftb-slide,
.tftb-slide-inner{max-width:100%;box-sizing:border-box;}
.logo-partners-slider img,
.lps-wrapper img,
.lps-swiper img{max-width:100%;height:auto;object-fit:contain;}

/* Legal/simple pages. */
.tfe-simple-page__inner,
.tfe-legal-content,
.tfe-about-content{
  max-width:var(--tfe-stable-container);
  margin-left:auto;
  margin-right:auto;
}


/* v9.9.36 — header, mobile filter and social icon stability */
.tfe-social-svg{display:block;width:18px;height:18px;flex:0 0 auto;}
.tfe-social-icon,.footer-social-btn,.tfe-share-btn,.tfv-share a{font-size:0!important;line-height:1!important;}
.tfe-social-icon .tfe-social-svg,.footer-social-btn .tfe-social-svg,.tfe-share-btn .tfe-social-svg,.tfv-share a .tfe-social-svg{width:18px;height:18px;}
.tfe-share-btn--copy{font-size:13px!important;}

/* The header is fixed; reserve visual space above the home banner so it never covers the slider. */
body.home .tfe-hero-banner-section,
body.page-template-page-home-dots .tfe-hero-banner-section{
  padding-top:clamp(92px,7vw,116px)!important;
}
@media (max-width:768px){
  .tfe-header-outer{padding-top:calc(8px + env(safe-area-inset-top))!important;}
  body.home .tfe-hero-banner-section,
  body.page-template-page-home-dots .tfe-hero-banner-section{
    padding-top:calc(76px + env(safe-area-inset-top))!important;
  }
}

/* Artists page mobile category carousel: allow horizontal movement/tap selection. */
@media (max-width:768px){
  .tfe-artists-page .tfe-toolbar,
  .page-template-page-artists .tfe-toolbar{overflow:visible!important;}
  .tfe-artists-page .tfe-filter-pills,
  .page-template-page-artists .tfe-filter-pills,
  #tfeFilterPills{
    display:flex!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    width:calc(100vw - 32px)!important;
    max-width:calc(100vw - 32px)!important;
    min-width:0!important;
    padding:2px 0 10px!important;
    gap:8px!important;
    -webkit-overflow-scrolling:touch!important;
    touch-action:pan-x!important;
    overscroll-behavior-inline:contain!important;
    scrollbar-width:none!important;
  }
  .tfe-artists-page .tfe-filter-pills::-webkit-scrollbar,
  .page-template-page-artists .tfe-filter-pills::-webkit-scrollbar,
  #tfeFilterPills::-webkit-scrollbar{display:none!important;}
  .tfe-artists-page .tfe-filter-pill,
  .page-template-page-artists .tfe-filter-pill,
  #tfeFilterPills .tfe-filter-pill{flex:0 0 auto!important;white-space:nowrap!important;}
}
