/* =========================================================
   hero-fx.css
   ------------------------------------------------------------------
   Hero (slider) gorselinin UZERINE binen yumusak, hareketli
   arka plan efektleri. Admin > Hero Slider ekranindan secilir.
   Katman sirasi: gorsel (0) < .hero-fx (2) < yazilar (3)
   ========================================================= */

.hero-fx{
  position:absolute;inset:0;z-index:2;pointer-events:none;overflow:hidden;
  opacity:var(--fx-op,.8);
}
.hero-fx:before,.hero-fx:after{content:'';position:absolute;inset:0;}

/* --- Yogunluk ve hiz varyasyonlari --------------------------------- */
.hero-fx.fx-i-soft{--fx-op:.45;}
.hero-fx.fx-i-normal{--fx-op:.8;}
.hero-fx.fx-i-strong{--fx-op:1;}

.hero-fx.fx-s-slow{--fx-speed:36s;}
.hero-fx.fx-s-normal{--fx-speed:20s;}
.hero-fx.fx-s-fast{--fx-speed:11s;}

/* --- Animasyonlar -------------------------------------------------- */
@keyframes fxDrift{
  0%{transform:translate3d(-3%,-2%,0) scale(1.02);}
  50%{transform:translate3d(3%,2%,0) scale(1.1);}
  100%{transform:translate3d(-2%,3%,0) scale(1.05);}
}
@keyframes fxRise{
  0%{transform:translateY(7%) scale(1);opacity:0;}
  18%{opacity:1;}
  82%{opacity:1;}
  100%{transform:translateY(-11%) scale(1.07);opacity:0;}
}
@keyframes fxPan{
  0%{background-position:0 0;}
  100%{background-position:72px 72px;}
}
@keyframes fxMesh{
  0%{background-position:0% 50%;}
  50%{background-position:100% 50%;}
  100%{background-position:0% 50%;}
}
@keyframes fxBeam{
  0%{transform:translateX(-40%) skewX(-14deg);opacity:0;}
  20%{opacity:.85;}
  80%{opacity:.85;}
  100%{transform:translateX(260%) skewX(-14deg);opacity:0;}
}
@keyframes fxTwinkle{
  0%,100%{opacity:.32;}
  50%{opacity:.95;}
}

/* --- 1) Aurora: yumusak renk dalgalari ----------------------------- */
.hero-fx-aurora:before{
  inset:-35%;filter:blur(46px);
  background:
    radial-gradient(closest-side,rgba(99,102,241,.62),transparent 72%) 18% 34%/52% 52% no-repeat,
    radial-gradient(closest-side,rgba(14,165,233,.5),transparent 72%) 76% 26%/48% 48% no-repeat,
    radial-gradient(closest-side,rgba(168,85,247,.46),transparent 72%) 58% 82%/58% 58% no-repeat;
  animation:fxDrift var(--fx-speed,20s) ease-in-out infinite alternate;
}
.hero-fx-aurora:after{
  background:linear-gradient(118deg,rgba(255,255,255,.2) 0%,transparent 42%,rgba(255,255,255,.14) 100%);
  mix-blend-mode:soft-light;
  animation:fxMesh calc(var(--fx-speed,20s) * 1.5) ease-in-out infinite;
}

/* --- 2) Mesh: akan gradyan agi ------------------------------------- */
.hero-fx-mesh{
  background:
    radial-gradient(at 12% 22%,rgba(99,102,241,.58) 0,transparent 46%),
    radial-gradient(at 84% 18%,rgba(14,165,233,.46) 0,transparent 42%),
    radial-gradient(at 72% 80%,rgba(217,70,239,.36) 0,transparent 46%),
    radial-gradient(at 20% 84%,rgba(45,212,191,.36) 0,transparent 46%);
  background-size:220% 220%;
  filter:blur(8px);
  animation:fxMesh calc(var(--fx-speed,20s) * 1.6) ease-in-out infinite;
}

/* --- 3) Bokeh: yuzeren isik daireleri ------------------------------ */
.hero-fx-bokeh:before,
.hero-fx-bokeh:after{
  inset:-25%;filter:blur(6px);background-repeat:no-repeat;
  background-image:
    radial-gradient(circle at 12% 26%,rgba(255,255,255,.55) 0 5px,transparent 6px),
    radial-gradient(circle at 28% 70%,rgba(165,180,252,.55) 0 9px,transparent 10px),
    radial-gradient(circle at 46% 32%,rgba(125,211,252,.5) 0 6px,transparent 7px),
    radial-gradient(circle at 62% 78%,rgba(255,255,255,.42) 0 11px,transparent 12px),
    radial-gradient(circle at 78% 22%,rgba(196,181,253,.5) 0 7px,transparent 8px),
    radial-gradient(circle at 90% 64%,rgba(255,255,255,.38) 0 8px,transparent 9px);
  animation:fxRise calc(var(--fx-speed,20s) * 1.4) ease-in-out infinite;
}
.hero-fx-bokeh:after{
  opacity:.6;animation-direction:reverse;animation-delay:-6s;
  animation-duration:calc(var(--fx-speed,20s) * 2);
}

/* --- 4) Parcaciklar: yukselen zerreler ----------------------------- */
.hero-fx-particles:before{
  inset:-20%;filter:blur(1.5px);background-repeat:no-repeat;
  background-image:
    radial-gradient(circle at 8% 78%,rgba(255,255,255,.85) 0 2px,transparent 3px),
    radial-gradient(circle at 18% 42%,rgba(199,210,254,.8) 0 2px,transparent 3px),
    radial-gradient(circle at 30% 88%,rgba(255,255,255,.7) 0 1.6px,transparent 2.6px),
    radial-gradient(circle at 41% 30%,rgba(125,211,252,.85) 0 2.2px,transparent 3.2px),
    radial-gradient(circle at 54% 74%,rgba(255,255,255,.75) 0 1.8px,transparent 2.8px),
    radial-gradient(circle at 66% 48%,rgba(196,181,253,.8) 0 2px,transparent 3px),
    radial-gradient(circle at 79% 86%,rgba(255,255,255,.65) 0 1.6px,transparent 2.6px),
    radial-gradient(circle at 92% 36%,rgba(147,197,253,.8) 0 2.2px,transparent 3.2px);
  animation:fxRise calc(var(--fx-speed,20s) * 1.15) linear infinite;
}
.hero-fx-particles:after{
  inset:-20%;background-repeat:no-repeat;
  background-image:
    radial-gradient(circle at 14% 62%,rgba(255,255,255,.9) 0 1.4px,transparent 2.4px),
    radial-gradient(circle at 36% 22%,rgba(224,231,255,.85) 0 1.6px,transparent 2.6px),
    radial-gradient(circle at 58% 58%,rgba(255,255,255,.8) 0 1.4px,transparent 2.4px),
    radial-gradient(circle at 74% 34%,rgba(186,230,253,.85) 0 1.8px,transparent 2.8px),
    radial-gradient(circle at 88% 72%,rgba(255,255,255,.75) 0 1.4px,transparent 2.4px);
  animation:fxTwinkle calc(var(--fx-speed,20s)) ease-in-out infinite;
}

/* --- 5) Izgara: kayan teknik cizgiler ------------------------------ */
/* Not: Renk katmani yoktur; sadece notr (gri) izgara cizgileri kayar. */
.hero-fx-grid{
  background-image:
    linear-gradient(rgba(148,163,184,.17) 1px,transparent 1px),
    linear-gradient(90deg,rgba(148,163,184,.17) 1px,transparent 1px);
  background-size:72px 72px;
  -webkit-mask-image:radial-gradient(120% 92% at 50% 40%,#000 28%,transparent 78%);
  mask-image:radial-gradient(120% 92% at 50% 40%,#000 28%,transparent 78%);
  animation:fxPan calc(var(--fx-speed,20s) * 1.1) linear infinite;
}
.hero-fx-grid:before,.hero-fx-grid:after{content:none;}

/* --- 6) Isik huzmeleri: suzulen capraz isik ------------------------ */
.hero-fx-beams:before,
.hero-fx-beams:after{
  inset:auto;top:-30%;left:-45%;width:36%;height:170%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.22),transparent);
  filter:blur(28px);
  animation:fxBeam calc(var(--fx-speed,20s) * 1.7) ease-in-out infinite;
}
.hero-fx-beams:after{
  width:20%;
  background:linear-gradient(90deg,transparent,rgba(165,180,252,.36),transparent);
  animation-duration:calc(var(--fx-speed,20s) * 2.2);
  animation-delay:-6s;
}

/* --- Hareket azaltma tercihi --------------------------------------- */
@media(prefers-reduced-motion:reduce){
  .hero-fx,.hero-fx:before,.hero-fx:after{animation:none !important;}
}

/* --- Kucuk ekranlarda bulaniklik yukunu azalt (performans) --------- */
@media(max-width:680px){
  .hero-fx-aurora:before{filter:blur(28px);}
  .hero-fx-beams:before,.hero-fx-beams:after{filter:blur(18px);}
  .hero-fx-mesh{filter:blur(5px);}
  .hero-fx-bokeh:before,.hero-fx-bokeh:after{filter:blur(4px);}
}

/* =========================================================
   Admin panel onizleme kutusu (Hero Slider ekrani)
   ========================================================= */
.fx-preview{
  position:relative;height:170px;border-radius:14px;overflow:hidden;
  background:linear-gradient(120deg,#0b1226 0%,#111c3a 55%,#1e293b 100%);
  border:1px solid rgba(148,163,184,.28);
}
.fx-preview .hero-fx{z-index:1;}
.fx-preview-tag{
  position:absolute;left:14px;bottom:12px;z-index:4;font-size:11px;font-weight:800;
  letter-spacing:.07em;text-transform:uppercase;color:#e2e8f0;text-shadow:0 2px 10px rgba(0,0,0,.6);
}
.fx-preview-off{
  position:absolute;inset:0;z-index:2;display:none;place-items:center;
  color:#94a3b8;font-size:13px;font-weight:700;
}
.fx-preview.is-off .fx-preview-off{display:grid;}

/* Iki kolonlu yerlesim: solda secimler, sagda onizleme */
.fx-panel{display:grid;grid-template-columns:1.1fr .9fr;gap:20px;align-items:start;margin-top:14px;}
.fx-panel-fields{display:flex;flex-direction:column;gap:14px;min-width:0;}
.fx-panel-preview{min-width:0;}
.fx-panel-preview .field-hint{display:block;margin-top:9px;}
@media(max-width:900px){
  .fx-panel{grid-template-columns:1fr;gap:16px;}
}
