/* ==========================================================================
   RESPONSIVE STYLES - Mobile First
   ========================================================================== */

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

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

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  .nav {
    display: block;
  }

  .mobile-menu-btn {
    display: none;
  }

  .mobile-nav {
    display: none !important;
  }

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

  .logo img {
    height: 50px;
  }

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

  .page-header {
    padding: var(--space-3xl) 0;
  }

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

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

  /* Casino cards in article - 2 columns on tablet */
  .casino-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
  .container {
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
  }

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

  .nav__list {
    gap: var(--space-xl);
  }

  .card__content {
    padding: var(--space-xl);
  }

  .modal__content {
    max-width: 900px;
  }

  .modal__body {
    max-height: 70vh;
    padding: var(--space-xl);
  }
}

/* Extra large devices (large desktops, 1280px and up) */
@media (min-width: 1280px) {
  .grid--4-xl { grid-template-columns: repeat(4, 1fr); }
  .grid--5-xl { grid-template-columns: repeat(5, 1fr); }
}

/* ==========================================================================
   MOBILE SPECIFIC OVERRIDES
   ========================================================================== */

@media (max-width: 767px) {
  /* Full width buttons on mobile */
  .btn--mobile-full {
    width: 100%;
  }

  /* Stack casino card elements */
  .casino-card__header {
    flex-direction: column;
    text-align: center;
  }

  /* Smaller page titles */
  .page-header__title {
    font-size: var(--text-3xl);
  }

  /* Adjust carousel on mobile */
  .kw-carousel {
    padding: var(--space-lg) 0;
  }

  .kw-carousel__title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-lg);
  }

  /* Simplified footer on mobile */
  .footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer__links {
    align-items: center;
  }

  /* Article content adjustments */
  .article-content h2 {
    font-size: var(--text-xl);
  }

  .article-content h3 {
    font-size: var(--text-lg);
  }

  /* Modal full screen on mobile */
  .modal.active {
    padding: 0;
    padding-top: 0;
    align-items: stretch;
  }

  .modal__content {
    border-radius: 0;
    max-width: none;
    min-height: 100vh;
  }

  .modal__header {
    position: sticky;
    top: 0;
    background: var(--color-bg-card);
    z-index: 1;
  }

  /* Pagination adjustments */
  .pagination {
    flex-wrap: wrap;
  }

  .pagination__link {
    min-width: 40px;
    height: 40px;
    font-size: var(--text-sm);
  }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
  .header,
  .footer,
  .nav,
  .mobile-nav,
  .kw-carousel,
  .btn,
  .pagination,
  .sidebar {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .card,
  .article-content {
    border: 1px solid #ccc;
    box-shadow: none;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

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

  html {
    scroll-behavior: auto;
  }

  .kw-carousel__row--animate,
  .kw-carousel__row--reverse,
  .kw-carousel__row--slow {
    animation: none;
  }
}

/* ==========================================================================
   DARK MODE (already dark, but can be lighter preference)
   ========================================================================== */

@media (prefers-color-scheme: light) {
  /* Keep dark theme - casino sites are typically dark */
}

/* ==========================================================================
   HIGH CONTRAST MODE
   ========================================================================== */

@media (prefers-contrast: high) {
  :root {
    --color-primary: #ffd700;
    --color-text: #ffffff;
    --color-text-muted: #cccccc;
  }

  .card,
  .btn,
  .form-input,
  .form-textarea {
    border-width: 2px;
  }
}
