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

.page-blog__section {
  padding: 40px 0;
  margin-bottom: 20px;
}

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

.page-blog__section-title {
  font-size: 2.5em;
  color: #017439;
  text-align: center;
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.2;
}

.page-blog__section-subtitle {
  font-size: 1.1em;
  color: #555555;
  text-align: center;
  margin-bottom: 40px;
}

/* Hero Section */
.page-blog__hero-section {
  padding-top: 10px; /* Rely on body for --header-offset, use small top padding */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: #f5f5f5;
  margin-bottom: 0; /* No margin as it's the first content block */
}

.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; /* Cover for desktop to fill space */
}

.page-blog__hero-content {
  max-width: 800px;
  padding: 40px 20px;
}

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

.page-blog__hero-description {
  font-size: 1.1em;
  color: #555555;
  margin-bottom: 30px;
}

.page-blog__btn-primary {
  display: inline-block;
  background-color: #017439;
  color: #ffffff;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border: 2px solid transparent;
}

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

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

.page-blog__post-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px 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 15px rgba(0, 0, 0, 0.1);
}

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

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

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

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

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

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

.page-blog__read-more {
  color: #017439;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
}

.page-blog__read-more:hover {
  text-decoration: underline;
}

/* Pagination */
.page-blog__pagination {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  gap: 10px;
}

.page-blog__pagination-link {
  display: inline-block;
  padding: 10px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  text-decoration: none;
  color: #017439;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-blog__pagination-link:hover {
  background-color: #017439;
  color: #ffffff;
}

.page-blog__pagination-link--active {
  background-color: #017439;
  color: #ffffff;
  border-color: #017439;
}

/* Featured Section */
.page-blog__dark-section {
  background-color: #017439;
  color: #ffffff;
}

.page-blog__dark-section .page-blog__section-title,
.page-blog__dark-section .page-blog__section-subtitle {
  color: #ffffff;
}

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

.page-blog__featured-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__featured-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

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

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

.page-blog__featured-title {
  font-size: 1.5em;
  color: #ffffff;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.page-blog__featured-excerpt {
  font-size: 1em;
  color: #f0f0f0;
  margin-bottom: 15px;
}

.page-blog__featured-card .page-blog__read-more {
  color: #FFFF00; /* Yellow for contrast on dark background */
}

.page-blog__featured-card .page-blog__read-more:hover {
  text-decoration: underline;
}

/* CTA Section */
.page-blog__cta-section {
  text-align: center;
  background-color: #f9f9f9;
  padding: 60px 0;
}

.page-blog__cta-title {
  font-size: 2em;
  color: #017439;
  margin-bottom: 15px;
}

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

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

.page-blog__btn-register {
  background-color: #C30808;
  color: #FFFF00;
  padding: 14px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border: 2px solid transparent;
}

.page-blog__btn-register:hover {
  background-color: #a00606;
}

.page-blog__btn-login {
  background-color: #C30808;
  color: #FFFF00;
  padding: 14px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border: 2px solid transparent;
}

.page-blog__btn-login:hover {
  background-color: #a00606;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
}

.page-blog__faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.page-blog__faq-item {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.page-blog__faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  color: #017439;
  font-size: 1.1em;
}

.page-blog__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.page-blog__faq-qtext {
  flex-grow: 1;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  margin-left: 10px;
  color: #017439;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  content: '−';
}

.page-blog__faq-answer {
  padding: 0 20px 20px 20px;
  color: #555555;
  font-size: 1em;
  line-height: 1.5;
}

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

/* Mobile responsive styles */
@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }

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

  .page-blog__hero-section {
    flex-direction: column;
    padding-top: 10px !important;
  }

  .page-blog__hero-image-wrapper {
    max-height: none;
  }

  .page-blog__hero-image {
    object-fit: contain; /* Ensure full image is visible, no cropping */
    aspect-ratio: unset;
    max-height: none;
  }

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

  .page-blog__main-title {
    font-size: 2em;
    margin-bottom: 15px;
  }

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

  .page-blog__btn-primary,
  .page-blog__btn-register,
  .page-blog__btn-login,
  .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-left: 15px;
    padding-right: 15px;
  }

  .page-blog__cta-buttons {
    flex-direction: column !important;
    gap: 10px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

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

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

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

  .page-blog__featured-image {
    height: 200px;
  }

  .page-blog__featured-title {
    font-size: 1.3em;
  }

  .page-blog__section-title {
    font-size: 2em;
    margin-bottom: 10px;
  }

  .page-blog__section-subtitle {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-blog__faq-item summary {
    font-size: 1em;
    padding: 15px;
  }

  .page-blog__faq-answer {
    padding: 0 15px 15px 15px;
  }

  /* General image and container responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-image-wrapper,
  .page-blog__post-card,
  .page-blog__featured-card,
  .page-blog__cta-section,
  .page-blog__faq-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden;
  }

  .page-blog__pagination {
    padding: 0 15px;
  }
}

/* No specific 1024px rules needed as 768px handles mobile and desktop is base */
@media (max-width: 1024px) {
  .page-blog__container {
    padding: 0 20px;
  }
  .page-blog__post-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-blog__featured-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}