/* ========================================
   Responsive Styles
   BetLatino
   ======================================== */

/* Mobile First Approach - Base styles are for mobile */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
  .container {
    padding: 0 var(--space-6);
  }

  h1 {
    font-size: var(--text-4xl);
  }

  .grid-sm-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  h1 {
    font-size: var(--text-5xl);
  }

  h2 {
    font-size: var(--text-3xl);
  }

  .section {
    padding: var(--space-20) 0;
  }

  .grid-md-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-md-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .hide-mobile {
    display: revert;
  }

  th.hide-mobile,
  td.hide-mobile {
    display: table-cell;
  }

  .show-mobile {
    display: none;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  h1 {
    font-size: var(--text-6xl);
  }

  .grid-lg-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-lg-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .section-lg {
    padding: var(--space-24) 0;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .container {
    padding: 0 var(--space-8);
  }

  .grid-xl-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .grid-xl-5 {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Mobile-only styles */
@media (max-width: 767px) {
  .hide-mobile {
    display: none !important;
  }

  .show-mobile {
    display: block !important;
  }

  /* Stack cards on mobile */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* Adjust section padding */
  .section {
    padding: var(--space-12) 0;
  }

  .section-lg {
    padding: var(--space-16) 0;
  }

  /* Cards full width */
  .card {
    padding: var(--space-4);
  }

  /* Buttons full width on mobile */
  .btn-block-mobile {
    width: 100%;
  }

  /* Category icons scroll horizontally */
  .category-icons {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: var(--space-4);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .category-icons::-webkit-scrollbar {
    display: none;
  }

  .category-item {
    min-width: 80px;
    flex-shrink: 0;
  }

  /* Table horizontal scroll */
  .table-wrapper {
    margin: 0 calc(-1 * var(--space-4));
    padding: 0 var(--space-4);
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  /* Footer stacked */
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  /* Newsletter form stacked */
  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form .input {
    width: 100%;
  }

  .newsletter-form .btn {
    width: 100%;
  }
}

/* Tablet-specific styles */
@media (min-width: 768px) and (max-width: 991px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn:hover {
    transform: none;
  }

  .card:hover {
    transform: none;
  }

  .category-item:hover {
    transform: none;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print styles */
@media print {
  body {
    background: white;
    color: black;
  }

  .btn,
  .nav,
  .footer,
  .newsletter {
    display: none;
  }
}