/* Reading experience enhancements */

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1000;
  background: transparent;
}

.reading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  width: 0%;
  transition: width 0.1s ease;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

/* Bookmark button */
.bookmark-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
  color: #f59e0b;
  padding: 4px;
}

.ww-post-card:hover .bookmark-btn,
.ww-pillcard:hover .bookmark-btn {
  opacity: 1;
}

.bookmark-btn:hover {
  transform: scale(1.2);
}

/* Reading time */
.reading-time {
  display: inline-block;
  font-size: 0.75rem;
  color: #78716c;
  font-weight: 400;
  margin-left: 8px;
  background: #f5f5f4;
  padding: 2px 8px;
  border-radius: 999px;
}

/* Article card hover effects */
.ww-post-card,
.ww-pillcard {
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ww-post-card:hover,
.ww-pillcard:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .reading-progress,
  .back-to-top,
  .bookmark-btn {
    display: none !important;
  }
}
