:root {
  --theme-color-primary: #656DE6;
  --theme-color-primary-dark: #9197ed;
  --theme-color-primary-light: #3943df;
  --site-header-height: 76px;
}

@media screen and (min-width: 50.0625rem) {
  [data-header-sticky-disable] .ub-header-b,
  [data-header-sticky-disable] .ub-header {
    top: 0 !important;
  }
  .ub-header-b {
    position: sticky;
    height: var(--site-header-height);
    top: 0;
    z-index: 2000;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  }
  html.body-scroll-far .ub-header-b {
    top: 0;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  }
  .ub-header-b .ub-container {
    height: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    overflow: visible;
  }
  .ub-header-b .logo {
    order: 1;
    float: none;
    flex: 0 0 auto;
    margin: 0 34px 0 0;
    padding: 0;
  }
  .ub-header-b .logo a {
    height: var(--site-header-height);
    line-height: 1;
    display: flex;
    align-items: center;
  }
  .ub-header-b .logo a img {
    width: auto;
    height: 48px;
    max-width: 170px;
    object-fit: contain;
  }
  .ub-header-b .nav {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0;
    overflow: visible;
  }
  .ub-header-b .nav > a,
  .ub-header-b .nav > .nav-item {
    display: flex;
    align-items: center;
    height: 100%;
    line-height: 1;
    padding: 0 16px;
    color: #182033;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    background: transparent;
    transition: color 0.18s ease, background 0.18s ease;
  }
  .ub-header-b .nav > a:hover,
  .ub-header-b .nav > a.active,
  .ub-header-b .nav > .nav-item:hover,
  .ub-header-b .nav > .nav-item.active {
    color: var(--theme-color-primary);
  }
  .ub-header-b .nav > .nav-item {
    position: relative;
  }
  .ub-header-b .nav > .nav-item > .sub-title {
    height: 100%;
    line-height: 1;
    display: flex;
    align-items: center;
  }
  .ub-header-b .nav > .nav-item > .sub-title > a {
    height: 100%;
    line-height: 1;
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    background: transparent;
  }
  .ub-header-b .nav .nav-item > .sub-title > a:after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    border-width: 5px 4px 0 4px;
    border-style: solid;
    border-color: currentColor transparent transparent transparent;
    transform: translateY(1px);
    transition: transform 0.18s ease;
  }
  .ub-header-b .nav .nav-item:hover > .sub-title > a:after,
  .ub-header-b .nav .nav-item:focus-within > .sub-title > a:after {
    transform: rotate(180deg) translateY(-1px);
  }
  .ub-header-b .nav > .nav-item > .sub-nav {
    position: fixed;
    top: var(--site-header-height);
    left: 0;
    right: 0;
    z-index: 1999;
    display: block;
    min-width: 0;
    max-width: none;
    width: 100vw;
    min-height: 304px;
    padding: 0;
    background: #ffffff;
    border: none;
    border-top: 1px solid #eef2f7;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  }
  .ub-header-b .nav .sub-nav-inner {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 42px;
    width: calc(100% - 48px);
    max-width: 1200px;
    min-height: 304px;
    margin: 0 auto;
    padding: 34px 0 38px;
  }
  .ub-header-b .nav .sub-nav-tabs {
    display: flex;
    flex-direction: column;
    padding: 4px 22px 4px 0;
    border-right: 1px solid #edf1f6;
  }
  .ub-header-b .nav .sub-nav-tab {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 18px 0 22px;
    color: #4b5563;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    background: transparent;
    transition: color 0.18s ease, background 0.18s ease;
  }
  .ub-header-b .nav .sub-nav-tab:before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 3px;
    border-radius: 3px;
    background: transparent;
  }
  .ub-header-b .nav .sub-nav-tab:after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    opacity: 0.35;
    transform: rotate(45deg);
  }
  .ub-header-b .nav .sub-nav-tab:hover,
  .ub-header-b .nav .sub-nav-tab.active {
    color: var(--theme-color-primary);
    background: #f6f8ff;
  }
  .ub-header-b .nav .sub-nav-tab.active:before {
    background: var(--theme-color-primary);
  }
  .ub-header-b .nav .sub-nav-content {
    min-width: 0;
    padding-top: 2px;
  }
  .ub-header-b .nav .sub-nav-pane {
    display: none;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 22px 42px;
  }
  .ub-header-b .nav .sub-nav-pane.active {
    display: grid;
  }
  .ub-header-b .nav > .nav-item:hover > .sub-nav,
  .ub-header-b .nav > .nav-item:focus-within > .sub-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .ub-header-b .nav .sub-nav .sub-nav-group {
    min-width: 0;
    padding: 0 0 4px;
  }
  .ub-header-b .nav .sub-nav .sub-nav-item,
  .ub-header-b .nav .sub-nav .sub-nav-group-item {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 42px;
    line-height: 1.4;
    margin: 0;
    padding: 0;
    border-radius: 0;
    color: #182033;
    font-size: 15px;
    font-weight: 700;
    white-space: normal;
    background: transparent;
  }
  .ub-header-b .nav .sub-nav .sub-nav-item:after,
  .ub-header-b .nav .sub-nav .sub-nav-group-item:after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: 8px;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    opacity: 0.26;
    transform: rotate(45deg);
  }
  .ub-header-b .nav .sub-nav .sub-nav-item:hover,
  .ub-header-b .nav .sub-nav .sub-nav-item.active,
  .ub-header-b .nav .sub-nav .sub-nav-group-item:hover {
    color: var(--theme-color-primary);
  }
  .ub-header-b .nav .sub-nav .sub-nav-group-nav {
    position: static;
    z-index: auto;
    display: grid;
    gap: 4px;
    min-width: 0;
    margin-top: 4px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  .ub-header-b .nav .sub-nav .sub-nav-group:hover .sub-nav-group-nav,
  .ub-header-b .nav .sub-nav .sub-nav-group:focus-within .sub-nav-group-nav {
    display: grid;
  }
  .ub-header-b .nav .sub-nav .sub-nav-group-nav-item {
    display: block;
    min-height: 30px;
    line-height: 30px;
    margin: 0;
    padding: 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    white-space: normal;
    background: transparent;
  }
  .ub-header-b .nav .sub-nav .sub-nav-group-nav-item:hover {
    color: var(--theme-color-primary);
  }
  .ub-header-b .nav > .search {
    order: 90;
    float: none;
    flex: 0 0 min(23vw, 220px);
    width: auto;
    height: 40px;
    margin-left: auto;
    padding: 4px 12px;
    border: 1px solid #dde3ec;
    border-radius: 20px;
    background: #f8fafc;
  }
  .ub-header-b .nav > .search:hover,
  .ub-header-b .nav > .search:focus-within {
    border-color: var(--theme-color-primary);
    box-shadow: 0 0 0 3px rgba(101, 109, 230, 0.12);
  }
  .ub-header-b .nav .search .box input {
    height: 30px;
    color: #182033;
  }
  .ub-header-b .nav .search .box button {
    height: 30px;
    color: #64748b;
  }
  .ub-header-b .menu {
    order: 3;
    float: none;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    margin-left: 16px;
    padding: 0;
  }
  .ub-header-b .menu a,
  .ub-header-b .menu .item {
    color: #334155;
    font-weight: 600;
  }
  .ub-header-b .header-contact {
    order: 4;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 16px;
    color: var(--theme-color-primary);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
  }
}

/* Keep card images at their intrinsic size instead of upscaling them. */
.cms-card-cover {
  position: relative;
  background-color: #f8fafc;
  background-image: none !important;
}

.cms-card-cover > img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: 100% !important;
  transform: translate(-50%, -50%);
}

.cms-card-cover,
.ub-list .body [class^="item-"]:hover .image .cms-card-cover,
.ub-list-items [class^="item-"]:hover .image .cms-card-cover {
  transform: none !important;
  transition: none !important;
}

@media screen and (max-width: 50rem) {
  .ub-header-b {
    position: sticky;
    top: 0;
    z-index: 2000;
    height: 56px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
  }
  .ub-header-b .logo {
    margin-left: 56px;
  }
  .ub-header-b .logo a {
    height: 56px;
    line-height: 56px;
  }
  .ub-header-b .logo a img {
    height: 42px;
    max-width: 150px;
    object-fit: contain;
  }
  .ub-header-b .nav-toggle {
    width: 56px;
    line-height: 56px;
    color: var(--theme-color-primary);
  }
  .ub-header-b .header-contact {
    display: inline-flex;
    margin-left: auto;
    margin-right: 12px;
    color: var(--theme-color-primary);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
  }
  .ub-header-b.show .nav-mask {
    top: 56px;
  }
  .ub-header-b .nav {
    top: 56px;
    left: -82%;
    width: 82%;
    padding: 12px;
    background: #ffffff;
  }
  .ub-header-b .nav > a,
  .ub-header-b .nav > .nav-item > .sub-title > a {
    display: block;
    min-height: 44px;
    line-height: 44px;
    padding: 0 12px;
    color: #182033;
    font-size: 15px;
    font-weight: 600;
    background: transparent;
  }
  .ub-header-b .nav > .nav-item {
    height: auto;
    padding: 0;
    background: transparent;
  }
  .ub-header-b .nav > .nav-item > .sub-nav {
    display: block;
    position: static;
    padding: 0 0 8px 14px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }
  .ub-header-b .nav .sub-nav-inner {
    display: block;
    width: auto;
    max-width: none;
    min-height: 0;
    padding: 0;
  }
  .ub-header-b .nav .sub-nav-tabs {
    display: none;
  }
  .ub-header-b .nav .sub-nav-content {
    display: block;
    padding: 0;
  }
  .ub-header-b .nav .sub-nav-pane {
    display: none;
  }
  .ub-header-b .nav .sub-nav-pane.active {
    display: block;
  }
  .ub-header-b .nav .sub-nav .sub-nav-item,
  .ub-header-b .nav .sub-nav .sub-nav-group-item,
  .ub-header-b .nav .sub-nav .sub-nav-group-nav-item {
    display: block;
    line-height: 38px;
    min-height: 38px;
    margin: 4px 0;
    padding: 0 12px;
    border-radius: 6px;
    color: #64748b;
    background: #f8fafc;
  }
  .ub-header-b .nav .sub-nav .sub-nav-item:after,
  .ub-header-b .nav .sub-nav .sub-nav-group-item:after {
    display: none;
  }
  .ub-header-b .nav .sub-nav .sub-nav-group {
    padding: 0;
  }
  .ub-header-b .nav .sub-nav .sub-nav-group-nav {
    display: block;
    position: static;
    padding-left: 12px;
    background: transparent;
    box-shadow: none;
  }
}
