/* Decorative server-photo treatment overrides. Kept separate so the AI-placeholder photos can be tuned or removed quickly. */

/* Move the old homepage rack photo out of the process section. */
div:has(> img[src='/assets/server-shots/rack-deployment.webp']) {
  display: none;
}

/* Homepage final CTA: use the dedicated rack CTA photo on desktop only. */
body:has(#common-builds) section:has(a[href='mailto:sales@zenithsystems.my']),
body:has(#common-builds) section:has(a[href='mailto:hello@zenithsystems.my']) {
  position: relative;
  overflow: hidden;
}

body:has(#common-builds) section:has(a[href='mailto:sales@zenithsystems.my'])::before,
body:has(#common-builds) section:has(a[href='mailto:hello@zenithsystems.my'])::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url('/assets/server-shots/rack-cta-bg.webp');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center right;
  opacity: 0.72;
  filter: saturate(0.94) contrast(0.98) brightness(0.86);
}

body:has(#common-builds) section:has(a[href='mailto:sales@zenithsystems.my']) > *,
body:has(#common-builds) section:has(a[href='mailto:hello@zenithsystems.my']) > * {
  position: relative;
  z-index: 1;
}

/* Refurbished hero: keep the new image clear without forcing a crop scale. */
img[src='/assets/server-shots/refurbished-server-hero.webp'] {
  opacity: 0.96 !important;
  filter: saturate(0.9) contrast(0.98) brightness(0.96) !important;
}

/* Services page: keep the photo desktop-only and let the source fade do most of the work. */
.services-refurbished-section img[src='/assets/server-shots/open-chassis-service-bg.webp'] {
  object-position: right center !important;
}

/* Refurbished included section: make the decorative photo quiet and non-interactive. */
.refurbished-included-section > img[src='/assets/server-shots/rack-included-bg.webp'] {
  object-position: center right;
}

@media (min-width: 1024px) {
  .refurbished-hero-section > div.grid {
    column-gap: clamp(5rem, 6vw, 6rem) !important;
  }

  .refurbished-hero-section div:has(> img[src='/assets/server-shots/refurbished-server-hero.webp']) {
    transform: scale(1.08);
    transform-origin: center right;
  }

  #common-builds + section,
  .refurbished-hero-section + .refurbished-case-section,
  .refurbished-workloads-section,
  .refurbished-faq-section,
  .services-list-section {
    padding-top: 0 !important;
  }

  .services-list-section > div {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }
}

@media (max-width: 1023px) {
  #common-builds + section,
  .refurbished-hero-section + .refurbished-case-section,
  .refurbished-workloads-section,
  .refurbished-faq-section,
  .services-list-section {
    padding-top: 0 !important;
  }

  body:has(#common-builds) section:has(a[href='mailto:sales@zenithsystems.my'])::before,
  body:has(#common-builds) section:has(a[href='mailto:hello@zenithsystems.my'])::before,
  .services-refurbished-section img[src='/assets/server-shots/open-chassis-service-bg.webp'],
  .refurbished-included-section > img[src='/assets/server-shots/rack-included-bg.webp'] {
    display: none !important;
  }
}
