/* Blog Common Styles - Shared across all blog pages */

/* Fade In Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fadeIn {
  animation: fadeIn 0.8s ease-out forwards;
  opacity: 0;
}

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

/* Aggressive pull-to-refresh prevention */
html, body {
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: auto;
  touch-action: manipulation;
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Create scrollable container */
.blog-post-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
}

/* Prevent any bounce or elastic scrolling */
* {
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;
}

/* Article Typography */
article p {
  margin-bottom: 1rem;
}

article h1, article h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

article img {
  margin: 1.5rem auto;
  max-width: 100%;
}

article ul, article ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

article li {
  margin: 0.5rem 0;
}

article blockquote {
  border-left: 4px solid #71717a;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #71717a;
}

/* Additional common styles that may vary between pages */
article p b {
  font-weight: 600;
  color: #18181b;
}

/* LiteRegistry-specific styles */
article strong {
  font-weight: 600 !important;
  color: #1f2937 !important;
}

/* Mobile-specific enhancements */
@media (max-width: 768px) {
  article h1, article h2 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
  }
  
  article img {
    margin: 1rem auto;
  }
  
  article ul, article ol {
    padding-left: 1.5rem;
  }
}

/* Mobile Navigation Styles */
/* Mobile Menu */
#mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
}

#mobile-menu:not(.hidden) {
  display: block;
}

#mobile-menu .mobile-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 16rem; /* w-64 */
  height: 100%;
  background-color: white;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

#mobile-menu .mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid #e4e4e7;
}

#mobile-menu .mobile-menu-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #18181b;
}

#mobile-menu .mobile-menu-close {
  padding: 0.5rem;
  border-radius: 9999px;
  transition: background-color 0.2s ease;
}

#mobile-menu .mobile-menu-close:hover {
  background-color: #f4f4f5;
}

#mobile-menu .mobile-menu-nav {
  flex: 1;
  padding: 1.5rem;
}

#mobile-menu .mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#mobile-menu .mobile-menu-link {
  display: block;
  font-size: 1.125rem;
  font-weight: 500;
  color: #18181b;
  transition: color 0.2s ease;
}

#mobile-menu .mobile-menu-link:hover {
  color: #52525b;
}

/* Mobile Menu Button */
#mobile-menu-button {
  padding: 0.5rem;
  border-radius: 9999px;
  border: 1px solid #e4e4e7;
  background-color: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

#mobile-menu-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

#mobile-menu-button svg {
  width: 1.25rem;
  height: 1.25rem;
  color: currentColor;
}

/* Hide mobile menu on desktop */
@media (min-width: 640px) {
  #mobile-menu-button {
    display: none;
  }
}

/* Show mobile menu button on mobile */
@media (max-width: 639px) {
  #mobile-menu-button {
    display: block;
  }
}
