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

/* Base styles are mobile-first (already in other CSS files) */

/* ==========================================
   SMALL DEVICES (640px+)
   ========================================== */
@media (min-width: 640px) {
  .container {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }

  .hero__title {
    font-size: calc(var(--text-4xl) * 1.1);
  }

  .casino-card__bonus-value {
    font-size: var(--text-2xl);
  }
}

/* ==========================================
   MEDIUM DEVICES (768px+)
   Note: Hero layout is unified in layout.css
   ========================================== */
@media (min-width: 768px) {
  .section {
    padding: var(--space-3xl) 0;
  }

  .hero__content {
    max-width: 600px;
  }

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

  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

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

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

  .casino-card--horizontal .casino-card__header {
    width: 200px;
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }

  .casino-card--horizontal .casino-card__body {
    flex: 1;
    display: flex;
    align-items: center;
  }

  .casino-card--horizontal .casino-card__bonus {
    margin: 0;
    margin-right: var(--space-lg);
  }

  .casino-card--horizontal .casino-card__footer {
    width: 180px;
    flex-direction: column;
    justify-content: center;
  }
}

/* ==========================================
   LARGE DEVICES (1024px+)
   Note: Hero layout is unified in layout.css
   ========================================== */
@media (min-width: 1024px) {
  :root {
    --header-height: 80px;
  }

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

  /* Navigation */
  .nav {
    display: block;
  }

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

  /* Content Layout */
  .content-wrapper {
    grid-template-columns: 1fr var(--sidebar-width);
    gap: var(--space-2xl);
  }

  .content-wrapper--sidebar-left {
    grid-template-columns: var(--sidebar-width) 1fr;
  }

  .hero__content {
    max-width: 700px;
  }

  /* Sidebar sticky */
  .sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-lg));
    max-height: calc(100vh - var(--header-height) - var(--space-2xl));
    overflow-y: auto;
  }

  /* Grid adjustments */
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==========================================
   EXTRA LARGE DEVICES (1280px+)
   ========================================== */
@media (min-width: 1280px) {
  .container {
    max-width: var(--container-max);
    padding-left: var(--space-2xl);
    padding-right: var(--space-2xl);
  }

  .container-wide {
    max-width: 1440px;
  }

  .hero__title {
    font-size: calc(var(--text-4xl) * 1.2);
  }
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
  .header,
  .footer,
  .sidebar,
  .mobile-menu,
  .btn,
  .top-casinos,
  .hero__actions {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

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

  .content-wrapper {
    grid-template-columns: 1fr;
  }

  .card,
  .casino-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  a {
    text-decoration: underline;
  }

  a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}

/* ==========================================
   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;
  }
}

/* ==========================================
   HIGH CONTRAST MODE
   ========================================== */
@media (prefers-contrast: high) {
  :root {
    --color-text-muted: #B0B8C8;
    --color-text-dark: #8A94A6;
  }

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

/* ==========================================
   DARK MODE (already default, but ensure)
   ========================================== */
@media (prefers-color-scheme: light) {
  /* Override if user prefers light - optional */
  /* For this casino site, we keep dark theme */
}

/* ==========================================
   TOUCH DEVICE OPTIMIZATIONS
   ========================================== */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .btn {
    min-height: 48px;
  }

  .nav__link {
    padding: var(--space-md) var(--space-sm);
  }

  .pagination__item {
    min-width: 48px;
    height: 48px;
  }

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

  /* Add active states instead */
  .card:active,
  .casino-card:active,
  .category-card:active {
    transform: scale(0.98);
  }
}

/* ==========================================
   LANDSCAPE MOBILE
   Note: Hero layout is unified in layout.css
   ========================================== */
@media (max-width: 767px) and (orientation: landscape) {
  .hero__title {
    font-size: var(--text-2xl);
  }

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

/* ==========================================
   VERY SMALL SCREENS (320px)
   ========================================== */
@media (max-width: 359px) {
  :root {
    font-size: 14px;
  }

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

  .btn {
    padding: 0.5rem 1rem;
  }

  .casino-card__header {
    flex-direction: column;
    text-align: center;
  }

  .casino-card__logo {
    margin: 0 auto;
  }
}
