/*
 * Shared Hero parity layer — visual presentation only.
 *
 * These selectors deliberately preserve each template's existing copy, H1,
 * links, forms, structured data and WordPress records. The page backgrounds
 * use only existing on-site media; no media or database associations change.
 */
@media (min-width: 761px) {
  /* The approved small-vial home treatment should have the same calm page
     rhythm as the editorial About Hero, rather than growing with viewport. */
  html body.home:has(.master-home) .master-home-hero {
    height: 400px !important;
    min-height: 400px !important;
  }

  /* Catalogue: replace the purely decorative gradient with the existing
     research-material image while retaining a high-contrast reading area. */
  body:has(.page-hero-catalog) .page-hero-catalog {
    min-height: 400px !important;
    background-color: #031738 !important;
    background-image:
      linear-gradient(90deg, rgba(3, 23, 56, .98) 0%, rgba(3, 31, 82, .91) 43%, rgba(3, 31, 82, .47) 100%),
      url('/wp-content/uploads/2026/07/lab-vials2.webp') !important;
    background-position: center, center !important;
    background-size: cover, cover !important;
  }
  body:has(.page-hero-catalog) .page-hero-catalog .content-wrap {
    min-height: 400px !important;
  }

  /* Product detail already has a background image; harmonize only its
     geometry so the specimen remains the visual focus at the right. */
  body.single-product.woocommerce .page-hero-detail,
  body.single-product.woocommerce .page-hero-detail .content-wrap {
    height: 400px !important;
    min-height: 400px !important;
  }

  /* Research Library already uses the same verified local asset. Align its
     block height and vertical copy position with the rest of the system. */
  html body:has(main.research-library-page) .research-support-hero {
    min-height: 400px !important;
    padding-block: 0 !important;
  }
  html body:has(main.research-library-page) .research-support-hero-grid {
    min-height: 400px;
    align-items: center;
  }

  /* Contact previously had no photographic layer. Use an existing site image
     with the same navy overlay treatment, without changing contact content. */
  body:has(.contact-brief-wrap) .page-hero {
    min-height: 400px;
    padding-block: 0;
    background-color: #031a43;
    background-image:
      linear-gradient(90deg, rgba(3, 26, 67, .98) 0%, rgba(3, 31, 79, .91) 43%, rgba(3, 31, 79, .45) 100%),
      url('/wp-content/uploads/2026/07/lab-microscope.jpg');
    background-position: center, center;
    background-size: cover, cover;
    background-repeat: no-repeat;
  }
  body:has(.contact-brief-wrap) .page-hero .content-wrap {
    min-height: 400px;
    align-items: center;
  }
}

/* Tablet sits between the desktop and 720px mobile rules in the legacy
   library sheet. Chinese two-line headings need their own breathing room
   here, rather than being forced into the desktop composition. */
@media (min-width: 721px) and (max-width: 860px) {
  html body:has(main.research-library-page) .research-support-hero {
    min-height: 0 !important;
    padding: 42px 0 38px !important;
  }
  html body:has(main.research-library-page) .research-support-hero-grid,
  html body:has(main.research-library-page) .research-support-guides > .content-wrap,
  html body:has(main.research-library-page) .research-support-action-band > .content-wrap,
  html body:has(main.research-library-page) .research-support-faq > .content-wrap {
    width: min(100% - 48px, 720px) !important;
  }
  html body:has(main.research-library-page) .research-support-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    align-items: start !important;
  }
  html body:has(main.research-library-page) .research-support-intro h1 {
    max-width: 600px;
    font-size: clamp(40px, 6.2vw, 50px) !important;
    line-height: 1.06 !important;
  }
  html body:has(main.research-library-page) .research-support-lead {
    max-width: 570px;
    margin-top: 16px !important;
    font-size: 15px !important;
    line-height: 1.58 !important;
  }
  html body:has(main.research-library-page) .research-support-hero-controls {
    width: min(100%, 540px) !important;
    margin-top: 20px !important;
  }
}
