/*
 * Responsive corrections for Paramount Infinet
 * Loaded after the original theme so these rules win without changing the
 * existing page content or navigation behavior.
 */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Reserve a soft bottom action shelf so floating controls never sit on top
   of cards, copy, or footer content. */
body:has(.whatsapp_float)::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 78px;
  z-index: 99;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(247, 249, 252, 0), rgba(247, 249, 252, .98) 72%);
}

img {
  max-width: 100%;
}

/* Prevent the logo and hamburger from fighting for the same pixels. */
@media (max-width: 767px) {
  .header.header_style_01,
  .header.header_style_01 .navbar {
    min-height: 76px;
  }

  .header.header_style_01 .container-fluid {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 76px;
    padding: 0 16px;
  }

  .header.header_style_01 .navbar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
    float: none;
  }

  .header.header_style_01 .navbar-toggle {
    display: inline-flex !important;
    order: 2;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 0 0 12px;
    padding: 10px;
  }

  .header.header_style_01 .navbar-brand {
    display: flex;
    order: 1;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    height: auto;
    padding: 8px 0;
    margin: 0;
  }

  .header.header_style_01 .navbar-brand img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 48px;
    object-fit: contain;
  }

  /* Keep the off-canvas navigation inside the viewport. */
  .header.header_style_01 #navbar {
    width: min(360px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
  }

  /* One readable card per row; no clipped third column on phones. */
  #services {
    overflow: hidden;
  }

  #services > .container {
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  #services .section-title {
    margin-left: auto;
    margin-right: auto;
  }

  #services .owl-services.owl-carousel {
    display: block;
    width: 100%;
  }

  #services .owl-services .service-widget,
  #services .owl-services .owl-item,
  #services .owl-services .owl-item > .service-widget {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 18px;
  }

  #services .owl-services .post-media img {
    display: block;
    width: 100%;
    height: auto;
  }

  /* Keep WhatsApp on the right and the single back-to-top control on the left. */
  .whatsapp_float {
    right: 16px !important;
    bottom: 30px !important;
    width: 48px !important;
    height: 48px !important;
    margin: 0 !important;
    display: grid;
    place-items: center;
    z-index: 1100;
  }

  .whatsapp-icon {
    margin-top: 0 !important;
  }

  .dmtop {
    right: auto !important;
    left: 16px !important;
    bottom: 30px !important;
    width: 48px !important;
    height: 48px !important;
    line-height: 45px !important;
  }
}

/* Stable three-column service grid on larger screens. */
@media (min-width: 768px) {
  #services > .container {
    width: min(1240px, calc(100% - 48px));
  }

  #services .owl-services.owl-carousel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
  }

  #services .owl-services .service-widget,
  #services .owl-services .owl-item,
  #services .owl-services .owl-item > .service-widget {
    width: 100%;
    min-width: 0;
    margin: 0;
  }

  .whatsapp_float {
    right: 24px !important;
    bottom: 30px !important;
    margin: 0 !important;
  }

  .dmtop {
    right: auto !important;
    left: 24px !important;
    bottom: 30px !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  #services .owl-services.owl-carousel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}