/* Blog Article Styles - KitVia */

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-color), #7c3aed);
  z-index: 9999;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(22, 163, 74, 0.5);
}

/* Reading Time Indicator */
.reading-time-indicator {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  background: var(--bg-elevated);
  border: 2px solid var(--accent-color);
  padding: 0.75rem 1.25rem;
  border-radius: 2rem;
  font-size: 0.9rem;
  color: var(--text-color);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
}
.reading-time-indicator.show {
  opacity: 1;
  transform: translateY(0);
}
.reading-time-indicator::before {
  content: '📖';
  font-size: 1.1rem;
}

/* Container */
.article-container { 
  max-width: 850px; 
  margin: 0 auto; 
  padding: 2rem 1.5rem; 
}

/* Breadcrumb */
.breadcrumb { 
  margin-bottom: 2rem; 
  font-size: 0.9rem; 
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.breadcrumb a { 
  color: var(--accent-color); 
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover { 
  color: #18a558;
  text-decoration: underline;
}
.breadcrumb span {
  color: var(--text-muted);
}

/* Article Header */
.article-header { 
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 2rem;
}
.article-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-color), transparent);
  border-radius: 2px;
}

.article-title { 
  font-size: 2.75rem; 
  line-height: 1.2; 
  margin-bottom: 1.5rem; 
  background: linear-gradient(135deg, var(--accent-color), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.article-meta { 
  color: var(--text-muted); 
  font-size: 0.95rem; 
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.article-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.article-meta-item::before {
  font-size: 1.1rem;
}

/* Article Content */
.article-content { 
  line-height: 1.9; 
  font-size: 1.1rem;
  color: var(--text-muted);
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-content > p:first-of-type {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--text-color);
  margin-bottom: 2rem;
  font-weight: 500;
}

.article-content h2 { 
  color: var(--text-color);
  margin: 3rem 0 1.5rem; 
  font-size: 2rem;
  font-weight: 700;
  position: relative;
  padding-left: 1.5rem;
}
.article-content h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 5px;
  height: 2rem;
  background: linear-gradient(180deg, var(--accent-color), #7c3aed);
  border-radius: 3px;
}

.article-content h3 { 
  color: var(--text-color);
  margin: 2.5rem 0 1rem; 
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.article-content h3::before {
  content: '▸';
  color: var(--accent-color);
  font-size: 1.25rem;
}

.article-content p { 
  margin-bottom: 1.5rem;
}

.article-content ul, 
.article-content ol { 
  margin: 1.25rem 0 2rem 0;
  padding-left: 2rem;
}
.article-content li { 
  margin-bottom: 1rem;
  position: relative;
  padding-left: 0.5rem;
}
.article-content li::marker {
  color: var(--accent-color);
  font-weight: 700;
}

.article-content strong { 
  color: var(--text-color);
  font-weight: 700;
}

.article-content a {
  color: var(--accent-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
  font-weight: 600;
}
.article-content a:hover {
  border-bottom-color: var(--accent-color);
}

.article-content code { 
  background: rgba(22, 163, 74, 0.15);
  padding: 0.3rem 0.6rem;
  border-radius: 0.4rem;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.95em;
  color: var(--accent-color);
  border: 1px solid rgba(22, 163, 74, 0.3);
}

.article-content pre {
  background: var(--bg-elevated);
  padding: 1.5rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.article-content pre code {
  background: none;
  padding: 0;
  border: none;
  color: var(--text-color);
}

/* Highlight Boxes */
.highlight-box { 
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.1), rgba(22, 163, 74, 0.05));
  border-left: 4px solid var(--accent-color);
  padding: 2rem;
  border-radius: 0.75rem;
  margin: 2.5rem 0;
  position: relative;
  overflow: hidden;
}
.highlight-box::before {
  content: '💡';
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
  font-size: 2.5rem;
  opacity: 0.3;
}
.highlight-box p:last-child {
  margin-bottom: 0;
}

.warning-box {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.1), rgba(234, 179, 8, 0.05));
  border-left: 4px solid #eab308;
  padding: 2rem;
  border-radius: 0.75rem;
  margin: 2.5rem 0;
}
.warning-box::before {
  content: '⚠️';
  margin-right: 0.75rem;
  font-size: 1.5rem;
}

.success-box {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
  border-left: 4px solid #22c55e;
  padding: 2rem;
  border-radius: 0.75rem;
  margin: 2.5rem 0;
}
.success-box::before {
  content: '✓';
  margin-right: 0.75rem;
  font-size: 1.5rem;
  color: #22c55e;
}

/* Formula Box */
.formula-box {
  background: var(--bg-elevated);
  padding: 2rem;
  border-radius: 0.75rem;
  margin: 2.5rem 0;
  border: 2px solid rgba(124, 58, 237, 0.3);
  text-align: center;
}
.formula-box h4 {
  color: var(--text-color);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
.formula-box .formula {
  font-size: 1.5rem;
  color: var(--accent-color);
  font-weight: 700;
  font-family: 'Georgia', serif;
  margin: 1rem 0;
}

/* Example Box */
.example-box {
  background: rgba(124, 58, 237, 0.05);
  padding: 2rem;
  border-radius: 0.75rem;
  margin: 2.5rem 0;
  border: 1px solid rgba(124, 58, 237, 0.2);
}
.example-box h4 {
  color: #a855f7;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.example-box h4::before {
  content: '📋';
  font-size: 1.25rem;
}

/* CTA Box */
.cta-box { 
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.9), rgba(124, 58, 237, 0.9));
  padding: 3rem 2rem;
  border-radius: 1.25rem;
  text-align: center;
  margin: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent);
  border-radius: 50%;
}
.cta-box h3 { 
  color: white;
  margin-bottom: 1rem;
  font-size: 2rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}
.cta-box p {
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 2rem;
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}
.cta-box a { 
  color: white;
  background: rgba(255, 255, 255, 0.2);
  padding: 1rem 2.5rem;
  border-radius: 0.75rem;
  text-decoration: none;
  display: inline-block;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}
.cta-box a:hover { 
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-color: white;
}

/* Table of Contents */
.table-of-contents {
  background: var(--bg-elevated);
  padding: 2rem;
  border-radius: 1rem;
  margin: 2.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.table-of-contents h3 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}
.table-of-contents ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.table-of-contents li {
  margin-bottom: 0.75rem;
}
.table-of-contents a {
  color: var(--text-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
}
.table-of-contents a::before {
  content: '→';
  color: var(--accent-color);
}
.table-of-contents a:hover {
  background: rgba(22, 163, 74, 0.1);
  transform: translateX(4px);
}

/* Related Articles */
.related-articles {
  margin: 4rem 0;
  padding: 2rem;
  background: var(--bg-elevated);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.related-articles h3 {
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}
.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}
.related-article-card {
  background: rgba(22, 163, 74, 0.05);
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(22, 163, 74, 0.2);
  transition: all 0.3s;
  text-decoration: none;
  display: block;
}
.related-article-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-color);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
.related-article-card h4 {
  color: var(--text-color);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}
.related-article-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .article-container {
    padding: 1.5rem 1rem;
  }
  .article-title {
    font-size: 2rem;
  }
  .article-content {
    font-size: 1rem;
  }
  .article-content h2 {
    font-size: 1.5rem;
    padding-left: 1rem;
  }
  .article-content h2::before {
    height: 1.5rem;
  }
  .article-content h3 {
    font-size: 1.25rem;
  }
  .article-content > p:first-of-type {
    font-size: 1.1rem;
  }
  .cta-box {
    padding: 2rem 1.5rem;
  }
  .cta-box h3 {
    font-size: 1.5rem;
  }
  .highlight-box,
  .formula-box,
  .example-box {
    padding: 1.5rem;
  }
}

/* Print Styles */
@media print {
  .breadcrumb,
  .cta-box,
  .related-articles {
    display: none;
  }
  .article-content {
    color: #000;
  }
}
