/* Non-critical CSS - loaded asynchronously */

/* Enhanced animations and interactions */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(10px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Progressive enhancement styles */
.enhanced .nav-link {
  position: relative;
}

.enhanced .nav-link:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -3px;
  left: 0;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

.enhanced .nav-link:hover:after {
  width: 100%;
}

.enhanced .article-card {
  transition: all 0.3s ease;
}

.enhanced .article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.enhanced .featured-article {
  transition: all 0.3s ease;
}

.enhanced .featured-article:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* Enhanced button styles */
.enhanced .btn-primary {
  position: relative;
  overflow: hidden;
}

.enhanced .btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.enhanced .btn-primary:hover::before {
  left: 100%;
}

/* Focus styles for accessibility */
.enhanced a:focus,
.enhanced button:focus,
.enhanced input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Loading states */
.skeleton {
  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;
  }
}

/* Print styles */
@media print {
  header,
  footer,
  .newsletter,
  nav {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .featured-article,
  .article-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}


/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .btn-primary {
    border: 2px solid;
  }
  
  .article-card,
  .featured-article {
    border: 2px solid var(--chocolate);
  }
}