/* Technical repairs only. The original stylesheets define the visual design. */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

[hidden] {
  display: none !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #1079bd;
  outline-offset: 3px;
}

/* Recover the original slider from the captured, fixed-width browser state. */
.bx-wrapper,
.bx-viewport,
.sppb-articles-carousel-wrap {
  width: 100%;
  max-width: 100%;
  height: auto;
  transform: none;
}

.sppb-articles-carousel-wrap > .sppb-articles-carousel-column {
  width: 100%;
  max-width: 100%;
  float: none;
}

.sppb-carousel-inner > .sppb-item.active {
  display: block;
  transform: none;
}

.sppb-carousel-indicators [role="button"] {
  cursor: pointer;
}

/* No JavaScript: all original tab and slide contents remain readable. */
html:not(.site-enhanced) .sppb-tab-pane,
html:not(.site-enhanced) .sppb-carousel-inner > .sppb-item {
  display: block;
  opacity: 1;
  margin-bottom: 30px;
}

html:not(.site-enhanced) .offcanvas-menu {
  position: static;
  width: 100%;
  visibility: visible;
  opacity: 1;
  transform: none;
}

.site-enhanced .sppb-tab-pane.active {
  display: block;
  opacity: 1;
}

/* The browser export contains two copies of the same menu toggle. */
#offcanvas-toggler-secondary {
  display: none !important;
}

#offcanvas-toggler {
  display: flex !important;
  align-items: center;
  margin-left: 20px;
}

/* Discard frozen CMS animation states; site.js replays the original effects. */
.sppb-wow {
  visibility: visible !important;
  animation: none !important;
}

.sppb-wow.motion-pending {
  opacity: 0;
}

/* Separate scroll/tilt transforms from the outer entrance animation. */
[data-original-scroll] {
  transform: none !important;
}

.original-motion-target {
  transform: perspective(1000px)
    rotateX(var(--original-tilt-x, 0deg))
    rotateY(var(--original-tilt-y, 0deg))
    rotateZ(var(--original-scroll-z, 0deg));
  transition: transform var(--original-tilt-duration, .1s) ease;
  transform-style: preserve-3d;
}

.sppb-carousel-inner > .carousel-slide-out {
  display: block !important;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.carousel-motion-toggle {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  border: 0;
  background: transparent;
  color: inherit;
  min-width: 32px;
  min-height: 32px;
  cursor: pointer;
}

#sp-header.header-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
}

.sticky-header-placeholder:not([hidden]) {
  height: 90px;
}

.sp-scroll-up.scroll-up-visible {
  display: block !important;
}

.offcanvas-menu {
  overflow-y: auto;
  max-height: 100vh;
}

/* The missing thumbnail was an HTML response, not an image. Retain its alt text. */
img[data-missing-source] {
  height: auto;
  width: auto;
}

.image-dialog {
  max-width: 94vw;
  max-height: 94vh;
  border: 0;
  padding: 12px;
  background: #fff;
}

.image-dialog::backdrop {
  background: rgb(0 0 0 / 80%);
}

.image-dialog img {
  display: block;
  max-width: 88vw;
  max-height: 80vh;
  object-fit: contain;
}

.image-dialog button {
  display: block;
  margin-left: auto;
  border: 0;
  font-size: 28px;
  background: transparent;
  cursor: pointer;
}

/* Avoid overflow without changing the original columns or breakpoints. */
.sppb-tab-nav {
  flex-wrap: wrap;
}

@media (max-width: 575px) {
  .sppb-carousel-content table {
    width: 100%;
  }

  .sppb-carousel-content td {
    overflow-wrap: anywhere;
  }

  #sp-logo .logo img {
    max-width: 100%;
    object-fit: contain;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sppb-wow.motion-pending {
    opacity: 1;
  }

  .original-motion-target {
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
