/* Locale-safe layout rules for long translated strings. */
main,
main > article,
main > section,
main section,
main article,
.products-section,
.products-section .services-inner,
.standard-service-copy,
.standard-service-card-wrap,
.standard-sample-cta,
.service-card,
.service-card-top {
  min-width: 0;
  max-width: 100%;
}

/*
 * The animated product-family word and the trust statement need independent
 * vertical zones. Keeping the original motion while reserving real space for
 * every line prevents the layers from colliding at intermediate scroll frames.
 */
.trust-reveal-section .trust-gooey-service-loop {
  top: clamp(2.5rem, 6vh, 4.5rem);
}

.trust-reveal-section .trust-gooey-text {
  margin-top: clamp(2.25rem, 5vh, 4rem);
  height: clamp(4.5rem, 10vw, 7.5rem);
}

.trust-reveal-section .trust-gooey-word {
  font-size: clamp(2.4rem, 6.4vw, 6.4rem);
  line-height: 0.92;
}

.trust-reveal-section .trust-message-wrapper {
  box-sizing: border-box;
  justify-content: flex-start;
  gap: 0;
  padding: clamp(17rem, 36vh, 21rem) 1rem clamp(7rem, 14vh, 10rem);
}

.trust-reveal-section .trust-primary-message,
.trust-reveal-section .trust-support-message {
  flex: 0 0 auto;
  font-size: clamp(3.2rem, 7.2vw, 6rem);
  letter-spacing: -0.18rem;
  line-height: 0.98;
}

.trust-reveal-section .trust-text-scroll {
  position: relative;
  flex: 0 0 auto;
  margin: clamp(1.35rem, 3vh, 2rem) 0 clamp(1.65rem, 3.5vh, 2.4rem);
  translate: none;
}

.trust-reveal-section .trust-text-scroll h2 {
  font-size: clamp(3rem, 7vw, 5.75rem);
  line-height: 0.92;
}

@media (min-width: 768px) and (max-height: 760px) {
  .trust-reveal-section .trust-gooey-service-loop {
    top: 2rem;
  }

  .trust-reveal-section .trust-gooey-text {
    margin-top: 2.2rem;
    height: 4.75rem;
  }

  .trust-reveal-section .trust-gooey-word {
    font-size: clamp(2.5rem, 5.8vw, 4.75rem);
  }

  .trust-reveal-section .trust-message-wrapper {
    padding-top: 10.75rem;
    padding-bottom: 5.5rem;
  }

  .trust-reveal-section .trust-primary-message,
  .trust-reveal-section .trust-support-message {
    font-size: clamp(2.8rem, 6.2vw, 4.75rem);
  }

  .trust-reveal-section .trust-text-scroll {
    margin-top: 1rem;
    margin-bottom: 1.25rem;
  }

  .trust-reveal-section .trust-text-scroll h2 {
    font-size: clamp(2.6rem, 5.8vw, 4.4rem);
  }
}

main h1,
main h2,
main h3,
main h4,
main p,
main span,
main a {
  overflow-wrap: anywhere;
}

/*
 * Long knowledge-centre headlines use Antonio's tall uppercase glyphs.  The
 * original 0.9 line-height lets dotted capitals (İ/I) touch the line above,
 * especially while the navigation drawer narrows the visible page.  Give the
 * article hero its own editorial rhythm without changing headings elsewhere.
 */
main article.bg-white > div.mx-auto > div.grid:first-child > div:first-child > h1 {
  max-width: 100%;
  font-size: clamp(3rem, 7vw, 7.25rem);
  line-height: 1.06;
  letter-spacing: -0.018em;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  text-wrap: balance;
}

@media (min-width: 768px) and (max-width: 1399px) {
  /* Keep the large product names inside four-column card padding. */
  .products-section .service-card:not(.service-card-standard) h3 {
    max-width: 100%;
    font-size: clamp(1.75rem, 3vw, 2.125rem);
    direction: ltr;
    white-space: nowrap;
  }
}

@media (max-width: 767px) {
  /*
   * Keep the animated trust statement clear of the rising product cards.
   * The individual `translate` property preserves GSAP's own transforms.
   */
  .trust-reveal-section .trust-message-wrapper {
    justify-content: flex-start;
    padding-top: clamp(12.5rem, 32vh, 16rem);
    padding-bottom: 5rem;
    translate: none;
  }

  .trust-reveal-section .trust-gooey-service-loop {
    top: 2.25rem;
  }

  .trust-reveal-section .trust-gooey-text {
    margin-top: 2.35rem;
    height: 4.5rem;
  }

  .trust-reveal-section .trust-gooey-word {
    font-size: clamp(2.25rem, 11vw, 3.45rem);
  }

  .trust-reveal-section .trust-primary-message,
  .trust-reveal-section .trust-support-message {
    max-width: calc(100vw - 2rem);
    font-size: clamp(2.55rem, 12.5vw, 4rem);
    letter-spacing: -0.08rem;
    line-height: 0.98;
  }

  .trust-reveal-section .trust-text-scroll {
    margin-top: 1.2rem;
    margin-bottom: 1.45rem;
  }

  .trust-reveal-section .trust-text-scroll h2 {
    font-size: clamp(2.4rem, 11.5vw, 3.7rem);
  }

  main .grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .products-section .services-grid,
  .standard-service-copy,
  .standard-service-card-wrap,
  .standard-sample-cta,
  .service-card,
  .service-card-top {
    width: 100%;
  }

  /* Product names stay on one line, but must fit inside the card padding too. */
  .products-section .service-card:not(.service-card-standard) h3 {
    width: 100%;
    max-width: 100%;
    font-size: clamp(
      1.5rem,
      calc(100cqw / (var(--service-title-chars) * 0.76)),
      2.85rem
    );
    direction: ltr;
    text-align: start;
    white-space: nowrap;
  }

  main .general-title {
    max-width: calc(100vw - 2rem);
    font-size: clamp(2.25rem, 11vw, 3.15rem);
    line-height: 0.96;
    text-align: center;
  }

  main .general-title [class*="text-nowrap"] {
    max-width: 100%;
    white-space: normal;
  }

  main article.bg-white > div.mx-auto > div.grid:first-child > div:first-child > h1 {
    font-size: clamp(2.4rem, 7.8vw, 3.6rem);
    line-height: 1.1;
    letter-spacing: -0.012em;
    text-wrap: pretty;
  }
}

/*
 * Diacritic-safe display rhythm
 *
 * Antonio has very tall Turkish/Azerbaijani capitals (İ, Ş, Ö, Ü, Ğ, Ç).
 * Several original display rules used 0.82–1.00 leading, which makes those
 * marks touch the line above or below. Keep the condensed character of the
 * type system while reserving enough vertical room on every translated page.
 */
html:not([dir="rtl"]) main h1,
html:not([dir="rtl"]) main h2,
html:not([dir="rtl"]) main h3,
html:not([dir="rtl"]) main h4 {
  line-height: 1.08;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

/* Multi-line editorial and conversion headings need one extra step of air. */
html:lang(tr) main article h1,
html:lang(tr) main article h2,
html:lang(tr) main article h3,
html:lang(az) main article h1,
html:lang(az) main article h2,
html:lang(az) main article h3,
html:lang(tr) .cm-qf .cm-qf__hero h2,
html:lang(az) .cm-qf .cm-qf__hero h2 {
  line-height: 1.12;
}

html:lang(tr) .cm-qf .cm-qf__section-head h3,
html:lang(az) .cm-qf .cm-qf__section-head h3,
html:lang(tr) .cm-lead .cm-lead__intro h2,
html:lang(az) .cm-lead .cm-lead__intro h2 {
  line-height: 1.1;
}

/* These animated headings have more specific legacy selectors. */
html:not([dir="rtl"]) .trust-reveal-section .trust-gooey-word,
html:not([dir="rtl"]) .trust-reveal-section .trust-primary-message,
html:not([dir="rtl"]) .trust-reveal-section .trust-support-message,
html:not([dir="rtl"]) .trust-reveal-section .trust-text-scroll h2,
html:not([dir="rtl"]) main .general-title {
  line-height: 1.08;
}

@media (max-width: 767px) {
  html:not([dir="rtl"]) main h1,
  html:not([dir="rtl"]) main h2,
  html:not([dir="rtl"]) main h3,
  html:not([dir="rtl"]) main h4 {
    line-height: 1.12;
  }

  html:not([dir="rtl"]) .trust-reveal-section .trust-gooey-word,
  html:not([dir="rtl"]) .trust-reveal-section .trust-primary-message,
  html:not([dir="rtl"]) .trust-reveal-section .trust-support-message,
  html:not([dir="rtl"]) .trust-reveal-section .trust-text-scroll h2,
  html:not([dir="rtl"]) main .general-title {
    line-height: 1.12;
  }
}
/* Keep the certificates hero readable at laptop and zoomed desktop widths. */
.certificates-page main > section:first-of-type h1 {
  overflow-wrap: normal;
  word-break: keep-all;
  font-size: clamp(3rem, 12vw, 9rem);
}

@media (min-width: 768px) and (max-width: 991px) {
  .certificates-page main > section[class*="pt-36"] > div {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .certificates-page main > section[class*="pt-36"] h1 {
    font-size: 9vw;
  }
}

/* Premium product cards: restrained surface, fine borders, and one quiet accent. */
.products-section .service-card.service-card {
  min-height: 22rem;
  padding: clamp(1.6rem, 2.2vw, 2.25rem);
  border: 1px solid rgba(26, 66, 138, 0.28);
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(26, 66, 138, 0.07);
  overflow: hidden;
}

.products-section .service-card.service-card::before,
.products-section .service-card.service-card::after {
  display: none;
}

.products-section .service-card.service-card .service-card-top {
  gap: 1rem;
  padding-bottom: 1.1rem;
  border-color: rgba(26, 66, 138, 0.18);
}

.products-section .service-card.service-card .service-card-top::after {
  width: 2.4rem;
  height: 1px;
  background: #d84d99;
  content: "";
  flex: 0 0 auto;
}

.products-section .service-card.service-card h3 {
  margin-top: 2rem;
  letter-spacing: -0.025em;
}

.products-section .service-card.service-card h3::after {
  display: none;
}

.products-section .service-card.service-card p {
  max-width: 29rem;
  color: rgba(26, 66, 138, 0.82);
}

.products-section .service-card.service-card em {
  margin-top: 1.8rem;
  padding: 0.75rem 0 0;
  border-top: 1px solid rgba(26, 66, 138, 0.16);
  color: #1a428a;
  letter-spacing: 0.12em;
}

.products-section .service-card.service-card:hover {
  --tw-translate-y: calc(var(--spacing) * -1);
  color: #1a428a;
  background: #fff;
  box-shadow: 0 20px 42px rgba(26, 66, 138, 0.12);
}

.products-section .service-card.service-card:hover p,
.products-section .service-card.service-card:hover em {
  color: inherit;
}

/* Product families: a quiet, editorial system that replaces the former framed layout. */
.products-section {
  position: relative;
  isolation: isolate;
  padding-block: clamp(4rem, 8vw, 8rem);
  background:
    radial-gradient(circle at 88% 8%, rgba(45, 182, 219, 0.18), transparent 25rem),
    linear-gradient(135deg, #061633 0%, #0b2860 56%, #081b40 100%);
}

.products-section::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 4rem 4rem;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

.products-section .services-inner {
  width: min(1380px, calc(100% - 3rem));
  margin-inline: auto;
}

.products-section .services-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.65fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
  padding: 0;
  border: 0;
  color: #fff;
}

.products-section .services-heading p,
.products-section .micro-services-copy > p {
  margin-bottom: 1rem;
  color: #75d8ed;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.19em;
}

.products-section .services-heading h2 {
  max-width: 13ch;
  margin: 0;
  color: #fff;
  font-size: clamp(2.5rem, 5.3vw, 5.8rem);
  line-height: 0.93;
  letter-spacing: -0.055em;
}

.products-section .services-heading > span {
  display: block;
  max-width: 31rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.26);
  color: rgba(255, 255, 255, 0.75);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.65;
}

.products-section .micro-services-feature {
  display: grid;
  grid-template-columns: minmax(16rem, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  margin: 0 0 clamp(1.5rem, 3vw, 2.75rem);
  padding: clamp(1.5rem, 3.3vw, 3.6rem);
  border: 1px solid rgba(152, 215, 235, 0.3);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.16);
}

.products-section .micro-services-copy {
  padding: 0;
  border: 0;
  color: #fff;
}

.products-section .micro-services-copy h3 {
  margin: 0 0 1.7rem;
  color: #fff;
  font-size: clamp(2.2rem, 3.35vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}

.products-section .micro-services-copy > span {
  display: block;
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.02rem;
  line-height: 1.7;
}

.products-section .micro-services-grid,
.products-section .services-grid {
  gap: clamp(1rem, 2vw, 1.75rem);
}

.products-section .services-grid {
  counter-reset: product-card;
}

.products-section .service-card.service-card {
  position: relative;
  min-height: 25rem;
  padding: clamp(1.5rem, 2.2vw, 2.25rem);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: none;
  overflow: hidden;
}

.products-section .services-grid .service-card.service-card {
  counter-increment: product-card;
}

.products-section .services-grid .service-card.service-card::before {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  display: block;
  color: rgba(26, 66, 138, 0.22);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  content: counter(product-card, decimal-leading-zero);
}

.products-section .service-card.service-card::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 0.28rem;
  background: linear-gradient(90deg, #1a428a, #2db6db 65%, #d84d99);
  content: "";
}

.products-section .service-card.service-card .service-card-top {
  display: flex;
  align-items: center;
  min-height: 2.7rem;
  padding: 0 3rem 1rem 0;
  border-bottom: 1px solid rgba(26, 66, 138, 0.16);
}

.products-section .service-card.service-card .service-card-top::after {
  display: none;
}

.products-section .service-card.service-card .service-card-top span {
  color: rgba(26, 66, 138, 0.72);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.35;
}

.products-section .service-card.service-card h3 {
  margin-top: clamp(2.2rem, 4vw, 4.5rem);
  margin-bottom: 1.35rem;
  color: #123a81;
  font-size: clamp(2.15rem, 3.1vw, 3.65rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.products-section .service-card.service-card p {
  margin: 0;
  color: rgba(12, 41, 92, 0.75);
  font-size: 1.02rem;
  line-height: 1.65;
}

.products-section .service-card.service-card em {
  margin-top: auto;
  padding: 1.5rem 0 0;
  border-top: 0;
  color: #123a81;
  font-size: 0.73rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.products-section .service-card.service-card em::after {
  margin-left: 0.55rem;
  color: #d84d99;
  content: "→";
}

.products-section .service-card.service-card:hover {
  --tw-translate-y: calc(var(--spacing) * -2);
  border-color: rgba(117, 216, 237, 0.8);
  background: #fff;
  box-shadow: 0 1.4rem 3.2rem rgba(0, 0, 0, 0.22);
}

.products-section .certificate-cta,
.products-section .sample-cta {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

@media (max-width: 900px) {
  .products-section .services-heading,
  .products-section .micro-services-feature {
    grid-template-columns: 1fr;
  }

  .products-section .services-heading h2 {
    max-width: 16ch;
  }
}

@media (max-width: 600px) {
  .products-section {
    padding-block: 3.5rem;
  }

  .products-section .services-inner {
    width: min(100% - 2rem, 1380px);
  }

  .products-section .micro-services-feature {
    padding: 1.4rem;
    border-radius: 0.5rem;
  }

  .products-section .service-card.service-card {
    min-height: 21rem;
  }
}

/* Use the warm call-action tone throughout the product area and remove card ordinals. */
.products-section {
  background: #faeade;
}

.products-section::before {
  background-image: linear-gradient(rgba(26, 66, 138, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(26, 66, 138, 0.05) 1px, transparent 1px);
}

.products-section .services-heading,
.products-section .micro-services-copy {
  color: #123a81;
}

.products-section .services-heading p,
.products-section .micro-services-copy > p {
  color: rgba(18, 58, 129, 0.72);
}

.products-section .services-heading h2,
.products-section .micro-services-copy h3 {
  color: #123a81;
}

.products-section .services-heading > span,
.products-section .micro-services-copy > span {
  border-color: rgba(18, 58, 129, 0.22);
  color: rgba(18, 58, 129, 0.78);
}

.products-section .micro-services-feature,
.products-section .service-card.service-card,
.products-section .certificate-cta,
.products-section .sample-cta {
  border-color: rgba(18, 58, 129, 0.24);
  background: #faeade;
  box-shadow: none;
}

.products-section .services-grid .service-card.service-card::before {
  display: none;
  content: none;
}

.products-section .service-card.service-card:hover {
  border-color: rgba(18, 58, 129, 0.5);
  background: #faeade;
  box-shadow: 0 1rem 2.6rem rgba(18, 58, 129, 0.12);
}

/* Certificate callout: stable desktop grid and high-contrast navy typography. */
.products-section .certificate-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: clamp(2rem, 5vw, 5rem);
  row-gap: 0.8rem;
  align-items: center;
  width: 100%;
  margin-bottom: clamp(3rem, 6vw, 6rem);
  padding: clamp(1.75rem, 3.5vw, 3.5rem);
  border: 1px solid rgba(18, 58, 129, 0.3);
  color: #123a81;
  overflow: visible;
}

.products-section .certificate-cta::before {
  display: none;
}

.products-section .certificate-cta p {
  grid-column: 1;
  margin: 0;
  color: #123a81;
  font-size: clamp(0.68rem, 0.8vw, 0.82rem);
  font-weight: 800;
  letter-spacing: 0.18em;
}

.products-section .certificate-cta h2 {
  grid-column: 1;
  max-width: 32ch;
  margin: 0;
  color: #123a81;
  font-size: clamp(1.45rem, 2.25vw, 2.45rem);
  line-height: 1.14;
  text-wrap: balance;
}

.products-section .certificate-cta a {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  min-width: clamp(13rem, 18vw, 17rem);
  padding: 1rem 1.25rem;
  border: 1px solid #123a81;
  color: #123a81;
  background: transparent;
  font-size: clamp(0.75rem, 0.95vw, 0.9rem);
  text-align: center;
  white-space: nowrap;
}

@media (hover: hover) {
  .products-section .certificate-cta a:hover {
    color: #faeade;
    background: #123a81;
  }
}

@media (max-width: 720px) {
  .products-section .certificate-cta {
    grid-template-columns: 1fr;
  }

  .products-section .certificate-cta p,
  .products-section .certificate-cta h2,
  .products-section .certificate-cta a {
    grid-column: 1;
  }

  .products-section .certificate-cta a {
    grid-row: auto;
    width: 100%;
    min-width: 0;
  }
}

/* Product detail hero: keep compound product names intact at every desktop width. */
main > section.bg-white[class*="pt-36"] h1.break-words {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  white-space: nowrap;
  font-size: clamp(3.15rem, 15vw, 4.5rem);
}

@media (min-width: 768px) {
  main > section.bg-white[class*="pt-36"] h1.break-words {
    font-size: clamp(4.5rem, 8.2vw, 8rem);
  }
}

/* Keep every active-card label visible and center the complete copy block. */
.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-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;
  }
}

/* Premium expanding product showcase — progressively enhances the existing cards. */
.products-section.cm-expanding-ready .micro-services-feature {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

.products-section.cm-expanding-ready .micro-services-copy {
  width: min(100%, 62rem);
  padding: clamp(1.5rem, 3vw, 3rem) 0;
  border: 0;
}

.products-section.cm-expanding-ready .micro-services-grid,
.products-section.cm-expanding-ready > .services-inner > .services-grid {
  display: none;
}

.cm-expanding-products {
  --active-card: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(4.75rem, 1fr));
  width: 100%;
  height: clamp(31rem, 44vw, 38rem);
  gap: clamp(0.45rem, 0.8vw, 0.8rem);
  margin: clamp(1.25rem, 3vw, 3rem) 0 clamp(4rem, 7vw, 7rem);
  transition: grid-template-columns 520ms cubic-bezier(.22, .8, .22, 1);
}

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

.products-section.cm-expanding-ready .cm-expanding-card.service-card {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 1.25rem;
  background: #102f69;
  box-shadow: 0 1.25rem 3rem rgba(14, 47, 105, 0.14);
  isolation: isolate;
  outline: none;
}

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

.cm-expanding-card__image,
.cm-expanding-card__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cm-expanding-card__image {
  z-index: -2;
  object-fit: cover;
  object-position: center 24%;
  filter: grayscale(.88) brightness(.52) contrast(1.05);
  transform: scale(1.08);
  transition: filter 420ms ease, transform 700ms cubic-bezier(.22, .8, .22, 1);
}

.cm-expanding-card__shade {
  z-index: -1;
  background: linear-gradient(180deg, rgba(5, 22, 55, .06) 18%, rgba(5, 22, 55, .94) 100%);
}

.cm-expanding-card[data-active="true"] .cm-expanding-card__image {
  filter: saturate(.92) brightness(.78) contrast(1.03);
  transform: scale(1);
}

.cm-expanding-card[data-active="true"],
.cm-expanding-card:focus-visible {
  border-color: rgba(52, 197, 224, .9) !important;
  box-shadow: 0 1.5rem 4rem rgba(14, 47, 105, .23), inset 0 0 0 1px rgba(255,255,255,.34) !important;
}

.cm-expanding-card__rail-title {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  z-index: 2;
  color: #fff;
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: clamp(1.1rem, 1.5vw, 1.45rem);
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: translateX(-50%) rotate(180deg);
  opacity: .9;
  transition: opacity 220ms ease, transform 320ms ease;
}

.cm-expanding-card[data-active="true"] .cm-expanding-card__rail-title {
  opacity: 0;
  transform: translateX(-50%) translateY(1rem) rotate(180deg);
}

.cm-expanding-card__content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: .85rem;
  width: 100%;
  padding: clamp(1.35rem, 2.6vw, 2.75rem);
  color: #fff;
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 300ms ease 100ms, transform 420ms cubic-bezier(.22,.8,.22,1) 100ms;
  pointer-events: none;
}

.cm-expanding-card[data-active="true"] .cm-expanding-card__content {
  opacity: 1;
  transform: translateY(0);
}

.products-section .cm-expanding-card__content .service-card-top,
.products-section .cm-expanding-card__content h3,
.products-section .cm-expanding-card__content p,
.products-section .cm-expanding-card__content em {
  position: static;
  width: min(100%, 32rem);
  margin: 0;
  padding: 0;
  color: #fff;
  background: none;
  border: 0;
  box-shadow: none;
}

.products-section .cm-expanding-card__content .service-card-top {
  display: block;
  color: rgba(255,255,255,.74);
  font-size: .72rem;
  letter-spacing: .2em;
}

.products-section .cm-expanding-card__content h3 {
  font-size: clamp(2.4rem, 4.6vw, 5rem);
  line-height: .96;
  letter-spacing: -.025em;
  text-shadow: 0 .2rem 1.5rem rgba(0,0,0,.24);
}

.products-section .cm-expanding-card__content p {
  font-size: clamp(.96rem, 1.25vw, 1.15rem);
  line-height: 1.55;
  color: rgba(255,255,255,.83);
}

.products-section .cm-expanding-card__content em {
  width: max-content;
  margin-top: .35rem;
  color: #fff;
  font-size: .8rem;
  font-style: normal;
  letter-spacing: .14em;
  text-transform: uppercase;
}

@media (max-width: 767px) {
  .cm-expanding-products {
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(6, 1fr);
    height: 46rem;
    gap: .5rem;
    transition: grid-template-rows 520ms cubic-bezier(.22, .8, .22, 1);
  }

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

  .cm-expanding-card__rail-title {
    left: 1.2rem;
    bottom: 50%;
    writing-mode: horizontal-tb;
    transform: translateY(50%);
    font-size: 1rem;
  }

  .cm-expanding-card[data-active="true"] .cm-expanding-card__rail-title {
    transform: translateY(calc(50% + .5rem));
  }

  .products-section .cm-expanding-card__content h3 {
    font-size: clamp(2.1rem, 12vw, 3.65rem);
  }

  .products-section .cm-expanding-card__content p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cm-expanding-products,
  .cm-expanding-card__image,
  .cm-expanding-card__content,
  .cm-expanding-card__rail-title {
    transition: none !important;
  }
}

/* Expanding cards: preserve the photography while guaranteeing readable copy. */
.products-section.cm-expanding-ready .cm-expanding-card__shade {
  background:
    linear-gradient(90deg, rgba(4, 17, 43, .5) 0%, rgba(4, 17, 43, .08) 62%),
    linear-gradient(180deg, rgba(4, 17, 43, .08) 20%, rgba(4, 17, 43, .68) 62%, rgba(4, 17, 43, .98) 100%);
}

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

.products-section.cm-expanding-ready .cm-expanding-card__content {
  background: linear-gradient(180deg, transparent 28%, rgba(4, 18, 46, .18) 48%, rgba(4, 18, 46, .88) 100%);
}

.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 {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .72), 0 1px 2px rgba(0, 0, 0, .9);
}

.products-section.cm-expanding-ready .cm-expanding-card__content p {
  color: rgba(255, 255, 255, .94);
  font-weight: 500;
}

.products-section.cm-expanding-ready .cm-expanding-card__content .service-card-top {
  color: rgba(255, 255, 255, .88);
  font-weight: 600;
}

.products-section.cm-expanding-ready .cm-expanding-card__rail-title {
  padding: .65rem .42rem;
  border-radius: .4rem;
  background: rgba(4, 18, 46, .62);
  box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .18);
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .85);
  backdrop-filter: blur(5px);
}

@media (max-width: 767px) {
  .products-section.cm-expanding-ready .cm-expanding-card__content {
    padding: 1.35rem;
    background: linear-gradient(180deg, rgba(4, 18, 46, .06) 10%, rgba(4, 18, 46, .9) 100%);
  }

  .products-section.cm-expanding-ready .cm-expanding-card__rail-title {
    padding: .45rem .7rem;
  }
}

/* Center the sample/contact callout on desktop as one focused action block. */
.products-section .sample-cta {
  display: flex;
  justify-content: center;
  text-align: center;
}

.products-section .sample-cta-copy {
  align-items: center;
  width: min(100%, 64rem);
  margin-inline: auto;
  text-align: center;
}

.products-section .sample-cta-copy h2 {
  width: min(100%, 54rem);
  margin-inline: auto;
}

.products-section .sample-cta-actions {
  justify-content: center;
}

@media (min-width: 768px) {
  .products-section .sample-cta-copy {
    justify-content: center;
    gap: 1.25rem;
    flex-direction: column;
  }

  .products-section .sample-cta-actions {
    margin-top: 1.5rem;
  }
}
