.page-blog {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default text color for light background */
  background: #FFFFFF; /* Default background for the page */
}

.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, relying on body padding-top from shared.css */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-bottom: 40px;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit hero image height on desktop */
  overflow: hidden;
  position: relative;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Cover the area, may crop */
  filter: brightness(0.8); /* Slightly dim the image to make text pop */
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin-top: -150px; /* Pull content up over the image slightly for visual effect */
  padding: 20px;
  background: rgba(255, 255, 255, 0.9); /* Semi-transparent white background for text */
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.page-blog__description {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
  color: #333333;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

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

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

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

.page-blog__section {
  padding: 60px 20px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

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

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

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

.page-blog__text-block {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 20px;
  text-align: justify;
  color: #333333;
}

.page-blog__text-block--light {
  color: #f0f0f0;
}

.page-blog__about-blog-section .page-blog__text-block {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__categories-grid,
.page-blog__posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.page-blog__card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: #333333;
  border: 1px solid #e0e0e0;
}

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

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

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

.page-blog__post-date {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 10px;
}

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

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

.page-blog__card-title a:hover {
  color: #005f2e;
}

.page-blog__card-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-blog__card-link {
  display: inline-block;
  color: #017439;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid #017439;
  padding-bottom: 2px;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.page-blog__card-link:hover {
  color: #005f2e;
  border-color: #005f2e;
  padding-bottom: 4px;
}

.page-blog__latest-posts-section {
  background: #017439; /* Brand color as background */
  color: #ffffff;
  padding-bottom: 80px;
}

.page-blog__latest-posts-section .page-blog__card {
  background: #ffffff;
  color: #333333;
}

.page-blog__latest-posts-section .page-blog__card-title a {
  color: #017439;
}

.page-blog__latest-posts-section .page-blog__card-link {
  color: #017439;
  border-color: #017439;
}

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

.page-blog__why-follow-section {
  background: #f9f9f9;
}

.page-blog__benefits-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.page-blog__benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: #ffffff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
}

.page-blog__benefit-icon {
  font-size: 2.5rem;
  color: #017439;
  flex-shrink: 0;
  line-height: 1;
}

.page-blog__benefit-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #017439;
  margin-bottom: 8px;
}

.page-blog__benefit-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 0;
}

.page-blog__faq-section {
  padding-bottom: 60px;
}

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}
details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-blog__faq-item summary.page-blog__faq-question::-webkit-details-marker {
  display: none;
}
details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: #f5f5f5;
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #555;
  line-height: 1.6;
}

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

/* Desktop specific adjustments for hero content overlapping image */
@media (min-width: 850px) {
  .page-blog__hero-section {
    padding-top: 0; /* No extra padding on desktop if shared.css handles body */
  }
  .page-blog__hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 0; /* Reset margin-top for absolute positioning */
    background: rgba(255, 255, 255, 0.95); /* Slightly less transparent for better contrast */
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    max-width: 800px;
  }
  .page-blog__hero-image-wrapper {
    max-height: 700px; /* Allow taller hero image */
  }
  .page-blog__hero-image {
    height: 700px; /* Fixed height for desktop hero image */
  }
}

/* Media Queries for Responsive Design */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    margin-top: -100px;
    padding: 30px;
  }
  .page-blog__main-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }
  .page-blog__description {
    font-size: 1rem;
  }
  .page-blog__section {
    padding: 50px 15px;
  }
  .page-blog__section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  }
  .page-blog__benefits-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 849px) {
  .page-blog__hero-image {
    object-fit: contain !important; /* Prevent cropping on smaller screens */
    aspect-ratio: unset !important; /* Allow image to scale freely */
    height: auto !important;
    max-height: 400px; /* Limit height to prevent overly tall image */
  }
  .page-blog__hero-content {
    position: relative; /* Back to relative positioning */
    transform: none; /* Remove transform */
    top: auto; 
    left: auto;
    margin-top: -80px; /* Adjust margin-top for mobile */
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-top: 10px; /* Small top padding for mobile */
    padding-bottom: 30px;
  }
  .page-blog__hero-image-wrapper {
    max-height: 300px;
  }
  .page-blog__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-blog__hero-content {
    margin-top: -60px; /* Further adjust for mobile */
    padding: 15px;
  }
  .page-blog__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: 10px;
  }
  .page-blog__description {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
  }
  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="button"],
  .page-blog a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 15px;
    font-size: 0.95rem;
  }
  
  .page-blog__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: clamp(1.5rem, 5vw, 2.2rem);
    margin-bottom: 30px;
  }
  .page-blog__text-block {
    font-size: 0.95rem;
    text-align: left;
  }
  
  .page-blog__categories-grid,
  .page-blog__posts-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-blog__category-image,
  .page-blog__post-image {
    height: 180px;
    max-width: 100% !important;
    width: 100% !important;
  }
  .page-blog__card-title {
    font-size: 1.1rem;
  }
  .page-blog__card-description {
    font-size: 0.9rem;
  }
  
  .page-blog__latest-posts-section {
    padding-bottom: 60px;
  }
  .page-blog__view-all-button {
    margin-top: 40px;
  }

  .page-blog__benefits-list {
    gap: 20px;
  }
  .page-blog__benefit-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
  }
  .page-blog__benefit-icon {
    font-size: 2rem;
    margin-bottom: 10px;
  }
  .page-blog__benefit-content h3 {
    font-size: 1.15rem;
  }
  .page-blog__benefit-content p {
    font-size: 0.9rem;
  }

  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px;
  }
  .page-blog__faq-qtext {
    font-size: 15px;
  }
  details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 15px 15px;
  }
  
  /* General image and container responsiveness for mobile */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-blog__cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
  }
}