/* SEO and Performance Optimizations */

/* Improve font loading performance */
/* Note: font-display: swap should be applied to actual font-face declarations with src and font-family */

/* Optimize images for better loading - these are handled via HTML attributes, not CSS */
img {
  max-width: 100%;
  height: auto;
}

/* Improve Core Web Vitals - reduce layout shift */
.article-image-placeholder {
  aspect-ratio: 16/9;
  background: linear-gradient(45deg, #f3f4f6, #e5e7eb);
}

/* Optimize breadcrumb navigation for SEO */
.breadcrumb-nav {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

/* Improve accessibility and SEO for skip links */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #000;
  color: #fff;
  padding: 8px;
  text-decoration: none;
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}

/* Optimize social sharing buttons */
.social-share-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Improve mobile performance */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 1rem;
  }
  
  .article-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Optimize for print media */
@media print {
  .social-share-buttons,
  .mobile-menu-button,
  .breadcrumb-nav {
    display: none;
  }
  
  .article-content {
    font-size: 12pt;
    line-height: 1.4;
  }
}

/* Improve focus indicators for accessibility */
a:focus,
button:focus {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

/* Optimize structured data visibility */
.structured-data {
  display: none;
}

/* Improve loading states */
.loading-placeholder {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Optimize category badges */
.category-badge {
  display: inline-block;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1rem;
}

/* Improve article meta information display */
.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: #6b7280;
}

.article-meta svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* Optimize tag display */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-item {
  background: #f3f4f6;
  color: #374151;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tag-item:hover {
  background: #dc2626;
  color: white;
}
