/* Sources Section Styling */
.cai-sources-section,
.cai-tools-section,
.cai-materials-section {
  margin: 32px 0;
  padding: 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.cai-sources-section::before,
.cai-tools-section::before,
.cai-materials-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
}

.cai-section-title {
  margin: 0 0 16px 0;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cai-sources-list,
.cai-tools-list,
.cai-materials-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cai-source-item,
.cai-tool-item,
.cai-material-item {
  margin-bottom: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(226, 232, 240, 0.5);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.cai-source-item:hover,
.cai-tool-item:hover,
.cai-material-item:hover {
  background: rgba(255, 255, 255, 1);
  border-color: #3b82f6;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.cai-source-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  width: 100%;
}

.cai-source-link:hover {
  color: #1d4ed8;
  text-decoration: none;
}

.cai-source-icon,
.cai-tool-icon,
.cai-material-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.cai-source-text,
.cai-tool-text,
.cai-material-text {
  flex: 1;
  color: #374151;
}

/* Attribution */
.cai-attribution {
  margin-top: 24px;
  padding: 16px;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.1);
  border-radius: 12px;
}

.cai-attribution-text {
  margin: 0;
  font-size: 14px;
  color: #64748b;
  text-align: center;
  font-style: italic;
}

/* Article Sources - Simple Style */
.cai-article-sources {
  margin: 24px 0;
  padding: 20px;
  background: #f8fafc;
  border-left: 4px solid #3b82f6;
  border-radius: 0 8px 8px 0;
}

.cai-article-sources-title {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.cai-article-sources-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cai-article-source-item {
  margin-bottom: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
}

.cai-article-source-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.cai-article-source-item a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}

.cai-article-source-item a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Keywords Section */
.cai-keywords-section {
  margin: 24px 0;
  padding: 20px;
  background: #f8fafc;
  border-left: 4px solid #10b981;
  border-radius: 0 8px 8px 0;
}

.cai-keywords-title {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.cai-keywords-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cai-keyword-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #10b981;
  color: white;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.cai-keyword-tag:hover {
  background: #059669;
}

.cai-keywords-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cai-keywords-list li {
  padding: 4px 0;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
}

.cai-keywords-list li:last-child {
  border-bottom: none;
}

.cai-keywords-inline {
  margin: 16px 0;
  padding: 12px;
  background: #f1f5f9;
  border-radius: 6px;
  font-size: 14px;
  color: #475569;
}

/* Related posts */
.cai-related-section { margin: 24px 0; padding: 20px; background:#f8fafc; border-left:4px solid #0ea5e9; border-radius:0 8px 8px 0; }
.cai-related-title { margin:0 0 12px; font-size:16px; font-weight:600; color:#0f172a; }
.cai-related-list { list-style:none; margin:0; padding:0; display:flex; gap:12px; flex-direction:column; }
.cai-related-item { display:flex; align-items:center; gap:10px; }
.cai-related-thumb img { width:60px; height:60px; object-fit:cover; border-radius:6px; }
.cai-related-link { color:#0ea5e9; text-decoration:none; font-weight:500; }
.cai-related-link:hover { text-decoration:underline; color:#0369a1; }
.cai-related-archive { margin-top:10px; }
.cai-related-archive-link { color:#0f766e; text-decoration:none; font-weight:600; }
.cai-related-archive-link:hover { text-decoration:underline; color:#115e59; }

/* Responsive */
@media (max-width: 768px) {
  .cai-sources-section,
  .cai-tools-section,
  .cai-materials-section {
    margin: 24px 0;
    padding: 20px;
  }
  
  .cai-section-title {
    font-size: 18px;
  }
  
  .cai-source-item,
  .cai-tool-item,
  .cai-material-item {
    padding: 10px 12px;
  }
  
  .cai-article-sources {
    margin: 20px 0;
    padding: 16px;
  }
}
