/* Additional Comprehensive Responsive Styles for All Screen Sizes */

/* Prevent horizontal overflow on all devices */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Ensure images are responsive */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive tables */
table {
  width: 100%;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Extra Small Phones (320px - 374px) */
@media (max-width: 374px) {
  .headerContent {
    padding: 0 12px;
    flex-wrap: wrap;
  }
  
  .nav {
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
  .navLink {
    font-size: 0.8rem;
    padding: 8px 10px;
  }
  
  .contactButton {
    font-size: 0.8rem;
    padding: 10px 16px;
  }
  
  .hero {
    padding: 50px 12px 40px;
  }
  
  .heroStats {
    gap: 1.25rem;
    flex-direction: column;
  }
  
  .footerContent {
    padding: 0 12px;
  }
  
  .formNavigation {
    gap: 0.5rem;
  }
  
  .formNavigation {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .formButton {
    flex: 1;
    min-width: 120px;
    max-width: 180px;
    padding: 12px 18px;
  }
  
  .reviewRow {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  
  .socialProofContent {
    flex-direction: column;
    gap: 1rem;
  }
  
  .socialProofItem {
    min-width: 100%;
    justify-content: center;
  }
  
  .ctaBannerContent {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .ctaBannerActions {
    width: 100%;
    flex-direction: column;
  }
  
  .ctaBannerButton {
    width: 100%;
  }
}

/* Small Phones (375px - 479px) */
@media (min-width: 375px) and (max-width: 479px) {
  .container {
    padding: 0 18px;
  }
  
  .industriesGrid,
  .servicesGrid {
    grid-template-columns: 1fr;
  }
}

/* Medium Phones (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
  .industriesGrid,
  .servicesGrid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .aboutFeatures {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .trustBadgesGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablets Portrait (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .container {
    max-width: 960px;
    margin: 0 auto;
  }
  
  .industriesGrid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .servicesGrid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .aboutFeatures {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .trustBadgesGrid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .reviewRow {
    grid-template-columns: 180px 1fr;
  }
}

/* Large Tablets and Small Desktops (1025px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
  .container {
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .industriesGrid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .servicesGrid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .trustBadgesGrid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Extra Large Desktops (1441px and up) */
@media (min-width: 1441px) {
  .container {
    max-width: 1600px;
    margin: 0 auto;
  }
  
  .industriesGrid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .servicesGrid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .trustBadgesGrid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Landscape Orientation for Mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 40px 20px 30px;
  }
  
  .title {
    font-size: 2rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .heroStats {
    flex-direction: row;
    gap: 2rem;
    flex-wrap: wrap;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Ensure minimum touch target size (44x44px) */
  .navLink,
  .contactButton,
  .formButton,
  .enquiryButton,
  .industryCard,
  .serviceCard,
  .exitIntentClose {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Remove hover effects on touch devices */
  .industryCard:hover,
  .serviceCard:hover {
    transform: none;
  }
  
  /* Larger tap targets for forms */
  .formInput,
  .formSelect,
  .formTextarea {
    min-height: 44px;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Ensure crisp rendering on retina displays */
  img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .contactButton,
  .whatsapp-float,
  .exitIntentPopup {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .section {
    page-break-inside: avoid;
  }
}

