/* ==========================================================
   GLOBAL HERO MEDIA STANDARD
   Canonical reference: Services hero
   Applied identically to Home, About, Services, Products, Contact.
   ========================================================== */

/* DESKTOP: exact Services geometry */
.hero,
.about-hero,
.services-hero,
.products-hero,
.contact-hero {
  min-height: 85vh !important;
  padding: 140px 5% 80px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 750px !important;
  column-gap: 80px !important;
  row-gap: 0 !important;
  align-items: start !important;
}

/* Same media column size and same top position */
.hero-image,
.about-hero-image,
.services-hero-image,
.products-hero-image,
.contact-hero-image {
  position: relative !important;
  z-index: 2 !important;
  width: 750px !important;
  min-width: 750px !important;
  max-width: 750px !important;
  height: 650px !important;
  min-height: 650px !important;
  max-height: 650px !important;
  margin: 0 !important;
  padding: 0 !important;
  align-self: start !important;
  justify-self: end !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

/* Same inner photo frame */
.hero-image-wrapper,
.about-hero-image-wrapper,
.services-hero-image-wrapper,
.products-hero-image-wrapper,
.contact-hero-image-wrapper {
  position: relative !important;
  width: 637.85px !important;
  min-width: 637.85px !important;
  max-width: 637.85px !important;
  height: 650px !important;
  min-height: 650px !important;
  max-height: 650px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: block !important;
  box-sizing: border-box !important;
}

/* Same actual photo dimensions, crop and position */
.hero-image-wrapper > img,
.about-hero-image-wrapper > img,
.services-hero-image-wrapper > img,
.products-hero-image-wrapper > img,
.contact-hero-image-wrapper > img {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  display: block !important;
  width: 637.85px !important;
  min-width: 637.85px !important;
  max-width: 637.85px !important;
  height: 650px !important;
  min-height: 650px !important;
  max-height: 650px !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover !important;
  object-position: 50% 50% !important;
  border-radius: 24px !important;
  transform: none !important;
  box-sizing: border-box !important;
}

/* Do not allow hover effects to alter the photo size or position */
.hero-image:hover .hero-image-wrapper > img,
.about-hero-image:hover .about-hero-image-wrapper > img,
.services-hero-image:hover .services-hero-image-wrapper > img,
.products-hero-image:hover .products-hero-image-wrapper > img,
.contact-hero-image:hover .contact-hero-image-wrapper > img {
  transform: none !important;
}

/* Keep the left content on the same top grid line as Services */
.hero-content,
.about-hero-content,
.services-hero-content,
.products-hero-content,
.contact-hero-content {
  align-self: start !important;
}

/* TABLET: all five pages continue to use the same media dimensions */
@media (max-width: 1024px) {
  .hero,
  .about-hero,
  .services-hero,
  .products-hero,
  .contact-hero {
    grid-template-columns: 1fr !important;
    row-gap: 48px !important;
    column-gap: 0 !important;
    padding: 140px 5% 80px !important;
  }

  .hero-image,
  .about-hero-image,
  .services-hero-image,
  .products-hero-image,
  .contact-hero-image {
    width: 750px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 650px !important;
    min-height: 650px !important;
    max-height: 650px !important;
    margin: 0 auto !important;
    justify-self: center !important;
  }

  .hero-image-wrapper,
  .about-hero-image-wrapper,
  .services-hero-image-wrapper,
  .products-hero-image-wrapper,
  .contact-hero-image-wrapper {
    width: 637.85px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 650px !important;
  }

  .hero-image-wrapper > img,
  .about-hero-image-wrapper > img,
  .services-hero-image-wrapper > img,
  .products-hero-image-wrapper > img,
  .contact-hero-image-wrapper > img {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 637.85px !important;
    height: 650px !important;
  }
}

/* MOBILE: identical responsive media box across every page */
@media (max-width: 600px) {
  .hero,
  .about-hero,
  .services-hero,
  .products-hero,
  .contact-hero {
    padding: 115px 5% 60px !important;
    row-gap: 36px !important;
  }

  .hero-image,
  .about-hero-image,
  .services-hero-image,
  .products-hero-image,
  .contact-hero-image {
    width: 100% !important;
    max-width: 100% !important;
    height: 500px !important;
    min-height: 500px !important;
    max-height: 500px !important;
  }

  .hero-image-wrapper,
  .about-hero-image-wrapper,
  .services-hero-image-wrapper,
  .products-hero-image-wrapper,
  .contact-hero-image-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    height: 500px !important;
    min-height: 500px !important;
    max-height: 500px !important;
  }

  .hero-image-wrapper > img,
  .about-hero-image-wrapper > img,
  .services-hero-image-wrapper > img,
  .products-hero-image-wrapper > img,
  .contact-hero-image-wrapper > img {
    width: 100% !important;
    max-width: 100% !important;
    height: 500px !important;
    min-height: 500px !important;
    max-height: 500px !important;
  }
}


/* ==========================================================
   HERO PHOTO RIGHT-EDGE ALIGNMENT
   Keep the shared image sizes, but move the visible photo to
   the maximum right limit allowed by the page's 5% margin.
   ========================================================== */

/* Media column stays at the right edge of the hero grid */
.hero-image,
.about-hero-image,
.services-hero-image,
.products-hero-image,
.contact-hero-image {
  justify-self: end !important;
  justify-content: flex-end !important;
}

/* Remove the extra internal right gap created by centering the
   637.85px image inside the 750px media column. */
.hero-image-wrapper,
.about-hero-image-wrapper,
.services-hero-image-wrapper,
.products-hero-image-wrapper,
.contact-hero-image-wrapper {
  margin-left: auto !important;
  margin-right: 0 !important;
}

/* Tablet/mobile remain centered for balanced responsive layout */
@media (max-width: 1024px) {
  .hero-image,
  .about-hero-image,
  .services-hero-image,
  .products-hero-image,
  .contact-hero-image {
    justify-self: center !important;
    justify-content: center !important;
  }

  .hero-image-wrapper,
  .about-hero-image-wrapper,
  .services-hero-image-wrapper,
  .products-hero-image-wrapper,
  .contact-hero-image-wrapper {
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* generic social icons; no third-party brand marks */
.social-generic-icon {
  width: 20px;
  height: 20px;
  display: block;
}
.social-links a:hover {
  background: linear-gradient(135deg, var(--electric-cyan, #20C7D9), var(--acid-lime, #C8F000)) !important;
  color: var(--ink-black, #111514) !important;
  border-color: transparent !important;
}


/* ==========================================================
   TABLET RESPONSIVE HARDENING
   Prevents the canonical 750px hero width from exceeding the
   usable viewport between mobile and desktop breakpoints.
   ========================================================== */
@media (max-width: 820px) {
  .hero,
  .about-hero,
  .services-hero,
  .products-hero,
  .contact-hero {
    width: 100% !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .hero-content,
  .about-hero-content,
  .services-hero-content,
  .products-hero-content,
  .contact-hero-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .hero-image,
  .about-hero-image,
  .services-hero-image,
  .products-hero-image,
  .contact-hero-image {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .hero-image-wrapper,
  .about-hero-image-wrapper,
  .services-hero-image-wrapper,
  .products-hero-image-wrapper,
  .contact-hero-image-wrapper {
    width: min(637.85px, 100%) !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .hero-image-wrapper > img,
  .about-hero-image-wrapper > img,
  .services-hero-image-wrapper > img,
  .products-hero-image-wrapper > img,
  .contact-hero-image-wrapper > img {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}
