/* Shared containment and brand-logo fixes for all lab detail pages. */
.newlab-adl-force,
.newlab-adl-force *,
.newlab-adl-force *::before,
.newlab-adl-force *::after {
  box-sizing: border-box;
}

.newlab-adl-force {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

/* Keep every lab page edge-to-edge; older templates set this variable at
   multiple breakpoints to create an outer left/right gutter. */
html body .newlab-adl-force {
  --adl-edge: 0px !important;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}

html body .newlab-adl-force :where(
  .newlab-hero,
  .newlab-stats-strip,
  .newlab-license-band,
  .newlab-dark-stats,
  .newlab-bottom-cta
) {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

html body .newlab-adl-force :where(
  .newlab-two-column,
  .newlab-programs,
  .newlab-ecosystem,
  .newlab-gallery
) {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

@media (max-width: 1200px) {
  html body .newlab-adl-force {
    --adl-edge: 0px !important;
  }
}

.newlab-adl-force :where(
  .newlab-hero-copy,
  .newlab-hero-photo,
  .newlab-panel,
  .newlab-card,
  .newlab-program-card,
  .newlab-approval-card,
  .newlab-license-copy,
  .newlab-license-visual,
  .newlab-about-copy,
  .newlab-highlights,
  .newlab-stat,
  .newlab-mini-grid > *,
  .newlab-tech-grid > *,
  .newlab-grid > *,
  [class*="grid"] > *,
  [class*="row"] > *
) {
  min-width: 0;
  max-width: 100%;
}

.newlab-adl-force :where(h1, h2, h3, h4, p, li, strong, small, span) {
  overflow-wrap: anywhere;
  word-break: normal;
}

.newlab-adl-force :where(img, video, iframe, svg:not(.newlab-line-icon):not(.newlab-mini-icon)) {
  max-width: 100%;
}

.newlab-adl-force .newlab-hero-copy {
  overflow: hidden;
}

.newlab-adl-force .newlab-hero-copy > * {
  max-width: 100%;
}

.newlab-adl-force .newlab-photo-crop,
.newlab-adl-force .newlab-hero-photo {
  overflow: hidden;
}

/* Certification overlays were removed from every page; this also protects
   against stale server markup during deployment. */
html body .newlab-adl-force .newlab-approval-card {
  display: none !important;
}

/* Keep the diagonal brand ribbon fully visible above the hero image. */
html body .newlab-adl-force .newlab-hero {
  position: relative !important;
  isolation: isolate !important;
  grid-template-columns: minmax(0, 46%) minmax(0, 54%) !important;
}

html body .newlab-adl-force .newlab-hero-copy {
  position: relative !important;
  z-index: 3 !important;
}

html body .newlab-adl-force .newlab-hero-photo {
  position: relative !important;
  z-index: 1 !important;
}

html body .newlab-adl-force .newlab-hero-angle {
  display: none !important;
}

/* Page-specific CTA contrast. */
html body main.nasscom-page.newlab-adl-force .newlab-bottom-cta {
  background: linear-gradient(105deg, #35105f, #7b22c9) !important;
}

html body main.microsoft-page.newlab-adl-force .newlab-bottom-cta {
  background: linear-gradient(105deg, #004e8c, #0078d4) !important;
}

html body main.newlab-adl-force:not(.microsoft-page) .newlab-bottom-cta {
  background-color: var(--navy, #071d3f);
}

html body main.newlab-adl-force .newlab-bottom-cta :where(h2, p) {
  color: #ffffff !important;
}

html body main.pearson-page.newlab-adl-force,
html body main.nvidia-page.newlab-adl-force {
  display: block !important;
  width: 100vw !important;
  max-width: 100vw !important;
}

html body :where(.pearson-page, .nvidia-page) :where(
  .newlab-two-column,
  .newlab-two-column.newlab-compact
) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 18px !important;
}

html body :where(.pearson-page, .nvidia-page) :where(
  .newlab-panel,
  .newlab-highlights-panel,
  .newlab-learn-panel,
  .newlab-program-card
) {
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 !important;
}

/* Requested brand CTA palettes. */
html body main.newlab-adl-force .newlab-bottom-cta.apple-cta-fix,
html body main.newlab-adl-force.apple-page .newlab-bottom-cta {
  background: #050505 !important;
}

html body main.newlab-adl-force.google-page .newlab-bottom-cta {
  background: linear-gradient(105deg, #0b57d0, #1a73e8) !important;
}

html body .newlab-adl-force .newlab-program-card h3,
html body .newlab-adl-force .newlab-tech-grid small,
html body .newlab-adl-force .newlab-mini-feature-row small {
  font-size: clamp(11px, 0.95vw, 15px) !important;
  line-height: 1.2 !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.newlab-adl-force .newlab-photo-crop img,
.newlab-adl-force .newlab-hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.newlab-brand-logo {
  display: block;
  width: min(150px, 100%);
  max-height: 58px;
  margin: 0 auto;
  object-fit: contain;
}

.newlab-emblem .newlab-brand-logo {
  width: min(92px, 100%);
  max-height: 44px;
}

.newlab-dgca-mark .newlab-brand-logo {
  width: min(160px, 100%);
  max-height: 58px;
}

@media (max-width: 980px) {
  html body .newlab-adl-force .newlab-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: 0 !important;
  }

  html body .newlab-adl-force .newlab-hero-angle {
    display: none !important;
  }

  html body .newlab-adl-force .newlab-hero-photo {
    width: 100% !important;
    height: clamp(280px, 52vw, 430px) !important;
  }

  html body .newlab-adl-force :where(
    .newlab-two-column,
    .newlab-two-column.newlab-compact,
    .newlab-license-band,
    .newlab-bottom-cta
  ) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html body :where(.pearson-page, .nvidia-page) :where(
    .newlab-two-column,
    .newlab-two-column.newlab-compact
  ) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 760px) {
  html body .newlab-adl-force .newlab-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: 0 !important;
  }

  html body .newlab-adl-force .newlab-hero-angle {
    display: none !important;
  }

  .newlab-adl-force .newlab-hero-copy {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  html body .newlab-adl-force .newlab-hero-photo {
    width: 100% !important;
    height: clamp(240px, 62vw, 390px) !important;
  }

  html body .newlab-adl-force :where(
    .newlab-two-column,
    .newlab-two-column.newlab-compact,
    .newlab-license-band,
    .newlab-bottom-cta
  ) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html body .newlab-adl-force :where(
    .newlab-program-grid,
    .newlab-ecosystem-grid,
    .newlab-gallery-grid,
    .newlab-tech-grid,
    .newlab-mini-feature-row
  ) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html body .newlab-adl-force .newlab-wall-sign {
    right: 14px !important;
    max-width: calc(100% - 28px) !important;
  }

  .newlab-adl-force .newlab-hero-copy h1 {
    font-size: clamp(1.75rem, 9vw, 2.8rem) !important;
    line-height: 1.06 !important;
  }

  .newlab-adl-force .newlab-hero-copy h2 {
    font-size: clamp(1.08rem, 5vw, 1.45rem) !important;
  }
}

@media (max-width: 460px) {
  html body .newlab-adl-force :where(
    .newlab-program-grid,
    .newlab-ecosystem-grid,
    .newlab-gallery-grid,
    .newlab-tech-grid,
    .newlab-mini-feature-row
  ) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
