/* mkl-ux-css */

/* Sticky header subtle shadow on scroll */
.mkl-header {
  transition: box-shadow .25s ease, background-color .25s ease;
  position: sticky; top: 0; z-index: 900;
  background: #fff;
}
.mkl-header.is-stuck {
  box-shadow: 0 4px 18px rgba(0,0,0,.10);
}
body.admin-bar .mkl-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .mkl-header { top: 46px; }
}

/* Image fade-in (one-time, on load). Images remain visible without JS. */
img[loading="lazy"] { opacity: 1; }
html.mkl-lazy-fade img[loading="lazy"] {
  opacity: 0;
  transition: opacity .35s ease;
}
html.mkl-lazy-fade img[loading="lazy"].is-loaded,
html.mkl-lazy-fade img[loading="lazy"].mkl-no-fade { opacity: 1; }

/* Lightbox */
.mkl-lightbox {
  position: fixed; inset: 0; z-index: 9000;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.92);
  padding: 24px;
}
.mkl-lightbox.is-open { display: flex; }
.mkl-lightbox__img {
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  width: auto; height: auto;
  display: block;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.mkl-lightbox__close {
  position: absolute; top: 16px; right: 16px;
  width: 48px; height: 48px;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 0; border-radius: 50%;
  font-size: 26px; line-height: 1;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.mkl-lightbox__close:hover,
.mkl-lightbox__close:focus-visible { background: rgba(255,255,255,.22); outline: 2px solid #fff; outline-offset: 2px; }
.mkl-lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 0; width: 56px; height: 56px; border-radius: 50%;
  font-size: 26px; line-height: 1;
  cursor: pointer;
}
.mkl-lightbox__nav--prev { left: 12px; }
.mkl-lightbox__nav--next { right: 12px; }
.mkl-lightbox__nav:hover,
.mkl-lightbox__nav:focus-visible { background: rgba(255,255,255,.25); outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 640px) {
  .mkl-lightbox__nav { width: 44px; height: 44px; font-size: 22px; }
  .mkl-lightbox__close { width: 44px; height: 44px; font-size: 22px; top: 10px; right: 10px; }
}

/* Image cursor hint inside galleries */
.mkl-secgallery img, .mkl-g2__masonry img, .mkl-article-body__inner img {
  cursor: zoom-in;
}
/* Keyboard focus ring for lightbox trigger images */
.mkl-secgallery img:focus-visible,
.mkl-g2__masonry img:focus-visible,
.mkl-article-body__inner img:focus-visible {
  outline: 3px solid #c92929;
  outline-offset: 2px;
}

/* Back-to-top button */
.mkl-totop {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #c92929;
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 22px rgba(0,0,0,.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, background .15s ease, visibility 0s linear .25s;
  z-index: 800;
}
.mkl-totop.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .25s ease, transform .25s ease, background .15s ease;
}
.mkl-totop:hover, .mkl-totop:focus-visible {
  background: #a91f1f;
  outline: 3px solid #ffce5a;
  outline-offset: 2px;
}
.mkl-totop svg { width: 18px; height: 18px; display: block; }
@media (max-width: 640px) {
  .mkl-totop { right: 14px; bottom: 14px; width: 44px; height: 44px; }
}
@media print { .mkl-totop { display: none !important; } }

/* mkl-scroll-reveal-css */

@media (prefers-reduced-motion: no-preference) {
  .mkl-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s var(--mkl-ease-out, ease),
                transform .6s var(--mkl-ease-out, ease);
    will-change: opacity, transform;
  }
  .mkl-reveal.is-visible {
    opacity: 1;
    transform: none;
  }
  /* Stagger children inside a parent .mkl-reveal-group */
  .mkl-reveal-group.is-visible > .mkl-reveal-child {
    animation: mkl-fade-up .55s var(--mkl-ease-out, ease) both;
  }
  .mkl-reveal-group.is-visible > .mkl-reveal-child:nth-child(2)  { animation-delay: .06s; }
  .mkl-reveal-group.is-visible > .mkl-reveal-child:nth-child(3)  { animation-delay: .12s; }
  .mkl-reveal-group.is-visible > .mkl-reveal-child:nth-child(4)  { animation-delay: .18s; }
  .mkl-reveal-group.is-visible > .mkl-reveal-child:nth-child(5)  { animation-delay: .24s; }
  .mkl-reveal-group.is-visible > .mkl-reveal-child:nth-child(6)  { animation-delay: .30s; }
  .mkl-reveal-group.is-visible > .mkl-reveal-child:nth-child(n+7){ animation-delay: .36s; }
  @keyframes mkl-fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }
}
