/* Homepage canonical layout rules. Keep this file last in the cascade. */
.home-enhanced #technology .tech-cards-v2,
.home-enhanced #products .product-service-grid {
  align-items: stretch !important;
}

.home-enhanced #technology .tech-v2-card,
.home-enhanced #products .product-service-card {
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.home-enhanced #technology .tech-v2-main,
.home-enhanced #technology .tech-v2-text {
  height: auto !important;
  min-height: 136px !important;
}

.home-enhanced #technology .tech-v2-heading,
.home-enhanced #technology .tech-v2-heading h3,
.home-enhanced #technology .keyword-item,
.home-enhanced #technology .keyword-label,
.home-enhanced #products .product-service-body,
.home-enhanced #products .product-service-tags,
.home-enhanced #products .product-service-tags a {
  min-width: 0 !important;
  overflow-wrap: anywhere;
}

.home-enhanced #technology .tech-v2-keywords {
  height: auto !important;
  min-height: 0 !important;
}

.home-enhanced #technology .tech-v2-keywords .keyword-item {
  height: auto !important;
  min-height: 86px !important;
  padding: 12px 6px !important;
}

.home-enhanced #products .product-service-grid {
  grid-auto-rows: 1fr;
}

.home-enhanced #products .product-service-card {
  display: flex !important;
  flex-direction: column !important;
}

.home-enhanced #products .product-service-body {
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  height: auto !important;
  box-sizing: border-box !important;
}

.home-enhanced #products .product-service-body h3 {
  width: calc(100% - 72px) !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  white-space: normal !important;
}

.home-enhanced #products .product-service-tags {
  align-content: flex-start;
  height: auto !important;
  margin-top: auto;
  max-width: 100% !important;
  overflow: hidden !important;
  flex-wrap: wrap !important;
  gap: 8px 6px !important;
}

.home-enhanced #products .product-service-tags a {
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding-inline: 8px !important;
  font-size: 11px !important;
  white-space: normal !important;
  text-align: center;
}

.home-enhanced #technology .keyword-item,
.home-enhanced #technology .keyword-item span {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis;
}

/* One in-flow active card removes the fixed-height carousel whitespace. */
.home-enhanced .news-v3 .news-carousel {
  position: relative !important;
  width: min(1120px, 100%) !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 22px auto 0 !important;
  padding: 0 54px !important;
  overflow: visible !important;
}

.home-enhanced .news-carousel .news-carousel-track {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  perspective: none !important;
}

.home-enhanced .news-carousel .news-v3-card {
  display: none !important;
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto !important;
}

.home-enhanced .news-carousel .news-v3-card.is-active {
  display: grid !important;
}

.home-enhanced .news-carousel-arrow {
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.home-enhanced .news-carousel-prev { left: 0 !important; }
.home-enhanced .news-carousel-next { right: 0 !important; }
.home-enhanced .news-carousel-dots { margin-top: 18px !important; }

.mobile-header-actions,
.mobile-search-toggle {
  display: none;
}

/* Keep the homepage navigation visible while browsing, matching inner pages. */
body.home-enhanced > .unified-site-header {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 5000 !important;
  overflow: visible !important;
  background: rgba(255, 255, 255, .98) !important;
  box-shadow: 0 1px 0 rgba(214, 225, 240, .95), 0 8px 22px rgba(22, 57, 110, .08) !important;
}

@media (max-width: 900px) {
  body.home-enhanced > .unified-site-header {
    z-index: 10000 !important;
    isolation: isolate;
  }
  body.home-enhanced > .unified-site-header .mobile-header-actions,
  body.home-enhanced > .unified-site-header .mobile-nav-toggle {
    position: relative;
    z-index: 10002 !important;
  }
  body.home-enhanced > .unified-site-header .main-nav,
  body.home-enhanced > .unified-site-header .header-search-inline {
    z-index: 10001 !important;
  }
  body.home-enhanced > .unified-site-header.is-mobile-open .main-nav {
    display: flex !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100dvh - 64px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
}

@media (max-width: 900px) {
  .unified-site-header {
    min-height: 64px !important;
    padding: 8px 16px !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }

  .unified-site-header .brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .unified-site-header .header-logo-img {
    width: auto !important;
    height: 46px !important;
  }

  .unified-site-header .brand-copy h1 {
    font-size: clamp(17px, 4.8vw, 22px) !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }

  .mobile-header-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
  }

  .mobile-search-toggle,
  .unified-site-header .mobile-nav-toggle {
    display: inline-flex !important;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    border: 1px solid #d7e4f5;
    border-radius: 11px;
    background: #fff;
    color: #1458b7;
    box-shadow: none;
  }

  .mobile-search-toggle {
    font: 700 25px/1 Arial, sans-serif;
    cursor: pointer;
  }

  .unified-site-header .header-search-inline {
    display: none !important;
    position: absolute !important;
    z-index: 1002;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    background: #fff;
    border-top: 1px solid #e3ebf6;
    box-shadow: 0 14px 28px rgba(11, 50, 98, .14);
  }

  .unified-site-header.is-search-open .header-search-inline {
    display: flex !important;
  }

  .home-enhanced .news-v3 .news-carousel {
    margin-top: 14px !important;
    padding: 0 42px !important;
  }

  .home-enhanced .news-carousel .news-v3-card.is-active {
    display: block !important;
  }

  .home-enhanced #technology .tech-v2-main,
  .home-enhanced #technology .tech-v2-text {
    min-height: 112px !important;
  }

  .home-enhanced #technology .tech-v2-keywords,
  .home-enhanced #technology .platform-shortcuts-v149 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .home-enhanced #technology .tech-v2-keywords .keyword-item {
    min-height: 72px !important;
  }
}

@media (max-width: 520px) {
  .unified-site-header { padding-inline: 10px !important; }
  .unified-site-header .brand-copy h1 { font-size: 17px !important; }
  .mobile-search-toggle,
  .unified-site-header .mobile-nav-toggle {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
  .home-enhanced .news-v3 .news-carousel { padding: 0 34px !important; }
  .home-enhanced .news-carousel-arrow { width: 34px !important; height: 44px !important; }
}

.news-v3-card[href] { color: inherit; text-decoration: none; }
.news-v3-card-video { position: relative; }
.news-v3-card-video::after {
  content: '▶'; position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; display: grid; place-items: center; padding-left: 3px;
  border-radius: 50%; color: #fff; background: rgba(7, 65, 148, .8);
  box-shadow: 0 7px 20px rgba(0, 0, 0, .22); pointer-events: none;
}
