/* CLEWIS detail-page readability overrides.
 * Kept separate from the generated bundle so upgrades remain easy to review. */

/* Give inner-page navigation a stable surface instead of placing white text
   directly over bright photography. */
.inner-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 50;
  background: linear-gradient(90deg, rgba(3, 18, 32, .96), rgba(6, 36, 61, .90));
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 12px 34px rgba(2, 15, 28, .18);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
}

.inner-header .site-container {
  min-height: 86px;
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(440px, 1fr) minmax(150px, 190px);
  align-items: center;
  gap: 28px;
}

.inner-header .brand { justify-self: start; }
.inner-header .site-logo {
  filter: brightness(0) invert(1);
  opacity: .96;
}
.inner-header nav {
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 2.3vw, 40px);
}
.inner-header nav a {
  color: rgba(255, 255, 255, .88);
  font-weight: 600;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}
.inner-header nav a:hover { color: #fff; }
.inner-header > .site-container > .btn { justify-self: end; }

/* The left-weighted overlay protects the title and copy while retaining the
   architectural detail on the right side of the image. */
.inner-hero.service-detail-hero {
  min-height: 720px;
  isolation: isolate;
  overflow: hidden;
}

.inner-hero.service-detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(2, 16, 29, .90) 0%,
      rgba(3, 22, 39, .78) 32%,
      rgba(5, 25, 43, .48) 57%,
      rgba(4, 19, 32, .20) 78%,
      rgba(4, 18, 30, .12) 100%),
    linear-gradient(180deg, rgba(3, 17, 29, .18), rgba(3, 17, 29, .30));
}

.inner-hero.service-detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
}

.inner-hero.service-detail-hero > .site-container {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 128px));
  margin-inline: auto;
  padding-top: 178px;
  padding-bottom: 96px;
}

.inner-hero.service-detail-hero h1 {
  max-width: 720px;
  margin-top: 26px;
  text-shadow: 0 4px 28px rgba(0, 0, 0, .45);
}

.inner-hero.service-detail-hero .eyebrow,
.inner-hero.service-detail-hero .site-container > p:not(.eyebrow) {
  text-shadow: 0 2px 18px rgba(0, 0, 0, .50);
}

.inner-hero.service-detail-hero .site-container > p:not(.eyebrow) {
  max-width: 650px;
  color: rgba(255, 255, 255, .88);
  line-height: 1.9;
}

@media (max-width: 1050px) {
  .inner-header .site-container {
    grid-template-columns: minmax(170px, 220px) 1fr auto;
    gap: 18px;
  }
  .inner-header nav { gap: 18px; }
  .inner-header nav a { font-size: 13px; }
}

@media (max-width: 900px) {
  .inner-header .site-container {
    display: flex;
    min-height: 76px;
    justify-content: space-between;
  }
  .inner-header nav { display: none; }
  .inner-hero.service-detail-hero { min-height: 640px; }
  .inner-hero.service-detail-hero > .site-container {
    width: min(100% - 48px, 1180px);
    padding-top: 150px;
    padding-bottom: 72px;
  }
  .inner-hero.service-detail-hero::before {
    background: linear-gradient(90deg, rgba(2, 16, 29, .91), rgba(3, 22, 39, .72) 70%, rgba(4, 18, 30, .35));
  }
}

@media (max-width: 600px) {
  .inner-header .site-container { min-height: 70px; }
  .inner-header .site-logo { max-width: 174px; }
  .inner-header > .site-container > .btn { padding: 12px 15px; font-size: 12px; }
  .inner-hero.service-detail-hero { min-height: 590px; }
  .inner-hero.service-detail-hero > img { object-position: 58% center; }
  .inner-hero.service-detail-hero > .site-container {
    width: calc(100% - 36px);
    padding-top: 132px;
  }
}

/* Global back-to-top control. It sits above the language switcher and only
   becomes interactive after the visitor has scrolled down the page. */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 78px;
  z-index: 9998;
  width: 46px;
  height: 46px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(6, 30, 52, .92);
  border: 1px solid rgba(111, 180, 255, .48);
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(0, 20, 40, .28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease, background .2s ease;
}
.back-to-top span { font: 500 25px/1 Arial, sans-serif; transform: translateY(-1px); }
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover { background: #1677ff; border-color: #68adff; }
.back-to-top:focus-visible { outline: 3px solid rgba(78, 158, 247, .42); outline-offset: 3px; }

.hero .hero-bg {
  /* Universal PNG fallback: older Edge/compatibility modes may not decode
     WebP or retain a custom-property url() used by the generated bundle. */
  background-image:
    linear-gradient(90deg, rgba(2, 13, 27, .96) 0%, rgba(2, 13, 27, .82) 42%, rgba(2, 13, 27, .28) 72%, rgba(2, 13, 27, .08) 100%),
    linear-gradient(0deg, rgba(1, 10, 21, .58), transparent 48%),
    url('/images/hero-datacenter.png') !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  transition: opacity .28s ease, filter .28s ease;
}

/* Windows 10 Edge fallback. Keep a complete background on the hero itself so
   the page remains correct even when an older cached utility stylesheet does
   not position .hero-bg, or when CSS custom-property image URLs are ignored. */
.hero {
  position: relative;
  min-height: 880px;
  color: #fff;
  background-color: #06182a;
  background-image:
    linear-gradient(90deg, rgba(2, 13, 27, .96) 0%, rgba(2, 13, 27, .82) 42%, rgba(2, 13, 27, .28) 72%, rgba(2, 13, 27, .08) 100%),
    linear-gradient(0deg, rgba(1, 10, 21, .58), rgba(1, 10, 21, 0) 48%),
    url('/images/hero-datacenter.png');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}
.hero .hero-bg {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
.hero .hero-title span { color: #fff; }
.hero .hero-title em { color: #63adff; }
.clewis-nav-logo,
.clewis-nav-logo img,
.site-logo {
  max-width: 100%;
}
.clewis-nav-logo img {
  width: 170px;
  height: 52px;
  object-fit: contain;
}

@media (min-width: 1024px) {
  .hero { min-height: 920px; }
}
.clewis-mega-header.clewis-over-hero + .hero {
  box-sizing: border-box;
  padding-top: 86px;
}
.hero .hero-bg.is-switching {
  opacity: .58;
  filter: saturate(.82);
}
.hero-switcher button { cursor: pointer; }
.hero-switcher button:focus-visible {
  outline: 2px solid #69adff;
  outline-offset: 3px;
}

/* Explicit positioning fallbacks for browsers that reject Tailwind's max()
   arbitrary-value utilities. */
@media (min-width: 1024px) {
  .hero .hero-switcher {
    position: absolute !important;
    display: flex !important;
    flex-direction: row !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    top: auto !important;
    left: auto !important;
    right: 80px !important;
    bottom: 32px !important;
    z-index: 10 !important;
  }
  .hero .hero-switcher button {
    flex: 0 0 250px !important;
    width: 250px !important;
  }
  .hero .scroll-cue {
    position: absolute !important;
    display: flex !important;
    align-items: center !important;
    width: auto !important;
    margin: 0 !important;
    top: auto !important;
    left: 80px !important;
    right: auto !important;
    bottom: 36px !important;
    z-index: 10 !important;
  }
}

/* Do not rely on generated utility declarations for the desktop hero. This
   deliberately uses conservative CSS understood by Windows 10 Edge. */
@media screen and (min-width: 1024px) {
  .hero {
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    min-height: 920px !important;
    overflow: hidden !important;
  }
  .hero > .site-container {
    position: relative !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 1520px !important;
    margin-right: auto !important;
    margin-left: auto !important;
    padding: 86px 24px 150px !important;
  }
}

@media screen and (min-width: 1024px) and (max-width: 1366px) {
  .hero .hero-switcher { right: 32px !important; }
  .hero .hero-switcher button {
    flex-basis: 210px !important;
    width: 210px !important;
  }
  .hero .scroll-cue { left: 32px !important; }
}

@media (max-width: 900px) {
  .clewis-mega-header.clewis-over-hero + .hero { padding-top: 72px; }
}

@media (max-width: 600px) {
  .back-to-top { right: 18px; bottom: 74px; width: 42px; height: 42px; }
}

/* English pages contain longer labels and form copy. Keep every section
   inside the viewport and prevent the document-level horizontal scrollbar. */
html[lang="en"], html[lang="en"] body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html[lang="en"]::-webkit-scrollbar,
html[lang="en"] body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
html[lang="en"] main,
html[lang="en"] header,
html[lang="en"] section,
html[lang="en"] footer {
  max-width: 100%;
}
html[lang="en"] .site-container,
html[lang="en"] .contact-section .site-container,
html[lang="en"] .footer-main,
html[lang="en"] .footer-bottom {
  min-width: 0;
  max-width: min(1440px, calc(100% - 48px));
}
html[lang="en"] .site-container > *,
html[lang="en"] .contact-section .site-container > *,
html[lang="en"] .footer-main > * {
  min-width: 0;
}
html[lang="en"] .contact-form,
html[lang="en"] .contact-form input,
html[lang="en"] .contact-form select,
html[lang="en"] .contact-form textarea,
html[lang="en"] .contact-form button {
  box-sizing: border-box;
  max-width: 100%;
}
html[lang="en"] .site-header.is-scrolled {
  color: #fff;
  background: rgba(3, 17, 34, .97);
  border-color: rgba(255,255,255,.1);
  box-shadow: 0 10px 34px rgba(0, 10, 24, .28);
}
html[lang="en"] footer { overflow: hidden; }

/* Shared template footer. Some legacy English service pages contain only a
   small inline stylesheet, so the common footer must be fully self-styled. */
.template-footer {
  overflow: hidden;
  padding: 68px 0 24px;
  color: #9fb3c5;
  background: #06172a;
  border-top: 1px solid rgba(151, 187, 218, .16);
  font: 14px/1.7 Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.template-footer .site-container {
  box-sizing: border-box;
  width: calc(100% - 48px);
  max-width: 1440px;
  margin: 0 auto;
}
.template-footer .footer-main {
  display: grid;
  grid-template-columns: minmax(230px, 1.35fr) repeat(3, minmax(170px, 1fr));
  gap: 56px;
  align-items: start;
}
.template-footer .footer-brand .site-logo {
  display: block;
  width: 230px;
  height: 76px;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
}
.template-footer h4 {
  margin: 0 0 19px;
  color: #fff;
  font-size: 15px;
}
.template-footer p { margin: 0 0 13px; }
.template-footer a {
  display: block;
  margin: 0 0 10px;
  color: #aebfce;
  text-decoration: none;
}
.template-footer a:hover { color: #65b2ff; }
.template-footer .footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid rgba(151, 187, 218, .14);
  font-size: 12px;
}
.template-footer .footer-bottom a { display: inline; margin: 0; }

/* Database-driven products shared by all service detail templates. */
.template-related-products {
  padding: 82px 0;
  color: #152a3d;
  background: #f4f8fc;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.template-related-products .site-container {
  box-sizing: border-box;
  width: calc(100% - 48px);
  max-width: 1440px;
  margin: 0 auto;
}
.template-related-products header span {
  color: #1677ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
}
.template-related-products header h2 {
  margin: 10px 0 8px;
  color: #102438;
  font-size: 38px;
  line-height: 1.2;
}
.template-related-products header p { margin: 0; color: #71869a; }
.template-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}
.template-related-grid > a {
  min-width: 0;
  padding: 0 24px 25px;
  color: #183047;
  background: #fff;
  border: 1px solid #dce7ef;
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(13, 53, 86, .06);
}
.template-related-image {
  height: 190px;
  margin: 0 -24px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}
.template-related-image img { width: 100%; height: 100%; object-fit: contain; }
.template-product-placeholder { color: #1677ff; font-size: 22px; font-weight: 800; }
.template-related-grid small { color: #1677ff; font-weight: 700; }
.template-related-grid h3 { margin: 9px 0; color: #102438; font-size: 19px; }
.template-related-grid p { min-height: 3.4em; color: #72869a; line-height: 1.7; }
.template-related-grid b { color: #1677ff; font-size: 13px; }
.template-related-all {
  display: inline-block;
  margin-top: 28px;
  color: #1677ff;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 900px) {
  .template-footer .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 38px; }
  .template-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .template-footer { padding-top: 48px; }
  .template-footer .footer-main,
  .template-related-grid { grid-template-columns: 1fr; }
  .template-footer .footer-bottom { display: block; }
  .template-footer .footer-bottom span { display: block; margin-top: 8px; }
  .template-related-products { padding: 58px 0; }
  .template-related-products header h2 { font-size: 30px; }
}

@media (max-width: 1100px) {
  html[lang="en"] .site-header .site-container { width: calc(100% - 32px); }
  html[lang="en"] .site-header nav { gap: 16px; }
  html[lang="en"] .site-header .nav-link { font-size: 13px; }
  html[lang="en"] .header-phone { display: none; }
}
