/* ===== Responsive / mobile adaptation ===== */

html, body { overflow-x: hidden; }

/* Horizontal-scroll strips without visible scrollbars */
.sports-menu,
.bet-tabs,
.carousel {
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.sports-menu::-webkit-scrollbar,
.bet-tabs::-webkit-scrollbar,
.carousel::-webkit-scrollbar { display: none; }

/* Keep side padding on the main grid (".page-wrap" overrode ".container") */
.container.page-wrap { padding-left: 16px; padding-right: 16px; }

/* ---------- Tablet ---------- */
@media (max-width: 980px) {
  .container.page-wrap { padding-top: 12px; padding-bottom: 12px; gap: 16px; }
  .betslip-panel { max-width: 520px; width: 100%; margin: 0 auto; }
}

/* ---------- Phones ---------- */
@media (max-width: 700px) {
  body { font-size: 14px; }
  .container,
  .container.page-wrap { padding-left: 12px; padding-right: 12px; }

  /* Header */
  .header-top { padding: 8px 12px; gap: 8px; }
  .header-logo { flex: 1 1 auto; min-width: 0; }
  .header-logo img { height: 30px; max-width: 100%; object-fit: contain; object-position: left center; }
  .header-actions { gap: 6px; flex-shrink: 0; }
  .header-actions .btn { padding: 6px 14px; font-size: 13px; }
  .burger-btn { padding: 4px; flex-shrink: 0; }
  .burger-btn img { width: 24px; height: 24px; }

  /* Sports pills: one swipeable row */
  .sports-menu {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -12px;
    padding: 8px 12px;
  }
  .sports-menu a { padding: 6px 11px; font-size: 12px; flex-shrink: 0; }

  /* Category chips: compact two-column grid */
  .sport-categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .sport-categories a {
    font-size: 12px;
    padding: 7px 8px;
    min-width: 0;
    white-space: normal;
    line-height: 1.2;
  }
  .sport-categories a span { margin-left: auto; color: var(--grey); font-size: 11px; }

  .section-title { font-size: 18px; margin: 18px 0 10px; padding-left: 10px; border-left-width: 4px; }
  .section-head { gap: 10px; }
  .section-head .section-title { font-size: 18px; }
  .section-head .view-all { white-space: nowrap; }

  /* Carousels: swipe edge to edge */
  .carousel { margin: 0 -12px; padding: 6px 12px 12px; gap: 10px; scroll-padding: 0 12px; }
  .carousel .carousel-item img { width: 82vw; max-width: 340px; height: auto; border-radius: 6px; }

  /* Featured games: 2 per row */
  .featured-games { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

  /* Bet tabs: one swipeable row */
  .bet-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 8px -12px;
    padding: 0 12px;
  }
  .bet-tabs a { flex-shrink: 0; white-space: nowrap; font-size: 12px; padding: 6px 12px; }

  /* Odds tables fit the screen instead of scrolling sideways */
  .table-responsive { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
  .table-responsive table { min-width: 0; table-layout: fixed; }
  .table-responsive th:not(:first-child),
  .table-responsive td:not(:first-child) { width: 52px; padding: 8px 2px; font-size: 13px; }
  .table-responsive thead th { padding: 7px 4px; font-size: 12px; }
  .table-responsive tbody td:first-child {
    padding: 8px 8px 8px 10px;
    font-size: 12px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }
  .table-responsive tbody td small { font-size: 12px; color: var(--dark); }
  .table-responsive tbody td:not(:first-child) { background: #fafafa; border-left: 1px solid var(--border); }

  /* SEO text */
  .readmore-content { padding: 6px 0 20px; }
  .readmore-content h1 { font-size: 22px; line-height: 1.25; }
  .readmore-content h2 { font-size: 18px; margin: 20px 0 8px; }
  .readmore-content h3 { font-size: 16px; margin: 16px 0 6px; }
  .readmore-content p { font-size: 14px; line-height: 1.6; }
  .readmore-content ul, .readmore-content ol { padding-left: 18px; }

  /* Betslip */
  .betslip-settings { flex-wrap: wrap; gap: 8px; align-items: center; }
  .betslip-form-row .stake-box { width: 55%; max-width: 176px; }

  /* Footer */
  .footer-top { flex-direction: column; justify-content: center; text-align: center; }
  .footer-welcome { font-size: 13px; letter-spacing: 1px; padding: 14px 12px; }
  .footer-columns { grid-template-columns: 1fr 1fr; gap: 16px; }
  .footer-col a { font-size: 13px; }
  .footer-games { gap: 14px; }
  .footer-bottom { padding: 14px 0 18px; }

  /* Bottom nav */
  .mobile-bottom-nav { padding-bottom: env(safe-area-inset-bottom); }
  .mobile-bottom-nav .nav-inner { padding: 0 4px; }
  .mobile-bottom-nav a { text-align: center; line-height: 1.1; min-width: 0; }
  body { padding-bottom: calc(55px + env(safe-area-inset-bottom)); }
}

/* ---------- Small phones ---------- */
@media (max-width: 380px) {
  .search-btn { display: none; }
  .header-logo img { height: 26px; }
  .footer-columns { grid-template-columns: 1fr; }
  .table-responsive th:not(:first-child),
  .table-responsive td:not(:first-child) { width: 46px; font-size: 12px; }
}
