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

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

.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  position: relative;
  text-align: center;
  color: #ffffff;
  background-color: #017439;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 600px;
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7); /* Slightly darken image for text readability */
}

.page-blog__hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  max-width: 800px;
  padding: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.5em);
  font-weight: 700;
  margin-bottom: 15px;
  color: #ffffff;
  line-height: 1.2;
}

.page-blog__subtitle {
  font-size: clamp(1em, 1.8vw, 1.3em);
  margin-bottom: 30px;
  color: #ffffff;
}

.page-blog__section-title {
  font-size: clamp(1.8em, 3vw, 2.5em);
  color: #017439;
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
}

.page-blog__introduction-section, .page-blog__featured-articles, .page-blog__latest-articles, .page-blog__why-choose-us {
  padding: 60px 0;
  background-color: #ffffff;
  color: #333333;
}

.page-blog__dark-bg {
  background-color: #017439;
  color: #ffffff;
}

.page-blog__dark-bg .page-blog__section-title {
  color: #ffffff;
}

.page-blog__text-block {
  font-size: 1.1em;
  margin-bottom: 20px;
  text-align: justify;
}

.page-blog__highlight {
  font-weight: bold;
  color: #017439;
}

.page-blog__dark-bg .page-blog__highlight {
  color: #FFFF00; /* Yellow for highlights on dark background */
}

.page-blog__article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.page-blog__article-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: #333333;
}

.page-blog__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

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

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

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

.page-blog__card-meta {
  font-size: 0.9em;
  color: #666666;
  margin-bottom: 15px;
}

.page-blog__card-excerpt {
  font-size: 1em;
  color: #555555;
}

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

.page-blog__cta-button {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
}

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

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

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

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

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

.page-blog__categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.page-blog__category-card {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 150px;
}

.page-blog__category-card:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
}

.page-blog__category-title {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #ffffff;
}

.page-blog__category-description {
  font-size: 0.95em;
  color: #f0f0f0;
}

.page-blog__article-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-blog__list-item {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__list-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.page-blog__list-item-link {
  display: flex;
  align-items: flex-start;
  text-decoration: none;
  color: #333333;
  padding: 15px;
}

.page-blog__list-thumbnail {
  width: 150px;
  height: 84px; /* Maintain 16:9 aspect ratio for 150px width */
  object-fit: cover;
  border-radius: 4px;
  margin-right: 20px;
  flex-shrink: 0;
}

.page-blog__list-content {
  flex-grow: 1;
}

.page-blog__list-title {
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 5px;
  color: #017439;
}

.page-blog__list-meta {
  font-size: 0.85em;
  color: #777777;
  margin-bottom: 10px;
}

.page-blog__list-excerpt {
  font-size: 0.95em;
  color: #555555;
}

.page-blog__newsletter-section {
  padding: 60px 0;
  text-align: center;
}

.page-blog__newsletter-form {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.page-blog__form-input {
  padding: 12px 20px;
  border: 1px solid #ffffff;
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1em;
  flex: 1;
  max-width: 300px;
}

.page-blog__form-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.page-blog__why-choose-us .page-blog__inline-link {
  color: #017439;
  text-decoration: underline;
}

.page-blog__why-choose-us .page-blog__inline-link:hover {
  color: #005f2f;
}

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

/* General image responsiveness */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .page-blog__hero-section {
    min-height: 300px;
    padding-top: 10px !important;
  }

  .page-blog__hero-content {
    padding: 15px;
    width: 90%;
  }

  .page-blog__main-title {
    font-size: 2em; /* Smaller H1 for mobile */
    margin-bottom: 10px;
  }

  .page-blog__subtitle {
    font-size: 1em;
    margin-bottom: 20px;
  }

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

  .page-blog__article-grid {
    grid-template-columns: 1fr; /* Single column for articles */
    gap: 20px;
  }

  .page-blog__article-thumbnail {
    height: auto; /* Allow height to adjust */
  }

  .page-blog__article-card {
    margin: 0 15px;
  }

  .page-blog__categories-grid {
    grid-template-columns: repeat(2, 1fr); /* Two columns for categories */
    gap: 15px;
    margin: 0 15px;
  }

  .page-blog__category-card {
    min-height: 120px;
    padding: 15px;
  }

  .page-blog__list-item-link {
    flex-direction: column; /* Stack image and text */
    align-items: center;
    padding: 15px;
  }

  .page-blog__list-thumbnail {
    width: 100%;
    height: auto;
    max-height: 180px;
    margin-right: 0;
    margin-bottom: 15px;
  }

  .page-blog__list-content {
    text-align: center;
  }

  .page-blog__newsletter-form {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 0 15px 30px 15px;
  }

  .page-blog__form-input {
    max-width: 100%;
    width: 100%;
  }

  .page-blog__cta-button {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 15px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    margin: 40px 15px 0 15px;
  }

  /* Universal image rules for mobile */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Universal container rules for mobile */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__article-card,
  .page-blog__category-card,
  .page-blog__list-item,
  .page-blog__newsletter-section,
  .page-blog__why-choose-us {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}