/* Mobile fixes for text overflow issues */

/* Global fixes for all devices */
html, body {
  width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

body {
  -webkit-text-size-adjust: 100%;
}

/* Container fixes for all screen sizes */
.container {
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

/* Ensure all content stays within view */
body, html {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Fix for all text elements to prevent overflow */
p, h1, h2, h3, div, span, li {
  overflow-wrap: break-word;
  word-wrap: break-word;
  -ms-word-break: break-all;
  word-break: break-word;
  hyphens: auto;
}

/* Tablet specific fixes */
@media (max-width: 992px) {
  body {
    padding: 30px 0;
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 5% !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
  }

  main {
    width: 100%;
  }
  
  .experience-section, 
  .services-section, 
  .about-text, 
  .highlight-text {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  .highlight-span {
    display: inline-block;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal !important;
  }
  
  .contact-section {
    margin-left: 335px !important;
  }
  
  .highlight-text h1 {
    font-size: 1.8rem;
    line-height: 1.4;
    word-break: break-word;
  }
  
  .about-text {
    font-size: 1.05rem;
    max-width: 90% !important;
  }
  
  /* Ensure contact info doesn't overflow */
  .contact-info p {
    white-space: normal;
    word-break: break-word;
  }
  
  /* Fix for Polish long words */
  .services-section li {
    word-break: break-word;
  }
}

/* Mobile specific fixes */
@media (max-width: 768px) {
  body {
    padding: 20px 0;
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 20px !important;
  }

  main {
    width: 100%;
  }
  
  .experience-section, 
  .services-section, 
  .contact-section,
  .about-text, 
  .highlight-text {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  .contact-section {
    margin-left: 0 !important;
  }
  
  .highlight-span {
    display: inline-block;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .highlight-text h1 {
    font-size: 1.6rem;
    line-height: 1.4;
  }
  
  .about-text {
    font-size: 1rem;
  }
  
  /* Fix for contact section */
  .contact-wrapper {
    margin-top: 20px !important;
  }
}

/* Smaller devices */
@media (max-width: 576px) {
  .container {
    padding: 0 15px !important;
  }
  
  h1 {
    font-size: 1.4rem !important;
    line-height: 1.3;
  }
  
  h2 {
    font-size: 1.2rem !important;
  }
  
  .about-text p {
    font-size: 0.95rem;
  }
  
  .services-section ul {
    padding-left: 15px;
  }
  
  .services-section li {
    font-size: 0.95rem;
  }
  
  
  .logo-footer {
    margin-bottom: 15px !important;
  }
}

/* Super small screens */
@media (max-width: 375px) {
  .container {
    padding: 0 10px !important;
  }
  
  h1 {
    font-size: 1.3rem !important;
  }
  
  .highlight-span {
    padding: 5px 10px !important;
  }
}
