/* AI-Friendly CSS Optimizations */

/* Semantic HTML improvements */
article, section, nav, aside, header, footer {
  display: block;
}

/* Clear heading hierarchy */
h1 { font-size: 2.5rem; margin-bottom: 1.5rem; }
h2 { font-size: 2rem; margin-bottom: 1.2rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.8rem; }

/* AI-friendly link structure */
a {
  text-decoration: none;
  color: #2980b9;
  transition: color 0.3s ease;
}

a:hover {
  color: #1a5276;
  text-decoration: underline;
}

a[href^="http"]:after {
  content: " ↗";
  font-size: 0.8em;
  opacity: 0.6;
}

/* Structured content blocks */
.article-meta {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 1rem;
}

.article-content {
  line-height: 1.7;
  font-size: 1.1rem;
}

.article-content p {
  margin-bottom: 1.2rem;
}

.article-content ul,
.article-content ol {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

/* FAQ schema styling */
.faq-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 10px;
  border-left: 4px solid #2980b9;
}

.faq-question {
  font-weight: 600;
  color: #1a5276;
  margin-bottom: 0.5rem;
}

.faq-answer {
  margin-bottom: 1.5rem;
}

/* Table of contents for long articles */
.toc {
  background: #e3f2fd;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.toc h3 {
  margin-bottom: 1rem;
  color: #1a5276;
}

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

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

.toc a {
  color: #2980b9;
  font-size: 0.95rem;
}

/* Breadcrumbs */
.breadcrumb {
  background: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.breadcrumb-item a {
  color: #6c757d;
  font-size: 0.9rem;
}

.breadcrumb-item.active {
  color: #1a5276;
  font-weight: 500;
}

/* Reading time indicator */
.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: #6c757d;
}

.reading-time:before {
  content: "⏱";
  font-size: 1rem;
}

/* Author information */
.author-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 10px;
  margin: 2rem 0;
}

.author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #2980b9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
}

.author-info h4 {
  margin-bottom: 0.3rem;
  color: #1a5276;
}

.author-info p {
  margin-bottom: 0;
  font-size: 0.9rem;
  color: #6c757d;
}

/* Related articles */
.related-articles {
  margin: 3rem 0;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 15px;
}

.related-articles h3 {
  color: #1a5276;
  margin-bottom: 1.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.related-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.related-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.related-card p {
  font-size: 0.9rem;
  color: #6c757d;
}

/* Accessibility improvements for AI */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* Print styles for AI extraction */
@media print {
  .zalo-float, .navbar, .footer, .hero-carousel {
    display: none;
  }
  
  body {
    padding-top: 0 !important;
  }
  
  .article-content {
    font-size: 12pt;
    line-height: 1.5;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #f8f9fa;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  a {
    text-decoration: underline;
  }
  
  .btn {
    border-width: 2px;
  }
}

/* AI content analysis helpers */
.keyword-density-monitor {
  /* Visual indicator for keyword density */
  border-left: 3px solid transparent;
  transition: border-color 0.3s ease;
}

.keyword-density-good {
  border-left-color: #27ae60;
}

.keyword-density-low {
  border-left-color: #f39c12;
}

.keyword-density-high {
  border-left-color: #e74c3c;
}