/* ========================================
   MOBILE FIRST RESPONSIVE DESIGN
======================================== */

/* Extra small devices (phones, less than 576px) */
/* Base styles are mobile-first */

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

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

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

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .hide-mobile {
    display: block;
  }

  .show-mobile {
    display: none;
  }

  .casino-card {
    flex-direction: row;
  }

  .casino-card-header {
    flex-direction: column;
    justify-content: center;
    width: 200px;
    min-height: 200px;
  }

  .casino-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .casino-card-footer {
    display: flex;
    align-items: center;
    width: 180px;
    border-top: none;
    border-left: 1px solid var(--color-border);
  }

  .article-meta {
    gap: var(--space-lg);
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

  main {
    padding: var(--space-2xl) 0;
  }

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

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

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

  .container {
    max-width: var(--container-max);
  }
}

/* Print styles */
@media print {
  .header,
  .footer,
  .nav-mobile,
  .mobile-menu-btn,
  .kw-carousel-section,
  .modal-backdrop,
  .btn {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .container {
    max-width: 100%;
  }

  a {
    text-decoration: underline;
  }

  .article-content a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --color-border: rgba(255, 255, 255, 0.3);
  }

  .btn,
  .card,
  .form-control {
    border: 2px solid currentColor;
  }
}

/* Dark mode preference (already dark, but ensure consistency) */
@media (prefers-color-scheme: light) {
  /* Keep dark theme regardless of system preference */
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn:hover,
  .card:hover,
  .nav-desktop a:hover {
    transform: none;
  }

  /* Ensure all interactive elements have adequate touch targets */
  .kw-pill,
  .btn,
  .nav-mobile a,
  .tag,
  .pagination a,
  .pagination span {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Landscape phone orientation */
@media (max-width: 767px) and (orientation: landscape) {
  .hero {
    padding: var(--space-xl) 0;
  }

  .hero-title {
    font-size: var(--text-2xl);
  }
}

/* Very small screens */
@media (max-width: 359px) {
  :root {
    --text-base: 0.9rem;
    --space-md: 0.75rem;
    --space-lg: 1rem;
  }

  .container {
    padding: 0 var(--space-sm);
  }
}
