/* Global Responsive Fixes */

/* Prevent horizontal scroll on all devices */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }
  
  /* Ensure all containers respect viewport width */
  .container, .container-fluid {
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  /* Mobile-first approach */
  @media (max-width: 768px) {
    /* Global mobile adjustments */
    * {
      box-sizing: border-box;
    }
    
    /* Prevent any element from exceeding viewport width */
    .row, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
      max-width: 100vw;
      overflow-x: hidden;
    }
    
    /* Adjust padding for mobile */
    .container, .container-fluid {
      padding-left: 15px;
      padding-right: 15px;
    }
    
    /* Ensure images don't overflow */
    img {
      max-width: 100%;
      height: auto;
    }
    
    /* Text adjustments for mobile */
    h1 {
      font-size: 1.8rem !important;
      line-height: 1.3 !important;
    }
    
    h2 {
      font-size: 1.5rem !important;
      line-height: 1.3 !important;
    }
    
    h3 {
      font-size: 1.3rem !important;
      line-height: 1.3 !important;
    }
    
    p {
      font-size: 1rem !important;
      line-height: 1.5 !important;
    }
    
    /* Button adjustments for mobile */
    .btn {
      max-width: 100% !important;
      text-align: center !important;
      padding: 12px 20px !important;
      margin-bottom: 10px !important;
    }
    
    /* Specific mobile button styles - but don't force width for all buttons */
    .btn-block {
      width: 100% !important;
    }
    
    /* Flex container adjustments */
    [style*="display: flex"] {
      flex-direction: column !important;
      gap: 10px !important;
    }
    
    /* Grid adjustments */
    .row > div {
      margin-bottom: 20px;
    }
    
    /* Section padding adjustments */
    section, div[style*="padding"] {
      padding-left: 15px !important;
      padding-right: 15px !important;
    }
    
    /* Hero section specific fixes */
    .hero-section {
      margin: 0 !important;
      padding: 40px 15px !important;
      width: 100% !important;
      max-width: 100vw !important;
    }
    
    /* Statistics section fixes */
    [style*="display: flex; gap: 30px"] {
      flex-direction: column !important;
      gap: 20px !important;
    }
    
    [style*="text-align: center"] {
      margin-bottom: 15px;
    }
    
    /* Service cards adjustments */
    [style*="background: white"] {
      margin-bottom: 15px;
      padding: 20px 15px !important;
    }
    
    /* Logo grid adjustments */
    [style*="display: grid"] {
      grid-template-columns: 1fr !important;
      gap: 20px !important;
    }
    
    /* Testimonial adjustments */
    [style*="background: #f8f9fa"] {
      margin-bottom: 20px;
      padding: 20px 15px !important;
    }
  }
  
  /* Tablet adjustments */
  @media (min-width: 769px) and (max-width: 1024px) {
    .container, .container-fluid {
      padding-left: 20px;
      padding-right: 20px;
    }
    
    .hero-section {
      padding: 60px 20px !important;
    }
    
    h1 {
      font-size: 2.5rem !important;
    }
    
    h2 {
      font-size: 2rem !important;
    }
  }
  
  /* Desktop adjustments with proper margins */
  @media (min-width: 1025px) {
    .container {
      max-width: 1200px;
      margin: 0 auto;
      padding-left: 30px;
      padding-right: 30px;
    }
    
    .container-fluid {
      max-width: 1400px;
      margin: 0 auto;
      padding-left: 30px;
      padding-right: 30px;
    }
  }
  
  /* Large desktop adjustments with increased margins */
  @media (min-width: 1400px) {
    .container {
      padding-left: 50px;
      padding-right: 50px;
    }
    
    .container-fluid {
      padding-left: 50px;
      padding-right: 50px;
    }
  }
  
  /* Fix for specific problematic elements */
  @media (max-width: 768px) {
    /* Override any inline styles that might cause overflow */
    [style*="width: 100vw"],
    [style*="width: 100%"] {
      max-width: 100vw !important;
      overflow-x: hidden !important;
    }
    
    /* Ensure all flex containers wrap properly */
    [style*="display: flex"] {
      flex-wrap: wrap !important;
    }
    
    /* Fix for any absolute positioned elements */
    [style*="position: absolute"] {
      max-width: 100vw !important;
    }
    
    /* Fix for any fixed positioned elements */
    [style*="position: fixed"] {
      max-width: 100vw !important;
    }
    
    /* Specific fixes for main content areas */
    .col-sm-12, .col-md-12, .col-lg-12 {
      width: 100% !important;
      max-width: 100% !important;
      margin-left: 0 !important;
      padding-left: 15px !important;
      padding-right: 15px !important;
    }
  }
  
  /* Additional fix for medium screens */
  @media (max-width: 1200px) {
    .main-content-with-sidebar,
    .col-sm-12.main-content-with-sidebar {
      margin-left: 0 !important;
      width: 100% !important;
      max-width: 100% !important;
    }
  }
  