/* =========================================================
   BADAWY NEXUS GLOBAL PUBLIC ANIMATIONS
   Applies to all public pages: homepage, company, pricing,
   contact, security, web design, blog, service pages.
   ========================================================= */

:root{
  --bnx-global-blue:#0b57ff;
  --bnx-global-blue-dark:#002b86;
  --bnx-global-green:#08c94f;
  --bnx-global-orange:#ff7a18;
  --bnx-global-white:#ffffff;
  --bnx-global-dark:#06142f;
}

/* Smooth page feel */
html{
  scroll-behavior:smooth;
}

body{
  animation:bnxPageFadeIn .55s ease both;
}

@keyframes bnxPageFadeIn{
  from{opacity:0;}
  to{opacity:1;}
}

/* Global hero slideshow */
.hero,
.page-hero,
.bnx-hero,
.contact-hero,
.security-hero{
  position:relative !important;
  isolation:isolate !important;
  overflow:hidden !important;
}

.bnx-global-hero-slideshow{
  position:absolute !important;
  inset:0 !important;
  z-index:0 !important;
  overflow:hidden !important;
  background:#06142f !important;
  pointer-events:none !important;
}

.bnx-global-hero-slide{
  position:absolute !important;
  inset:0 !important;
  background-size:cover !important;
  background-position:center !important;
  opacity:0 !important;
  transform:scale(1.08) !important;
  transition:opacity 1.25s ease, transform 6.5s ease !important;
  filter:saturate(1.1) contrast(1.05) brightness(.9) !important;
}

.bnx-global-hero-slide.is-active{
  opacity:1 !important;
  transform:scale(1) !important;
}

.bnx-global-hero-slideshow::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:2;
  background:
    linear-gradient(90deg,rgba(4,22,57,.96) 0%,rgba(4,29,76,.86) 43%,rgba(4,25,54,.58) 74%,rgba(2,13,25,.38) 100%),
    radial-gradient(circle at 18% 18%,rgba(8,201,79,.18),transparent 30%),
    radial-gradient(circle at 82% 26%,rgba(11,87,255,.22),transparent 28%);
}

.bnx-global-hero-slideshow::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:3;
  background:
    linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px);
  background-size:42px 42px;
  opacity:.22;
  animation:bnxGridMove 18s linear infinite;
}

@keyframes bnxGridMove{
  from{background-position:0 0,0 0;}
  to{background-position:84px 84px,84px 84px;}
}

/* Ensure content stays above slideshow */
.hero > *,
.page-hero > *,
.bnx-hero > *,
.contact-hero > *,
.security-hero > *{
  position:relative;
  z-index:5;
}

/* Dots */
.bnx-global-slide-dots{
  position:absolute;
  left:50%;
  bottom:20px;
  transform:translateX(-50%);
  display:flex;
  gap:8px;
  z-index:8;
  pointer-events:auto;
}

.bnx-global-slide-dot{
  width:9px;
  height:9px;
  border-radius:999px;
  background:rgba(255,255,255,.48);
  border:1px solid rgba(255,255,255,.55);
  transition:.25s ease;
  cursor:pointer;
}

.bnx-global-slide-dot.is-active{
  width:28px;
  background:var(--bnx-global-green);
  border-color:var(--bnx-global-green);
  box-shadow:0 0 20px rgba(8,201,79,.48);
}

/* Falling particles */
.bnx-global-particles{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:4;
  overflow:hidden;
}

.bnx-global-particle{
  position:absolute;
  width:8px;
  height:8px;
  border-radius:50%;
  background:rgba(255,255,255,.45);
  box-shadow:0 0 18px rgba(255,255,255,.35);
  animation:bnxGlobalFall linear infinite;
}

.bnx-global-particle:nth-child(3n){
  background:rgba(8,201,79,.55);
  box-shadow:0 0 22px rgba(8,201,79,.42);
}

.bnx-global-particle:nth-child(4n){
  background:rgba(255,122,24,.55);
  box-shadow:0 0 22px rgba(255,122,24,.38);
}

@keyframes bnxGlobalFall{
  0%{transform:translate3d(0,-120px,0) scale(.65);opacity:0;}
  12%{opacity:1;}
  88%{opacity:.85;}
  100%{transform:translate3d(var(--drift,40px),105vh,0) scale(1.1);opacity:0;}
}

/* Hero entrance */
.hero h1,
.page-hero h1,
.bnx-hero h1{
  animation:bnxGlobalZoomRise 1s cubic-bezier(.2,.85,.2,1.12) both;
}

.hero p,
.page-hero p,
.bnx-hero p{
  animation:bnxGlobalSlideRise .85s ease .25s both;
}

.hero .btn,
.page-hero .btn,
.bnx-hero .btn{
  position:relative;
  overflow:hidden;
}

.hero .btn::after,
.page-hero .btn::after,
.bnx-hero .btn::after{
  content:"";
  position:absolute;
  inset:-2px;
  background:linear-gradient(120deg,transparent,rgba(255,255,255,.45),transparent);
  transform:translateX(-130%);
  animation:bnxButtonShine 3.4s ease-in-out infinite;
}

@keyframes bnxGlobalZoomRise{
  from{opacity:0;transform:translateY(30px) scale(.92);filter:blur(5px);}
  to{opacity:1;transform:none;filter:blur(0);}
}

@keyframes bnxGlobalSlideRise{
  from{opacity:0;transform:translateY(24px);}
  to{opacity:1;transform:none;}
}

@keyframes bnxButtonShine{
  0%,45%{transform:translateX(-130%);}
  70%,100%{transform:translateX(130%);}
}

/* Global scroll reveal */
[data-animate],
.bnx-reveal{
  opacity:0 !important;
  transform:translateY(42px) scale(.985) !important;
  filter:blur(4px) !important;
  transition:
    opacity .85s cubic-bezier(.2,.85,.2,1),
    transform .85s cubic-bezier(.2,.85,.2,1),
    filter .85s ease !important;
}

[data-animate].show,
.bnx-reveal.bnx-visible{
  opacity:1 !important;
  transform:none !important;
  filter:blur(0) !important;
}

/* Cards: professional hover motion */
.solution-card,
.service-card,
.post-card,
.plan-card,
.plan,
.card,
.metric,
.module,
.quote,
.project,
.org-card,
.info-card,
.quick-card,
.side-card,
.build-card,
.industry-card,
.strip-item,
.search-card,
.panel,
.dash-card,
.form-panel,
.contact-card{
  transition:
    transform .28s ease,
    box-shadow .28s ease,
    border-color .28s ease,
    background .28s ease !important;
  will-change:transform;
}

.solution-card:hover,
.service-card:hover,
.post-card:hover,
.plan-card:hover,
.plan:hover,
.card:hover,
.metric:hover,
.module:hover,
.quote:hover,
.project:hover,
.org-card:hover,
.info-card:hover,
.quick-card:hover,
.side-card:hover,
.build-card:hover,
.industry-card:hover,
.strip-item:hover,
.search-card:hover,
.panel:hover,
.dash-card:hover,
.form-panel:hover,
.contact-card:hover{
  transform:translateY(-8px) scale(1.015) !important;
  box-shadow:0 24px 70px rgba(11,87,255,.15) !important;
  border-color:rgba(11,87,255,.35) !important;
}

/* Images zoom gently */
.industry-card img,
.project img,
.org-card img,
.post-card img,
.featured-img,
.contact-card img{
  transition:transform 1.1s ease, filter 1.1s ease !important;
}

.industry-card:hover img,
.project:hover img,
.org-card:hover img,
.post-card:hover img{
  transform:scale(1.1) !important;
  filter:saturate(1.1) contrast(1.04) !important;
}

/* Floating WhatsApp bottom-left */
.bnx-floating-whatsapp{
  position:fixed;
  left:22px;
  bottom:22px;
  z-index:99998;
  width:58px;
  height:58px;
  border-radius:50%;
  background:#25D366;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 18px 45px rgba(37,211,102,.35);
  border:3px solid rgba(255,255,255,.95);
  transform:translateY(90px) scale(.8);
  opacity:0;
  transition:.35s ease;
}

.bnx-floating-whatsapp.bnx-show{
  transform:translateY(0) scale(1);
  opacity:1;
}

.bnx-floating-whatsapp:hover{
  transform:translateY(-5px) scale(1.05);
  box-shadow:0 24px 58px rgba(37,211,102,.45);
}

.bnx-floating-whatsapp svg{
  width:31px;
  height:31px;
  fill:currentColor;
}

/* Floating arrow up bottom-right */
.bnx-back-to-top{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:99998;
  width:54px;
  height:54px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--bnx-global-blue),var(--bnx-global-blue-dark));
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 18px 45px rgba(11,87,255,.30);
  border:2px solid rgba(255,255,255,.9);
  cursor:pointer;
  transform:translateY(90px) scale(.8);
  opacity:0;
  transition:.35s ease;
}

.bnx-back-to-top.bnx-show{
  transform:translateY(0) scale(1);
  opacity:1;
}

.bnx-back-to-top:hover{
  transform:translateY(-5px) scale(1.05);
}

.bnx-back-to-top svg{
  width:26px;
  height:26px;
  stroke:currentColor;
  fill:none;
  stroke-width:2.4;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* Keep both buttons apart on very small screens */
@media(max-width:600px){
  .bnx-floating-whatsapp{
    left:14px;
    bottom:16px;
    width:52px;
    height:52px;
  }

  .bnx-back-to-top{
    right:14px;
    bottom:16px;
    width:50px;
    height:50px;
  }
}

/* Accessibility */
@media(prefers-reduced-motion:reduce){
  *,
  *::before,
  *::after{
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important;
  }

  [data-animate],
  .bnx-reveal{
    opacity:1!important;
    transform:none!important;
    filter:none!important;
  }

  .bnx-global-particles{
    display:none!important;
  }

  .bnx-global-hero-slide{
    opacity:0!important;
    transform:none!important;
  }

  .bnx-global-hero-slide:first-child{
    opacity:1!important;
  }
}


/* ===== BNX PUBLIC PAGES UNWHITE RESCUE START =====
   Public pages must remain visible even if animation JS fails.
   This does not touch dashboards or authenticated app templates.
*/
html,
body{
  visibility:visible!important;
  opacity:1!important;
  background:#fff!important;
}

body > *{
  visibility:visible!important;
}

[data-animate],
[data-animate].show,
.bnx-animate,
.bnx-reveal,
.bnx-fade,
.bnx-slide,
.bnx-zoom,
.footer a,
.footer p,
.footer h4,
.footer img,
.footer .socials a,
.footer .newsletter{
  opacity:1!important;
  visibility:visible!important;
  transform:none!important;
  filter:none!important;
}

.bnx-cookie-backdrop,
[id*="cookie"],
[class*="cookie"],
[id*="consent"],
[class*="consent"],
#bnxOpeningIntro,
.bnx-opening-intro{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}

.hero,
section,
.footer,
.nav,
.topbar,
.container{
  display:block;
  visibility:visible!important;
  opacity:1!important;
}

.nav-inner,
.hero-grid,
.solutions-grid,
.performance-grid,
.industries-grid,
.modules-grid,
.testimonials-grid,
.footer-grid,
.strip-box,
.metrics,
.counter-row{
  visibility:visible!important;
  opacity:1!important;
}
/* ===== BNX PUBLIC PAGES UNWHITE RESCUE END ===== */

