/* Blog Archive Styles */
.blog-hero {
  position: relative; /* Made relative for background image support */
  padding: 5rem 0;
  background: linear-gradient(to bottom, #002147, #f9ede1);
  text-align: center;
  overflow: hidden; /* Added overflow hidden for background image */
}

.blog-hero-pattern {
  position: absolute;
  inset: 0;
  background-image: url("../images/patron-rody.png");
  background-repeat: repeat;
  background-size: 400px;
  opacity: 0.15;
  z-index: 0;
}

/* Added hero background and overlay for blog hero images */
.blog-hero .hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.blog-hero .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0, 33, 71, 0.85), rgba(249, 237, 225, 0.9));
  z-index: 1;
}

.blog-hero .container {
  position: relative; /* Made relative to sit above background */
  z-index: 2; /* Added z-index to sit above overlay */
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #f9ede1;
  margin-bottom: 1.5rem;
  font-family: "DM Serif Display", serif;
  line-height: 1.2;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #f9ede1;
  max-width: 900px;
  margin: 0 auto 1rem;
  line-height: 1.6;
}

.hero-subdescription {
  font-size: 1rem;
  color: #f9ede1;
  opacity: 0.9;
  max-width: 800px;
  margin: 0 auto;
}

/* Categories */
.blog-categories {
  padding: 2rem 0;
  border-bottom: 1px solid #e5e5e5;
}

.categories-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.category-badge {
  padding: 0.5rem 1rem;
  background: #f9ede1;
  color: #002147;
  border-radius: 9999px;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 250ms ease-in-out;
  border: 1px solid transparent;
}

.category-badge:hover {
  background: #0098b3 !important;
  color: #f9ede1 !important;
  border-color: #0098b3 !important;
}

/* Added active state for category badges */
.category-badge.active {
  background: #0098b3 !important;
  color: #f9ede1 !important;
  border-color: #0098b3 !important;
}

/* Blog Grid */
.blog-grid-section {
  padding: 4rem 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.blog-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.blog-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.blog-card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-card-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.25rem 0.75rem;
  background: rgba(249, 237, 225, 0.9);
  backdrop-filter: blur(4px);
  color: #002147;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.blog-card-content {
  padding: 1.5rem;
}

.blog-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #002147;
  margin-bottom: 0.75rem;
  font-family: "DM Serif Display", serif;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
  color: #0098b3;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 1rem;
}

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

.blog-meta-item svg {
  width: 12px;
  height: 12px;
}

.blog-card-excerpt {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.blog-card-readmore {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #0098b3;
  font-size: 0.875rem;
  font-weight: 600;
}

.blog-card-readmore svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-readmore svg {
  transform: translateX(4px);
}

/* Single Post Styles */
.single-post-hero {
  position: relative;
  height: 400px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .single-post-hero {
    height: 500px;
  }
}

.single-post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #f9ede1 0%, rgba(249, 237, 225, 0.6) 50%, rgba(249, 237, 225, 0.2) 100%);
}

.single-post-article {
  padding: 3rem 0;
  margin-top: -8rem;
  position: relative;
  z-index: 10;
}

.single-post-content {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  padding: 2rem;
}

@media (min-width: 768px) {
  .single-post-content {
    padding: 3rem;
  }
}

.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  color: #002147;
  text-decoration: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  transition: all 250ms ease-in-out;
}

.back-to-blog:hover {
  background: #0098b3 !important;
  color: #f9ede1 !important;
}

.back-to-blog svg {
  width: 16px;
  height: 16px;
}

.single-post-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #f9ede1;
  color: #002147;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.single-post-title {
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: 700;
  color: #002147;
  margin-bottom: 1.5rem;
  font-family: "DM Serif Display", serif;
  line-height: 1.2;
}

.single-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: #666;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e5e5e5;
}

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

.single-meta-item svg {
  width: 16px;
  height: 16px;
}

.single-post-body {
  font-size: 1rem;
  line-height: 1.8;
  color: #333;
}

.single-post-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #002147;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-family: "DM Serif Display", serif;
}

.single-post-body p {
  margin-bottom: 1.5rem;
  color: #666;
}

.single-post-share {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e5e5;
}

.share-label {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 1rem;
}

.share-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.share-button {
  padding: 0.5rem 1rem;
  border: 1px solid #e5e5e5;
  border-radius: 0.375rem;
  text-decoration: none;
  color: #002147;
  font-size: 0.875rem;
  transition: all 250ms ease-in-out;
}

.share-button:hover {
  background: #0098b3 !important;
  color: #f9ede1 !important;
  border-color: #0098b3 !important;
}

/* Related Posts */
.related-posts-section {
  padding: 4rem 0;
  background: #002147;
}

.related-posts-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
  color: white;
  margin-bottom: 3rem;
  font-family: "DM Serif Display", serif;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.related-post-card {
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.related-post-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.related-post-image {
  height: 180px;
  overflow: hidden;
}

.related-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-image img {
  transform: scale(1.05);
}

.related-post-content {
  padding: 1.5rem;
}

.related-post-category {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: #f9ede1;
  color: #002147;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.related-post-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #002147;
  margin-bottom: 0.5rem;
  font-family: "DM Serif Display", serif;
  line-height: 1.4;
}

.related-post-excerpt {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.6;
}

.no-related-posts {
  text-align: center;
  color: white;
  padding: 2rem;
}

/* Pagination */
.blog-pagination {
  margin-top: 3rem;
  text-align: center;
}

.blog-pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.blog-pagination a,
.blog-pagination .current {
  padding: 0.5rem 1rem;
  border: 1px solid #e5e5e5;
  border-radius: 0.375rem;
  text-decoration: none;
  color: #002147;
  transition: all 250ms ease-in-out;
}

.blog-pagination a:hover,
.blog-pagination .current {
  background: #0098b3 !important;
  color: #f9ede1 !important;
  border-color: #0098b3 !important;
}

.no-posts {
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
}
