/* ========================================
   RESPONSIVE WEBCAST SPORTS STYLESHEET
   ======================================== */

/* CSS Variables for consistency */
:root {
  --primary-dark: #212529;
  --secondary-dark: #343a40;
  --border-dark: #495057;
  --text-light: #f8f9fa;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --card-border-radius: 0.375rem;
  --transition-speed: 0.3s ease-in-out;
}

/* ========================================
   GLOBAL STYLES
   ======================================== */

* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  background-color: var(--primary-dark);
  color: var(--text-light);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

/* ========================================
   TYPOGRAPHY - RESPONSIVE
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: var(--spacing-md);
  font-weight: 600;
  line-height: 1.2;
}

/* Mobile first typography */
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }

/* Tablet and up */
@media (min-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.1rem; }
}

/* Desktop and up */
@media (min-width: 1200px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.25rem; }
}

p {
  margin-bottom: var(--spacing-md);
}

/* ========================================
   NAVIGATION BAR - RESPONSIVE
   ======================================== */

.header {
  background-color: var(--secondary-dark) !important;
  border-bottom: 2px solid var(--border-dark);
  padding: var(--spacing-md) 0;
}

.header .navbar-brand {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-light) !important;
  letter-spacing: 0.05em;
  transition: color var(--transition-speed);
}

.header .navbar-brand:hover {
  color: #0d6efd !important;
}

/* Mobile: Stack nav items vertically */
@media (max-width: 991px) {
  .header .navbar-brand {
    font-size: 0.85rem;
  }

  .header .navbar-nav {
    margin-top: var(--spacing-md);
  }

  .header .nav-link {
    padding: var(--spacing-sm) 0 !important;
    font-size: 0.95rem;
  }
}

/* Tablet and up: Horizontal nav */
@media (min-width: 992px) {
  .header .nav-link {
    padding: 0 var(--spacing-md) !important;
    font-size: 1rem;
  }
}

.header .nav-link {
  color: var(--text-light) !important;
  transition: color var(--transition-speed);
  cursor: pointer;
}

.header .nav-link:hover,
.header .nav-link.active {
  color: #0d6efd !important;
  border-bottom: 2px solid #0d6efd;
}

/* ========================================
   MAIN CONTENT - RESPONSIVE GRID
   ======================================== */

.content {
  background-color: var(--primary-dark);
  min-height: calc(100vh - 60px);
}

/* Mobile: Stacked layout */
@media (max-width: 575px) {
  .content {
    padding: var(--spacing-sm) !important;
  }

  .content .row {
    gap: var(--spacing-sm) !important;
  }

  .content .col-12 {
    flex: 0 0 100% !important;
  }
}

/* Tablet: 2-column layout */
@media (min-width: 576px) and (max-width: 991px) {
  .content {
    padding: var(--spacing-md) !important;
  }

  .content .row {
    gap: var(--spacing-md) !important;
  }

  .content .col-md-6 {
    flex: 0 0 50% !important;
  }

  .content .col-md-12 {
    flex: 0 0 100% !important;
  }
}

/* Desktop: 3-column layout */
@media (min-width: 992px) {
  .content {
    padding: var(--spacing-lg) !important;
  }

  .content .row {
    gap: var(--spacing-lg) !important;
  }

  .content .col-lg-3 {
    flex: 0 0 25% !important;
  }

  .content .col-lg-5 {
    flex: 0 0 41.6666% !important;
  }

  .content .col-lg-4 {
    flex: 0 0 33.3333% !important;
  }
}

/* Large Desktop: Optimized spacing */
@media (min-width: 1400px) {
  .content {
    padding: var(--spacing-xl) !important;
  }

  .content .row {
    gap: var(--spacing-xl) !important;
  }
}

/* ========================================
   CARDS - RESPONSIVE
   ======================================== */

.card {
  background-color: var(--secondary-dark) !important;
  border: 1px solid var(--border-dark) !important;
  border-radius: var(--card-border-radius);
  margin-bottom: var(--spacing-md);
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  height: 100%;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.card-header {
  background-color: var(--primary-dark) !important;
  border-bottom: 1px solid var(--border-dark) !important;
  padding: var(--spacing-md);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Mobile: Reduced padding */
@media (max-width: 575px) {
  .card-header {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.85rem;
  }

  .card-body {
    padding: var(--spacing-sm) !important;
  }
}

/* Tablet and up: Normal padding */
@media (min-width: 576px) {
  .card-header {
    padding: var(--spacing-md);
  }

  .card-body {
    padding: var(--spacing-md) !important;
  }
}

/* Desktop: Generous padding */
@media (min-width: 992px) {
  .card-body {
    padding: var(--spacing-lg) !important;
  }
}

.card.text-bg-dark {
  color: var(--text-light) !important;
}

/* ========================================
   API SPORTS WIDGETS - RESPONSIVE
   ======================================== */

api-sports-widget {
  width: 100%;
  display: block;
  overflow-x: auto;
  overflow-y: auto;
}

/* Mobile: Smaller widget containers */
@media (max-width: 575px) {
  api-sports-widget {
    font-size: 0.85rem;
  }
}

/* Prevent horizontal scrolling on widgets */
@media (max-width: 991px) {
  api-sports-widget {
    max-width: 100%;
  }
}

/* ========================================
   BUTTONS - RESPONSIVE
   ======================================== */

button, .btn, a.btn {
  border-radius: var(--card-border-radius);
  font-weight: 500;
  transition: all var(--transition-speed);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

/* Mobile: Larger touch targets */
@media (max-width: 575px) {
  button, .btn, a.btn {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    min-height: 44px;
    min-width: 44px;
  }
}

button:active, .btn:active {
  transform: scale(0.98);
}

/* ========================================
   ADVERTISEMENT SECTION - RESPONSIVE
   ======================================== */

.adsbygoogle {
  display: block;
  margin: var(--spacing-md) 0;
}

@media (max-width: 575px) {
  .adsbygoogle {
    margin: var(--spacing-sm) 0;
  }
}

@media (min-width: 992px) {
  .adsbygoogle {
    margin: var(--spacing-lg) 0;
  }
}

/* ========================================
   ACCESSIBILITY & PRINT STYLES
   ======================================== */

/* Focus states for keyboard navigation */
.nav-link:focus,
button:focus,
.btn:focus,
a:focus {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode preference (already dark, but for consistency) */
@media (prefers-color-scheme: dark) {
  body {
    background-color: var(--primary-dark);
    color: var(--text-light);
  }
}

/* Print styles */
@media print {
  .header, .adsbygoogle, .navbar-toggler {
    display: none !important;
  }

  .card {
    page-break-inside: avoid;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-center-mobile {
  text-align: center;
}

@media (min-width: 576px) {
  .text-center-mobile {
    text-align: left;
  }
}

/* Hidden on mobile */
.d-none-mobile {
  display: none !important;
}

@media (min-width: 576px) {
  .d-none-mobile {
    display: block !important;
  }
}

/* Visible only on mobile */
.d-mobile-only {
  display: block !important;
}

@media (min-width: 576px) {
  .d-mobile-only {
    display: none !important;
  }
}

/* ========================================
   SCROLLBAR STYLING (Modern Browsers)
   ======================================== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--primary-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border-dark);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6c757d;
}

/* ========================================
   RESPONSIVE BREAKPOINTS SUMMARY
   ======================================== */
/*
  xs (extra small): < 576px  - Mobile phones
  sm (small):      ≥ 576px  - Large phones / small tablets
  md (medium):     ≥ 768px  - Tablets
  lg (large):      ≥ 992px  - Small laptops
  xl (extra large):≥ 1200px - Desktops
  xxl (2xl):       ≥ 1400px - Large desktops
*/
