/* Mobile-only responsive overrides. Desktop styles remain controlled by the existing CSS files. */
@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  img,
  video,
  iframe {
    max-width: 100%;
  }

  header {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    position: relative !important;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--bright-blue) 100%) !important;
    border-bottom: 2px solid var(--bright-orange) !important;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15) !important;
  }

  header .nav {
    width: 100%;
    max-width: none;
    position: relative;
    gap: 1rem;
    padding-right: 54px;
    min-height: 46px;
  }

  .logo h1 {
    font-size: 1.2rem !important;
    line-height: 1.1;
  }

  .logo span {
    font-size: 0.65rem !important;
  }

  .mobile-menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0 !important;
    color: #fff !important;
    font-size: 0 !important;
    line-height: 1;
    flex: 0 0 auto;
    background:
      linear-gradient(#fff, #fff) center 14px / 22px 2px no-repeat,
      linear-gradient(#fff, #fff) center 21px / 22px 2px no-repeat,
      linear-gradient(#fff, #fff) center 28px / 22px 2px no-repeat !important;
    border: 0 !important;
    position: absolute !important;
    top: 50% !important;
    right: 0 !important;
    z-index: 2001 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(-50%) !important;
  }

  .mobile-menu-toggle::before {
    content: none;
  }

  header .nav-menu {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 0.75rem) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: calc(100vh - 90px) !important;
    overflow-y: auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    background: #fff !important;
    border-radius: 0 0 12px 12px !important;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.18) !important;
    z-index: 2000 !important;
  }

  header .nav-menu.active {
    display: flex !important;
  }

  header .logo {
    margin-right: auto !important;
    text-align: left !important;
  }

  header .nav-menu a,
  header .dropdown-toggle {
    width: 100% !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0.9rem 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text) !important;
    background: transparent !important;
    border-radius: 0 !important;
    border-bottom: 1px solid #eef1f4 !important;
    text-align: center !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    transform: none !important;
    box-shadow: none !important;
    white-space: normal !important;
  }

  header .nav-menu a:hover,
  header .nav-menu a.active,
  header .dropdown-toggle:hover,
  header .dropdown:hover .dropdown-toggle {
    color: #fff !important;
    background: linear-gradient(135deg, var(--bright-orange), var(--brand-accent)) !important;
  }

  header .dropdown {
    width: 100% !important;
  }

  header .dropdown-menu {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    background: #f7f9fb !important;
  }

  header .dropdown-menu a {
    padding: 0.75rem 1.25rem !important;
    font-size: 0.82rem !important;
    color: var(--light-text) !important;
  }

  .hero,
  .page-hero,
  .contact-hero,
  .service-hero,
  body > section[style*="min-height: 100vh"] {
    min-height: 68vh !important;
    padding: 3rem 1rem !important;
    background-attachment: scroll !important;
  }

  .hero-container,
  .hero-content,
  body > section[style*="min-height: 100vh"] > div {
    width: 92% !important;
    max-width: 680px !important;
    padding: 0 1rem !important;
  }

  .hero h1,
  .hero h2,
  .page-hero h1,
  .contact-hero h1,
  .service-hero h1,
  body > section[style*="min-height: 100vh"] h1,
  body > section[style*="min-height: 100vh"] h2 {
    font-size: clamp(1.9rem, 7.5vw, 2.75rem) !important;
    line-height: 1.15 !important;
    margin-bottom: 0.9rem !important;
    overflow-wrap: anywhere;
  }

  body > section[style*="debottlenecking-hero.jpg"] h1 {
    font-size: clamp(1.55rem, 6.4vw, 2.35rem) !important;
    line-height: 1.08 !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
  }

  .hero-subtitle,
  .hero p,
  .hero-content p,
  .page-hero p,
  .contact-hero p,
  .service-hero p,
  body > section[style*="min-height: 100vh"] p {
    font-size: clamp(0.98rem, 4vw, 1.16rem) !important;
    line-height: 1.55 !important;
    overflow-wrap: anywhere;
  }

  .hero-stats {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    padding: 1.25rem 0 !important;
  }

  .hero-stat {
    text-align: center !important;
  }

  .section,
  .section-band,
  .content-section,
  .achievements-section,
  .about-section {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .about-section > .section-band {
    margin-top: 0 !important;
  }

  .section-container,
  .container,
  .breadcrumb-container,
  .breadcrumb-content {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .section-title,
  .content-section h2 {
    font-size: clamp(1.7rem, 7vw, 2.2rem) !important;
    line-height: 1.2 !important;
  }

  .services-grid,
  .expertise-grid,
  .mission-vision-grid,
  .strength-grid,
  .contact-grid,
  .content-grid,
  .certificates-grid,
  .gallery-grid,
  .split-container {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  .services-grid .service-card:nth-child(n),
  .vertical-info-card {
    grid-column: 1 !important;
    grid-row: auto !important;
    justify-self: stretch !important;
  }

  .service-card,
  .vertical-info-card,
  .expertise-item,
  .strength-card,
  .contact-info,
  .contact-form,
  .content-with-image,
  .certificate-item,
  .gallery-category {
    width: 100% !important;
    min-height: auto !important;
    height: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .content-with-image {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  .side-image,
  .text-content {
    width: 100% !important;
  }

  .gallery-images,
  .certificates-grid {
    grid-template-columns: 1fr !important;
  }

  .mobile-image-first,
  .pollution-intro-flex,
  .operation-excellence-flex,
  .technical-solutions-flex {
    display: flex !important;
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    gap: 1rem !important;
  }

  .mobile-image-first > div,
  .pollution-intro-flex > div,
  .operation-excellence-flex > div,
  .technical-solutions-flex > div {
    flex: 0 0 auto !important;
    width: 100% !important;
    padding: 0 !important;
  }

  .integration-timeline {
    overflow: visible !important;
  }

  .integration-timeline > div[style*="height: 2px"] {
    display: none !important;
  }

  .integration-timeline > div[style*="display: flex"] {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 0.85rem !important;
    margin-bottom: 1rem !important;
    overflow-x: auto !important;
    padding-bottom: 0.35rem !important;
    -webkit-overflow-scrolling: touch;
  }

  .integration-item {
    flex: 0 0 190px !important;
    width: 190px !important;
    padding: 1rem !important;
  }

  .project-types {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .project-card,
  .greenfield-card,
  .brownfield-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent)) !important;
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(27, 58, 87, 0.22) !important;
  }

  .project-card h3,
  .project-card p,
  .project-card i {
    color: #fff !important;
    opacity: 1 !important;
  }

  .objectives-grid-mobile {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 1rem !important;
    overflow-x: auto !important;
    padding-bottom: 0.5rem !important;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .objectives-grid-mobile > div {
    flex: 0 0 82% !important;
    min-width: 260px !important;
    scroll-snap-align: start;
  }

  .project-experience-feature-list {
    gap: 1.25rem !important;
  }

  .project-experience-feature-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem !important;
    padding: 1rem !important;
  }

  .project-experience-feature-card > img {
    order: -1 !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
  }

  .card-image {
    width: min(100%, 260px) !important;
    height: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    border-radius: 8px !important;
  }

  .gallery-images img,
  .certificate-item img,
  .side-image img,
  .service-image img,
  .key-strengths-image img,
  .card-image img,
  .intro-card img,
  .overview-card img,
  .project-card img,
  .service-card img,
  .activity-card img,
  main img[style*="height: 300px"],
  main img[style*="height: 250px"],
  main img[style*="height: 240px"] {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: cover !important;
    display: block !important;
  }

  img[src*="Key strength.jpg"],
  img[src*="20210508_120257.jpg"],
  img[src*="Electrical & Automation 1.jpg"],
  img[src*="Electrical & Automation 2.jpg"] {
    aspect-ratio: 4 / 3 !important;
  }

  img[src*="E&A-3.jpg"] {
    aspect-ratio: 1083 / 959 !important;
  }

  img[src*="environmental-pollution-industry-exterior.jpg"],
  img[src*="image2.png"] {
    aspect-ratio: 2 / 3 !important;
  }

  img[src*="image3.png"] {
    aspect-ratio: 2000 / 1883 !important;
  }

  input,
  textarea,
  select,
  button {
    max-width: 100%;
    font-size: 16px !important;
  }

  .contact-form input,
  .contact-form textarea,
  .contact-form button {
    width: 100% !important;
  }

  .back-to-top {
    right: 18px !important;
    bottom: 18px !important;
    width: 46px !important;
    height: 46px !important;
  }

  body > div[style*="display: flex"][style*="max-width: 1200px"] {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 1rem !important;
    gap: 1.25rem !important;
  }

  body > div[style*="display: flex"][style*="max-width: 1200px"] > aside {
    width: 100% !important;
    position: static !important;
    top: auto !important;
    padding: 1rem !important;
  }

  body > div[style*="display: flex"][style*="max-width: 1200px"] > main {
    width: 100% !important;
    min-width: 0 !important;
  }

  body > div[style*="border-bottom: 1px solid #e0e0e0"] > div {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .department-map {
    position: sticky !important;
    top: 0 !important;
    z-index: 900 !important;
    background: rgba(255, 255, 255, 0.98) !important;
  }

  .department-map.sticky {
    position: sticky !important;
    top: 0 !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12) !important;
  }

  .department-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 0.5rem !important;
    padding: 0.75rem 1rem !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .department-nav::-webkit-scrollbar {
    display: none;
  }

  .department-item {
    min-width: max-content !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    flex-direction: row !important;
    gap: 0.45rem !important;
    padding: 0.6rem 0.8rem !important;
    border-radius: 999px !important;
    border-width: 1px !important;
    scroll-snap-align: start;
  }

  .department-item:hover,
  .department-item.active {
    transform: none !important;
  }

  .dept-icon {
    margin-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  .dept-icon svg {
    width: 1rem !important;
    height: 1rem !important;
  }

  .dept-name {
    font-size: 0.72rem !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
  }

  .progress-bar {
    margin: 0 !important;
    height: 2px !important;
  }

  .department-map.sticky + .gallery-section {
    padding-top: 2rem !important;
  }

  .gallery-section {
    padding: 1.5rem 0.85rem !important;
  }

  .department-section {
    margin-bottom: 2.5rem !important;
    scroll-margin-top: 74px !important;
  }

  .section-header {
    padding: 1rem 0 !important;
    margin-bottom: 1.25rem !important;
  }

  .section-header h2 {
    font-size: clamp(1.45rem, 6vw, 1.9rem) !important;
    margin-bottom: 0.5rem !important;
  }

  .section-header p {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
  }

  .section-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-count: initial !important;
    gap: 0.75rem !important;
  }

  .gallery-item {
    margin-bottom: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
  }

  .gallery-item:hover {
    transform: none !important;
  }

  .gallery-item img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
    object-fit: cover !important;
  }

  .modal-content {
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 64px) !important;
  }

  .modal img {
    max-height: 82vh !important;
  }
}

@media (max-width: 520px) {
  .hero,
  .page-hero,
  .contact-hero,
  .service-hero,
  body > section[style*="min-height: 100vh"] {
    min-height: 62vh !important;
  }

  .hero-container,
  .hero-content,
  body > section[style*="min-height: 100vh"] > div {
    bottom: 14% !important;
  }

  .section,
  .section-band,
  .content-section,
  .achievements-section {
    padding-top: 2.25rem !important;
    padding-bottom: 2.25rem !important;
  }

  .service-content,
  .contact-info,
  .contact-form,
  .content-section,
  .process-section,
  .modal-content {
    padding: 1rem !important;
  }

  .service-title,
  .content-section h3,
  body > div[style*="display: flex"][style*="max-width: 1200px"] h2 {
    font-size: 1.25rem !important;
    line-height: 1.25 !important;
  }

  .world-map-container {
    overflow-x: visible !important;
  }

  .map-wrapper {
    width: auto !important;
    max-width: 100% !important;
    overflow: visible !important;
    padding-bottom: 0 !important;
  }

  .world-map-image {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 800px !important;
  }

  .gallery-section {
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
  }

  .section-grid {
    gap: 0.6rem !important;
  }

  .gallery-item img {
    aspect-ratio: 1 / 1 !important;
  }

  .department-nav {
    padding: 0.65rem 0.75rem !important;
  }

  .department-item {
    padding: 0.55rem 0.7rem !important;
  }
}
