/* ====================
   API GUIDE ARTICLE STYLES
   ==================== */

/* Hero Section Customization */
.api-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.api-hero .hero-text h1 {
  color: white;
}

.api-hero .article-meta,
.api-hero .breadcrumb,
.api-hero .breadcrumb a {
  color: #94a3b8;
}

.api-hero .article-category {
  background: #3b82f6;
}

/* Analogy Card */
.api-analogy-card {
  display: flex;
  gap: 2rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 1rem;
  padding: 2rem;
  margin: 2rem 0;
  border-left: 4px solid #3b82f6;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.analogy-icon {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  background: #3b82f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
}

.analogy-text h4 {
  color: #0f172a;
  margin-bottom: 1rem;
}

.analogy-text ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.analogy-text li {
  margin-bottom: 0.5rem;
  color: #334155;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-item {
  background: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.feature-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  border-color: #3b82f6;
}

.feature-item i {
  font-size: 2rem;
  color: #3b82f6;
  margin-bottom: 1rem;
  display: block;
}

/* Warning Tip */
.expert-tip.warning-tip {
  background: #fef9e7;
  border-left-color: #f59e0b;
}

/* Key Use Cases */
.key-use-cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.use-case-card {
  background: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.use-case-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  border-color: #3b82f6;
}

.use-case-card i {
  font-size: 2.5rem;
  color: #3b82f6;
  margin-bottom: 1rem;
}

.use-case-card h4 {
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.use-case-card p {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
}

/* Small CTA */
.small-cta {
  background: #f1f5f9;
  text-align: center;
  padding: 1rem;
  margin-top: 1rem;
}

.small-cta p {
  margin: 0;
}

.small-cta a {
  font-weight: 600;
}

/* Workflow Diagram */
.workflow-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  background: #f8fafc;
  padding: 2rem;
  border-radius: 1rem;
  margin: 2rem 0;
}

.workflow-step {
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 2rem;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-weight: 500;
  text-align: center;
  width: 100%;
  max-width: 400px;
}

.workflow-diagram i {
  color: #3b82f6;
  font-size: 1.25rem;
}

/* Timeline Vertical */
.timeline-vertical {
  position: relative;
  padding-left: 2rem;
  margin: 2rem 0;
}

.timeline-vertical::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, #3b82f6, #60a5fa, #93c5fd);
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 1.5rem;
}

.timeline-year {
  font-weight: 700;
  color: #3b82f6;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.timeline-content {
  background: white;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
}

.timeline-cons {
  color: #ef4444;
  font-size: 0.85rem;
  display: block;
  margin-top: 0.5rem;
}

.timeline-pros {
  color: #10b981;
  font-size: 0.85rem;
  display: block;
  margin-top: 0.5rem;
}

/* API Types Grid */
.api-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.api-type-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 1.5rem;
  border-radius: 0.75rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
}

.api-type-card:hover {
  transform: translateY(-3px);
  border-color: #3b82f6;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.api-type-card i {
  font-size: 2rem;
  color: #3b82f6;
  margin-bottom: 1rem;
  display: block;
}

.api-type-card strong {
  display: block;
  margin-bottom: 0.5rem;
  color: #0f172a;
}

/* Code Sample */
.code-sample {
  background: #1e293b;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 2rem 0;
  overflow-x: auto;
}

.code-sample h4 {
  color: #94a3b8;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.code-sample pre {
  margin: 0;
  color: #e2e8f0;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  overflow-x: auto;
}

.code-sample code {
  font-family: 'Courier New', monospace;
}

/* Security Grid */
.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.security-grid > div {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 0.5rem;
  border-left: 3px solid #3b82f6;
}

.security-grid strong {
  display: block;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

/* Advantages List */
.advantages-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.advantages-list li {
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: white;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.advantages-list li:hover {
  transform: translateX(5px);
  border-color: #3b82f6;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.advantages-list i {
  font-size: 1.5rem;
  color: #3b82f6;
  width: 2rem;
  text-align: center;
}

.advantages-list strong {
  color: #0f172a;
}

/* Alternatives Table */
.alternatives-table {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 2rem 0;
}

.alt-item {
  background: white;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.alt-item strong {
  color: #0f172a;
}

.alt-cons {
  color: #ef4444;
  font-size: 0.85rem;
}

.verdict {
  background: #f0fdf4;
  padding: 1rem;
  border-radius: 0.5rem;
  border-left: 4px solid #10b981;
  margin-top: 1rem;
}

/* Professionals Insight */
.professionals-insight {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  padding: 2rem;
  border-radius: 1rem;
  margin: 2rem 0;
}

.professionals-insight h3 {
  color: white;
  margin-bottom: 1rem;
}

.professionals-insight ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.professionals-insight li {
  margin-bottom: 0.5rem;
}

.professionals-insight i {
  margin-right: 0.5rem;
}

/* Button Group */
.button-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.button-group .btn-primary,
.button-group .btn-secondary {
  text-decoration: none;
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.button-group .btn-primary {
  background: #3b82f6;
  color: white;
}

.button-group .btn-primary:hover {
  background: #2563eb;
  transform: translateY(-2px);
}

.button-group .btn-secondary {
  background: white;
  color: #3b82f6;
  border: 1px solid #3b82f6;
}

.button-group .btn-secondary:hover {
  background: #eff6ff;
  transform: translateY(-2px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .api-analogy-card {
    flex-direction: column;
    text-align: center;
  }

  .analogy-icon {
    margin: 0 auto;
  }

  .workflow-step {
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
  }

  .alt-item {
    flex-direction: column;
    text-align: center;
  }

  .button-group {
    flex-direction: column;
  }

  .button-group .btn-primary,
  .button-group .btn-secondary {
    text-align: center;
    width: 100%;
  }

  .advantages-list li {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .feature-grid,
  .key-use-cases,
  .api-types-grid,
  .security-grid {
    grid-template-columns: 1fr;
  }

  .timeline-vertical {
    padding-left: 1rem;
  }

  .timeline-item {
    padding-left: 1rem;
  }

  .code-sample pre {
    font-size: 0.7rem;
  }
}

/* Animation for elements on scroll */
.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger children animations */
.stagger-children > * {
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }