/* ============================================
   CrowdX — Responsive Breakpoints
   ============================================ */

/* Mobile first — base styles apply to mobile */

/* Small tablets and up (640px+) */
@media (min-width: 640px) {
  .container { max-width: 640px; }
}

/* Tablets (768px+) */
@media (min-width: 768px) {
  .container { max-width: 768px; }
  
  /* Tables become horizontally scrollable if needed */
  table { min-width: 100%; }
}

/* Large tablets / small desktops (1024px+) */
@media (min-width: 1024px) {
  .container { max-width: 1024px; }
  
  /* Sidebar visible, mobile menu hidden */
  #mobile-sidebar { display: none !important; }
  #mobile-overlay { display: none !important; }
}

/* Desktop (1280px+) */
@media (min-width: 1280px) {
  .container { max-width: 1280px; }
}

/* Wide desktop (1536px+) */
@media (min-width: 1536px) {
  .container { max-width: 1536px; }
}

/* Mobile-specific adjustments */
@media (max-width: 767px) {
  /* Hide desktop sidebar */
  #sidebar-desktop { display: none !important; }
  
  /* Stack grid columns */
  .grid-cols-1.md\:grid-cols-2,
  .grid-cols-1.md\:grid-cols-3,
  .grid-cols-1.md\:grid-cols-4 {
    grid-template-columns: 1fr;
  }
  
  /* Reduce padding on mobile */
  .p-6 { padding: 1rem; }
  .p-8 { padding: 1.25rem; }
  
  /* Smaller hero text */
  h1 { font-size: 2rem; line-height: 1.2; }
  h2 { font-size: 1.75rem; line-height: 1.25; }
  
  /* Tables scroll horizontally */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Modals full width */
  .modal-content {
    margin: 1rem;
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
  /* 2-column grids on tablet */
  .lg\:grid-cols-3 > * {
    grid-column: span 1;
  }
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Print styles */
@media print {
  #sidebar-desktop, #mobile-sidebar, #mobile-overlay,
  header, footer, button, .no-print {
    display: none !important;
  }
  body { background: white; color: black; }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  * {
    border-color: currentColor !important;
  }
}

/* Touch device optimizations */
@media (hover: none) {
  .hover-lift:hover {
    transform: none;
  }
  button:hover, a:hover {
    transition: none;
  }
}