/* Blog post specific styles */

/* Hero section */
.blog-post-hero {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 2rem 0;
}

/* When there's no featured image */
.blog-post-hero.no-image .blog-post-hero-content {
  flex: 1;
  max-width: 100%;
}

.blog-post-hero-content {
  flex: 1;
  text-align: left;
  order: 1; /* Content on the left */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

.blog-post-hero-image {
  flex: 0 0 55%; /* Don't grow, don't shrink, stay at 55% width */
  width: 55%;
  max-width: 55%;
  order: 2; /* Image on the right */
}

.blog-post-hero-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

/* This is a duplicate selector, removing it */

.blog-post-title,
.blog-post-subtitle {
  font-size: 2.5rem;
  font-weight: normal;
  margin-bottom: 1rem;
  color: var(--primary-color);
  text-transform: capitalize;
  text-align: left;
}

.blog-post-subtitle {
  font-size: 2rem;
}

.blog-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
  color: var(--primary-text-color);
  width: 100%;
}

.blog-post-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Content styling */
.blog-post-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: left;
}

.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4,
.blog-post-content h5,
.blog-post-content h6 {
  font-weight: normal;
  margin: 2rem 0 1rem;
  color: var(--primary-color);
  text-transform: capitalize;
  text-align: left;
}

.blog-post-content h2 {
  font-size: 2rem;
}

.blog-post-content h3 {
  font-size: 1.75rem;
}

.blog-post-content h4 {
  font-size: 1.5rem;
}

.blog-post-content p {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.blog-post-content ul,
.blog-post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.blog-post-content li {
  margin-bottom: 0.5rem;
}

.blog-post-content a {
  color: var(--primary-color);
  text-decoration: underline;
}

.blog-post-content a:hover {
  text-decoration: none;
}

.blog-post-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 8px;
}

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

/* Categories and tags */
.blog-post-categories,
.blog-post-tags {
  margin-top: 2rem;
  text-align: left;
}

.blog-post-categories-header,
.blog-post-tags-header {
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.blog-category,
.blog-tag {
  display: inline-block;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.75rem;
  background-color: var(--secondary-background-color);
  border-radius: 50px;
  color: var(--primary-text-color);
  text-decoration: none;
  font-size: 0.875rem;
}

.blog-category:hover,
.blog-tag:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Error message */
.no-posts {
  text-align: center;
  padding: 3rem 0;
  color: var(--secondary-text-color);
}

.no-posts h2 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* Loading spinner */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(10, 77, 104, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .blog-post-hero {
    flex-direction: column;
  }

  .blog-post-hero-content {
    order: 2; /* Content below image on mobile */
  }

  .blog-post-hero-image {
    order: 1; /* Image above content on mobile */
    max-width: 100%;
  }

  .blog-post-title {
    font-size: 2rem;
  }

  .blog-post-content h2 {
    font-size: 2rem;
  }

  .blog-post-content h3 {
    font-size: 1.75rem;
  }

  .blog-post-content h4 {
    font-size: 1.25rem;
  }
}
