/* =========================================================
   PropTrack — WOW Pack (Premium Effects)
   ========================================================= */

/* =========================================================
   1. LOADING SCREEN
   ========================================================= */
.preloader {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #071525, #0d2136);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  z-index: 9999;
  transition: opacity .6s ease, visibility .6s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  animation: logoPulse 1.8s ease-in-out infinite;
}

.preloader-logo b {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #1477ff, #1aaee8);
  color: #fff;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 15px 40px #1477ff50;
}

.preloader-logo span {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

.preloader-bar {
  width: 200px;
  height: 3px;
  background: #ffffff15;
  border-radius: 3px;
  overflow: hidden;
}

.preloader-bar::after {
  content: "";
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #1477ff, #1aaee8);
  border-radius: 3px;
  animation: loadBar 1.4s ease-in-out infinite;
}

@keyframes loadBar {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

.preloader-text {
  color: #7b8796;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* =========================================================
   2. AURORA BACKGROUND (Hero)
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
}

.hero .aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.hero .aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .5;
  animation: auroraMove 18s ease-in-out infinite;
}

.hero .aurora span:nth-child(1) {
  width: 500px;
  height: 500px;
  background: #1477ff;
  top: -20%;
  left: -10%;
  animation-delay: 0s;
}

.hero .aurora span:nth-child(2) {
  width: 400px;
  height: 400px;
  background: #1aaee8;
  top: 30%;
  right: -10%;
  animation-delay: -6s;
}

.hero .aurora span:nth-child(3) {
  width: 350px;
  height: 350px;
  background: #4bd69b;
  bottom: -20%;
  left: 40%;
  animation-delay: -12s;
}

@keyframes auroraMove {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: .4;
  }
  33% {
    transform: translate(80px, -60px) scale(1.15);
    opacity: .6;
  }
  66% {
    transform: translate(-60px, 40px) scale(.9);
    opacity: .35;
  }
}

.hero .container {
  position: relative;
  z-index: 1;
}

/* =========================================================
   3. CURSOR FOLLOW
   ========================================================= */
.cursor-dot,
.cursor-ring {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 9998;
  transition: opacity .3s ease;
  will-change: transform;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: #1477ff;
  transition: opacity .3s ease, width .3s ease, height .3s ease;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid #1477ff60;
  transition: opacity .3s ease, width .4s ease, height .4s ease,
              border-color .3s ease, background .3s ease;
}

body.cursor-hover .cursor-ring {
  width: 60px;
  height: 60px;
  border-color: #1477ff;
  background: #1477ff10;
}

body.cursor-hover .cursor-dot {
  width: 0;
  height: 0;
}

@media (hover: none) {
  .cursor-dot,
  .cursor-ring { display: none; }
}

/* =========================================================
   4. MAGNETIC BUTTONS
   ========================================================= */
.magnetic {
  position: relative;
  display: inline-flex;
  will-change: transform;
  transition: transform .4s cubic-bezier(.4, 0, .2, 1);
}

.magnetic-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .4s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}

/* =========================================================
   5. STATS COUNTER
   ========================================================= */
.stats-section {
  padding: 80px 0;
  background: linear-gradient(180deg, #fff, #f8fbff);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #1477ff08, transparent 70%);
  border-radius: 50%;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  position: relative;
}

.stat-card {
  text-align: center;
  padding: 20px;
  position: relative;
}

.stat-card::after {
  content: "";
  position: absolute;
  right: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: var(--line);
}

.stat-card:last-child::after {
  display: none;
}

.stat-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #eaf3ff, #d8e6f7);
  color: var(--blue);
  display: grid;
  place-items: center;
  border-radius: 14px;
  transition: var(--transition);
}

.stat-card:hover .stat-icon {
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: #fff;
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 12px 30px #1477ff40;
}

.stat-number {
  font-size: 46px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -1.5px;
  margin-bottom: 6px;
  display: block;
}

.stat-number .plus {
  color: var(--blue);
  font-size: .9em;
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* =========================================================
   6. 3D TILT CARDS
   ========================================================= */
.tilt-card {
  transition: transform .3s cubic-bezier(.4, 0, .2, 1),
              box-shadow .3s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.tilt-card-inner {
  transform: translateZ(20px);
  transition: transform .3s ease;
}

/* =========================================================
   7. HOW IT WORKS
   ========================================================= */
.how-section {
  padding: 100px 0;
  background: var(--navy);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.how-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at 50% 50%, #000 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 40%, transparent 80%);
}

.how-section .container {
  position: relative;
}

.how-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 70px;
}

.how-head .eyebrow {
  color: var(--blue-light);
}

.how-head h2 {
  font-size: 42px;
  color: #fff;
  margin: 12px 0;
}

.how-head p {
  color: #a8bad0;
  font-size: 16px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  position: relative;
}

.how-step {
  background: #ffffff06;
  border: 1px solid #ffffff10;
  border-radius: 18px;
  padding: 40px 30px;
  position: relative;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.how-step:hover {
  background: #ffffff0a;
  border-color: #1477ff60;
  transform: translateY(-8px);
  box-shadow: 0 30px 60px #00000040;
}

.how-step-num {
  position: absolute;
  top: -18px;
  left: 30px;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: #fff;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 10px 25px #1477ff50;
}

.how-step-icon {
  width: 60px;
  height: 60px;
  background: #ffffff08;
  border: 1px solid #ffffff15;
  color: var(--blue-light);
  display: grid;
  place-items: center;
  border-radius: 14px;
  margin: 12px 0 22px;
  transition: var(--transition);
}

.how-step:hover .how-step-icon {
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: #fff;
  border-color: transparent;
  transform: rotate(-5deg) scale(1.08);
  box-shadow: 0 15px 35px #1477ff50;
}

.how-step h3 {
  color: #fff;
  font-size: 20px;
  margin: 0 0 12px;
}

.how-step p {
  color: #a8bad0;
  font-size: 14px;
  line-height: 1.7;
}

/* اتصال بین مراحل */
.how-grid::before {
  content: "";
  position: absolute;
  top: 60px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #1477ff40, #1477ff40, transparent);
  z-index: 0;
}

.how-step { z-index: 1; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 850px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .stat-card::after { display: none; }

  .stat-number { font-size: 36px; }

  .how-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .how-grid::before { display: none; }

  .how-head h2 { font-size: 32px; }

  .cursor-dot,
  .cursor-ring { display: none; }
}

@media (max-width: 520px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .stat-number { font-size: 30px; }
  .stat-label { font-size: 11px; }

  .how-step { padding: 30px 22px; }
  .how-head h2 { font-size: 26px; }
}