/* Static-rebuild additions: JS-gated hidden states, lightbox chrome, form messages. */

/* Elementor hides animated elements until the observer fires. Without JS the
   content must still be visible to visitors and crawlers. */
html:not(.js) .elementor-invisible { visibility: visible !important; }
html:not(.js) [data-reveal] { opacity: 1 !important; transform: none !important; }
html:not(.js) .e-gallery--lazyload .e-gallery-image { filter: none; transform: none; }

/* Swiper needs the wrapper laid out even before init. */
.elementor-main-swiper:not(.swiper-initialized) .swiper-wrapper { display: flex; }
.elementor-main-swiper:not(.swiper-initialized) .swiper-slide { flex: 0 0 auto; }

/* ------------------------------------------------------------------ lightbox */
.so-lightbox[hidden] { display: none !important; }
.so-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  background: rgba(0, 0, 0, 0.8);
}
.so-lightbox .dialog-widget-content {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  background: transparent;
  box-shadow: none;
}
.so-lightbox .dialog-message {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 40px 70px;
}
.so-lightbox__figure {
  display: flex;
  max-width: 100%;
  max-height: 100%;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.so-lightbox img.elementor-lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.so-lightbox__caption {
  color: #fff;
  font-size: 14px;
  text-align: center;
  opacity: 0.85;
}
.so-lightbox .dialog-close-button {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 2;
  color: #fff;
  opacity: 0.8;
  line-height: 0;
}
.so-lightbox .dialog-close-button:hover { opacity: 1; }
.so-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  opacity: 0.7;
}
.so-lightbox__nav:hover { opacity: 1; }
.so-lightbox__prev { left: 10px; }
.so-lightbox__next { right: 10px; }
.so-lightbox__counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
  opacity: 0.8;
}
body.so-lightbox-open { overflow: hidden; }

/* --------------------------------------------------------- video pop-up */
.so-video-popup {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(0, 0, 0, 0.85);
}
.so-video-popup__frame {
  position: relative;
  width: min(1100px, 100%);
  aspect-ratio: 16 / 9;
}
.so-video-popup__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.so-video-popup__close {
  position: absolute;
  top: 14px;
  right: 22px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}
.so-video-popup__close:hover { opacity: 1; }

/* -------------------------------------------------------- form messages */
.elementor-message-container { width: 100%; margin-top: 12px; }
.elementor-message {
  padding: 8px 0;
  font-size: 14px;
  line-height: 1.5;
}
.elementor-message-success { color: #2d7a3e; }
.elementor-message-danger { color: #b3261e; }
.elementor-form--loading { opacity: 0.7; }
