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

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

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

.page-blog__light-bg {
  background-color: #ffffff;
  color: #333333;
}

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

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  border: 2px solid #C30808;
}

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

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

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

/* Hero Section */
.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.page-blog__hero-section .page-blog__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

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

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

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

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

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

/* Latest Articles Section */
.page-blog__latest-articles {
  padding: 60px 0;
}

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

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

.page-blog__article-card:hover {
  transform: translateY(-5px);
}

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

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

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

.page-blog__article-title {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #017439;
}

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

.page-blog__article-date {
  font-size: 0.85em;
  color: #777777;
}

.page-blog__view-all-wrapper {
  text-align: center;
}

/* Featured Categories Section */
.page-blog__featured-categories {
  padding: 60px 0;
}

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

.page-blog__category-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  transition: background-color 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-blog__category-card:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.page-blog__category-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin: 0 auto 15px auto;
  display: block;
}

.page-blog__category-title {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 10px;
}

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

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  text-align: center;
}

.page-blog__cta-container {
  max-width: 900px;
}

.page-blog__cta-title {
  font-size: 2.2em;
  font-weight: bold;
  color: #017439;
  margin-bottom: 20px;
}

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

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

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

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

.page-blog__faq-item {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-item[open] {
  background-color: #f0f0f0;
}

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

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

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #017439;
}

.page-blog__faq-answer {
  padding: 0 25px 20px 25px;
  color: #555555;
  font-size: 0.95em;
}

.page-blog__faq-answer p {
  margin: 0;
}

/* --- Mobile Responsive Styles (max-width: 768px) --- */
@media (max-width: 768px) {
  .page-blog__container {
    padding: 15px;
  }

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

  /* Hero Section */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Ensure small padding, body handles offset */
    padding-bottom: 40px;
    text-align: center;
  }

  .page-blog__hero-section .page-blog__container {
    flex-direction: column;
    gap: 20px;
  }

  .page-blog__hero-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }

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

  .page-blog__hero-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important; /* Mobile hero image must contain, not cover */
  }

  /* Latest Articles Section */
  .page-blog__latest-articles {
    padding: 40px 0;
  }

  .page-blog__article-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
  }

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

  .page-blog__article-title {
    font-size: 1.1em;
  }

  .page-blog__article-excerpt {
    font-size: 0.9em;
  }

  /* Featured Categories Section */
  .page-blog__featured-categories {
    padding: 40px 0;
  }

  .page-blog__category-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
  }

  .page-blog__category-icon {
    width: 80px;
    height: 80px;
  }

  .page-blog__category-title {
    font-size: 1.1em;
  }

  .page-blog__category-description {
    font-size: 0.85em;
  }

  /* CTA Section */
  .page-blog__cta-section {
    padding: 50px 0;
  }

  .page-blog__cta-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }

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

  .page-blog__cta-buttons {
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 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-left: 15px;
    padding-right: 15px;
  }

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

  .page-blog__faq-question {
    padding: 15px 20px;
    font-size: 1em;
  }

  .page-blog__faq-toggle {
    font-size: 1.3em;
  }

  .page-blog__faq-answer {
    padding: 0 20px 15px 20px;
    font-size: 0.9em;
  }

  /* General Images and Containers 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,
  .page-blog__article-card,
  .page-blog__category-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden;
  }
}