/* SanjayaFreshKeeperBio Responsive Styles - Preserves Original Layout */

/* Global mobile overrides */
@media (max-width: 1200px) {
  /* Force all images to be responsive */
  img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Reset all positioning */
  div[style*='marginLeft'] {
    margin-left: 0 !important;
  }

  div[style*='marginTop'] {
    margin-top: 20px !important;
  }

  /* Make section responsive */
  section {
    max-width: 100% !important;
    padding: 1rem !important;
  }
}

@media (max-width: 992px) {
  /* Force all content to be mobile-friendly */
  * {
    max-width: 100% !important;
  }

  /* Reset all margins and positioning */
  div[style*='margin'] {
    margin: 20px 0 !important;
  }

  /* Make table responsive */
  table {
    width: 100% !important;
    font-size: 14px;
  }

  /* Stack flex items vertically */
  div[style*="display: 'flex'"] {
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
  }
}

@media (max-width: 768px) {
  /* Mobile-first approach - force everything to be mobile-friendly */
  * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  section {
    padding: 0.5rem !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  /* Reset all positioning and margins */
  div {
    margin: 10px 0 !important;
    padding: 0 !important;
  }

  /* Make all images responsive */
  img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 10px 0 !important;
    display: block !important;
  }

  /* Adjust text sizes */
  h1,
  h2 {
    font-size: 1.25rem !important;
    text-align: center !important;
    margin: 15px 0 !important;
  }

  p {
    font-size: 0.9rem !important;
    text-align: center !important;
    margin: 10px 0 !important;
  }

  /* Make table scrollable */
  table {
    width: 100% !important;
    font-size: 10px !important;
    overflow-x: auto !important;
    display: block !important;
  }

  /* Reset all inline styles that cause issues */
  div[style*='width'] {
    width: 100% !important;
  }

  div[style*='marginLeft'] {
    margin-left: 0 !important;
  }

  div[style*='marginTop'] {
    margin-top: 10px !important;
  }
}

@media (max-width: 576px) {
  /* Extra small mobile - even more aggressive overrides */
  section {
    padding: 0.25rem !important;
  }

  /* Smaller fonts for very small screens */
  h1,
  h2 {
    font-size: 1rem !important;
  }

  p {
    font-size: 0.8rem !important;
  }

  /* Compact table */
  table {
    font-size: 8px !important;
  }

  th,
  td {
    padding: 4px 2px !important;
  }

  /* Even smaller margins */
  div {
    margin: 5px 0 !important;
  }

  img {
    margin: 5px 0 !important;
  }
}

/* Global mobile fixes */
* {
  box-sizing: border-box;
}

/* Ensure images maintain aspect ratio */
img {
  object-fit: contain;
  max-width: 100%;
}

/* Prevent horizontal overflow */
body,
html {
  overflow-x: hidden;
  width: 100%;
}

/* Force responsive behavior */
@media (max-width: 768px) {
  /* Override any fixed widths */
  [style*='width:'] {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Override any fixed heights that might cause issues */
  [style*='height:'] {
    height: auto !important;
  }

  /* Center all content */
  section,
  div {
    text-align: center !important;
  }

  /* Make sure flex items stack */
  .flex-row {
    flex-direction: column !important;
  }
}
