/* Article Page Styles */
.article-page {
  padding: 3rem 0;
  background-color: var(--background);
}

.article-container {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 2rem;
}

/* Article Content Styles */
.article-content {
  background-color: var(--background);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.article-header {
  margin-bottom: 2rem;
}

.article-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height:1.3em;
}

.article-meta {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.article-category {
  color: var(--primary);
  font-weight: 500;
}

.article-separator {
  margin: 0 0.5rem;
}

.article-date {
  color: var(--text-secondary);
}

.article-toc {
  background-color: var(--background-alt);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
}

.article-toc h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.article-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-toc li {
  margin-bottom: 0.5rem;
}

.article-toc a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.article-toc a:hover {
  color: var(--primary);
}

.lead {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.article-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 2.5rem 0 1.2rem;
  color: var(--text-primary);
}

.article-content h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.article-content ul, 
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  list-style: square outside none;
}

.article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.article-content ul li::marker {
  color: #e85e05;
}

.article-content li strong {
  margin-bottom: 1px !important;
  display: inline-block;
}

.article-image {
  margin: 2rem 0;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: auto;
  display: block;
}

.article-image figcaption {
  padding: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  background-color: var(--background-alt);
  text-align: center;
  display: block;
  width: 100%;
}

.info-box, 
.warning-box {
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin: 2rem 0;
}

.info-box {
  background-color: rgba(0, 122, 255, 0.1);
  border-left: 4px solid rgba(0, 122, 255, 0.8);
}

.warning-box {
  background-color: rgba(255, 59, 48, 0.1);
  border-left: 4px solid rgba(255, 59, 48, 0.8);
}

.info-box h4, 
.warning-box h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.info-box p, 
.warning-box p {
  margin-bottom: 0;
}

.data-table {
  overflow-x: auto;
  margin: 2rem 0;
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th, 
.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background-color: var(--background-alt);
  font-weight: 600;
}

.data-table tr:hover {
  background-color: var(--background-alt);
}

.references {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.references h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.references ol {
  padding-left: 1.5rem;
}

.references li {
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Sidebar Styles */
.article-sidebar {
  /*position: sticky;*/
  top: 4rem;
  align-self: start;
}

.sidebar-section {
  background-color: var(--background);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.related-articles ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-articles li {
  margin-bottom: 0.75rem;
}

.related-articles a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

.related-articles a:hover {
  color: var(--primary);
}

.related-articles li:last-child a {
  border-bottom: none;
}

.stats-box {
  background-color: var(--primary);
}

.sidebar-stat {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-stat:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white-text);
}

.cta-box {
  background-color: var(--primary);
  color: white;
  text-align: center;
}

.cta-box h3 {
  color: white;
}

.cta-box p {
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.cta-box .btn {
  background-color: white;
  color: var(--primary);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  display: inline-block;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s;
}

.cta-box .btn:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

/* Responsive Styles */
@media (max-width: 992px) {
  .article-container {
    grid-template-columns: 1fr;
  }
  
  .article-sidebar {
    position: static;
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .article-header h1 {
    font-size: 2rem;
  }
  
  .article-content h2 {
    font-size: 1.6rem;
  }
  
  .article-content h3 {
    font-size: 1.3rem;
  }
  
  .lead {
    font-size: 1.1rem;
  }
  
  .data-table {
    margin: 1.5rem -1rem;
    width: calc(100% + 2rem);
  }
}