/* ============================================
   MODERN SERVICE CARDS REDESIGN
   Beautiful, clean, and professional design
   ============================================ */

/* ============================================
   1. GRID LAYOUT
   ============================================ */

.pricing-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)) !important;
  gap: clamp(2rem, 4vw, 3rem) !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  align-items: stretch !important;
}

/* ============================================
   2. MODERN SERVICE CARD
   ============================================ */

.service-card-modern {
  background: #ffffff !important;
  border-radius: 20px !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.06) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  cursor: default !important;
}

/* Recommended card styling */
.service-card-recommended {
  border: 2px solid #10B981 !important;
  box-shadow: 
    0 4px 12px rgba(16, 185, 129, 0.15),
    0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

/* Card hover effect */
.service-card-modern:hover {
  transform: translateY(-8px) !important;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.12),
    0 8px 16px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(37, 99, 235, 0.1) !important;
  border-color: rgba(37, 99, 235, 0.3) !important;
}

.service-card-recommended:hover {
  border-color: #10B981 !important;
  box-shadow: 
    0 20px 40px rgba(16, 185, 129, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.08) !important;
}

/* ============================================
   3. CARD HEADER - BLUE SECTION WITH ICON
   ============================================ */

.service-card-header-modern {
  background: linear-gradient(135deg, #2563EB 0%, #1E40AF 100%) !important;
  padding: 0 !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 200px !important;
  overflow: hidden !important;
}

/* Header with image - no padding, image fills the space */
.service-card-header-with-image {
  padding: 0 !important;
  background: transparent !important;
}

/* Service image in header - full size */
.service-card-header-image {
  width: 100% !important;
  height: 100% !important;
  min-height: 200px !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  opacity: 0 !important;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 1 !important;
}

.service-card-header-image.loaded {
  opacity: 1 !important;
}

.service-card-modern:hover .service-card-header-image {
  transform: scale(1.08) !important;
}

/* Header without image - show gradient background */
.service-card-header-no-image {
  background: linear-gradient(135deg, #2563EB 0%, #1E40AF 100%) !important;
  padding: clamp(2rem, 4vw, 2.5rem) !important;
}

/* Decorative background pattern - only for headers without images */
.service-card-header-no-image::before {
  content: '' !important;
  position: absolute !important;
  top: -50% !important;
  right: -50% !important;
  width: 200% !important;
  height: 200% !important;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%) !important;
  animation: pulse 4s ease-in-out infinite !important;
  z-index: 0 !important;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
}

/* Recommended badge */
.service-recommended-badge {
  position: absolute !important;
  top: 1rem !important;
  right: 1rem !important;
  z-index: 10 !important;
  pointer-events: none !important;
}

.service-recommended-badge .pricing-plan-badge {
  background: #10B981 !important;
  color: #ffffff !important;
  padding: 0.5rem 1rem !important;
  border-radius: 20px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

.service-recommended-badge .pricing-plan-badge i {
  font-size: 0.875rem !important;
}

/* ============================================
   4. CARD BODY - WHITE SECTION
   ============================================ */

.service-card-body {
  padding: clamp(1.75rem, 3vw, 2.25rem) !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
}

/* Title */
.service-card-title {
  font-size: clamp(1.5rem, 3vw, 1.875rem) !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  margin: 0 0 0.75rem 0 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.02em !important;
}

/* Label badge */
.service-card-label {
  margin-bottom: 0.75rem !important;
}

.service-label-badge {
  display: inline-block !important;
  padding: 0.375rem 0.875rem !important;
  background: #f1f5f9 !important;
  color: #64748b !important;
  border-radius: 20px !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.service-label-badge-green {
  background: #d1fae5 !important;
  color: #10B981 !important;
}

/* Subtitle */
.service-card-subtitle {
  font-size: clamp(0.875rem, 1.5vw, 1rem) !important;
  color: #64748b !important;
  margin: 0 0 1.5rem 0 !important;
  line-height: 1.6 !important;
}

/* ============================================
   5. FEATURES SECTION
   ============================================ */

.service-card-features {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.875rem !important;
  margin-top: auto !important;
}

.service-feature-item {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  padding: 0.75rem !important;
  background: #f8fafc !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
}

.service-card-modern:hover .service-feature-item {
  background: #f1f5f9 !important;
  transform: translateX(4px) !important;
}

.service-feature-check {
  color: #10B981 !important;
  font-size: 1.125rem !important;
  flex-shrink: 0 !important;
}

.service-feature-text {
  font-size: 0.875rem !important;
  color: #475569 !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
}

/* ============================================
   6. RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  
  .service-card-header-modern {
    min-height: 160px !important;
    padding: 1.5rem !important;
  }
  
  .service-card-icon-container {
    width: 70px !important;
    height: 70px !important;
  }
  
  .service-card-icon {
    font-size: 2rem !important;
  }
  
  .service-card-spinner {
    width: 90px !important;
    height: 90px !important;
  }
}

/* ============================================
   7. ANIMATIONS
   ============================================ */

.service-card-modern {
  animation: fadeInUp 0.6s ease-out !important;
  animation-fill-mode: both !important;
}

.service-card-modern:nth-child(1) {
  animation-delay: 0.1s !important;
}

.service-card-modern:nth-child(2) {
  animation-delay: 0.2s !important;
}

.service-card-modern:nth-child(3) {
  animation-delay: 0.3s !important;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   8. LAO LANGUAGE SUPPORT
   ============================================ */

.lang-lao .service-card-title,
.lang-lao .service-card-subtitle,
.lang-lao .service-feature-text {
  font-family: 'Noto Sans Lao', 'Phetsarath OT', sans-serif !important;
}

/* ============================================
   9. OVERRIDE OLD STYLES
   ============================================ */

/* Hide old pricing card elements if they exist */
.pricing-card .pricing-card-header,
.pricing-card .pricing-plan-features {
  display: none !important;
}

/* Ensure new structure is visible */
.service-card-modern {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

