/* Mobile Process Cards Animation - حركة بطاقات قسم كيف نعمل معك على الهاتف */
/* تأثير متحرك لإظهار بطاقتين ثم اختفائهما وإظهار بطاقتين أخريين */

@media (max-width: 768px) {
  /* Process section container */
  #process {
    position: relative;
    overflow: visible;
  }
  
  /* Process steps grid */
  #process .grid.steps {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    position: relative !important;
    min-height: 200px !important;
    overflow: visible !important;
  }
  
  /* Process step cards */
  #process .step {
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.9), rgba(21, 101, 192, 0.85)) !important;
    border: 1px solid rgba(66, 165, 245, 0.45) !important;
    border-radius: 16px !important;
    padding: 1.5rem !important;
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 10px 30px rgba(0, 31, 94, 0.3) !important;
    position: relative !important;
    width: 100% !important;
    min-height: 180px !important;
    grid-column: span 1 !important;
  }
  
  /* Animation classes for individual cards */
  #process .step:nth-child(1) {
    animation: showHideSingleCard 8s infinite !important;
  }
  
  #process .step:nth-child(2) {
    animation: showHideSingleCard 8s infinite !important;
    animation-delay: 1.33s !important;
  }
  
  #process .step:nth-child(3) {
    animation: showHideSingleCard 8s infinite !important;
    animation-delay: 2.67s !important;
  }
  
  #process .step:nth-child(4) {
    animation: showHideSingleCard 8s infinite !important;
    animation-delay: 4s !important;
  }
  
  #process .step:nth-child(5) {
    animation: showHideSingleCard 8s infinite !important;
    animation-delay: 5.33s !important;
  }
  
  #process .step:nth-child(6) {
    animation: showHideSingleCard 8s infinite !important;
    animation-delay: 6.67s !important;
  }
  
  /* Main animation for single card */
  @keyframes showHideSingleCard {
    0% {
      opacity: 0 !important;
      transform: translateY(30px) scale(0.9) !important;
    }
    10% {
      opacity: 1 !important;
      transform: translateY(0) scale(1) !important;
    }
    25% {
      opacity: 1 !important;
      transform: translateY(0) scale(1) !important;
    }
    35% {
      opacity: 0 !important;
      transform: translateY(-30px) scale(0.9) !important;
    }
    100% {
      opacity: 0 !important;
      transform: translateY(-30px) scale(0.9) !important;
    }
  }
  
  /* Card content styling */
  #process .step h3 {
    color: #ffffff !important;
    font-size: 1.1rem !important;
    margin-bottom: 0.5rem !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  }
  
  #process .step p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
  }
  
  /* Icon styling */
  #process .step::before {
    content: '📋' !important;
    display: block !important;
    font-size: 2rem !important;
    margin-bottom: 0.5rem !important;
    text-align: center !important;
  }
  
  #process .step:nth-child(1)::before { content: '🎯' !important; }
  #process .step:nth-child(2)::before { content: '📝' !important; }
  #process .step:nth-child(3)::before { content: '⚡' !important; }
  #process .step:nth-child(4)::before { content: '📊' !important; }
  #process .step:nth-child(5)::before { content: '🔍' !important; }
  #process .step:nth-child(6)::before { content: '🤝' !important; }
  
  /* Hover effects */
  #process .step:hover {
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 0 20px 40px rgba(0, 31, 94, 0.4) !important;
    border-color: rgba(66, 165, 245, 0.6) !important;
  }
  
  /* Pause animation on hover */
  #process .step:hover {
    animation-play-state: paused !important;
  }
  
  /* Container height adjustment */
  #process .container {
    min-height: 250px !important;
  }
  
  /* Section title styling */
  #process .section-title {
    color: #ffffff !important;
    text-align: center !important;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    margin-top: -2rem !important;
    margin-bottom: 4rem !important;
    position: relative !important;
    top: -15px !important;
    transform: translateY(-10px) !important;
    padding-top: 0rem !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    float: none !important;
    clear: both !important;
  }
  
  #process .section-title::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    border: none !important;
  }
  
  section#process .section-title::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    border: none !important;
    position: absolute !important;
    bottom: -9999px !important;
    left: -9999px !important;
    transform: none !important;
  }
  
  @media (max-width: 768px) {
    section#process .section-title::after {
      display: none !important;
      content: none !important;
      width: 0 !important;
      height: 0 !important;
      background: transparent !important;
      border: none !important;
      position: absolute !important;
      bottom: -9999px !important;
      left: -9999px !important;
      transform: none !important;
    }
  }
  
  /* RTL support for Arabic */
  [dir="rtl"] #process .step {
    text-align: right !important;
    direction: rtl !important;
  }
  
  [dir="rtl"] #process .step h3 {
    text-align: right !important;
  }
  
  [dir="rtl"] #process .step p {
    text-align: right !important;
  }
  
  /* LTR support for English */
  [dir="ltr"] #process .step {
    text-align: left !important;
    direction: ltr !important;
  }
  
  [dir="ltr"] #process .step h3 {
    text-align: left !important;
  }
  
  [dir="ltr"] #process .step p {
    text-align: left !important;
  }
  
  /* Small mobile adjustments */
  @media (max-width: 480px) {
    #process .grid.steps {
      gap: 0.8rem !important;
      min-height: 180px !important;
    }
    
    #process .step {
      padding: 1.2rem !important;
      min-height: 160px !important;
    }
    
    #process .step h3 {
      font-size: 1rem !important;
    }
    
    #process .step p {
      font-size: 0.85rem !important;
    }
    
    #process .step::before {
      font-size: 1.5rem !important;
    }
    
    #process .container {
      min-height: 220px !important;
    }
  }
  
  /* Extra small mobile adjustments */
  @media (max-width: 360px) {
    #process .grid.steps {
      gap: 0.6rem !important;
      min-height: 160px !important;
    }
    
    #process .step {
      padding: 1rem !important;
      min-height: 140px !important;
    }
    
    #process .step h3 {
      font-size: 0.95rem !important;
    }
    
    #process .step p {
      font-size: 0.8rem !important;
    }
    
    #process .step::before {
      font-size: 1.3rem !important;
    }
    
    #process .container {
      min-height: 200px !important;
    }
  }
}

/* Desktop - ensure no animation affects desktop */
@media (min-width: 769px) {
  #process .step {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    position: relative !important;
    width: auto !important;
    min-height: auto !important;
  }
  
  #process .grid.steps {
    position: static !important;
    overflow: visible !important;
    min-height: auto !important;
  }
}
