/**
 * Benefits Section - Small Card Design
 * Modern, visually appealing small cards for each benefit
 * Version: 3.0 - Card-based layout
 */

/* ============================================
   SECTION CONTAINER
   ============================================ */

.benefits-cards-section {
  padding: 80px 0;
  background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
}

[data-theme="dark"] .benefits-cards-section {
  background: linear-gradient(180deg, #0a0f1a 0%, #0f172a 100%);
}

.benefits-cards-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   SECTION HEADER
   ============================================ */

.benefits-cards-header {
  text-align: center;
  margin-bottom: 48px;
}

.benefits-cards-title {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
}

[data-theme="dark"] .benefits-cards-title {
  color: #f8fafc;
}

.benefits-cards-subtitle {
  font-size: 16px;
  color: #6b7280;
  margin: 0;
}

[data-theme="dark"] .benefits-cards-subtitle {
  color: #94a3b8;
}

/* ============================================
   GRID LAYOUT - Small Cards
   ============================================ */

.benefits-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

@media (min-width: 640px) {
  .benefits-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .benefits-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   INDIVIDUAL CARD - Modern Small Card
   ============================================ */

.benefits-card {
  position: relative;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
  overflow: hidden;
}

.benefits-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.benefits-card:hover::before {
  transform: scaleX(1);
}

.benefits-card:hover {
  border-color: #10b981;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
  transform: translateY(-4px);
}

[data-theme="dark"] .benefits-card {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .benefits-card:hover {
  border-color: #10b981;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
}

/* Blue variant for "Cosa Include" */
.benefits-card--blue::before {
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.benefits-card--blue:hover {
  border-color: #3b82f6;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .benefits-card--blue:hover {
  border-color: #3b82f6;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
}

/* Amber variant for "Non Incluso" */
.benefits-card--amber {
  background: #fffbeb;
  border-color: #fde68a;
}

.benefits-card--amber::before {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.benefits-card--amber:hover {
  border-color: #f59e0b;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}

[data-theme="dark"] .benefits-card--amber {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
}

/* ============================================
   CARD ICON - Circular Badge
   ============================================ */

.benefits-card__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-radius: 16px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.benefits-card:hover .benefits-card__icon {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.benefits-card__icon svg {
  width: 28px;
  height: 28px;
  color: #059669;
  stroke-width: 2;
}

[data-theme="dark"] .benefits-card__icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.08) 100%);
}

[data-theme="dark"] .benefits-card__icon svg {
  color: #10b981;
}

/* Blue icon variant */
.benefits-card--blue .benefits-card__icon {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.benefits-card--blue .benefits-card__icon svg {
  color: #2563eb;
}

[data-theme="dark"] .benefits-card--blue .benefits-card__icon {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.08) 100%);
}

[data-theme="dark"] .benefits-card--blue .benefits-card__icon svg {
  color: #3b82f6;
}

/* Amber icon variant */
.benefits-card--amber .benefits-card__icon {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.benefits-card--amber .benefits-card__icon svg {
  color: #d97706;
}

[data-theme="dark"] .benefits-card--amber .benefits-card__icon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.08) 100%);
}

[data-theme="dark"] .benefits-card--amber .benefits-card__icon svg {
  color: #f59e0b;
}

/* ============================================
   CARD CONTENT
   ============================================ */

.benefits-card__content {
  flex: 1;
}

.benefits-card__title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px 0;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .benefits-card__title {
  color: #f1f5f9;
}

.benefits-card__description {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  line-height: 1.6;
}

[data-theme="dark"] .benefits-card__description {
  color: #94a3b8;
}

/* ============================================
   SECTION DIVIDER
   ============================================ */

.benefits-section-divider {
  margin: 60px 0 48px 0;
  text-align: center;
}

.benefits-section-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  padding: 12px 24px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .benefits-section-title {
  color: #f8fafc;
  background: #1e293b;
  border-color: #334155;
}

.benefits-section-title svg {
  width: 20px;
  height: 20px;
}

.benefits-section-title--green {
  color: #059669;
}

.benefits-section-title--blue {
  color: #2563eb;
}

.benefits-section-title--amber {
  color: #d97706;
}

.benefits-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 12px;
  margin-left: 4px;
}

[data-theme="dark"] .benefits-section-count {
  background: #334155;
  color: #94a3b8;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.benefits-card {
  animation: fadeInScale 0.4s ease forwards;
  opacity: 0;
}

.benefits-card:nth-child(1) { animation-delay: 0.05s; }
.benefits-card:nth-child(2) { animation-delay: 0.1s; }
.benefits-card:nth-child(3) { animation-delay: 0.15s; }
.benefits-card:nth-child(4) { animation-delay: 0.2s; }
.benefits-card:nth-child(5) { animation-delay: 0.25s; }
.benefits-card:nth-child(6) { animation-delay: 0.3s; }
.benefits-card:nth-child(7) { animation-delay: 0.35s; }
.benefits-card:nth-child(8) { animation-delay: 0.4s; }
.benefits-card:nth-child(9) { animation-delay: 0.45s; }

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .benefits-card {
    animation: none;
    opacity: 1;
  }

  .benefits-card:hover {
    transform: none;
  }

  .benefits-card__icon {
    transform: none !important;
  }
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */

@media (max-width: 640px) {
  .benefits-cards-section {
    padding: 60px 0;
  }

  .benefits-cards-header {
    margin-bottom: 32px;
  }

  .benefits-cards-title {
    font-size: 24px;
  }

  .benefits-cards-subtitle {
    font-size: 14px;
  }

  .benefits-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .benefits-card {
    padding: 20px;
  }

  .benefits-card__icon {
    width: 48px;
    height: 48px;
  }

  .benefits-card__icon svg {
    width: 24px;
    height: 24px;
  }

  .benefits-card__title {
    font-size: 15px;
  }

  .benefits-card__description {
    font-size: 13px;
  }

  .benefits-section-divider {
    margin: 40px 0 32px 0;
  }

  .benefits-section-title {
    font-size: 20px;
    padding: 10px 20px;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .benefits-cards-section {
    background: white;
    padding: 20px 0;
  }

  .benefits-card {
    border: 1px solid #000;
    box-shadow: none;
    page-break-inside: avoid;
    margin-bottom: 10px;
  }

  .benefits-card:hover {
    transform: none;
    border-color: #000;
  }

  .benefits-card::before {
    display: none;
  }
}
