/**
 * UCFER public site — pixel alignment lock (8px grid).
 * Loaded last. One content rail, one logo height, sticky header, no JS gutters.
 */

html.ucfer-wb-clone {
  --ucfer-content: 1120px;
  --ucfer-gutter: 24px;
  --ucfer-logo-h: 48px;
  --ucfer-nav-h: 64px;
  --ucfer-strip-h: 40px;
  --header-height: auto;
  --header-height-scrolled: auto;
  --side-spacing: var(--ucfer-gutter);
  box-sizing: border-box;
}

html.ucfer-wb-clone *,
html.ucfer-wb-clone *::before,
html.ucfer-wb-clone *::after {
  box-sizing: border-box;
}

@media (min-width: 768px) {
  html.ucfer-wb-clone {
    --ucfer-gutter: 32px;
  }
}

@media (min-width: 1120px) {
  html.ucfer-wb-clone {
    --ucfer-gutter: 48px;
  }
}

html.ucfer-wb-clone,
html.ucfer-wb-clone body {
  margin: 0;
  overflow-x: hidden;
  max-width: 100%;
}

html.ucfer-wb-clone img,
html.ucfer-wb-clone video,
html.ucfer-wb-clone svg {
  max-width: 100%;
}

html.ucfer-wb-clone .header .ucfer-logo-image,
html.ucfer-wb-clone .header.scrolled .ucfer-logo-image,
html.ucfer-wb-clone .logo-link img,
html.ucfer-wb-clone .nav-logo img {
  height: var(--ucfer-logo-h) !important;
  width: auto !important;
  max-height: var(--ucfer-logo-h) !important;
  object-fit: contain;
  transform: none !important;
  filter: none !important;
  transition: none !important;
}

html.ucfer-wb-clone .logo-link:hover {
  transform: none !important;
}

/* Sticky header: content starts on the next pixel — no 150px / 110px jump */
html.ucfer-wb-clone .header,
html.ucfer-wb-clone .header.scrolled {
  position: sticky;
  top: 0;
  height: auto !important;
  min-height: 0;
  box-shadow: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: none !important;
}

html.ucfer-wb-clone .hero-margin-top,
html.ucfer-wb-clone .hero.services-hero,
html.ucfer-wb-clone .service-hero.hero-margin-top,
html.ucfer-wb-clone .header.scrolled ~ .hero.services-hero {
  margin-top: 0 !important;
}

html.ucfer-wb-clone .trust-strip {
  padding: 0;
  min-height: var(--ucfer-strip-h);
}

html.ucfer-wb-clone .navbar {
  height: var(--ucfer-nav-h);
}

html.ucfer-wb-clone .nav-container,
html.ucfer-wb-clone .trust-strip-inner,
html.ucfer-wb-clone .container,
html.ucfer-wb-clone .footer .container,
html.ucfer-wb-clone .wb-hero-copy,
html.ucfer-wb-clone .wb-enquire-inner {
  width: 100%;
  max-width: var(--ucfer-content) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--ucfer-gutter) !important;
  padding-right: var(--ucfer-gutter) !important;
}

html.ucfer-wb-clone .nav-container {
  display: flex !important;
  grid-template-columns: none !important;
  grid-template-areas: none !important;
  align-items: center;
  gap: 16px;
  height: var(--ucfer-nav-h);
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

html.ucfer-wb-clone .nav-logo {
  height: var(--ucfer-nav-h);
  flex-shrink: 0;
  order: 1;
}

html.ucfer-wb-clone .nav-menu {
  margin-left: auto;
  height: var(--ucfer-nav-h);
  order: 2;
}

html.ucfer-wb-clone .nav-actions {
  position: static !important;
  top: auto !important;
  right: auto !important;
  flex-shrink: 0;
  order: 3;
}

html.ucfer-wb-clone .nav-toggle {
  order: 4;
}

html.ucfer-wb-clone .trust-strip-inner {
  min-height: var(--ucfer-strip-h);
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  flex-wrap: nowrap;
}

@media (max-width: 767px) {
  html.ucfer-wb-clone .trust-strip-inner {
    flex-wrap: wrap;
    min-height: 0;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  html.ucfer-wb-clone .nav-container {
    flex-wrap: wrap;
    height: auto;
    min-height: var(--ucfer-nav-h);
  }

  html.ucfer-wb-clone .nav-logo {
    order: 1;
  }

  html.ucfer-wb-clone .nav-actions {
    order: 2;
    margin-left: auto;
  }

  html.ucfer-wb-clone .nav-toggle {
    order: 3;
    margin-left: 8px;
  }

  html.ucfer-wb-clone .nav-menu {
    order: 4;
    margin-left: 0;
    height: auto;
    flex-basis: 100%;
    width: 100%;
  }
}

/* Hero copy on the same rail as sections */
html.ucfer-wb-clone .wb-hero-copy {
  padding-top: 48px !important;
  padding-bottom: 48px !important;
}

@media (min-width: 768px) {
  html.ucfer-wb-clone .wb-hero-copy {
    padding-top: 64px !important;
    padding-bottom: 64px !important;
  }
}

html.ucfer-wb-clone .wb-hero {
  min-height: 560px;
}

html.ucfer-wb-clone .article-image {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

html.ucfer-wb-clone .article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

html.ucfer-wb-clone .wb-service-list li {
  align-items: start;
}

html.ucfer-wb-clone .section-title-centered,
html.ucfer-wb-clone .section-subtitle-centered {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

html.ucfer-wb-clone .streamlit-cta-container {
  text-align: left;
}

@media (max-width: 767px) {
  html.ucfer-wb-clone .header .ucfer-logo-image,
  html.ucfer-wb-clone .header.scrolled .ucfer-logo-image {
    height: var(--ucfer-logo-h) !important;
  }
}
