.page-blog {
  background-color: #F4F7FB;
  color: #1F2D3D;
}

.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.page-blog__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  margin-bottom: 40px;
  background-color: #F4F7FB;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-blog__hero-content {
  text-align: center;
  padding: 40px 20px;
  background-color: #FFFFFF;
  border-radius: 12px;
  margin: -60px auto 0; /* Pull content slightly over the image, but not covering text */
  max-width: 900px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  position: relative; /* Ensure z-index works if needed */
  z-index: 1; /* Ensure content is above any background elements */
}

.page-blog__hero-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  color: #1F2D3D;
  margin-bottom: 15px;
  letter-spacing: -0.02em;
}

.page-blog__hero-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #1F2D3D;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__hero-cta-button {
  display: inline-block;
  padding: 14px 30px;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #FFFFFF;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(47, 107, 255, 0.4);
}

.page-blog__hero-cta-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(47, 107, 255, 0.6);
}

.page-blog__latest-posts-section {
  padding: 60px 0;
  background-color: #F4F7FB;
}

.page-blog__section-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: #1F2D3D;
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.page-blog__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -15px;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #2F6BFF;
  border-radius: 2px;
}

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

.page-blog__post-card {
  background-color: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-blog__post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.page-blog__post-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-blog__post-card-image {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-blog__post-card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-blog__post-card-meta {
  font-size: 0.9rem;
  color: #6FA3FF;
  margin-bottom: 10px;
  font-weight: 500;
}

.page-blog__post-card-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1F2D3D;
  margin-bottom: 15px;
  line-height: 1.4;
}

.page-blog__post-card-excerpt {
  font-size: 1rem;
  color: #1F2D3D;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  color: #2F6BFF;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

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

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

.page-blog__view-all-button {
  display: inline-block;
  padding: 12px 25px;
  background-color: #2F6BFF;
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

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

.page-blog__cta-section {
  background-color: #F4F7FB;
  padding: 80px 0;
  text-align: center;
}

.page-blog__cta-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: #1F2D3D;
  margin-bottom: 20px;
}

.page-blog__cta-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #1F2D3D;
  max-width: 800px;
  margin: 0 auto 40px;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 16px 35px;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #FFFFFF;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(47, 107, 255, 0.4);
}

.page-blog__cta-button:hover {
  opacity: 0.9;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(47, 107, 255, 0.6);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-blog__hero-content {
    padding: 30px 15px;
    margin: -40px auto 0;
  }

  .page-blog__hero-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

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

  .page-blog__hero-cta-button {
    padding: 12px 25px;
    font-size: 1rem;
  }

  .page-blog__latest-posts-section {
    padding: 40px 0;
  }

  .page-blog__post-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-blog__post-card-image {
    height: 180px; /* Adjust height for smaller screens */
  }

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

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

  .page-blog__view-all-button {
    padding: 10px 20px;
    font-size: 0.95rem;
  }

  .page-blog__cta-section {
    padding: 60px 0;
  }

  .page-blog__cta-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

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

  .page-blog__cta-button {
    padding: 14px 30px;
    font-size: 1.1rem;
  }

  /* Ensure content area images do not overflow */
  .page-blog img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  .page-blog__hero-content {
    margin: -30px auto 0;
    padding: 25px 10px;
  }

  .page-blog__hero-title {
    font-size: clamp(1.6rem, 7vw, 2rem);
  }

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

  .page-blog__hero-cta-button {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .page-blog__post-card-image {
    height: 150px;
  }

  .page-blog__post-card-content {
    padding: 20px;
  }

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

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

  .page-blog__cta-title {
    font-size: clamp(1.6rem, 7vw, 2rem);
  }

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

  .page-blog__cta-button {
    padding: 12px 25px;
    font-size: 1rem;
  }
}