/* ========================================
 * EAMA Landing Page - Advanced Styles
 * ======================================== */

body {
  font-family: 'Vazirmatn', sans-serif !important;
}

/* ========================================
   ANIMATED GRADIENTS
======================================== */
.emx-animated-gradient-1 {
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

.emx-mesh-gradient-1 {
  background: 
    radial-gradient(at 40% 20%, hsla(280, 100%, 74%, 1) 0px, transparent 50%),
    radial-gradient(at 80% 0%, hsla(189, 100%, 56%, 1) 0px, transparent 50%),
    radial-gradient(at 0% 50%, hsla(355, 100%, 93%, 1) 0px, transparent 50%),
    radial-gradient(at 80% 50%, hsla(340, 100%, 76%, 1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, hsla(22, 100%, 77%, 1) 0px, transparent 50%),
    radial-gradient(at 80% 100%, hsla(242, 100%, 70%, 1) 0px, transparent 50%);
  background-size: cover;
  background-position: center;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ========================================
   FLOATING ANIMATION
======================================== */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float 6s ease-in-out infinite;
  animation-delay: 1s;
}
 /* EMX Design System Styles */
    .emx-mesh-gradient {
      background: radial-gradient(at top right, rgba(124, 58, 237, 0.1), rgba(94, 234, 212, 0)), 
                  radial-gradient(at bottom left, rgba(254, 205, 211, 0.1), rgba(29, 78, 216, 0.05));
    }
    
    .emx-animated-gradient {
      background: linear-gradient(-45deg, #6875f5, #7e3af2, #e74694, #6875f5);
      background-size: 400% 400%;
      animation: gradientShift 15s ease infinite;
    }
    
    @keyframes gradientShift {
      0% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }
    
    .emx-pattern-dots {
      background-image: radial-gradient(circle, #5850ec 1px, transparent 1px);
      background-size: 24px 24px;
      background-position: 0 0;
    }
    
    .emx-floating {
      animation: floating 6s ease-in-out infinite;
    }
    
    .emx-floating-delayed {
      animation: floating 6s ease-in-out 3s infinite;
    }
    
    @keyframes floating {
      0% { transform: translateY(0px); }
      50% { transform: translateY(-20px); }
      100% { transform: translateY(0px); }
    }
    
    .emx-fade-in {
      animation: fadeIn 0.8s ease-out forwards;
      opacity: 0;
    }
    
    .emx-slide-up {
      animation: slideUp 0.8s ease-out forwards;
      opacity: 0;
    }
    
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    
    @keyframes slideUp {
      from { opacity: 0; transform: translateY(40px); }
      to { opacity: 1; transform: translateY(0); }
    }
    
    .delay-100 { animation-delay: 0.1s; }
    .delay-200 { animation-delay: 0.2s; }
    .delay-300 { animation-delay: 0.3s; }
    .delay-400 { animation-delay: 0.4s; }
    .delay-500 { animation-delay: 0.5s; }
    
    .emx-glass {
      background: rgba(255, 255, 255, 0.7);
      backdrop-filter: blur(16px);
      border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .emx-purple-glow {
      box-shadow: 0 0 40px rgba(124, 58, 237, 0.5);
    }
    
    .emx-text-gradient {
      background: linear-gradient(to right, #6875f5, #7e3af2);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }
    
    .emx-tabs {
      position: relative;
      display: flex;
      gap: 0.5rem;
    }
    
    .emx-tab {
      padding: 0.75rem 1.5rem;
      color: #4b5563;
      font-weight: 500;
      cursor: pointer;
      text-align: center;
      transition: all 0.3s ease;
    }
    
    .emx-tab.active {
      color: #7e3af2;
      font-weight: 600;
      box-shadow: 0 1px 0 #7e3af2;
    }
    
    .emx-shine {
      position: relative;
      overflow: hidden;
    }
    
    .emx-shine::after {
      content: '';
      position: absolute;
      top: -50%;
      left: -50%;
      width: 200%;
      height: 200%;
      background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
      transform: rotate(30deg);
      animation: shine 6s infinite;
    }
    
    @keyframes shine {
      0% { transform: scale(0) rotate(45deg); opacity: 0; }
      80% { transform: scale(0) rotate(45deg); opacity: 0.5; }
      81% { transform: scale(4) rotate(45deg); opacity: 1; }
      100% { transform: scale(50) rotate(45deg); opacity: 0; }
    }
    
    .emx-browser-frame {
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 
        0 10px 30px rgba(37, 99, 235, 0.08),
        0 20px 40px rgba(79, 70, 229, 0.08);
      animation: frame-appear 1s ease-out forwards;
      transform-origin: center;
      border: 1px solid rgba(226, 232, 240, 1);
      width: 100%;
      display: block;
      margin: 0 auto;
    }
    
    @keyframes frame-appear {
      0% { opacity: 0; transform: translateY(40px) scale(0.95); }
      100% { opacity: 1; transform: translateY(0) scale(1); }
    }
    
    .emx-browser-header {
      background: #f8fafc;
      padding: 10px 14px;
      display: flex;
      align-items: center;
      border-bottom: 1px solid #e2e8f0;
      animation: header-fade-in 0.8s ease-out forwards 0.4s;
      opacity: 0;
    }
    
    @keyframes header-fade-in {
      0% { opacity: 0; }
      100% { opacity: 1; }
    }
    
    .emx-browser-circles {
      display: flex;
      align-items: center;
      gap: 6px;
      animation: circles-appear 0.5s ease-out forwards 0.6s;
      opacity: 0;
    }
    
    @keyframes circles-appear {
      0% { opacity: 0; transform: scale(0.5); }
      100% { opacity: 1; transform: scale(1); }
    }
    
    .emx-browser-circle {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }
    
    .emx-browser-address {
      margin-right: 16px;
      flex: 1;
      background: #f1f5f9;
      border-radius: 6px;
      padding: 5px 12px;
      font-size: 11px;
      color: #64748b;
      border: 1px solid #e2e8f0;
      animation: address-appear 0.6s ease-out forwards 0.8s;
      opacity: 0;
      text-align: left;
      letter-spacing: 0.01em;
    }
    
    @keyframes address-appear {
      0% { opacity: 0; width: 70%; }
      100% { opacity: 1; width: 100%; }
    }
    
    /* جدید: انیمیشن حرکت دکمه به پایین */
    @keyframes float-subtle {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-5px); }
    }
    
    /* جدید: سایه سه بعدی برای دکمه اصلی */
    .hover\:shadow-xl:hover {
      box-shadow: 0 10px 25px -3px rgba(79, 70, 229, 0.2), 0 4px 6px -2px rgba(79, 70, 229, 0.1);
    }
    
    .emx-btn {
      transition: all 0.2s ease-in-out;
    }
    
    .emx-btn:hover {
      transform: translateY(-2px);
    }
    
    .emx-custom-tab {
      position: relative;
      cursor: pointer;
      padding: 0.5rem 1rem;
      font-weight: 500;
      transition: all 0.3s ease;
      border-radius: 8px;
    }
    
    .emx-custom-tab.active {
      background-color: #7e3af2;
      color: white;
    }
/* ========================================
   FADE IN ANIMATIONS
======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* ========================================
   SCALE ON HOVER
======================================== */
.hover-scale {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

/* ========================================
   GLASSMORPHISM
======================================== */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ========================================
   PULSE ANIMATION
======================================== */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
  }
  50% {
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.8);
  }
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* ========================================
   PATTERN OVERLAYS
======================================== */
.pattern-dots {
  background-image: radial-gradient(circle, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
}

.pattern-grid {
  background-image: 
    linear-gradient(rgba(99, 102, 241, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* ========================================
   SHINE EFFECT
======================================== */
.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.shine-effect:hover::before {
  left: 100%;
}

/* ========================================
   CALCULATOR SPECIFIC
======================================== */
.price-digit {
  direction: ltr;
  font-variant-numeric: tabular-nums;
}

.plan-card.selected {
  border: 3px solid #6366f1 !important;
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.4) !important;
  transform: scale(1.02);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(147, 51, 234, 0.05) 100%);
}

.plan-card {
  position: relative;
  overflow: hidden;
}

.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.plan-card.selected::before {
  opacity: 1;
}

#calculator-box.loading {
  filter: blur(3px);
  pointer-events: none;
  opacity: 0.6;
  position: relative;
}

#calculator-box.loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 4px solid #ddd;
  border-top: 4px solid #6366f1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 10;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#cap-warning {
  display: none;
}

#cap-warning.active {
  display: block;
}

/* ========================================
   SCROLL ANIMATIONS
======================================== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   GRADIENT TEXT
======================================== */
.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   BUTTON EFFECTS
======================================== */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::after {
  width: 300px;
  height: 300px;
}

/* ========================================
   FEATURE CARD HOVER
======================================== */
.feature-card {
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-card .icon-wrapper {
  transition: all 0.3s ease;
}

.feature-card:hover .icon-wrapper {
  transform: scale(1.1) rotate(5deg);
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
  .animate-float,
  .animate-float-delayed {
    animation: none;
  }
  
  .emx-browser-frame {
    width: 100%;
    max-width: 340px;
    margin: 0 auto 2rem;
    display: block;
  }
  
  /* Fix for border in mobile view */
  .emx-browser-frame .border-l {
    border-left: none;
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
  }
  
  /* Make sure all content is visible */
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  /* Adjust mobile display for nested grid elements */
  .emx-browser-frame .grid {
    min-width: 100%;
    overflow-x: hidden;
  }
  
  /* Fix width for browser frame in all sizes */
  .emx-browser-frame .bg-white {
    min-width: 100%;
  }
  
  /* Fix alignment and spacing issues in mobile */
  .flex.gap-1,
  .flex.gap-1.5,
  .flex.gap-2,
  .flex.gap-3 {
    flex-wrap: wrap;
  }
  
  /* Ensure browser frame is always visible and properly sized */
  .emx-browser-frame {
    min-height: 300px;
    height: auto;
    max-width: 100%;
    box-sizing: border-box;
  }
}
