/* ============================================
   COMPREHENSIVE RESPONSIVE DESIGN SYSTEM
   For all device sizes: 320px to 2560px+
   ============================================ */

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Extra Small Mobile (320px - 480px) */
/* Small phones in portrait mode */
@media (max-width: 480px) {
  :root {
    --container-padding: 0.75rem;
    --font-size-base: 14px;
    --spacing-unit: 0.5rem;
  }
  
  html {
    font-size: 14px;
  }
  
  body {
    font-size: 14px;
    padding-top: 56px;
  }
  
  .container {
    width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.1rem; }
  h5 { font-size: 1rem; }
  h6 { font-size: 0.9rem; }
}

/* Small Mobile (481px - 640px) */
/* Large phones in portrait mode */
@media (min-width: 481px) and (max-width: 640px) {
  :root {
    --container-padding: 1rem;
    --font-size-base: 15px;
    --spacing-unit: 0.75rem;
  }
  
  html {
    font-size: 15px;
  }
  
  body {
    font-size: 15px;
    padding-top: 60px;
  }
  
  .container {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.25rem; }
  h5 { font-size: 1.1rem; }
  h6 { font-size: 1rem; }
}

/* Tablet Portrait (641px - 768px) */
/* Tablets in portrait mode */
@media (min-width: 641px) and (max-width: 768px) {
  :root {
    --container-padding: 1.25rem;
    --font-size-base: 15px;
    --spacing-unit: 1rem;
  }
  
  html {
    font-size: 15px;
  }
  
  body {
    font-size: 15px;
    padding-top: 65px;
  }
  
  .container {
    width: 96%;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  
  h1 { font-size: 2.25rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.75rem; }
  h4 { font-size: 1.5rem; }
  h5 { font-size: 1.25rem; }
  h6 { font-size: 1.1rem; }
}

/* Tablet Landscape (769px - 1024px) */
/* Tablets in landscape mode, small laptops */
@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --container-padding: 1.5rem;
    --font-size-base: 16px;
    --spacing-unit: 1rem;
  }
  
  html {
    font-size: 16px;
  }
  
  body {
    font-size: 16px;
    padding-top: 70px;
  }
  
  .container {
    width: 94%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    max-width: 1024px;
  }
  
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2.25rem; }
  h3 { font-size: 2rem; }
  h4 { font-size: 1.75rem; }
  h5 { font-size: 1.5rem; }
  h6 { font-size: 1.25rem; }
}

/* Desktop Small (1025px - 1200px) */
/* Standard desktop screens */
@media (min-width: 1025px) and (max-width: 1200px) {
  :root {
    --container-padding: 2rem;
    --font-size-base: 16px;
    --spacing-unit: 1.25rem;
  }
  
  html {
    font-size: 16px;
  }
  
  body {
    font-size: 16px;
    padding-top: 75px;
  }
  
  .container {
    width: 92%;
    padding-left: 2rem;
    padding-right: 2rem;
    max-width: 1200px;
  }
  
  h1 { font-size: 3rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 2.25rem; }
  h4 { font-size: 2rem; }
  h5 { font-size: 1.75rem; }
  h6 { font-size: 1.5rem; }
}

/* Desktop Medium (1201px - 1400px) */
/* Large desktop screens */
@media (min-width: 1201px) and (max-width: 1400px) {
  :root {
    --container-padding: 2rem;
    --font-size-base: 16px;
    --spacing-unit: 1.5rem;
  }
  
  html {
    font-size: 16px;
  }
  
  body {
    font-size: 16px;
    padding-top: 80px;
  }
  
  .container {
    width: 92%;
    padding-left: 2rem;
    padding-right: 2rem;
    max-width: 1400px;
  }
  
  h1 { font-size: 3.5rem; }
  h2 { font-size: 3rem; }
  h3 { font-size: 2.5rem; }
  h4 { font-size: 2.25rem; }
  h5 { font-size: 2rem; }
  h6 { font-size: 1.75rem; }
}

/* Desktop Large (1401px - 1920px) */
/* Extra large desktop screens */
@media (min-width: 1401px) and (max-width: 1920px) {
  :root {
    --container-padding: 2.5rem;
    --font-size-base: 17px;
    --spacing-unit: 1.5rem;
  }
  
  html {
    font-size: 17px;
  }
  
  body {
    font-size: 17px;
    padding-top: 85px;
  }
  
  .container {
    width: 90%;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
    max-width: 1600px;
  }
  
  h1 { font-size: 4rem; }
  h2 { font-size: 3.5rem; }
  h3 { font-size: 3rem; }
  h4 { font-size: 2.5rem; }
  h5 { font-size: 2.25rem; }
  h6 { font-size: 2rem; }
}

/* Desktop XL (1921px+) */
/* Ultra-wide screens */
@media (min-width: 1921px) {
  :root {
    --container-padding: 3rem;
    --font-size-base: 18px;
    --spacing-unit: 2rem;
  }
  
  html {
    font-size: 18px;
  }
  
  body {
    font-size: 18px;
    padding-top: 90px;
  }
  
  .container {
    width: 88%;
    padding-left: 3rem;
    padding-right: 3rem;
    max-width: 1800px;
  }
  
  h1 { font-size: 4.5rem; }
  h2 { font-size: 4rem; }
  h3 { font-size: 3.5rem; }
  h4 { font-size: 3rem; }
  h5 { font-size: 2.5rem; }
  h6 { font-size: 2.25rem; }
}

/* ============================================
   GLOBAL RESPONSIVE UTILITIES
   ============================================ */

/* Prevent horizontal scroll on all devices */
html, body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive videos */
video {
  max-width: 100%;
  height: auto;
}

/* Responsive iframes */
iframe {
  max-width: 100%;
}

/* Responsive tables */
table {
  width: 100%;
  overflow-x: auto;
  display: block;
}

@media (min-width: 769px) {
  table {
    display: table;
  }
}

/* Responsive buttons */
button, .btn {
  white-space: nowrap;
  min-height: 44px; /* Touch-friendly on mobile */
  padding: 0.75rem 1.5rem;
}

@media (max-width: 480px) {
  button, .btn {
    min-height: 40px;
    padding: 0.6rem 1.2rem;
    font-size: 0.875rem;
  }
}

/* Responsive forms */
input, textarea, select {
  width: 100%;
  min-height: 44px; /* Touch-friendly */
  font-size: 16px; /* Prevents zoom on iOS */
}

@media (min-width: 769px) {
  input, textarea, select {
    min-height: 40px;
  }
}

/* Responsive grid systems */
.grid-responsive {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 641px) {
  .grid-responsive {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1025px) {
  .grid-responsive {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 1401px) {
  .grid-responsive {
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
  }
}

/* Responsive flex utilities */
.flex-responsive {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 769px) {
  .flex-responsive {
    flex-direction: row;
    gap: 1.5rem;
  }
}

/* Hide/Show utilities */
.hide-mobile {
  display: none;
}

@media (min-width: 769px) {
  .hide-mobile {
    display: block;
  }
  
  .show-mobile {
    display: none;
  }
}

/* Text alignment responsive */
@media (max-width: 768px) {
  .text-center-mobile {
    text-align: center;
  }
  
  .text-left-mobile {
    text-align: left;
  }
}

/* Spacing utilities */
@media (max-width: 480px) {
  .p-mobile-sm {
    padding: 0.5rem;
  }
  
  .m-mobile-sm {
    margin: 0.5rem;
  }
  
  .gap-mobile-sm {
    gap: 0.5rem;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }
  
  .main-header,
  .mobile-menu-toggle,
  .header-user-section,
  button,
  .btn {
    display: none !important;
  }
  
  body {
    padding-top: 0 !important;
  }
}

