.page-blog {
  font-family: Arial, sans-serif;
  color: #FFFFFF;
  background-color: #100224; /* Adjusted from #FFFFFF for dark theme consistency */
  line-height: 1.6;
}

.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 40px;
  background-color: #017439;
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center;
  max-height: 600px; /* Limit height for hero image */
}

.page-blog__hero-content {
  text-align: center;
  padding: 20px 20px 0;
  max-width: 900px;
  margin-top: -80px; /* Overlap slightly with image for visual flow */
  position: relative;
  z-index: 1;
  background-color: rgba(16, 2, 36, 0.7); /* Semi-transparent background for text */
  border-radius: 8px;
  padding: 30px;
}

.page-blog__main-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem); /* Responsive font size */
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.05em;
  color: #FFFF00; /* Yellow for prominence */
  margin-bottom: 15px;
}

.page-blog__hero-description {
  font-size: 1.1rem;
  color: #FFFFFF;
  margin-bottom: 25px;
}

.page-blog__hero-button {
  display: inline-block;
  background: linear-gradient(90deg, #ff9500, #ff5e3a); /* Orange-red gradient */
  color: #FFFFFF;
  padding: 12px 28px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.page-blog__hero-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.page-blog__latest-posts {
  padding: 50px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-blog__section-title {
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  color: #FFFF00; /* Yellow for prominence */
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-blog__post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-blog__post-card {
  background-color: #1a0632; /* Slightly lighter dark background for cards */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 400px; /* Ensure cards have a minimum height */
}

.page-blog__post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.page-blog__post-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-blog__post-info {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-blog__post-date {
  font-size: 0.9em;
  color: #83a1f2; /* Blue for dates */
  margin-bottom: 10px;
}

.page-blog__post-title {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.page-blog__post-title a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
  color: #FFFF00; /* Yellow on hover */
}

.page-blog__post-excerpt {
  font-size: 1rem;
  color: #CCCCCC;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  display: inline-block;
  color: #83a1f2; /* Blue for read more links */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: #FFFF00;
}

.page-blog__view-all-wrapper {
  text-align: center;
  margin-top: 50px;
}

.page-blog__view-all-button {
  display: inline-block;
  background-color: #017439; /* Primary green */
  color: #FFFFFF;
  padding: 12px 30px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-blog__view-all-button:hover {
  background-color: #02944d;
  transform: translateY(-2px);
}

.page-blog__cta-section {
  background: linear-gradient(135deg, #017439, #005a2d); /* Green gradient */
  padding: 60px 20px;
  text-align: center;
}

.page-blog__cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-blog__cta-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: #FFFF00; /* Yellow for CTA title */
  margin-bottom: 20px;
  font-weight: bold;
}

.page-blog__cta-description {
  font-size: 1.1rem;
  color: #FFFFFF;
  margin-bottom: 30px;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 14px 35px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  margin: 0 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  min-height: 44px; /* Ensure touch target size */
}

.page-blog__cta-button--register {
  background-color: #C30808; /* Custom red */
  color: #FFFF00; /* Custom yellow font */
}

.page-blog__cta-button--register:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  background-color: #d80b0b;
}

.page-blog__cta-button--login {
  background-color: #C30808; /* Custom red */
  color: #FFFF00; /* Custom yellow font */
}

.page-blog__cta-button--login:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  background-color: #d80b0b;
}

/* Responsive adjustments */
@media (max-width: 849px) {
  .page-blog__hero-content {
    margin-top: -40px;
    padding: 20px;
  }

  .page-blog__main-title {
    font-size: 2rem;
  }

  .page-blog__post-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .page-blog__cta-button {
    display: block;
    width: calc(100% - 20px);
    margin: 15px auto;
  }
}

@media (max-width: 549px) {
  .page-blog__hero-content {
    margin-top: -20px;
    padding: 15px;
  }

  .page-blog__main-title {
    font-size: 1.6rem;
  }

  .page-blog__hero-description {
    font-size: 1rem;
  }

  .page-blog__section-title {
    font-size: 1.8rem;
  }

  .page-blog__post-card {
    min-height: auto;
  }

  .page-blog__post-title {
    font-size: 1.1rem;
  }

  .page-blog__post-excerpt {
    font-size: 0.9rem;
  }

  .page-blog__cta-title {
    font-size: 1.8rem;
  }

  .page-blog__cta-description {
    font-size: 1rem;
  }

  .page-blog__cta-button {
    font-size: 1rem;
  }
}

/* Ensure all content area images are responsive and do not cause overflow */
@media (max-width: 768px) {
  .page-blog img {
    max-width: 100%;
    height: auto;
  }

  .page-blog__post-image {
    height: 180px;
  }

  .page-blog__hero-image {
    max-height: 400px;
  }
}

/* Minimum size for content images */
.page-blog__post-image {
  min-width: 200px;
  min-height: 200px;
}