/**
 * Common CSS Extensions - Reusable Components
 * Part of Survivable Hybrid Cloud research project
 * 
 * Add this to your existing common.css or import it separately
 */

/* ============================================================================
   Analysis Cards - For multi-step frameworks
   ============================================================================ */

.analysis-card {
  background: white;
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  border-top: 4px solid var(--step-color);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.analysis-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--step-color);
  opacity: 0.8;
}

.analysis-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--step-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.step-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.step-description {
  color: #6b7280;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  font-style: italic;
}

.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.step-list li {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: #4b5563;
  line-height: 1.6;
  position: relative;
  font-size: 0.9375rem;
}

.step-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--step-color);
  font-weight: bold;
  font-size: 1rem;
}

/* ============================================================================
   Source Cards - For data sources and monitoring tools
   ============================================================================ */

.methodology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.source-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  transition: all 0.2s;
}

.source-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.source-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.source-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.source-name {
  font-weight: 600;
  color: #1f2937;
  font-size: 1.125rem;
}

.source-url {
  color: #3b82f6;
  font-size: 0.875rem;
  word-break: break-all;
  display: block;
  margin-bottom: 0.75rem;
  text-decoration: none;
}

.source-url:hover {
  text-decoration: underline;
}

.source-focus {
  display: inline-block;
  background: #eff6ff;
  color: #1e40af;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.source-description {
  color: #6b7280;
  line-height: 1.6;
  font-size: 0.9375rem;
}

/* ============================================================================
   Category Headers
   ============================================================================ */

.category-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  margin: 2rem 0 1.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
}

/* ============================================================================
   Info Boxes
   ============================================================================ */

.intro-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 6px solid #f59e0b;
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

.intro-box h2 {
  color: #92400e;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.intro-box p {
  color: #78350f;
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.intro-box p:last-child {
  margin-bottom: 0;
}

/* ============================================================================
   Finding Cards - For research insights
   ============================================================================ */

.finding-card {
  background: white;
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  transition: all 0.3s;
}

.finding-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12) !important;
}

/* ============================================================================
   Icon Badges
   ============================================================================ */

.icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  color: white;
}

.icon-badge-lg {
  width: 64px;
  height: 64px;
  font-size: 2rem;
}

/* ============================================================================
   Responsive Utilities
   ============================================================================ */

.responsive-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.responsive-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.responsive-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.centered-intro {
  max-width: 900px;
  margin: 0 auto 2rem auto;
  text-align: center;
  color: #6b7280;
  font-size: 1.0625rem;
}

/* ============================================================================
   Mobile Responsive Adjustments
   ============================================================================ */

@media (max-width: 768px) {
  .analysis-card {
    padding: 1.5rem;
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .step-title {
    font-size: 1.125rem;
  }

  .finding-card {
    padding: 1.5rem;
  }

  .methodology-grid {
    grid-template-columns: 1fr;
  }

  .source-card {
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  .category-header {
    font-size: 1.125rem;
    padding: 0.875rem 1.25rem;
  }

  .intro-box {
    padding: 1.25rem;
  }

  .step-list li {
    font-size: 0.875rem;
  }
}
