/* Shared presentation overrides for the Daochong template and its language mirrors. */

/* The active state is set by ncc-nav-active.js. Keep it visually equivalent
   to a hover state for both the source site and language mirrors. */
.main-nav a.ncc-nav-link--active {
  color: var(--blue-dark) !important;
}

.main-nav a.ncc-nav-link--active::after {
  transform: scaleX(1);
}

/* Footer language selector */
.footer-modern .footer-modern-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 18px;
  white-space: nowrap;
}

.footer-modern .ncc-language-switch > div {
  top: auto !important;
  right: 0;
  bottom: calc(100% + 10px) !important;
}

/* English copy is substantially longer than Chinese. Scale only the major headings. */
html[lang^="en"] .slide-content h1,
html[lang^="en"] .slide-content h2 {
  max-width: 680px;
  font-size: clamp(34px, 3.1vw, 46px);
  line-height: 1.12;
  letter-spacing: -.025em;
}

html[lang^="en"] .section-intro h2,
html[lang^="en"] .platform-copy h2,
html[lang^="en"] .cta-layout h2,
html[lang^="en"] .page-hero h1,
html[lang^="en"] .subpage-title h2,
html[lang^="en"] .prod-terminal-header h2,
html[lang^="en"] .platform-header h2,
html[lang^="en"] .solution-row-copy h2,
html[lang^="en"] .news-feature h2,
html[lang^="en"] .about-copy h2,
html[lang^="en"] .contact-info h2,
html[lang^="en"] .detail-product-copy h1,
html[lang^="en"] .detail-section-heading h2,
html[lang^="en"] .detail-recommend-header h2,
html[lang^="en"] .service-band-copy h2,
html[lang^="en"] .client-cases-heading h2,
html[lang^="en"] .showcase-content h2,
html[lang^="en"] .company-intro-copy h2,
html[lang^="en"] .solution-detail-hero-copy h1,
html[lang^="en"] .solution-detail-related h2,
html[lang^="en"] .solution-detail-service h2,
html[lang^="en"] .support-hero h1,
html[lang^="en"] .support-faq h2,
html[lang^="en"] .faq-detail-hero-copy h1,
html[lang^="en"] .about-cases-head h2 {
  font-size: clamp(30px, 2.7vw, 40px);
  line-height: 1.2;
  letter-spacing: -.03em;
}

html[lang^="en"] .platform-copy h2 {
  max-width: 700px;
  margin-right: auto;
  margin-left: auto;
  white-space: normal;
}

html[lang^="en"] .platform-copy h2 br {
  display: block;
}

/* CTA bands are shallow horizontal areas; long English calls to action need
   a quieter scale than page-section headings so they do not dominate the image. */
html[lang^="en"] .cta-layout h2 {
  max-width: 760px;
  font-size: clamp(24px, 2vw, 28px);
  line-height: 1.18;
  letter-spacing: -.025em;
}

/* Keep product terminal capabilities legible over the city-network artwork
   even before a card is hovered. */
html[lang^="en"] .prod-terminal-item {
  border: 1px solid rgba(133, 211, 245, .16);
  background: rgba(2, 18, 31, .52);
  box-shadow: 0 12px 28px rgba(0, 9, 18, .2);
  backdrop-filter: blur(3px);
}

html[lang^="en"] .prod-terminal-item:hover {
  background: rgba(6, 53, 77, .72);
  border-color: rgba(94, 200, 242, .38);
}

/* Product-platform figures use concise Chinese measurements in the source;
   their English equivalents need a calmer scale to stay balanced. */
html[lang^="en"] .platform-stat-card .stat-num {
  font-size: 26px;
  line-height: 1.18;
}

html[lang^="en"] .platform-stat-card .stat-num .stat-unit {
  font-size: 17px;
}

html[lang^="en"] .platform-stat-card .stat-label {
  font-size: 12px;
}

/* Capability-panel labels are often longer in English. Show the complete
   label across lines instead of truncating it with an ellipsis. */
html[lang^="en"] .accordion-panel .panel-title {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

/* English news headlines can be materially longer than their source titles.
   Keep the detail-page banner clear without overpowering the article summary. */
html[lang^="en"] .news-detail-page .page-hero h1 {
  font-size: clamp(28px, 2.3vw, 35px);
  line-height: 1.16;
}

@media (max-width: 760px) {
  .footer-modern .footer-modern-meta {
    gap: 16px;
  }

  html[lang^="en"] .slide-content h1,
  html[lang^="en"] .slide-content h2 {
    font-size: clamp(32px, 9vw, 40px);
  }

  html[lang^="en"] .cta-layout h2 {
    font-size: clamp(23px, 6.5vw, 27px);
  }

  html[lang^="en"] .prod-terminal-item {
    background: rgba(2, 18, 31, .64);
  }

  html[lang^="en"] .platform-stat-card .stat-num {
    font-size: 24px;
  }

  html[lang^="en"] .news-detail-page .page-hero h1 {
    font-size: clamp(27px, 7vw, 32px);
  }

  html[lang^="en"] .section-intro h2,
  html[lang^="en"] .platform-copy h2,
  html[lang^="en"] .cta-layout h2,
  html[lang^="en"] .page-hero h1,
  html[lang^="en"] .subpage-title h2,
  html[lang^="en"] .prod-terminal-header h2,
  html[lang^="en"] .platform-header h2,
  html[lang^="en"] .solution-row-copy h2,
  html[lang^="en"] .news-feature h2,
  html[lang^="en"] .about-copy h2,
  html[lang^="en"] .contact-info h2,
  html[lang^="en"] .detail-product-copy h1,
  html[lang^="en"] .detail-section-heading h2,
  html[lang^="en"] .detail-recommend-header h2,
  html[lang^="en"] .service-band-copy h2,
  html[lang^="en"] .client-cases-heading h2,
  html[lang^="en"] .showcase-content h2,
  html[lang^="en"] .company-intro-copy h2,
  html[lang^="en"] .solution-detail-hero-copy h1,
  html[lang^="en"] .solution-detail-related h2,
  html[lang^="en"] .solution-detail-service h2,
  html[lang^="en"] .support-hero h1,
  html[lang^="en"] .support-faq h2,
  html[lang^="en"] .faq-detail-hero-copy h1,
  html[lang^="en"] .about-cases-head h2 {
    font-size: clamp(28px, 7.5vw, 34px);
  }
}
