/* Blog CSS - Styles for blog posts and article pages */

:root {
  --headerColor: #1f2937;
  --bodyTextColor: #4b5563;
  --primary: #8445ec;
  --secondary: #6429c1;
  --secondaryLight: #7339db;
  --bodyTextColorWhite: #f3f4f6;
}

/* Core Styles */
.blog-container {
  margin: auto;
  max-width: 70em;
  width: 94%;
  padding: clamp(60px, 7vw, 100px) 0;
}

/* Blog Article Styles */
.blog-article {
  display: block;
  max-width: 49.6875em;
  width: 100%;
  margin: 0 auto;
}

.blog-article .blog-mainImage {
  position: relative;
  display: block;
  border-radius: 0.5em;
  margin-bottom: 2em;
  height: clamp(200px, 30vw, 400px);
  width: 100%;
  overflow: hidden;
}

.blog-article .blog-mainImage img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.blog-article .blog-h1 {
  margin: 1rem 0;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.3em;
  font-weight: 700;
  color: var(--headerColor);
}

.blog-article .blog-date {
  font-size: 0.875rem;
  line-height: 1.5em;
  color: var(--bodyTextColor);
  margin-bottom: 2rem;
  display: block;
}

/* Blog Content Styles */
.blog-content {
  border-top: 1px solid #e5e7eb;
  margin-top: 1.5em;
  padding-top: 2em;
}

.blog-content h1 {
  margin-bottom: 1.5rem;
  margin-top: 2.5rem;
  font-size: 2rem;
  line-height: 1.3em;
  font-weight: 700;
  color: var(--headerColor);
}

.blog-content h2 {
  margin-bottom: 1rem;
  margin-top: 2.5rem;
  font-size: 1.625rem;
  line-height: 1.4em;
  font-weight: 700;
  color: var(--headerColor);
}

.blog-content h3 {
  margin-bottom: 0.875rem;
  margin-top: 2rem;
  font-size: 1.25rem;
  line-height: 1.5em;
  font-weight: 600;
  color: var(--secondary);
}

.blog-content h4,
.blog-content h5,
.blog-content h6 {
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.5em;
  font-weight: 600;
  color: var(--headerColor);
}

.blog-content p {
  margin: 0;
  margin-bottom: 1.25rem;
  font-size: 1.125rem;
  line-height: 1.8em;
  color: var(--bodyTextColor);
}

.blog-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: inherit;
  color: var(--secondary);
  transition: color 0.2s;
}

.blog-content a:hover {
  color: var(--primary);
}

.blog-content hr {
  margin: 2.5rem 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}

.blog-content blockquote {
  background-color: #f9fafb;
  border-left: 4px solid var(--primary);
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  font-style: italic;
}

.blog-content blockquote p {
  margin-bottom: 0;
}

.blog-content ul,
.blog-content ol {
  margin: 1.25rem 0;
  padding-left: 1.75rem;
}

.blog-content ul li,
.blog-content ol li {
  margin-bottom: 0.625rem;
  font-size: 1.125rem;
  line-height: 1.7em;
  color: var(--bodyTextColor);
}

.blog-content ul li {
  list-style: disc;
}

.blog-content ol li {
  list-style: decimal;
}

.blog-content ul ul,
.blog-content ol ul {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.blog-content ul ul li {
  list-style: circle;
}

.blog-content img {
  display: block;
  border-radius: 0.5rem;
  margin: 2rem 0;
  height: auto;
  width: 100%;
}

.blog-content strong {
  font-weight: 600;
  color: var(--headerColor);
}

.blog-content code {
  font-size: 0.9em;
  background: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.blog-content pre {
  background: #1f2937;
  color: #f3f4f6;
  padding: 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.blog-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Back Link */
.blog-back-link {
  display: inline-block;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-back-link:hover {
  color: var(--secondary);
}

/* Responsive adjustments */
@media only screen and (min-width: 48rem) {
  .blog-content p,
  .blog-content ul li,
  .blog-content ol li {
    font-size: 1.1875rem;
  }
}

@media only screen and (min-width: 64rem) {
  .blog-article {
    max-width: 52rem;
  }
}

figcaption {
  font-size: 1.1rem;
  font-style: italic;
  margin-top: -1rem;
  margin-bottom: 2rem;
  color: var(--bodyTextColor);
}
