/* =========================
   Main Hero - Centered Version
   ========================= */

.main-hero {
  position: relative;
  min-height: 100vh;
  padding: 50px 24px 60px;

  display: flex;
  flex-direction: column;
  justify-content: center; /* وسط عمودی */
  align-items: center;     /* وسط افقی */
  text-align: center;

  overflow: hidden;

}

/* افکت‌های دکوراتیو پس‌زمینه */
.main-hero::before,
.main-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}

.main-hero::before {
  width: 320px;
  height: 320px;
  top: -80px;
  right: -80px;
  background: rgba(107, 146, 215, 0.22);
}

.main-hero::after {
  width: 260px;
  height: 260px;
  bottom: -60px;
  left: -60px;
  background: rgba(24, 33, 74, 0.12);
}

/* عنوان اصلی */
/* نکته: اسم کلاس در HTML شما mian-title است، نه main-title */
.mian-title {
  position: relative;
  z-index: 1;

  margin: 0 0 28px;

  font-size: clamp(4rem, 8vw, 9rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -3px;

  color: #18214A;
  text-transform: uppercase;
  text-shadow: 0 10px 30px rgba(24, 33, 74, 0.08);
}

/* باکس متن و دکمه */
.hero-text-holder {
  position: relative;
  z-index: 1;

  width: 100%;
  max-width: 520px;
  margin: 0 auto;

  padding: 28px 28px 24px;
  border-radius: 28px;

  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border: 1px solid rgba(255, 255, 255, 0.55);

  box-shadow:
    0 20px 60px rgba(24, 33, 74, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* متن */
.hero-text {
  margin: 0 0 18px;

  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.8;

  color: #2a3566;
}

/* دکمه */
.hero-button {
  appearance: none;
  border: none;
  outline: none;
  cursor: pointer;
  font-family: vazir !important;
  padding: 14px 26px;
  border-radius: 999px;

  background: linear-gradient(135deg, #18214A 0%, #2b3e86 100%);
  color: #ffffff;

  font-size: 0.95rem;
  font-weight: 700;

  box-shadow: 0 12px 30px rgba(24, 33, 74, 0.22);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.hero-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(24, 33, 74, 0.28);
  background: linear-gradient(135deg, #101738 0%, #243676 100%);
}

.hero-button:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(24, 33, 74, 0.18);
}

/* خط تزئینی زیر باکس، حالا وسط‌چین */
.hero-text-holder::after {
  content: "";
  position: absolute;

  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);

  width: 90px;
  height: 6px;
  border-radius: 999px;

  background: linear-gradient(90deg, transparent, #6B92D7, transparent);
  opacity: 0.8;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 992px) {
  .main-hero {
    min-height: 85vh;
    padding: 100px 24px 50px;
  }

  .mian-title {
    margin-bottom: 22px;
    letter-spacing: -1.5px;
  }

  .hero-text-holder {
    max-width: 100%;
    padding: 24px 20px;
    border-radius: 22px;
  }
}

@media (max-width: 576px) {
  .main-hero {
    padding: 0px 18px 40px;
  }

  .mian-title {
    font-size: clamp(3.2rem, 18vw, 5rem);
  }

  .hero-text {
    font-size: 1rem;
    line-height: 1.7;
  }

  .hero-button {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.95rem;
  }
}


/* =========================
   Bubble Layer
   ========================= */

.main-hero {
  position: relative;
  isolation: isolate;
}

.bubble-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.mian-title,
.hero-text-holder {
  position: relative;
  z-index: 2;
}

/* حباب واضح‌تر */
.hero-bubble {
  position: absolute;
  border-radius: 50%;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;

  background:
    radial-gradient(circle at 30% 30%,
      rgba(255,255,255,0.98) 0%,
      rgba(255,255,255,0.75) 18%,
      rgba(160,200,255,0.45) 42%,
      rgba(107,146,215,0.38) 65%,
      rgba(43,62,134,0.22) 100%);

  border: 1.5px solid rgba(255,255,255,0.75);

  box-shadow:
    inset -12px -14px 24px rgba(255,255,255,0.20),
    inset 10px 12px 18px rgba(255,255,255,0.50),
    0 12px 32px rgba(24, 33, 74, 0.18),
    0 0 20px rgba(107,146,215,0.18);

  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);

  opacity: 0.95;
  transform: translate3d(0,0,0) scale(1);
  will-change: transform, opacity;
  transition: transform 0.14s ease, opacity 0.14s ease, box-shadow 0.14s ease;
}

.hero-bubble::before {
  content: "";
  position: absolute;
  top: 14%;
  left: 16%;
  width: 32%;
  height: 32%;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255,255,255,1) 0%,
    rgba(255,255,255,0.75) 45%,
    rgba(255,255,255,0.08) 100%);
  filter: blur(1px);
  opacity: 1;
}

.hero-bubble::after {
  content: "";
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  border: 1.2px solid rgba(255,255,255,0.28);
  opacity: 0.8;
}

.hero-bubble:hover {
  transform: scale(1.08);
  box-shadow:
    inset -12px -14px 24px rgba(255,255,255,0.22),
    inset 10px 12px 18px rgba(255,255,255,0.52),
    0 14px 36px rgba(24, 33, 74, 0.22),
    0 0 26px rgba(107,146,215,0.25);
}

/* ترکیدن سریع‌تر */
.hero-bubble.popping {
  animation: bubblePop 220ms cubic-bezier(.22,.9,.24,1) forwards;
}

@keyframes bubblePop {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0px);
  }
  40% {
    opacity: 0.95;
    transform: scale(1.15);
  }
  100% {
    opacity: 0;
    transform: scale(1.38);
    filter: blur(4px);
  }
}

/* ذرات واضح‌تر */
.bubble-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle,
    rgba(255,255,255,1) 0%,
    rgba(170,210,255,0.9) 35%,
    rgba(107,146,215,0.45) 100%);
  box-shadow:
    0 0 12px rgba(107,146,215,0.32),
    0 0 4px rgba(255,255,255,0.6);
  opacity: 1;
  will-change: transform, opacity;
}

.bubble-particle.animate {
  transition:
    transform 260ms cubic-bezier(.16,.84,.44,1),
    opacity 260ms ease;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .hero-bubble,
  .hero-bubble.popping,
  .bubble-particle {
    animation: none !important;
    transition: none !important;
  }
}
