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

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

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

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

  .article-content {
    padding: var(--spacing-2xl);
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .main-nav {
    display: flex;
  }

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

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

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

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

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

/* Mobile styles (below 992px) */
@media (max-width: 991px) {
  .main-nav {
    display: none;
  }

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

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

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

/* Tablet and below - hero stacking */
@media (max-width: 767px) {
  .hero-image img {
    max-height: 280px;
  }

  /* Hide decorative elements on mobile */
  .hero-decor {
    display: none;
  }

  .hero-image {
    width: 100%;
    justify-content: center;
  }
}

/* Extra small devices (phones, 575px and below) */
@media (max-width: 575px) {
  :root {
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
    --spacing-2xl: 2rem;
    --spacing-3xl: 2.5rem;
  }

  .container {
    padding: 0 var(--spacing-md);
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

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

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

  .hero-subtitle {
    font-size: var(--text-base);
  }

  .hero-image img {
    max-height: 220px;
  }

  .article-content {
    padding: var(--spacing-md);
  }

  .modal {
    width: 95%;
    max-height: 90vh;
  }

  .card-content {
    padding: var(--spacing-md);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .pagination {
    flex-wrap: wrap;
  }

  .casino-cards {
    grid-template-columns: 1fr;
  }

  /* SEO content on mobile */
  .seo-article {
    padding: var(--spacing-md);
  }

  .seo-article h2 {
    font-size: var(--text-xl);
  }

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

  /* Section titles on mobile */
  .section-title {
    font-size: var(--text-2xl);
  }

  .casino-section-title {
    font-size: var(--text-xl);
  }

  /* 404 page on mobile */
  .error-page {
    padding: var(--spacing-2xl) var(--spacing-md);
  }

  .error-code {
    font-size: clamp(4rem, 25vw, 8rem);
  }

  .error-message {
    font-size: var(--text-xl);
  }

  .error-page .btn {
    width: 100%;
    max-width: 280px;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Keep carousel animation but make it slower */
  .carousel-track.animate,
  .carousel-track.animate-reverse,
  .carousel-track.animate-slow {
    animation-duration: 120s !important;
  }
}

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

  body {
    background: white;
    color: black;
  }

  .article-content {
    box-shadow: none;
    padding: 0;
  }

  a {
    text-decoration: underline;
  }

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