/* Final layout authority for the expanding product showcase. */
.products-section.cm-expanding-ready .cm-expanding-card__content {
  align-items: center;
  justify-content: center;
  gap: clamp(.8rem, 1.5vw, 1.35rem);
  padding: clamp(2rem, 4vw, 4rem);
  text-align: center;
  background: radial-gradient(circle at center, rgba(4, 18, 46, .34), rgba(4, 18, 46, .76) 72%, rgba(4, 18, 46, .9));
}

.products-section.cm-expanding-ready .cm-expanding-card__content .service-card-top,
.products-section.cm-expanding-ready .cm-expanding-card__content h3,
.products-section.cm-expanding-ready .cm-expanding-card__content p,
.products-section.cm-expanding-ready .cm-expanding-card__content em {
  flex: 0 0 auto;
  width: min(100%, 42rem);
  max-width: 100%;
  margin-inline: auto;
  text-align: center;
  opacity: 1;
  visibility: visible;
}

.products-section.cm-expanding-ready .cm-expanding-card__content .service-card-top,
.products-section.cm-expanding-ready .cm-expanding-card__content .service-card-top span {
  color: rgba(255, 255, 255, .9);
}

.products-section.cm-expanding-ready .cm-expanding-card__content .service-card-top::after,
.products-section.cm-expanding-ready .cm-expanding-card__content .service-card-top span::after {
  display: none;
}

.products-section.cm-expanding-ready .cm-expanding-card__content h3 {
  font-size: clamp(2.6rem, 4.5vw, 4.75rem);
}

.products-section.cm-expanding-ready .cm-expanding-card__content p {
  display: block;
  overflow: visible;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.55;
  -webkit-box-orient: initial;
  -webkit-line-clamp: unset;
}

.products-section.cm-expanding-ready .cm-expanding-card__content em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin-top: .25rem;
  padding: .7rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 999px;
  background: rgba(5, 23, 56, .42);
}

@media (max-width: 767px) {
  .products-section.cm-expanding-ready .cm-expanding-products {
    height: 54rem;
  }

  .products-section.cm-expanding-ready .cm-expanding-products:has(.cm-expanding-card:nth-child(1)[data-active="true"]) { grid-template-rows: 7fr repeat(5, 1fr); }
  .products-section.cm-expanding-ready .cm-expanding-products:has(.cm-expanding-card:nth-child(2)[data-active="true"]) { grid-template-rows: 1fr 7fr repeat(4, 1fr); }
  .products-section.cm-expanding-ready .cm-expanding-products:has(.cm-expanding-card:nth-child(3)[data-active="true"]) { grid-template-rows: repeat(2, 1fr) 7fr repeat(3, 1fr); }
  .products-section.cm-expanding-ready .cm-expanding-products:has(.cm-expanding-card:nth-child(4)[data-active="true"]) { grid-template-rows: repeat(3, 1fr) 7fr repeat(2, 1fr); }
  .products-section.cm-expanding-ready .cm-expanding-products:has(.cm-expanding-card:nth-child(5)[data-active="true"]) { grid-template-rows: repeat(4, 1fr) 7fr 1fr; }
  .products-section.cm-expanding-ready .cm-expanding-products:has(.cm-expanding-card:nth-child(6)[data-active="true"]) { grid-template-rows: repeat(5, 1fr) 7fr; }

  .products-section.cm-expanding-ready .cm-expanding-card__content {
    gap: .75rem;
    padding: 1.35rem 1.15rem;
  }

  .products-section.cm-expanding-ready .cm-expanding-card__content h3 {
    font-size: clamp(2rem, 10vw, 3.15rem);
  }

  .products-section.cm-expanding-ready .cm-expanding-card__content p {
    font-size: .95rem;
    line-height: 1.45;
  }

  .products-section.cm-expanding-ready .cm-expanding-card__content em {
    padding: .55rem .85rem;
    font-size: .7rem;
  }
}

/* Brighter card photography with a restrained readability veil. */
.products-section.cm-expanding-ready .cm-expanding-card__image {
  filter: grayscale(.42) brightness(.8) contrast(1.02);
}

.products-section.cm-expanding-ready .cm-expanding-card[data-active="true"] .cm-expanding-card__image {
  filter: saturate(1.02) brightness(.92) contrast(1.02);
}

.products-section.cm-expanding-ready .cm-expanding-card__shade {
  background:
    linear-gradient(90deg, rgba(5, 21, 50, .2) 0%, rgba(5, 21, 50, .02) 66%),
    linear-gradient(180deg, rgba(5, 21, 50, .02) 18%, rgba(5, 21, 50, .28) 62%, rgba(5, 21, 50, .66) 100%);
}

.products-section.cm-expanding-ready .cm-expanding-card__content {
  background: radial-gradient(circle at center, rgba(4, 18, 46, .08), rgba(4, 18, 46, .34) 72%, rgba(4, 18, 46, .58));
}

.products-section.cm-expanding-ready .cm-expanding-card__rail-title {
  background: rgba(4, 18, 46, .5);
}

/* Center the certificate invitation as one balanced call-to-action. */
.products-section .certificate-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.15rem, 2.4vw, 1.8rem);
  text-align: center;
}

.products-section .certificate-cta p,
.products-section .certificate-cta h2,
.products-section .certificate-cta a {
  margin-inline: auto;
  text-align: center;
}

.products-section .certificate-cta p {
  width: 100%;
}

.products-section .certificate-cta h2 {
  width: min(100%, 27ch);
  max-width: 27ch;
}

.products-section .certificate-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 32rem);
}

/* Clean white canvas for the complete certificates and products section. */
.products-section.cm-expanding-ready {
  background: #fff;
}

.products-section.cm-expanding-ready::before {
  background: none;
  background-image: none;
}

.products-section.cm-expanding-ready .certificate-cta,
.products-section.cm-expanding-ready .micro-services-feature,
.products-section.cm-expanding-ready .micro-services-copy,
.products-section.cm-expanding-ready .sample-cta {
  background-color: #fff;
}

/* Center the category label across the whole card, not its legacy column. */
.products-section.cm-expanding-ready .cm-expanding-card__content .service-card-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  padding: 0;
  text-align: center;
}

.products-section.cm-expanding-ready .cm-expanding-card__content .service-card-top span {
  display: block;
  flex: 1 1 100%;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center;
  transform: none !important;
}

/* Reset the old gradient-text treatment so the CTA label remains visible. */
.products-section.cm-expanding-ready .cm-expanding-card__content em {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background-color: rgba(5, 23, 56, .7) !important;
  background-image: none !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
  opacity: 1 !important;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .8) !important;
}

/* Center the two editorial introductions above the product showcase. */
.products-section .services-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100%, 64rem);
  margin: 0 auto clamp(2.5rem, 5vw, 4.5rem);
  gap: clamp(1rem, 2vw, 1.6rem);
  text-align: center;
}

.products-section .services-heading p,
.products-section .services-heading h2,
.products-section .services-heading > span {
  margin-inline: auto;
  text-align: center;
}

.products-section .services-heading h2 {
  max-width: 16ch;
  line-height: 1.08;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.products-section .services-heading > span {
  width: min(100%, 48rem);
  max-width: 48rem;
  padding-bottom: 1.1rem;
}

.products-section.cm-expanding-ready .micro-services-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100%, 64rem);
  margin-inline: auto;
  text-align: center;
}

.products-section.cm-expanding-ready .micro-services-copy > p,
.products-section.cm-expanding-ready .micro-services-copy h3,
.products-section.cm-expanding-ready .micro-services-copy > span {
  margin-inline: auto;
  text-align: center;
}

.products-section.cm-expanding-ready .micro-services-copy h3 {
  max-width: 18ch;
  padding-block: .12em .18em;
  overflow: visible;
  line-height: 1.22 !important;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.products-section.cm-expanding-ready .micro-services-copy > span {
  width: min(100%, 50rem);
  max-width: 50rem;
}

@media (max-width: 767px) {
  .products-section .services-heading,
  .products-section.cm-expanding-ready .micro-services-copy {
    width: 100%;
  }

  .products-section .services-heading h2,
  .products-section.cm-expanding-ready .micro-services-copy h3 {
    max-width: 100%;
    font-size: clamp(2.35rem, 10.5vw, 3.7rem);
    line-height: 1.12;
    letter-spacing: -.025em;
  }

  .products-section.cm-expanding-ready .micro-services-copy h3 {
    max-width: 14ch;
    font-size: clamp(2rem, 8.8vw, 3.05rem);
    line-height: 1.28 !important;
    letter-spacing: -.015em;
  }
}
