/* ============================================================
   FOURIX CSS NOTE — Motion
   الحركات العامة والمؤثرات. راعِ prefers-reduced-motion.
   راجع public/assets/css/README_AR.md قبل التعديل الكبير.
   ============================================================ */

/* FOURIX V27 — Unified motion language + interactive graphics */
:root{
  --fx-blue:#1677ff;
  --fx-cyan:#18b8d9;
  --fx-teal:#00b894;
  --fx-gold:#f4b83f;
  --fx-navy:#071624;
  --fx-navy-2:#0b2b49;
  --fx-glow-x:50%;
  --fx-glow-y:50%;
}

html{scroll-behavior:smooth}
body.fx-motion-enabled{overflow-x:hidden}
body.fx-motion-enabled main{position:relative;isolation:isolate}

/* Global cursor light — desktop only */
.fx-cursor-glow{
  position:fixed;inset:0 auto auto 0;width:420px;height:420px;z-index:9999;pointer-events:none;
  border-radius:50%;opacity:.16;filter:blur(4px);mix-blend-mode:screen;
  background:radial-gradient(circle,rgba(22,119,255,.65) 0%,rgba(24,184,217,.20) 34%,transparent 68%);
  transform:translate3d(calc(var(--fx-cursor-x, -500px) - 50%),calc(var(--fx-cursor-y, -500px) - 50%),0);
  transition:opacity .25s ease;
}

/* Hero graphic layer */
.fx-hero-host{position:relative;overflow:hidden;isolation:isolate}
.fx-hero-host>.container,.fx-hero-host>.container-fluid,.fx-hero-host>.row{position:relative;z-index:2}
.fx-ambient{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.fx-hero-host>.container{animation:fxHeroIntro .78s cubic-bezier(.2,.7,.2,1) both}
@keyframes fxHeroIntro{from{opacity:0;transform:translate3d(0,18px,0)}to{opacity:1;transform:none}}
.fx-ambient::before{
  content:"";position:absolute;inset:0;opacity:.22;
  background-image:linear-gradient(rgba(255,255,255,.10) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.10) 1px,transparent 1px);
  background-size:52px 52px;
  mask-image:linear-gradient(to bottom,#000 0%,rgba(0,0,0,.86) 58%,transparent 100%);
  animation:fxGridDrift 18s linear infinite;
}
.fx-orb{position:absolute;border-radius:50%;filter:blur(2px);will-change:transform}
.fx-orb.one{width:330px;height:330px;right:-80px;top:-105px;background:radial-gradient(circle at 35% 35%,rgba(39,150,255,.46),rgba(22,119,255,.08) 64%,transparent 72%);animation:fxOrbOne 9s ease-in-out infinite}
.fx-orb.two{width:430px;height:430px;left:-165px;bottom:-235px;background:radial-gradient(circle at 55% 45%,rgba(0,184,148,.30),rgba(0,184,148,.05) 62%,transparent 73%);animation:fxOrbTwo 11s ease-in-out infinite}
.fx-orb.three{width:180px;height:180px;left:42%;top:18%;background:radial-gradient(circle,rgba(244,184,63,.17),transparent 68%);animation:fxOrbThree 8s ease-in-out infinite}
.fx-circuit{position:absolute;width:8px;height:8px;border:1px solid rgba(255,255,255,.75);background:rgba(255,255,255,.12);border-radius:50%;box-shadow:0 0 22px rgba(71,171,255,.75)}
.fx-circuit::after{content:"";position:absolute;top:50%;right:8px;width:54px;height:1px;background:linear-gradient(90deg,rgba(255,255,255,.42),transparent);transform:translateY(-50%)}
.fx-circuit.c1{top:24%;right:13%;animation:fxCircuitFloat 6.2s ease-in-out infinite}
.fx-circuit.c2{top:62%;right:29%;animation:fxCircuitFloat 7.7s ease-in-out -2s infinite}
.fx-circuit.c3{top:34%;left:14%;animation:fxCircuitFloat 7.1s ease-in-out -3.2s infinite}
.fx-circuit.c4{bottom:18%;left:31%;animation:fxCircuitFloat 8.4s ease-in-out -1s infinite}

@keyframes fxGridDrift{to{background-position:52px 52px}}
@keyframes fxOrbOne{0%,100%{transform:translate3d(0,0,0) scale(1)}50%{transform:translate3d(-28px,26px,0) scale(1.08)}}
@keyframes fxOrbTwo{0%,100%{transform:translate3d(0,0,0) scale(1)}50%{transform:translate3d(36px,-24px,0) scale(1.06)}}
@keyframes fxOrbThree{0%,100%{transform:translate3d(0,0,0) scale(.92);opacity:.58}50%{transform:translate3d(12px,18px,0) scale(1.12);opacity:1}}
@keyframes fxCircuitFloat{0%,100%{transform:translate3d(0,0,0);opacity:.4}50%{transform:translate3d(0,-18px,0);opacity:1}}

.fx-float-icon{position:absolute;width:54px;height:54px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.18);border-radius:17px;background:rgba(255,255,255,.08);backdrop-filter:blur(10px);color:#fff;font-size:1.08rem;box-shadow:0 16px 38px rgba(0,0,0,.14);animation:fxIconFloat 7s ease-in-out infinite}
.fx-float-icon.i1{right:7%;top:38%;animation-delay:-1s}
.fx-float-icon.i2{left:8%;top:28%;animation-delay:-3s}
.fx-float-icon.i3{right:23%;bottom:12%;animation-delay:-5s}
.fx-float-icon.i4{left:23%;bottom:17%;animation-delay:-2s}
.fx-float-icon i{filter:drop-shadow(0 0 12px rgba(84,180,255,.35))}
@keyframes fxIconFloat{0%,100%{transform:translate3d(0,0,0) rotate(0deg)}50%{transform:translate3d(0,-14px,0) rotate(3deg)}}

/* Scroll reveal */
.fx-reveal{opacity:0;transform:translate3d(0,28px,0);transition:opacity .72s cubic-bezier(.2,.7,.2,1),transform .72s cubic-bezier(.2,.7,.2,1);transition-delay:var(--fx-delay,0ms);will-change:opacity,transform}
.fx-reveal.fx-from-right{transform:translate3d(26px,0,0)}
.fx-reveal.fx-from-left{transform:translate3d(-26px,0,0)}
.fx-reveal.fx-scale{transform:translate3d(0,14px,0) scale(.97)}
.fx-reveal.fx-visible{opacity:1;transform:none}

/* Interactive card light */
.fx-interactive-card{position:relative;overflow:hidden;isolation:isolate;--fx-card-x:50%;--fx-card-y:50%;transition:transform .28s ease,box-shadow .28s ease,border-color .28s ease}
.fx-interactive-card::after{
  content:"";position:absolute;inset:0;z-index:0;pointer-events:none;opacity:0;transition:opacity .3s ease;
  background:radial-gradient(320px circle at var(--fx-card-x) var(--fx-card-y),rgba(22,119,255,.13),rgba(24,184,217,.05) 38%,transparent 68%);
}
.fx-interactive-card:hover{transform:translateY(-5px);box-shadow:0 22px 58px rgba(7,35,59,.12)!important;border-color:rgba(22,119,255,.22)!important}
.fx-interactive-card:hover::after{opacity:1}

/* Buttons get subtle moving shine */
body.fx-motion-enabled .btn{position:relative;overflow:hidden;isolation:isolate}
body.fx-motion-enabled .btn::after{content:"";position:absolute;top:-60%;bottom:-60%;width:42px;left:-80px;transform:rotate(18deg);background:linear-gradient(90deg,transparent,rgba(255,255,255,.34),transparent);transition:left .55s ease;pointer-events:none}
body.fx-motion-enabled .btn:hover::after{left:calc(100% + 60px)}
body.fx-motion-enabled .btn i{transition:transform .25s ease}
body.fx-motion-enabled .btn:hover i.fa-arrow-left{transform:translateX(-4px)}
body.fx-motion-enabled .btn:hover i.fa-arrow-down{transform:translateY(3px)}

/* Header micro motion */
.fourix-global-navbar .brand-logo img{transition:transform .35s ease,filter .35s ease}
.fourix-global-navbar .navbar-brand:hover .brand-logo img{transform:rotate(-7deg) scale(1.07);filter:drop-shadow(0 0 9px rgba(244,184,63,.35))}
.fourix-global-navbar .nav-link::before{content:"";position:absolute;inset:auto 50% -7px 50%;height:1px;background:linear-gradient(90deg,transparent,var(--fx-gold),transparent);opacity:0;transition:.28s}
.fourix-global-navbar .nav-link:hover::before,.fourix-global-navbar .nav-link.active::before{inset-inline:15%;opacity:.85}

/* Unified FOURIX footer */
.fourix-global-footer{position:relative;overflow:hidden;padding:72px 0 0!important;background:linear-gradient(145deg,#061421 0%,#071a2b 58%,#08243a 100%)!important}
.fourix-global-footer::before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.028) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.028) 1px,transparent 1px);background-size:44px 44px;mask-image:linear-gradient(to top,#000,transparent 86%);pointer-events:none}
.fourix-global-footer::after{content:"";position:absolute;width:380px;height:380px;border-radius:50%;left:-230px;top:-210px;background:radial-gradient(circle,rgba(22,119,255,.20),transparent 68%);pointer-events:none;animation:fxFooterGlow 9s ease-in-out infinite}
.fourix-global-footer>.container{position:relative;z-index:1}
.fourix-global-footer .footer-brand{font-size:1.38rem;text-decoration:none}
.fourix-global-footer .footer-brand .brand-icon{background:#fff;border-color:rgba(255,255,255,.14);box-shadow:0 12px 28px rgba(0,0,0,.18)}
.fourix-global-footer .footer-brand img{width:100%;height:100%;object-fit:contain;padding:5px}
.fourix-global-footer .footer-brand-copy{max-width:470px;margin-top:18px!important;line-height:2;font-size:.86rem!important}
.fourix-global-footer h3{display:flex;align-items:center;gap:7px}
.fourix-global-footer h3::before{content:"";width:18px;height:2px;border-radius:99px;background:var(--fx-gold)}
.fourix-global-footer a{position:relative;text-decoration:none}
.fourix-global-footer .footer-link{display:flex!important;align-items:center;gap:7px;width:max-content;max-width:100%}
.fourix-global-footer .footer-link i{width:17px;color:rgba(244,184,63,.82);font-size:.72rem}
.fourix-global-footer .footer-contact a{display:flex!important;align-items:center;gap:9px}
.fourix-global-footer .footer-contact a i{display:grid;width:26px;height:26px;place-items:center;border-radius:8px;background:rgba(255,255,255,.06)}
.fourix-global-footer .footer-social-row{display:flex;gap:9px;margin-top:14px}
.fourix-global-footer .footer-social-row a{display:grid!important;width:38px;height:38px;place-items:center;border:1px solid rgba(255,255,255,.10);border-radius:11px;background:rgba(255,255,255,.05);color:#fff!important;margin:0!important}
.fourix-global-footer .footer-social-row a:hover{background:rgba(22,119,255,.28);border-color:rgba(22,119,255,.45);transform:translateY(-3px)!important}
.fourix-global-footer .footer-bottom{position:relative}
.fourix-global-footer .footer-bottom::after{content:"FOURIX";position:absolute;left:0;bottom:2px;font-size:clamp(2rem,4vw,4rem);font-weight:900;letter-spacing:.08em;color:rgba(255,255,255,.018);pointer-events:none}
@keyframes fxFooterGlow{0%,100%{transform:translate3d(0,0,0) scale(1)}50%{transform:translate3d(40px,18px,0) scale(1.08)}}

/* Global back-to-top */
.fx-back-to-top{position:fixed;z-index:1040;left:22px;bottom:22px;width:48px;height:48px;border:0;border-radius:14px;background:linear-gradient(135deg,var(--fx-blue),#0d66d7);color:#fff;display:grid;place-items:center;box-shadow:0 14px 32px rgba(22,119,255,.30);opacity:0;visibility:hidden;transform:translateY(16px) scale(.92);transition:.25s}
.fx-back-to-top.show{opacity:1;visibility:visible;transform:none}
.fx-back-to-top:hover{transform:translateY(-3px);box-shadow:0 18px 34px rgba(22,119,255,.38)}

/* Section decoration */
body.fx-motion-enabled main section:not(.fx-hero-host){position:relative}
body.fx-motion-enabled main section:not(.fx-hero-host)::selection{background:rgba(22,119,255,.2)}
.pp-section-title h2,.section-heading h2{position:relative}
.pp-section-title h2::after,.section-heading h2::after{content:"";display:block;width:54px;height:3px;margin-top:11px;border-radius:99px;background:linear-gradient(90deg,var(--fx-blue),var(--fx-teal));transform-origin:right;animation:fxLinePulse 4s ease-in-out infinite}
.section-heading.text-center h2::after{margin-inline:auto}
@keyframes fxLinePulse{0%,100%{transform:scaleX(.66);opacity:.65}50%{transform:scaleX(1);opacity:1}}

/* Mobile / accessibility */
@media (max-width:991px){
  .fx-cursor-glow{display:none}
  .fx-ambient::before{opacity:.13}
  .fx-orb.one{width:240px;height:240px}
  .fx-orb.two{width:310px;height:310px}
  .fourix-global-footer{padding-top:54px!important}
}
@media (max-width:575px){
  .fx-circuit,.fx-float-icon{display:none}
  .fourix-global-footer .footer-bottom{align-items:flex-start;flex-direction:column}
  .fourix-global-footer .footer-bottom::after{display:none}
  .fx-back-to-top{left:14px;bottom:14px;width:44px;height:44px}
}
@media (hover:none),(pointer:coarse){.fx-interactive-card:hover{transform:none}}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
  .fx-reveal{opacity:1!important;transform:none!important}
  .fx-cursor-glow{display:none!important}
}
.fx-scroll-progress{position:fixed;z-index:1095;top:0;right:0;left:0;height:2px;transform:scaleX(0);transform-origin:right center;background:linear-gradient(90deg,var(--fx-blue),var(--fx-cyan),var(--fx-gold));box-shadow:0 0 12px rgba(22,119,255,.55);pointer-events:none}
