/* Prevent horizontal scrolling on mobile devices */
body {
  overflow-x: hidden;
}

/* Fix row margins that cause horizontal scroll */
.row {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
}

/* Allow wrapping but don't break words unless necessary */
p, li, div, span, td, th, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
}

/* Mobile-specific adjustments (screens 640px and below) */
@media screen and (max-width: 640px) {
  /* Reduce column padding for mobile */
  .columns {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
	table {
    width: 100% !important;
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  table thead,
  table tbody,
  table tr,
  table th,
  table td {
    display: block !important;
    width: 100% !important;
  }
  
  table thead {
    display: none !important;
  }
  
  table tr {
    margin-bottom: 1rem !important;
    border: 1px solid #ddd !important;
  }
  
  table td {
    text-align: left !important;
    padding: 0.5rem !important;
    position: relative !important;
    border-bottom: 1px solid #ddd !important;
  }
  
  table td:before {
    content: attr(data-label) !important;
    font-weight: bold !important;
    display: block !important;
    margin-bottom: 0.25rem !important;
  }
  
  /* Make columns stack vertically on mobile */
  .medium-3.columns {
    width: 100% !important;
    float: none !important;
  }
  
  /* Adjust list padding for mobile */
  ul {
    padding-left: 1.5rem !important;
    margin-left: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  
  /* Force list items to stay within container */
  li {
    max-width: 100% !important;
    overflow: hidden !important;
  }
  
  /* Break long URLs only on mobile */
  a[href^="http"] {
    word-break: break-all !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    display: inline-block !important;
    max-width: 100% !important;
  }
}