/* ===== API-FIRST INSIGHT ENHANCED STYLING =====
   Technical architecture-themed styling with API teal/integration green/architecture blue colors
   Professional developer-focused design for API strategy content
   ================================================ */

/* API-First Theme Variables */
.api-first-insight-theme {
  --api-primary: #0891B2;
  --api-secondary: #059669;
  --api-accent: #1D4ED8;
  --api-success: #06B6D4;
  --api-text: #374151;
  --api-text-light: #6B7280;
  --gradient-api: linear-gradient(135deg, #0891B2, #06B6D4, #059669);
  --gradient-api-light: linear-gradient(135deg, rgba(8, 145, 178, 0.05), rgba(6, 182, 212, 0.05), rgba(5, 150, 105, 0.05));
  --gradient-architecture: linear-gradient(135deg, #1D4ED8, #0891B2, #059669);
  --gradient-integration: linear-gradient(135deg, #059669, #06B6D4, #0891B2);
}

/* Override base article theme with API colors */
.api-first-insight-theme.insight-article-theme {
  --insight-article-primary: #0891B2;
  --insight-article-secondary: #059669;
  --insight-article-accent: #1D4ED8;
  --gradient-article: linear-gradient(135deg, #0891B2, #06B6D4, #059669);
  --gradient-article-light: linear-gradient(135deg, rgba(8, 145, 178, 0.05), rgba(6, 182, 212, 0.05), rgba(5, 150, 105, 0.05));
}

/* Enhanced API Header */
.api-first-insight-theme .insight-header {
  background: var(--gradient-api);
  position: relative;
  overflow: hidden;
}

.api-first-insight-theme .insight-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(29, 78, 216, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(5, 150, 105, 0.15) 0%, transparent 50%);
  animation: apiFlow 25s ease-in-out infinite;
}

@keyframes apiFlow {
  0%, 100% { 
    transform: translate(0, 0) scale(1) rotate(0deg); 
    opacity: 0.8;
  }
  25% { 
    transform: translate(30px, -20px) scale(1.05) rotate(2deg); 
    opacity: 0.9;
  }
  50% { 
    transform: translate(-20px, 30px) scale(0.95) rotate(-1deg); 
    opacity: 0.7;
  }
  75% { 
    transform: translate(25px, 15px) scale(1.02) rotate(1deg); 
    opacity: 0.85;
  }
}

/* API Integration Icon */
.api-first-insight-theme .insight-category::before {
  content: '🔗';
  margin-right: 0.5rem;
}

/* Enhanced Statistics with API Theme */
.api-first-insight-theme .stats-highlight {
  background: var(--gradient-api-light);
  border: 1px solid rgba(8, 145, 178, 0.15);
  position: relative;
}

.api-first-insight-theme .stats-highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-api);
}

.api-first-insight-theme .stat-item {
  background: white;
  border: 1px solid rgba(8, 145, 178, 0.1);
  position: relative;
  overflow: hidden;
}

.api-first-insight-theme .stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-api);
}

.api-first-insight-theme .stat-item:hover {
  border-color: rgba(8, 145, 178, 0.2);
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.1);
}

.api-first-insight-theme .stat-number {
  background: var(--gradient-api);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Architecture Diagrams Section */
.api-first-insight-theme .architecture-diagrams {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.api-first-insight-theme .architecture-item {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(8, 145, 178, 0.1);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.api-first-insight-theme .architecture-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-architecture);
}

.api-first-insight-theme .architecture-item::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--gradient-api-light);
  transform: rotate(45deg);
  transition: opacity 0.4s ease;
  opacity: 0;
  z-index: -1;
}

.api-first-insight-theme .architecture-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.15);
  border-color: rgba(8, 145, 178, 0.2);
}

.api-first-insight-theme .architecture-item:hover::after {
  opacity: 1;
}

.api-first-insight-theme .architecture-item h4 {
  color: var(--api-primary);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.api-first-insight-theme .architecture-item:nth-child(1) h4::before { content: '🏗️'; }
.api-first-insight-theme .architecture-item:nth-child(2) h4::before { content: '⚡'; }
.api-first-insight-theme .architecture-item:nth-child(3) h4::before { content: '🎯'; }
.api-first-insight-theme .architecture-item:nth-child(4) h4::before { content: '🔄'; }

.api-first-insight-theme .architecture-item p {
  color: var(--api-text);
  line-height: 1.6;
  margin: 0;
}

/* Technology Spotlight Enhancement */
.api-first-insight-theme .technology-spotlight {
  background: var(--gradient-api-light);
  border: 1px solid rgba(8, 145, 178, 0.15);
  position: relative;
}

.api-first-insight-theme .technology-spotlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-api);
}

.api-first-insight-theme .technology-spotlight h3::before {
  content: '📡 ';
}

/* API Best Practices Section */
.api-first-insight-theme .best-practices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.api-first-insight-theme .practice-item {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(8, 145, 178, 0.1);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.05);
  transition: all 0.3s ease;
  border-left: 4px solid var(--api-secondary);
}

.api-first-insight-theme .practice-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.12);
  border-left-color: var(--api-primary);
}

.api-first-insight-theme .practice-item h4 {
  color: var(--api-primary);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.api-first-insight-theme .practice-item:nth-child(1) h4::before { content: '✅'; }
.api-first-insight-theme .practice-item:nth-child(2) h4::before { content: '🔒'; }
.api-first-insight-theme .practice-item:nth-child(3) h4::before { content: '📈'; }
.api-first-insight-theme .practice-item:nth-child(4) h4::before { content: '🔍'; }

.api-first-insight-theme .practice-item p {
  color: var(--api-text);
  line-height: 1.6;
  margin: 0;
}

.api-first-insight-theme .practice-item strong {
  color: var(--api-secondary);
  font-weight: 700;
}

/* Integration Timeline Section */
.api-first-insight-theme .integration-timeline {
  position: relative;
  margin: 3rem 0;
  padding: 2rem 0;
}

.api-first-insight-theme .timeline-container {
  position: relative;
  padding-left: 3rem;
}

.api-first-insight-theme .timeline-container::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient-api);
}

.api-first-insight-theme .timeline-item {
  position: relative;
  margin-bottom: 2rem;
  background: white;
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(8, 145, 178, 0.1);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.05);
  transition: all 0.3s ease;
}

.api-first-insight-theme .timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 1.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--api-primary);
  border: 3px solid white;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.2);
}

.api-first-insight-theme .timeline-item:hover {
  transform: translateX(8px);
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.12);
  border-color: rgba(8, 145, 178, 0.2);
}

.api-first-insight-theme .timeline-item h4 {
  color: var(--api-primary);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.api-first-insight-theme .timeline-item .timeline-phase {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: var(--gradient-api);
  color: white;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.api-first-insight-theme .timeline-item p {
  color: var(--api-text);
  line-height: 1.6;
  margin: 0;
}

/* Code Examples Enhancement */
.api-first-insight-theme .code-example {
  background: #1e293b;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
  border: 1px solid rgba(8, 145, 178, 0.2);
  position: relative;
  overflow: hidden;
}

.api-first-insight-theme .code-example::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-api);
}

.api-first-insight-theme .code-example pre {
  color: #e2e8f0;
  font-family: 'DM Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
  overflow-x: auto;
}

.api-first-insight-theme .code-example .code-label {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  background: var(--api-primary);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* ROI Metrics Section */
.api-first-insight-theme .roi-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
  padding: 2rem;
  background: var(--gradient-api-light);
  border-radius: 20px;
  border: 1px solid rgba(8, 145, 178, 0.1);
}

.api-first-insight-theme .roi-item {
  text-align: center;
  background: white;
  padding: 2rem 1rem;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.05);
  transition: all 0.3s ease;
}

.api-first-insight-theme .roi-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.1);
}

.api-first-insight-theme .roi-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-api);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}

.api-first-insight-theme .roi-label {
  color: var(--api-text-light);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Implementation Steps Section */
.api-first-insight-theme .implementation-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 3rem 0;
}

.api-first-insight-theme .step-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(8, 145, 178, 0.1);
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.05);
  transition: all 0.3s ease;
}

.api-first-insight-theme .step-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(8, 145, 178, 0.1);
  border-color: rgba(8, 145, 178, 0.2);
}

.api-first-insight-theme .step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-api);
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.api-first-insight-theme .step-content {
  flex: 1;
}

.api-first-insight-theme .step-content h4 {
  color: var(--api-primary);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.api-first-insight-theme .step-content p {
  color: var(--api-text);
  line-height: 1.6;
  margin: 0;
  font-size: 0.875rem;
}

/* Enhanced CTA with API Theme */
.api-first-insight-theme .insight-cta {
  background: var(--color-primary);
}

.api-first-insight-theme .insight-cta::before {
  background: 
    linear-gradient(135deg, var(--color-primary) 0%, rgba(107, 33, 168, 0.9) 50%, var(--color-secondary) 100%),
    radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

/* Enhanced API-First Technical Footer - Dark Theme */
.api-first-insight-theme .footer {
  background: linear-gradient(135deg, #0A0F14 0%, #0F1924 30%, #0A2028 70%, #051828 100%);
  color: white;
  padding: 4rem 0 2rem;
  position: relative;
  overflow: hidden;
}

.api-first-insight-theme .footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(135deg, rgba(8, 145, 178, 0.06) 0%, rgba(6, 182, 212, 0.04) 50%, rgba(29, 78, 216, 0.02) 100%),
    radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(8, 145, 178, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

/* Decorative API pattern overlay */
.api-first-insight-theme .footer::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-api);
  opacity: 0.8;
}

/* Footer Grid Enhancement */
.api-first-insight-theme .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
  position: relative;
  z-index: 2;
}

/* Footer Title with API Accent */
.api-first-insight-theme .footer-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #0891B2, #06B6D4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.api-first-insight-theme .footer-title::before {
  content: '📡';
  -webkit-text-fill-color: initial;
  filter: saturate(1.3) brightness(1.1);
}

/* Footer Description */
.api-first-insight-theme .footer-description {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
  font-size: 1rem;
}

/* Contact Information Styling */
.api-first-insight-theme .footer-contact {
  font-style: normal;
}

.api-first-insight-theme .footer-contact p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.api-first-insight-theme .contact-mono {
  font-family: var(--font-mono);
  color: #0891B2;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Footer Bottom Section */
.api-first-insight-theme .footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(8, 145, 178, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.api-first-insight-theme .footer-bottom p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  font-size: 0.875rem;
}

/* API-First Innovation Tagline */
.api-first-insight-theme .footer-bottom::after {
  content: 'Connecting Systems, Enabling Growth 📡';
  font-size: 0.875rem;
  background: linear-gradient(135deg, #06B6D4, #059669, #1D4ED8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  display: inline-block;
}

/* Footer Responsive Design */
@media (max-width: 768px) {
  .api-first-insight-theme .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .api-first-insight-theme .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .api-first-insight-theme .architecture-diagrams,
  .api-first-insight-theme .best-practices,
  .api-first-insight-theme .implementation-steps {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .api-first-insight-theme .roi-metrics {
    grid-template-columns: repeat(2, 1fr);
    padding: 1.5rem;
  }
  
  .api-first-insight-theme .timeline-container {
    padding-left: 2rem;
  }
  
  .api-first-insight-theme .timeline-item {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .api-first-insight-theme .roi-metrics {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  
  .api-first-insight-theme .code-example {
    padding: 1rem;
  }
  
  .api-first-insight-theme .timeline-container::before {
    left: 0.5rem;
  }
  
  .api-first-insight-theme .timeline-item::before {
    left: -1.5rem;
  }
}