/* Knowteq Technologies: focused responsive refinements */

/* Home page blog cards: keep the complete featured image visible */
.blog-home .blog-image,
.blog-listing .blog-image {
  height: auto !important;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f3f6fa;
}
.blog-home .blog-image img,
.blog-listing .blog-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center center !important;
}

/* Contact page map heading: deliberate contrast, independent from page background */
.contact-map-section {
  background: #071d3b !important;
  padding: 38px 0 30px !important;
  margin-top: 18px;
  border-radius: 0;
}
.contact-map-heading {
  color: #fff !important;
  padding: 0 24px 24px !important;
}
.contact-map-heading h2 {
  color: #fff !important;
  margin: 8px 0 10px;
}
.contact-map-heading p {
  color: rgba(255,255,255,.78) !important;
}
.contact-map-heading .kicker,
.contact-map-heading .left-kicker {
  color: #ff8a45 !important;
}
.contact-map-heading .btn {
  background: #ff6900;
  color: #fff;
  border-color: #ff6900;
}
.contact-map-frame {
  margin-inline: auto;
  width: min(100% - 48px, 1200px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 18px;
  overflow: hidden;
}

@media (max-width: 650px) {
  /* Compact service thumbnails: 3 across, 4 rows for 10 services */
  .services-home .home-services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 9px !important;
  }
  .services-home .home-service-card {
    min-height: 104px !important;
    padding: 11px 6px 10px !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 7px !important;
    text-align: center;
  }
  .services-home .home-service-icon {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px;
    border-radius: 11px !important;
    font-size: 22px !important;
  }
  .services-home .home-service-icon svg {
    width: 22px;
    height: 22px;
  }
  .services-home .home-service-copy {
    align-items: center;
    gap: 0 !important;
    width: 100%;
  }
  .services-home .home-service-copy b {
    font-size: 10.5px !important;
    line-height: 1.2 !important;
    min-height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-wrap: anywhere;
  }
  .services-home .home-service-copy small,
  .services-home .card-arrow {
    display: none !important;
  }
  .services-home .center-action {
    margin-top: 18px;
  }

  /* More breathing room for the home blog cards on narrow screens */
  .blog-home .blog-grid,
  .blog-listing {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .blog-home .blog-image,
  .blog-listing .blog-image {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    max-height: none;
  }
  .blog-home .blog-image img,
  .blog-listing .blog-image img {
    object-fit: contain !important;
  }

  .contact-map-section {
    padding: 27px 0 24px !important;
    margin-top: 12px;
  }
  .contact-map-heading {
    padding: 0 17px 18px !important;
    gap: 15px;
  }
  .contact-map-heading h2 {
    font-size: 27px !important;
    line-height: 1.15;
  }
  .contact-map-heading p {
    font-size: 13px;
    line-height: 1.55;
  }
  .contact-map-frame {
    width: calc(100% - 34px);
    border-radius: 14px;
  }
  .contact-map-frame iframe {
    height: 390px !important;
  }
}


/* Homepage blog thumbnails: consistent square cards on desktop and mobile */
.blog-home .blog-image {
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  min-height: 0;
  max-height: none;
  background: #f3f6fa;
}
.blog-home .blog-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
}
.blog-home .blog-card:hover .blog-image img { transform: none !important; }


/* Final homepage-only corrections: desktop shows all services; mobile shows the first six. */
@media (min-width: 651px) {
  .services-home .home-services-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .services-home .home-service-card { display: flex !important; }
}
@media (max-width: 650px) {
  .services-home .home-services-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .services-home .home-service-card:nth-child(n+7) { display: none !important; }
  .services-home .home-service-card:nth-child(-n+6) { display: flex !important; }
}

/* Match the homepage blog thumbnail frame to the blog listing: square, full image visible. */
.blog-home .blog-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch;
  gap: 22px !important;
}
.blog-home .blog-card { min-width: 0; overflow: hidden; }
.blog-home .blog-image {
  position: relative; width: 100%; height: auto !important;
  aspect-ratio: 1 / 1 !important; min-height: 0 !important;
  max-height: none !important; overflow: hidden;
  display: flex !important; align-items: center; justify-content: center;
  background: #f3f6fa !important;
}
.blog-home .blog-image img {
  display: block; width: 100% !important; height: 100% !important;
  max-width: 100%; max-height: 100%; object-fit: contain !important;
  object-position: center center !important; transform: none !important;
}
@media (max-width: 850px) {
  .blog-home .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 650px) {
  .blog-home .blog-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
  .blog-home .blog-image { aspect-ratio: 1 / 1 !important; height: auto !important; }
  .blog-home .blog-image img { object-fit: contain !important; }
}
