/**
 * Static-hosting overrides (no CMS runtime).
 * Site-wide CSS fixes for the deployed static mirror (logo, animations, news, sliders, etc.).
 */

/* Beaver Builder scroll animations: layout cache CSS often omits keyframes. */
.fl-animated.fl-slide-in-up {
  animation: fl-slide-in-up 1s ease both;
}

.fl-animated.fl-fade-up {
  animation: fl-fade-up 1s ease both;
}

@keyframes fl-slide-in-up {
  from {
    opacity: 0;
    transform: translate3d(0, 50%, 0);
    visibility: visible;
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fl-fade-up {
  from {
    opacity: 0;
    transform: translate3d(0, 50%, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Footer animations are off-screen on static builds; keep footers visible. */
footer .fl-animation,
.site-footer .fl-animation {
  opacity: 1 !important;
}

/* Global footer CTA: keep "Get in touch" label and arrow on one line. */
.site-footer .fl-button-has-icon .fl-button,
footer .fl-button-has-icon .fl-button {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.navbar-brand .pharmagenesis-site-logo {
  width: 187px;
  max-width: 100%;
  height: auto;
}

.site-footer .fl-button-has-icon .fl-button-icon,
footer .fl-button-has-icon .fl-button-icon {
  flex-shrink: 0;
}

/* Smart Slider 3: without plugin JS, slides stay off-screen; show first slide. */
.n2-ss-slider:not(.n2-ss-loaded) .n2-ss-slide-background {
  transform: none !important;
}

.n2-ss-slider:not(.n2-ss-loaded) .n2-ss-slide:not([data-first='1']) {
  display: none !important;
}

.n2-ss-slider:not(.n2-ss-loaded) .n2-ss-layer[data-animv2] {
  opacity: 1 !important;
  transform: none !important;
}

/* Careers / lightbox video modals (Magnific Popup). */
.mfp-wrap .mfp-close {
  opacity: 1 !important;
  color: #fff !important;
  background: #0584dc !important;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  line-height: 44px;
  font-size: 28px;
  right: 8px;
  top: 8px;
}

/* News pagination: hide page until scroll position is set (avoids top-then-scroll-down flash). */
html.pharmagenesis-news-scroll-pending:not(.pharmagenesis-news-scroll-ready) body {
  visibility: hidden;
}

/* Removed category filters (static): reserve prod filter bar height so scroll target stays stable. */
.pp-posts-wrapper:has([data-news-static='prod-listing'])::before {
  content: '';
  display: block;
  height: 46px;
}

/* News listing: prod shows fallback logo thumbs only, not post featured images. */
.pp-content-post-grid[data-news-static='prod-listing']
  .pp-content-grid-post.has-post-thumbnail
  .pp-content-grid-post-image {
  display: none !important;
}
