/* FubaSport Mobile Layer
   Greift nur auf Handy/kleinen Displays.
   Desktop/PC-Version bleibt unangetastet.
*/

@media (max-width: 820px) {
  html {
    scroll-padding-top: 76px;
  }

  body {
    overflow-x: hidden;
    font-size: 15px;
  }

  /* Allgemeine Breiten reparieren */
  main,
  section,
  article,
  .container,
  .max-w-7xl,
  .max-w-6xl,
  .max-w-5xl,
  .max-w-4xl {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Zu breite Elemente verhindern */
  img,
  video,
  canvas,
  iframe,
  table {
    max-width: 100% !important;
  }

  /* Seitenabstände angenehmer */
  main,
  .fs-page,
  .fs-content,
  .fs-section,
  section {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  /* Große Hero-Bereiche entschärfen */
  h1 {
    font-size: clamp(30px, 9vw, 44px) !important;
    line-height: 1.05 !important;
    letter-spacing: -0.04em !important;
  }

  h2 {
    font-size: clamp(24px, 7vw, 34px) !important;
    line-height: 1.12 !important;
  }

  h3 {
    font-size: clamp(20px, 5.6vw, 28px) !important;
    line-height: 1.16 !important;
  }

  p {
    line-height: 1.55;
  }

  /* Grids immer einspaltig */
  .grid,
  [class*="grid-cols"],
  [class*="lg:grid-cols"],
  [class*="md:grid-cols"],
  [class*="xl:grid-cols"] {
    grid-template-columns: 1fr !important;
  }

  /* Karten kompakter */
  article,
  .card,
  [class*="card"],
  [class*="rounded"],
  .fs-wm-sr-card,
  .fs-match-card,
  .fs-news-card {
    max-width: 100% !important;
  }

  .fs-wm-sr-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 12px 0 !important;
  }

  .fs-wm-sr-card {
    min-height: auto !important;
    padding: 14px !important;
    border-radius: 16px !important;
  }

  .fs-wm-sr-score {
    font-size: 24px !important;
  }

  .fs-wm-sr-team {
    font-size: 15px !important;
  }

  /* Startseite: News nicht so erschlagend */
  .fs-home-polish-news,
  .fs-home-polish-schedule {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }

  /* Überladene Abstände kleiner */
  .py-24,
  .py-20,
  .py-16 {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }

  .mt-20,
  .mt-16,
  .mt-12 {
    margin-top: 28px !important;
  }

  .mb-20,
  .mb-16,
  .mb-12 {
    margin-bottom: 28px !important;
  }

  /* Header mobiler machen */
  .fs-global-header,
  header {
    max-width: 100vw !important;
  }

  .fs-global-header nav,
  header nav {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
  }

  .fs-global-header nav::-webkit-scrollbar,
  header nav::-webkit-scrollbar {
    display: none;
  }

  .fs-global-header a,
  header a {
    white-space: nowrap;
  }

  /* Sidebanner auf Handy komplett weg */
  .fs-side-banners,
  .fs-side-banner,
  [class*="side-banner"] {
    display: none !important;
  }

  /* Tabellen/Listen besser scrollbar */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  /* Matchseiten kompakter */
  .fs-match-wide-grid,
  .fs-match-live-card,
  .fs-match-before-card {
    display: block !important;
    width: 100% !important;
  }

  .fs-live-enhanced,
  #matchLiveTimeline,
  #matchStats,
  #matchLineups {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  /* Footer angenehmer */
  footer {
    padding-left: 14px !important;
    padding-right: 14px !important;
    padding-bottom: 78px !important;
  }

  /* Mobile Quickbar-Platz */
  body.fs-mobile-layer-active {
    padding-bottom: 66px;
  }
}

/* Mobile Bottom Navigation */
@media (max-width: 820px) {
  .fs-mobile-quicknav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 9999;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(5, 17, 11, .94);
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 18px 45px rgba(0,0,0,.45);
    backdrop-filter: blur(14px);
  }

  .fs-mobile-quicknav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 13px;
    text-decoration: none;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(255,255,255,.07);
  }

  .fs-mobile-quicknav a:first-child {
    background: rgba(255,194,41,.95);
    color: #08120d;
  }
}

@media (min-width: 821px) {
  .fs-mobile-quicknav {
    display: none !important;
  }
}
