/**
 * Responsive Styles
 * Mobile-first breakpoints
 */

/* ========== BREAKPOINTS ========== */
/* Mobile: 0-640px (base styles) */
/* Tablet: 641px-1024px */
/* Desktop: 1025px+ */

/* ========== MOBILE (Default/Base) ========== */

/* Mobile Navigation */
@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    padding: var(--space-4);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    z-index: var(--z-dropdown);
  }

  .nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Mobile Grid Adjustments */
@media (max-width: 640px) {
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }

  .casino-card-logo {
    height: 100px;
  }

  .carousel-track {
    gap: var(--space-2);
  }

  .kw-pill {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
    min-height: 36px;
  }

  .modal {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  .modal-header,
  .modal-body {
    padding: var(--space-4);
  }

  .article-item {
    padding: var(--space-4);
  }

  .btn {
    width: 100%;
  }

  .pagination {
    flex-wrap: wrap;
  }
}

/* ========== TABLET (641px - 1024px) ========== */
@media (min-width: 641px) {
  .grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .casino-card-logo {
    height: 140px;
  }

  /* Show 2 columns for casino cards on tablet */
  .grid-auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ========== DESKTOP (1025px+) ========== */
@media (min-width: 1025px) {
  .mobile-menu-toggle {
    display: none;
  }

  .nav {
    position: static;
    flex-direction: row;
    transform: none;
    opacity: 1;
    visibility: visible;
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }

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

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

  .casino-card-logo {
    height: 160px;
  }

  /* Show 3 columns for casino cards on desktop */
  .grid-auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  }

  /* Hover effects only on desktop */
  .card:hover {
    transform: translateY(-4px);
  }

  .article-item:hover {
    transform: translateX(8px);
  }
}

/* ========== LARGE DESKTOP (1440px+) ========== */
@media (min-width: 1440px) {
  .grid-auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  }
}

/* ========== PRINT STYLES ========== */
@media print {
  .site-header,
  .site-footer,
  .nav,
  .mobile-menu-toggle,
  .btn,
  .carousel-wrapper,
  .modal-backdrop {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  a {
    text-decoration: underline;
  }

  .article-item,
  .card {
    page-break-inside: avoid;
    border: 1px solid #ccc;
    box-shadow: none;
  }
}

/* ========== TOUCH DEVICE ADJUSTMENTS ========== */
@media (hover: none) and (pointer: coarse) {
  /* Increase touch targets */
  .btn,
  .nav-link,
  .page-link,
  .kw-pill {
    min-height: var(--touch-target);
    min-width: var(--touch-target);
  }

  /* Remove hover effects on touch devices */
  .card:hover,
  .casino-card:hover,
  .article-item:hover {
    transform: none;
  }

  /* Disable carousel pause on hover for touch devices */
  .carousel-wrapper:hover .carousel-track {
    animation-play-state: running;
  }
}

/* ========== HIGH CONTRAST MODE ========== */
@media (prefers-contrast: high) {
  :root {
    --color-border: rgba(0, 0, 0, 0.4);
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }

  .btn,
  .card,
  .kw-pill {
    border: 2px solid currentColor;
  }
}

/* ========== LANDSCAPE MOBILE ========== */
@media (max-width: 1024px) and (orientation: landscape) {
  .modal {
    max-height: 95vh;
  }

  .site-header {
    padding: var(--space-2) 0;
  }
}
