/* 🚀 Ultra-Modern Professional Cards 2024 - AILA Tech */

/* ===== CSS CUSTOM PROPERTIES FOR CONSISTENT THEMING ===== */
:root {
  /* Primary Colors */
  --aila-primary: #3b82f6;
  --aila-primary-dark: #1d4ed8;
  --aila-primary-light: #60a5fa;
  
  /* Semantic Colors */
  --color-surface: #ffffff;
  --color-surface-secondary: #f8fafc;
  --color-surface-tertiary: #f1f5f9;
  --color-border: #e2e8f0;
  --color-border-light: rgba(226, 232, 240, 0.4);
  
  /* Text Colors */
  --color-text-primary: #0f172a;
  --color-text-secondary: #475569;
  --color-text-tertiary: #64748b;
  --color-text-muted: #94a3b8;
  
  /* Shadows - Professional Elevation System */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-professional: 0 32px 64px -12px rgba(16, 24, 40, 0.14);
  
  /* Interactive Shadows */
  --shadow-hover: 0 20px 40px -8px rgba(59, 130, 246, 0.25), 0 8px 16px -4px rgba(59, 130, 246, 0.1);
  --shadow-focus: 0 0 0 4px rgba(59, 130, 246, 0.12);
  
  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-3xl: 2rem;
  
  /* Animation Curves */
  --ease-in-out-cubic: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-cubic: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-cubic: cubic-bezier(0.4, 0, 1, 1);
  --ease-bouncy: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== MODERN CARD GRID SYSTEM ===== */
.modern-solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(2rem, 6vw, 4rem) 0;
  position: relative;
  container-type: inline-size;
}

/* CSS Container Queries for Ultra-Responsive Design */
@container (min-width: 600px) {
  .modern-solutions-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

@container (min-width: 900px) {
  .modern-solutions-grid {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  }
}

/* ===== ULTRA-MODERN CARD DESIGN ===== */
.modern-solution-card {
  position: relative;
  height: fit-content;
  
  /* Entrance Animation */
  opacity: 0;
  transform: translateY(2rem) scale(0.95);
  transition: all 0.8s var(--ease-smooth);
  
  /* Card Positioning */
  isolation: isolate;
}

.modern-solution-card.animate-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Stagger Animation for Multiple Cards */
.modern-solution-card:nth-child(1) { animation-delay: 0ms; }
.modern-solution-card:nth-child(2) { animation-delay: 100ms; }
.modern-solution-card:nth-child(3) { animation-delay: 200ms; }
.modern-solution-card:nth-child(4) { animation-delay: 300ms; }
.modern-solution-card:nth-child(5) { animation-delay: 400ms; }

/* ===== CARD INNER CONTAINER WITH ADVANCED EFFECTS ===== */
.modern-card-inner {
  position: relative;
  
  /* Modern Background with Subtle Gradient */
  background: 
    linear-gradient(135deg, 
      rgba(255, 255, 255, 0.95) 0%, 
      rgba(255, 255, 255, 0.9) 100%
    );
  
  /* Advanced Backdrop Filter */
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  
  /* Sophisticated Border System */
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-3xl);
  
  /* Professional Shadow System */
  box-shadow: var(--shadow-lg);
  
  /* Smooth Transitions */
  transition: all 0.4s var(--ease-out-cubic);
  
  /* Modern Transform Origin */
  transform-origin: center bottom;
  transform-style: preserve-3d;
  
  /* Content Isolation */
  isolation: isolate;
  overflow: hidden;
}

/* Advanced Hover State with Multiple Effects */
.modern-solution-card:hover .modern-card-inner {
  transform: translateY(-0.75rem) scale(1.02);
  box-shadow: var(--shadow-hover);
  border-color: rgba(59, 130, 246, 0.2);
  
  /* Subtle Background Shift */
  background: 
    linear-gradient(135deg, 
      rgba(255, 255, 255, 0.98) 0%, 
      rgba(248, 250, 252, 0.95) 100%
    );
}

/* ===== NEXT-GEN HEADER DESIGN ===== */
.modern-card-header {
  position: relative;
  height: 10rem;
  padding: var(--space-xl);
  
  /* Dynamic Gradient Background */
  background: linear-gradient(135deg, var(--aila-primary) 0%, var(--aila-primary-dark) 100%);
  
  /* Modern Layout */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  
  /* Advanced Effects */
  overflow: hidden;
  border-radius: var(--radius-3xl) var(--radius-3xl) 0 0;
}

/* Dynamic Header Backgrounds for Different Cards */
.modern-solution-card:nth-child(1) .modern-card-header {
  background: linear-gradient(135deg, #6366f1 0%, #3b82f6 50%, #1d4ed8 100%);
}

.modern-solution-card:nth-child(2) .modern-card-header {
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
}

.modern-solution-card:nth-child(3) .modern-card-header {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
}

.modern-solution-card:nth-child(4) .modern-card-header {
  background: linear-gradient(135deg, #1E40AF 0%, #2563EB 50%, #1D4ED8 100%);
}

/* Animated Background Pattern */
.modern-card-header::before {
  content: '';
  position: absolute;
  inset: 0;
  
  /* Subtle Pattern Overlay */
  background: 
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  
  /* Gentle Animation */
  animation: patternFloat 8s ease-in-out infinite;
  opacity: 0.6;
}

@keyframes patternFloat {
  0%, 100% { 
    transform: rotate(0deg) scale(1);
    opacity: 0.6;
  }
  50% { 
    transform: rotate(180deg) scale(1.05);
    opacity: 0.8;
  }
}

/* ===== SOPHISTICATED ICON DESIGN ===== */
.modern-icon-container {
  position: relative;
  width: 5rem;
  height: 5rem;
  margin-bottom: var(--space-md);
}

.modern-card-icon {
  width: 100%;
  height: 100%;
  
  /* Modern Glass Effect */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  
  /* Perfect Centering */
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* Typography */
  font-size: 2rem;
  color: white;
  
  /* Professional Shadow */
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  
  /* Smooth Interactions */
  transition: all 0.3s var(--ease-out-cubic);
  
  /* 3D Transform */
  transform-style: preserve-3d;
  position: relative;
  z-index: 2;
}

.modern-solution-card:hover .modern-card-icon {
  transform: scale(1.1) rotateY(12deg);
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Glow Effect */
.modern-icon-glow {
  position: absolute;
  inset: -0.5rem;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: iconPulse 3s ease-in-out infinite;
  z-index: 1;
}

@keyframes iconPulse {
  0%, 100% { 
    transform: scale(1);
    opacity: 0.5;
  }
  50% { 
    transform: scale(1.2);
    opacity: 0.8;
  }
}

/* ===== MODERN TYPOGRAPHY SYSTEM ===== */
.modern-card-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-xs);
  
  /* Modern Text Effects */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modern-card-title {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-lg);
  
  /* Modern Gradient Text */
  background: linear-gradient(135deg, var(--color-text-primary) 0%, var(--color-text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  
  /* Improved Readability */
  letter-spacing: -0.025em;
  text-align: center;
}

.modern-card-description {
  color: var(--color-text-tertiary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: var(--space-xl);
  text-align: center;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ===== CARD CONTENT AREA ===== */
.modern-card-content {
  padding: var(--space-xl);
}

/* ===== ENHANCED DETAILS GRID ===== */
.modern-details-grid {
  background: 
    linear-gradient(135deg, 
      rgba(248, 250, 252, 0.8) 0%,
      rgba(241, 245, 249, 0.6) 100%
    );
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  
  /* Modern Grid */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-md);
}

.modern-detail-item {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  text-align: center;
  
  /* Modern Hover Effect */
  transition: all 0.2s var(--ease-out-cubic);
  position: relative;
  overflow: hidden;
}

.modern-detail-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  transition: left 0.5s ease;
}

.modern-detail-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
}

.modern-detail-item:hover::before {
  left: 100%;
}

.modern-detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.modern-detail-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

/* ===== MODERN FEATURES LIST ===== */
.modern-features-section {
  margin-bottom: var(--space-xl);
}

.modern-features-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-lg);
  text-align: center;
  
  /* Decorative Elements */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.modern-features-title::before,
.modern-features-title::after {
  content: '';
  width: 2rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--aila-primary), transparent);
  border-radius: 1px;
}

.modern-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-sm);
}

.modern-feature-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(248, 250, 252, 0.6);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  
  /* Modern Interactions */
  transition: all 0.2s var(--ease-out-cubic);
  position: relative;
  overflow: hidden;
}

.modern-feature-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.08), transparent);
  transition: left 0.4s ease;
}

.modern-feature-item:hover {
  transform: translateX(4px);
  background: rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.2);
}

.modern-feature-item:hover::before {
  left: 100%;
}

.modern-feature-icon {
  width: 1.5rem;
  height: 1.5rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #059669;
  font-size: 0.75rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
  transition: all 0.2s var(--ease-out-cubic);
}

.modern-feature-item:hover .modern-feature-icon {
  transform: scale(1.1);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.3));
}

.modern-feature-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

/* ===== STATUS BADGE REDESIGN ===== */
.modern-status-badge {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 10;
  
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  
  /* Modern Styling */
  background: rgba(16, 185, 129, 0.9);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  
  /* Advanced Effects */
  border-radius: 2rem;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
  
  /* Pulse Animation */
  animation: statusGlow 2s ease-in-out infinite;
}

.modern-status-badge::before {
  content: '●';
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusGlow {
  0%, 100% { box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3); }
  50% { box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5); }
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ===== MODERN ACTION BUTTONS ===== */
.modern-actions-container {
  background: 
    linear-gradient(135deg, 
      rgba(248, 250, 252, 0.9) 0%,
      rgba(241, 245, 249, 0.8) 100%
    );
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-border-light);
  border-radius: 0 0 var(--radius-3xl) var(--radius-3xl);
  padding: var(--space-xl);
  
  /* Modern Flexbox Layout */
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.modern-btn {
  flex: 1;
  min-width: 8rem;
  
  /* Layout */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  
  /* Sizing */
  padding: var(--space-md) var(--space-lg);
  
  /* Typography */
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  
  /* Styling */
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  
  /* Advanced Transitions */
  transition: all 0.3s var(--ease-out-cubic);
  position: relative;
  overflow: hidden;
  
  /* Transform Origin */
  transform-origin: center;
}

/* Shimmer Effect for All Buttons */
.modern-btn::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 ease;
}

.modern-btn:hover::before {
  left: 100%;
}

/* Primary Button - AILA Brand */
.modern-btn--primary {
  background: linear-gradient(135deg, var(--aila-primary) 0%, var(--aila-primary-dark) 100%);
  color: white;
  box-shadow: 
    0 4px 16px rgba(59, 130, 246, 0.3),
    0 2px 8px rgba(59, 130, 246, 0.2);
}

.modern-btn--primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 8px 24px rgba(59, 130, 246, 0.4),
    0 4px 12px rgba(59, 130, 246, 0.3);
  background: linear-gradient(135deg, var(--aila-primary-light) 0%, var(--aila-primary) 100%);
}

/* Secondary Button - Outline Style */
.modern-btn--secondary {
  background: rgba(255, 255, 255, 0.8);
  color: var(--aila-primary);
  border: 2px solid var(--aila-primary);
  backdrop-filter: blur(8px);
}

.modern-btn--secondary:hover {
  background: var(--aila-primary);
  color: white;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 6px 20px rgba(59, 130, 246, 0.3),
    0 3px 10px rgba(59, 130, 246, 0.2);
}

/* Tertiary Button - Subtle Style */
.modern-btn--tertiary {
  background: linear-gradient(135deg, var(--color-text-secondary) 0%, var(--color-text-primary) 100%);
  color: white;
  box-shadow: 
    0 4px 16px rgba(71, 85, 105, 0.3),
    0 2px 8px rgba(71, 85, 105, 0.2);
}

.modern-btn--tertiary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 8px 24px rgba(71, 85, 105, 0.4),
    0 4px 12px rgba(71, 85, 105, 0.3);
}

/* ===== ADVANCED CARD SHADOW SYSTEM ===== */
.modern-card-shadow {
  position: absolute;
  bottom: -1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  height: 1.5rem;
  
  background: radial-gradient(ellipse at center, 
    rgba(59, 130, 246, 0.15) 0%, 
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(12px);
  
  opacity: 0;
  transition: all 0.4s var(--ease-out-cubic);
  z-index: -1;
}

.modern-solution-card:hover .modern-card-shadow {
  opacity: 1;
  transform: scale(1.1);
}

/* ===== RESPONSIVE DESIGN WITH MODERN BREAKPOINTS ===== */
@media (max-width: 1024px) {
  .modern-solutions-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-xl);
  }
}

@media (max-width: 768px) {
  .modern-solutions-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    padding: var(--space-xl) 0;
  }
  
  .modern-card-header {
    height: 8rem;
    padding: var(--space-lg);
  }
  
  .modern-icon-container {
    width: 4rem;
    height: 4rem;
  }
  
  .modern-card-icon {
    font-size: 1.5rem;
  }
  
  .modern-actions-container {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .modern-btn {
    width: 100%;
    min-width: auto;
  }
  
  .modern-details-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
  
  .modern-features-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .modern-card-content {
    padding: var(--space-lg);
  }
  
  .modern-actions-container {
    padding: var(--space-lg);
  }
  
  .modern-card-header {
    height: 7rem;
    padding: var(--space-md);
  }
  
  .modern-icon-container {
    width: 3rem;
    height: 3rem;
  }
  
  .modern-card-icon {
    font-size: 1.25rem;
  }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
.modern-btn:focus-visible {
  outline: 2px solid var(--aila-primary);
  outline-offset: 2px;
  box-shadow: var(--shadow-focus);
}

.modern-solution-card:focus-within {
  z-index: 10;
}

.modern-solution-card:focus-within .modern-card-inner {
  box-shadow: var(--shadow-focus), var(--shadow-lg);
  border-color: var(--aila-primary);
}

/* Respect User's Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  .modern-solution-card,
  .modern-card-inner,
  .modern-card-icon,
  .modern-btn,
  .modern-detail-item,
  .modern-feature-item {
    transition: none;
    animation: none;
  }
  
  .modern-card-header::before,
  .modern-icon-glow,
  .modern-status-badge::before {
    animation: none;
  }
}

/* ===== MODERN UTILITY CLASSES ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .modern-card-inner {
    border: 2px solid var(--color-text-primary);
  }
  
  .modern-btn {
    border: 2px solid currentColor;
  }
}

/* Dark Mode Support (if implemented) */
@media (prefers-color-scheme: dark) {
  :root {
    --color-surface: #0f172a;
    --color-surface-secondary: #1e293b;
    --color-surface-tertiary: #334155;
    --color-border: #475569;
    --color-border-light: rgba(71, 85, 105, 0.4);
    --color-text-primary: #f8fafc;
    --color-text-secondary: #e2e8f0;
    --color-text-tertiary: #cbd5e1;
    --color-text-muted: #94a3b8;
  }
  
  .modern-card-inner {
    background: linear-gradient(135deg, 
      rgba(30, 41, 59, 0.95) 0%, 
      rgba(15, 23, 42, 0.9) 100%
    );
  }
}







