/* Responsive Styles - Mobile First */

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

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  .hero {
    padding: var(--space-20) 0 calc(var(--space-20) + var(--space-8));
  }

  .hero-glow {
    width: 800px;
    height: 500px;
  }

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

  .hero-deco-chip-1 {
    width: 150px;
    height: 150px;
    left: 8%;
  }

  .hero-deco-card-1 {
    width: 80px;
    height: 115px;
    left: 12%;
  }

  .hero-deco-chip-2 {
    width: 180px;
    height: 180px;
    right: 10%;
  }

  .hero-deco-card-2 {
    width: 70px;
    height: 100px;
    right: 8%;
  }

  .hero-deco-chip-3 {
    width: 100px;
    height: 100px;
    right: 15%;
  }

  .hero-deco-dice-1 {
    width: 60px;
    height: 60px;
    left: 5%;
  }

  .hero-deco-dice-2 {
    width: 55px;
    height: 55px;
    right: 5%;
  }

  .hero-deco-roulette {
    width: 110px;
    height: 110px;
    right: 20%;
  }

  .hero-deco-ace {
    width: 65px;
    height: 92px;
    left: 15%;
  }

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

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

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

  .contact-form {
    padding: var(--space-10);
  }
}

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

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

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

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

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

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

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  }
}

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

  .hero {
    padding: calc(var(--space-20) + var(--space-8)) 0 calc(var(--space-20) + var(--space-12));
  }

  .hero-glow {
    width: 1000px;
    height: 600px;
  }

  .hero-deco-chip-1 {
    width: 180px;
    height: 180px;
    top: 10%;
    left: 10%;
  }

  .hero-deco-card-1 {
    width: 90px;
    height: 130px;
    bottom: 18%;
    left: 15%;
  }

  .hero-deco-chip-2 {
    width: 200px;
    height: 200px;
    top: 8%;
    right: 12%;
  }

  .hero-deco-card-2 {
    width: 80px;
    height: 115px;
    top: 40%;
    right: 8%;
  }

  .hero-deco-chip-3 {
    width: 120px;
    height: 120px;
    bottom: 12%;
    right: 18%;
  }

  .hero-deco-dice-1 {
    width: 70px;
    height: 70px;
    top: 35%;
    left: 6%;
  }

  .hero-deco-dice-2 {
    width: 60px;
    height: 60px;
    top: 22%;
    right: 6%;
  }

  .hero-deco-spade {
    width: 50px;
    height: 60px;
    bottom: 30%;
    left: 18%;
  }

  .hero-deco-heart {
    width: 45px;
    height: 45px;
    bottom: 35%;
    right: 6%;
  }

  .hero-deco-club {
    width: 50px;
    height: 55px;
    top: 50%;
    right: 18%;
  }

  .hero-deco-roulette {
    width: 130px;
    height: 130px;
    bottom: 5%;
    right: 22%;
  }

  .hero-deco-ace {
    width: 75px;
    height: 107px;
    top: 5%;
    left: 20%;
  }
}

/* Mobile navigation (when open) */
@media (max-width: 991px) {
  .main-nav {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-light) 100%);
    padding: 100px var(--space-6) var(--space-6);
    overflow-y: auto;
    z-index: 400;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
  }

  .main-nav.is-open {
    display: flex !important;
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    padding-top: var(--space-8);
  }

  .nav-list li {
    border-bottom: none;
    width: 100%;
    max-width: 300px;
    text-align: center;
  }

  .nav-list a {
    display: block;
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-xl);
    font-weight: 500;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
  }

  .nav-list a:hover,
  .nav-list a:active {
    background-color: var(--color-surface);
    color: var(--color-accent);
  }

  /* Prevent body scroll when menu is open */
  body.menu-open {
    overflow: hidden;
  }

  /* Article casinos grid - 3+2 rows on tablet */
  .article-casinos-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
  }

  .casino-card-icon {
    width: 38px;
    height: 38px;
  }
}

/* Touch device optimizations */
@media (hover: none) {
  /* Disable hover effects that might cause issues on touch */
  .category-card:hover,
  .subcategory-card:hover,
  .article-card:hover {
    transform: none;
  }

  /* Ensure touch targets are at least 44px */
  .btn,
  .pagination-link,
  .kw-pill,
  .nav-list a,
  .modal-close {
    min-height: 44px;
    min-width: 44px;
  }
}

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

  body {
    background: white;
    color: black;
  }

  .article-content {
    color: black;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  a {
    text-decoration: underline;
  }

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

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --color-surface: #1a1a1a;
    --color-surface-light: #2a2a2a;
    --color-text-muted: #cccccc;
  }

  .btn-primary {
    border: 2px solid var(--color-black);
  }
}

/* Dark mode is default, but if system prefers light */
@media (prefers-color-scheme: light) {
  /* Keep dark theme for casino site regardless of system preference */
  /* Casino sites traditionally use dark themes */
}

/* Landscape orientation adjustments for mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: var(--space-8) 0;
  }

  .hero-trust {
    margin-bottom: var(--space-4);
  }

  .hero-subtitle {
    margin-bottom: var(--space-4);
  }

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

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

/* Hide decorations on smaller screens */
@media (max-width: 767px) {
  .hero-decorations {
    display: none;
  }

  .hero-glow {
    width: 400px;
    height: 300px;
    filter: blur(40px);
  }

  .hero-trust {
    gap: var(--space-3) var(--space-4);
  }

  .trust-item {
    font-size: var(--text-xs);
  }

  .trust-icon {
    width: 32px;
    height: 32px;
  }

  .trust-icon svg {
    width: 16px;
    height: 16px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    max-width: 280px;
  }

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

  .article-casinos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }

  .casino-card-compact {
    padding: var(--space-2);
    gap: var(--space-1);
  }

  .casino-card-icon {
    width: 34px;
    height: 34px;
  }

  .casino-compact-info h3 {
    font-size: 0.72rem;
  }

  .casino-card-bonus {
    font-size: 0.6rem;
  }

  .btn-casino-play {
    min-height: 28px;
    font-size: 0.7rem;
    padding: var(--space-1) var(--space-2);
  }

  .casino-card {
    padding: var(--space-5);
  }

  .casino-actions {
    flex-direction: column;
  }

  .faq-question {
    padding: var(--space-4) var(--space-4);
    font-size: var(--text-sm);
  }

  .faq-answer p {
    padding: 0 var(--space-4) var(--space-4);
    font-size: var(--text-sm);
  }
}

/* Very small screens */
@media (max-width: 479px) {
  .article-casinos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }
}

@media (max-width: 359px) {
  :root {
    --container-padding: var(--space-3);
  }

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

  .hero-trust {
    flex-direction: column;
    align-items: center;
  }

  .category-card {
    padding: var(--space-5);
  }

  .category-icon {
    width: 48px;
    height: 48px;
  }
}
