/* Animate.css باید اول فایل import شود */
@import url('https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css');

/* ============ Base ============ */
:root { 
  --brand: #6366f1; /* indigo-500 */
  --brand-600: #4f46e5; /* برای hover */
  --accent: #10b981; /* emerald-500 */
  --bg: #f0f9ff; /* sky-50 */
  --text: #0f172a; /* slate-900 */
  --muted: #475569; /* slate-600 */
  --glass: rgba(255,255,255,0.98);
  --glow: #a5b4fc; /* indigo-300 */
}

* { box-sizing: border-box; margin: 0; padding: 0; scroll-behavior: smooth; }
html, body { min-height: 100vh; }
body {
  font-family: "Vazirmatn", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text); line-height: 1.6; font-size: 1rem;
}
a { color: var(--brand); transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
a:hover { color: var(--brand-600); } /* FIX: جایگزین darken(...) */

/* ============ Header (Glassmorphism + Glow) ============ */
.glass-nav {
  background: var(--glass);
  -webkit-backdrop-filter: blur(25px) saturate(200%);
  backdrop-filter: blur(25px) saturate(200%);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  transition: box-shadow 0.5s ease;
}
.glass-nav:hover { box-shadow: 0 16px 50px rgba(99,102,241,0.2); }
.navbar-brand .brand-text {
  font-weight: 800; font-size: 1.25rem;
  background: linear-gradient(45deg, var(--brand), var(--accent));
  -webkit-background-clip: text; color: transparent;
  text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.brand-logo { border-radius: 16px; box-shadow: 0 6px 24px rgba(99,102,241,0.3); transition: transform 0.4s ease, box-shadow 0.4s ease; }
.brand-logo:hover { transform: scale(1.08) rotate(10deg); box-shadow: 0 10px 40px rgba(99,102,241,0.4); }
.navbar .nav-link { font-weight: 600; color: var(--text); position: relative; padding: 0.75rem 1rem; }
.navbar .nav-link:hover { color: var(--brand); transform: translateY(-2px); text-shadow: 0 2px 6px rgba(99,102,241,0.3); }
.navbar .nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 50%; width: 0; height: 2px;
  background: linear-gradient(to right, var(--brand), var(--accent)); transition: width 0.4s ease, left 0.4s ease;
  transform: translateX(-50%);
}
.navbar .nav-link:hover::after, .navbar .nav-link.active::after { width: 100%; }

.btn-primary { 
  background: linear-gradient(135deg, var(--brand), #818cf8); 
  border: none; color: white; 
  box-shadow: 0 4px 15px rgba(99,102,241,0.4);
  --ripple-color: rgba(129,140,248,.35); /* رنگ ripple ثابت */
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(99,102,241,0.5); filter: brightness(1.05); }
.btn-outline-primary { 
  border-color: var(--brand); color: var(--brand); 
  box-shadow: 0 4px 15px rgba(99,102,241,0.2);
  --ripple-color: rgba(99,102,241,.25);
}
.btn-outline-primary:hover { background: var(--brand); color: white; box-shadow: 0 8px 25px rgba(99,102,241,0.3); }
.btn-glow { position: relative; overflow: hidden; }
.btn-glow::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(255,255,255,0.6), transparent 80%); opacity: 0; transition: opacity 0.5s; }
.btn-glow:hover::before { opacity: 1; animation: glowPulse 2s infinite; }
@keyframes glowPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }

/* ============ Footer (Glassmorphism) ============ */
.glass-footer {
  background: var(--glass);
  -webkit-backdrop-filter: blur(25px) saturate(200%);
  backdrop-filter: blur(25px) saturate(200%);
  border-top: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 -12px 40px rgba(0,0,0,0.08);
}
.footer-link { color: var(--muted); padding: 0.5rem 1rem; border-radius: 1.5rem; transition: all 0.4s ease; }
.footer-link:hover { color: var(--brand); background: rgba(99,102,241,0.1); transform: translateY(-3px) scale(1.05); box-shadow: 0 4px 15px rgba(99,102,241,0.2); }

/* ============ Page Loader ============ */
.page-loader {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--bg), #e0e7ff);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  z-index: 1300; opacity: 1; visibility: visible; transition: opacity 1s ease, visibility 1s ease;
}
.page-loader.hide { opacity: 0; visibility: hidden; }
.loader-card {
  background: white; padding: 2rem 3rem; border-radius: 2rem;
  box-shadow: 0 30px 80px rgba(0,0,0,0.12);
  text-align: center; animation: loaderAnim 1.5s infinite ease-in-out;
}
@keyframes loaderAnim { 0% { transform: scale(1) rotate(0); } 50% { transform: scale(1.05) rotate(5deg); } 100% { transform: scale(1) rotate(0); } }

/* ============ Reveal Animations ============ */
.reveal-fade { opacity: 0; transition: opacity 1.2s cubic-bezier(0.2, 0.6, 0.2, 1); }
.reveal-fade.revealed { opacity: 1; }
.reveal-slide { opacity: 0; transform: translateY(60px); transition: opacity 1.2s cubic-bezier(0.2, 0.6, 0.2, 1), transform 1.2s cubic-bezier(0.2, 0.6, 0.2, 1); }
.reveal-slide.revealed { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.4s; }
.delay-2 { transition-delay: 0.8s; }

/* ============ Cards (Holographic Hover) ============ */
.card { border-radius: 2rem; background: white; transition: transform 0.6s ease, box-shadow 0.6s ease; position: relative; }
.holographic { background: linear-gradient(135deg, #fff, #f0f9ff); }
.holographic::before { content: ''; position: absolute; inset: 0; background: linear-gradient(45deg, transparent 25%, rgba(255,255,255,0.5) 50%, transparent 75%); opacity: 0; transition: opacity 0.6s, background-position 0.6s; background-size: 200% 200%; border-radius: inherit; }
.holographic:hover::before { opacity: 1; animation: holoAnim 2s linear infinite; }
@keyframes holoAnim { 0% { background-position: 0% 0%; } 100% { background-position: 200% 200%; } }
.holographic:hover { transform: translateY(-12px) scale(1.03) rotate(2deg); box-shadow: 0 30px 60px rgba(99,102,241,0.2); }
.feature-card .feature-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 1.5rem; font-size: 2.2rem; background: linear-gradient(135deg, rgba(99,102,241,0.3), rgba(99,102,241,0.1)); box-shadow: 0 6px 20px rgba(99,102,241,0.2); transition: transform 0.6s ease, box-shadow 0.6s ease; margin-bottom: 1.5rem; }
.feature-card:hover .feature-icon { transform: scale(1.2) rotate(20deg); box-shadow: 0 10px 30px rgba(99,102,241,0.3); }

/* ============ Buttons (Ripple + Glow) ============ */
.btn-ripple { position: relative; overflow: hidden; border-radius: 1.25rem; transition: transform 0.4s ease, box-shadow 0.4s ease; }
.btn-ripple .ripple { position: absolute; border-radius: 50%; transform: scale(0); animation: rippleAnim 1.2s linear; background: var(--ripple-color, rgba(99,102,241,0.35)); pointer-events: none; }
@keyframes rippleAnim { to { transform: scale(8); opacity: 0; } }

/* ===== Hero Section (Particles + Parallax) ===== */
.hero { padding: 160px 0 140px; position: relative; }
.hero-bg.particles { position: absolute; inset: 0; background: radial-gradient(circle at top, rgba(99,102,241,0.15), transparent 60%); overflow: hidden; }
.hero-bg.particles::before { content: ''; position: absolute; inset: 0; background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"%3E%3Ccircle cx="40" cy="40" r="2" fill="%23a5b4fc"/%3E%3C/svg%3E'); opacity: 0.1; animation: particlesAnim 30s linear infinite; }
@keyframes particlesAnim { 0% { transform: translate(0, 0); } 100% { transform: translate(-100px, 100px); } }
.hero::before { content: ''; position: absolute; top: -30%; right: -20%; width: 800px; height: 800px; background: radial-gradient(circle, rgba(16,185,129,0.25), transparent); border-radius: 50%; filter: blur(150px); animation: blobAnim 18s ease-in-out infinite; }
.hero::after { content: ''; position: absolute; bottom: -40%; left: -25%; width: 700px; height: 700px; background: radial-gradient(circle, rgba(99,102,241,0.25), transparent); border-radius: 50%; filter: blur(120px); animation: blobAnim 22s ease-in-out infinite reverse; }
@keyframes blobAnim { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-60px) scale(1.1); } }
.text-gradient { background: linear-gradient(45deg, var(--text), var(--brand), var(--accent)); -webkit-background-clip: text; color: transparent; }
.glow { text-shadow: 0 0 10px var(--glow), 0 0 20px var(--glow); }

/* === مهم: جلوگیری از کشیدگی تصویر + کمی کراپ === */
.hero-image-wrapper {
  /* نسبت ثابت متناسب با عکس‌های شما (1536x1024 ≈ 3:2) */
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 1.5rem; /* هم‌راستا با .rounded-xl */
}
.hero-image-wrapper picture,
.hero-image-wrapper img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;       /* پر کردن قاب بدون کشیدگی؛ کمی کراپ مجاز */
}

/* Fallback برای مرورگرهای بدون aspect-ratio */
@supports not (aspect-ratio: 1) {
  .hero-image-wrapper { position: relative; padding-top: 66.6667%; } /* 3:2 */
  .hero-image-wrapper > picture,
  .hero-image-wrapper > img,
  .hero-image-wrapper > picture > img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
  }
}

/* Tilt/Parallax بدون تداخل Transform */
.tilt-3d { perspective: 1200px; }
.hero-img {
  transform-style: preserve-3d;
  --ry: 0deg; --rx: 0deg; --scale: 1; --scrollY: 0px;
  transform: translateY(var(--scrollY)) rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--scale));
  transition: transform 0.6s ease, box-shadow 0.6s ease;
}
.parallax-layer { will-change: transform; }

/* ============ Sections ============ */
.bg-gradient { background: linear-gradient(to bottom, var(--bg), #e0e7ff); }

/* ============ Forms ============ */
.form-control, .form-select { border-radius: 1.25rem; border-color: rgba(0,0,0,0.08); transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 0.2rem rgba(99,102,241,0.25); }

/* Utilities */
.section { padding: 120px 0; }
.display-4 { font-size: calc(1.1rem + 1.6vw); line-height: 1.25; letter-spacing: -0.01em; }
.lead { font-size: 1.1rem; font-weight: 400; }
.shadow-md { box-shadow: 0 0.375rem 0.75rem rgba(0,0,0,.1) !important; }
.shadow-lg { box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important; }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0,0,0,.25) !important; }
.rounded-xl { border-radius: 1.5rem; }
.z-2 { z-index: 2; }

/* Nav pills */
.nav-pills .nav-link.active { background-color: var(--brand); color: white; }

/* ============ Accessibility: Reduced Motion ============ */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .hero-bg.particles::before, .hero::before, .hero::after { display: none; }
}

/* قلب تپنده در فوتر */
.heart-beat{
  display:inline-block;
  margin: 0 .25rem;
  font-size: 1rem;            /* کوچیک و جمع‌وجور */
  color: #e11d48;             /* قرمز تمیز */
  transform-origin: center;
  text-shadow: 0 0 8px rgba(225,29,72,.35);
  animation: hb-pulse 1.2s ease-in-out infinite;
}
@keyframes hb-pulse{
  0%   { transform: scale(1);   filter: none; }
  15%  { transform: scale(1.25); filter: drop-shadow(0 0 6px rgba(225,29,72,.4)); }
  30%  { transform: scale(1);   }
  45%  { transform: scale(1.2); }
  60%  { transform: scale(1);   }
  100% { transform: scale(1);   }
}
/* احترام به تنظیمات کاربر برای کاهش حرکت */
@media (prefers-reduced-motion: reduce){
  .heart-beat{ animation: none; }
}









