/* Blog Article Styles - Modern CSS with smooth scrolling */

/* Base styles with smooth scrolling */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.75;
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px;
  color: #374351;
  background-color: #ffffff;
  transition: all 0.3s ease;
}

/* Prose styles matching Tailwind's prose class */
.prose {
  color: #374151;
  max-width: none;
}

/* Typography matching the application */
h1 {
  color: #1f2937; /* text-gray-800 */
  font-weight: 700;
  line-height: 1.25;
  transition: color 0.2s ease;
}

h2 {
  color: #7C3AED;
  font-weight: 700;
  line-height: 1.25;
  transition: color 0.2s ease;
}

h3, h4, h5, h6 {
  color: #111827;
  font-weight: 700;
  line-height: 1.25;
  transition: color 0.2s ease;
}

h1 {
  font-size: 1.875rem; /* text-3xl */
  margin-top: 0;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.875rem;
  margin-top: 5rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1.5rem 0.75rem 1rem;
  border-left: 4px solid #8B5CF6;
  background: linear-gradient(to right, #EDE9FE, transparent);
  font-weight: 600;
  border-radius: 0 0.375rem 0.375rem 0;
  transition: all 0.3s ease;
}

h2:hover {
  background: linear-gradient(to right, #EDE9FEee, transparent);
  transform: translateX(4px);
}

h3 {
  font-size: 1.5rem;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.25rem;
}

/* Links with smooth transitions */
a {
  color: #7C3AED;
  text-decoration: underline;
  transition: all 0.2s ease;
}

a:hover {
  color: #8B5CF6;
  text-decoration-thickness: 2px;
}

/* Lists */
ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.625rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Text formatting */
strong {
  color: #374151;
  font-weight: 600;
}

/* Code */
code {
  background-color: #f3f4f6;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875em;
}

pre {
  background-color: #f3f4f6;
  padding: 1rem;
  border-radius: 0.375rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

/* Block quotes */
blockquote {
  border-left: 4px solid #d1d5db;
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #6b7280;
}

/* Images with modern styling */
img {
  max-width: 100%;
  height: auto;
  border-radius: 0.375rem;
  margin: 1.5rem 0;
  transition: transform 0.2s ease;
}

img:hover {
  transform: scale(1.02);
}

/* Blog content images with improved styling */
.blog-image-container {
  margin: 2rem 0;
  text-align: center;
}

.blog-content-image {
  display: inline-block;
  max-width: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: all 0.3s ease;
}

.blog-content-image:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.blog-content-image img {
  margin: 0;
  display: block;
  width: 100%;
  height: auto;
}

/* Hero Image */
.hero-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: #f3f4f6;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  border-radius: 0.375rem;
  overflow: hidden;
}

th, td {
  border: 1px solid #e5e7eb;
  padding: 0.75rem;
  text-align: left;
}

th {
  background-color: #f9fafb;
  font-weight: 700;
  color: #111827;
}

/* Table of Contents with improved styling */
.table-of-contents {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 1.5rem auto;
  width: 80%;
  position: static;
}

.table-of-contents h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #7C3AED;
  font-size: 1.125rem;
  font-weight: 700;
  text-align: left;
  border-bottom: 2px solid #EDE9FE;
  padding-bottom: 0.5rem;
}

.table-of-contents ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  counter-reset: toc-counter;
}

.table-of-contents li {
  list-style: none;
  margin-bottom: 0.375rem;
}

.table-of-contents a {
  display: block;
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  color: #6b7280;
  text-decoration: none;
  border-left: 4px solid transparent;
  border-radius: 0.25rem;
  position: relative;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Counter removed for simpler design */

.table-of-contents a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #6b7280;
  transition: all 0.2s ease;
}

.table-of-contents a:hover {
  color: #7C3AED;
  background-color: #EDE9FE22;
  border-left-color: #7C3AED;
  padding-left: calc(1.5rem - 4px);
  transform: translateX(4px);
}

.table-of-contents a:hover::before {
  background: #7C3AED;
  width: 6px;
  height: 6px;
  left: 0.125rem;
}

/* Active state for current section */
.table-of-contents a.active {
  color: #1f2937;
  background-color: #e5e7eb;
  border-left: 3px solid #4b5563;
  padding-left: calc(1rem - 3px);
}


/* Print styles */
@media print {
  .table-of-contents {
    box-shadow: none;
    background: #EDE9FE;
  }
  
  h2:hover {
    transform: none;
  }
  
  img:hover {
    transform: none;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  body {
    padding: 16px 12px;
  }  
  h1 {
    font-size: 1.875rem;
  }
  
  h2 {
    font-size: 1.5rem;
    margin-top: 3rem;
  }
  
  .table-of-contents {
    margin-top: 1.5rem;
    padding: 1rem;
  }
}
/* Scroll to top button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, #7C3AED, #8B5CF6);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  z-index: 999;
}

.scroll-to-top.visible {
  opacity: 1;
}

.scroll-to-top:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Focus styles for accessibility */
a:focus {
  outline: 2px solid #7C3AED;
  outline-offset: 2px;
}

/* Improved selection styling */
::selection {
  background-color: #7C3AED33;
  color: #1e293b;
}
