/* Blog Post Page CSS */
:root {
  --primary: #0057ff;
  --primary-dark: #0046cc;
  --bg: #f6f8fc;
  --card-bg: #fff;
  --font-main: 'Inter', sans-serif;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Reading Progress Bar */
#readingProgress {
  transition: opacity 0.3s ease;
}

/* Cover Image */
#coverImageContainer {
  position: relative;
  overflow: hidden;
}

#coverImage {
  transition: transform 0.3s ease;
}

#coverImage:hover {
  transform: scale(1.02);
}

/* Article Content */
.prose {
  color: var(--text-primary);
  line-height: 1.8;
}

.prose h1 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.prose h2 {
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.prose h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.prose h4 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.prose p {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 1.125rem;
  line-height: 1.8;
}

.prose strong {
  font-weight: 600;
  color: var(--text-primary);
}

.prose em {
  font-style: italic;
  color: var(--text-primary);
}

.prose a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.prose a:hover {
  border-bottom-color: var(--primary);
}

.prose ul,
.prose ol {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  line-height: 1.8;
}

.prose blockquote {
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding-left: 1rem;
  border-left: 4px solid var(--primary);
  font-style: italic;
  color: var(--text-secondary);
  background: linear-gradient(to right, rgba(0, 87, 255, 0.05), transparent);
  padding: 1rem 1.5rem;
  border-radius: 0 8px 8px 0;
}

.prose blockquote p {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 1.125rem;
  line-height: 1.7;
}

.prose code {
  background-color: rgba(0, 87, 255, 0.1);
  color: var(--primary);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.prose pre {
  background-color: #1f2937;
  color: #f3f4f6;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}

.prose pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.prose img {
  border-radius: 0.75rem;
  box-shadow: var(--shadow-md);
  margin-top: 2rem;
  margin-bottom: 2rem;
  max-width: 100%;
  height: auto;
}

.prose hr {
  border: none;
  border-top: 2px solid var(--border-color);
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
}

.prose th {
  background-color: #f9fafb;
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
}

.prose td {
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  color: var(--text-primary);
}

.prose tr:nth-child(even) {
  background-color: #f9fafb;
}

/* Category Badge */
.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, rgba(0, 87, 255, 0.1), rgba(0, 87, 255, 0.05));
  color: var(--primary);
  border: 1px solid rgba(0, 87, 255, 0.2);
  transition: all 0.2s ease;
}

.category-badge:hover {
  background: linear-gradient(135deg, rgba(0, 87, 255, 0.15), rgba(0, 87, 255, 0.08));
  transform: translateY(-1px);
}

/* Share Buttons */
.share-button {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.share-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.share-button svg {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
}

/* Loading States */
.loading-skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .prose h1 {
    font-size: 2rem;
  }

  .prose h2 {
    font-size: 1.5rem;
  }

  .prose h3 {
    font-size: 1.25rem;
  }

  .prose p {
    font-size: 1rem;
  }

  .prose li {
    font-size: 1rem;
  }

  .prose blockquote p {
    font-size: 1rem;
  }

  #coverImageContainer {
    height: 16rem;
  }
}

@media (max-width: 640px) {
  .prose h1 {
    font-size: 1.75rem;
  }

  .prose h2 {
    font-size: 1.375rem;
  }

  .prose h3 {
    font-size: 1.125rem;
  }

  .prose pre {
    padding: 0.75rem;
    font-size: 0.8rem;
  }

  .share-button {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
  }
}

/* Focus States */
.prose a:focus,
.share-button:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Print Styles */
/* Blog Post Content Structure Insurance */
.prose p {
  margin-bottom: 1.75rem !important;
  line-height: 1.8;
}

.prose h1,
.prose h2,
.prose h3 {
  margin-top: 2.5rem !important;
  margin-bottom: 1.25rem !important;
}

@media print {

  #readingProgress,
  nav,
  .share-section,
  footer {
    display: none;
  }

  .prose {
    font-size: 12pt;
    line-height: 1.6;
  }

  .prose h1 {
    font-size: 18pt;
  }

  .prose h2 {
    font-size: 16pt;
  }

  .prose h3 {
    font-size: 14pt;
  }

  .prose a {
    color: #000;
    text-decoration: underline;
  }

  .prose blockquote {
    border-left: 3px solid #000;
    background: #f5f5f5;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection Color */
::selection {
  background-color: rgba(0, 87, 255, 0.25);
  color: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}