.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for light body background */
  background-color: #ffffff; /* Assuming body background is white */
}

.page-blog__hero-section {
  padding-top: 10px; /* Small top spacing as per rule, not var(--header-offset) */
  padding-bottom: 60px;
  background-color: #f8f8f8;
}

.page-blog__hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 40px 20px;
}

.page-blog__hero-content {
  flex: 1;
  color: #1e1765; /* Darker text for titles */
}

.page-blog__main-title {
  font-size: clamp(32px, 4vw, 48px); /* H1 font size with clamp */
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #017439; /* Brand primary color for H1 */
}

.page-blog__intro-text {
  font-size: 18px;
  margin-bottom: 30px;
  color: #333333;
}

.page-blog__cta-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background-color: #017439;
  color: #ffffff;
  border: 2px solid #017439;
}

.page-blog__btn-primary:hover {
  background-color: #005a2e;
  border-color: #005a2e;
}

.page-blog__btn-secondary {
  background-color: #ffffff;
  color: #017439;
  border: 2px solid #017439;
}

.page-blog__btn-secondary:hover {
  background-color: #f0f0f0;
}

.page-blog__hero-image {
  flex: 0 0 600px; /* Fixed width for desktop */
  max-width: 600px;
  text-align: center;
}

.page-blog__hero-side-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.page-blog__posts-section {
  padding: 60px 0;
  background-color: #ffffff;
}

.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-blog__section-title {
  font-size: 36px;
  font-weight: 700;
  color: #017439;
  text-align: center;
  margin-bottom: 40px;
}

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

.page-blog__post-card {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.page-blog__post-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.page-blog__post-media {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

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

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

.page-blog__post-title {
  font-size: 22px;
  font-weight: 600;
  color: #017439;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__post-excerpt {
  font-size: 16px;
  color: #555555;
  margin-bottom: 15px;
}

.page-blog__post-meta {
  font-size: 14px;
  color: #888888;
}

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

.page-blog__cta-section {
  padding: 80px 0;
  background-color: #017439; /* Primary brand color for dark section */
  color: #ffffff; /* White text for dark background */
  text-align: center;
}

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

.page-blog__cta-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-blog__cta-description {
  font-size: 18px;
  margin-bottom: 40px;
  color: #f0f0f0;
}

.page-blog__cta-buttons-wrapper {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-container {
    flex-direction: column;
    text-align: center;
  }

  .page-blog__hero-content {
    order: 1;
  }

  .page-blog__hero-image {
    order: 0;
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-top: 10px !important;
    padding-bottom: 30px;
  }

  .page-blog__hero-container {
    padding: 20px 15px;
    gap: 20px;
  }

  .page-blog__main-title {
    font-size: clamp(28px, 8vw, 40px); /* Adjusted for mobile */
    margin-bottom: 15px;
  }

  .page-blog__intro-text {
    font-size: 16px;
    margin-bottom: 25px;
  }

  .page-blog__cta-group {
    flex-direction: column;
    gap: 10px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
  }

  .page-blog__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-blog__hero-side-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

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

  .page-blog__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__section-title {
    font-size: 30px;
    margin-bottom: 30px;
  }

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

  .page-blog__post-card {
    max-width: 100%;
  }

  .page-blog__post-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-blog__post-title {
    font-size: 20px;
  }

  .page-blog__post-excerpt {
    font-size: 15px;
  }

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

  .page-blog__cta-title {
    font-size: 30px;
  }

  .page-blog__cta-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-blog__cta-buttons-wrapper {
    flex-direction: column !important;
    gap: 10px;
  }

  /* General image and container rules for mobile */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
  }

  .page-blog__section,
  .page-blog__card,
  .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}