.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 from shared.css */
}

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

.page-blog__top-section {
  padding-top: 10px; /* As per fixed header spacing rule */
  padding-bottom: 40px;
  text-align: center;
  background-color: #f8f8f8;
}

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

.page-blog__description {
  font-size: 1.1em;
  color: #555555;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog__btn-register,
.page-blog__btn-login {
  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;
  max-width: 100%; /* Button responsive */
  box-sizing: border-box; /* Button responsive */
  white-space: normal; /* Button text wrap */
  word-wrap: break-word; /* Button text wrap */
  text-align: center;
}

.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;
  border-color: #005a2e;
}

.page-blog__btn-register {
  background-color: #C30808;
  color: #FFFF00;
  border: 2px solid #C30808;
}

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

.page-blog__btn-login {
  background-color: #C30808;
  color: #FFFF00;
  border: 2px solid #C30808;
}

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

.page-blog__article-list {
  padding: 60px 0;
}

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

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

.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, box-shadow 0.3s ease;
}

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

.page-blog__article-figure {
  margin: 0;
  padding: 0;
  line-height: 0;
}

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

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

.page-blog__article-heading {
  font-size: 1.5em;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.page-blog__article-heading a:hover {
  color: #005a2e;
}

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

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

.page-blog__read-more {
  display: inline-block;
  color: #017439;
  font-weight: bold;
  text-decoration: none;
  border-bottom: 2px solid #017439;
  padding-bottom: 3px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.page-blog__read-more:hover {
  color: #005a2e;
  border-color: #005a2e;
}

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

.page-blog__promo-section {
  padding: 60px 0;
  text-align: center;
  background-color: #017439;
  color: #FFFFFF;
}

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

.page-blog__description--white {
  color: #f0f0f0;
}

/* --- Responsive Styles --- */

/* Tablet and Mobile */
@media (max-width: 1024px) {
  .page-blog__container {
    padding: 0 15px;
  }

  .page-blog__main-title {
    font-size: clamp(1.8em, 4.5vw, 2.8em);
  }

  .page-blog__description {
    font-size: 1em;
  }

  .page-blog__cta-buttons {
    gap: 10px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog__btn-register,
  .page-blog__btn-login {
    padding: 10px 20px;
    font-size: 0.95em;
  }

  .page-blog__section-title {
    font-size: 2em;
  }

  .page-blog__article-card {
    margin-bottom: 20px;
  }

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

  .page-blog__article-heading {
    font-size: 1.3em;
  }
}

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

  /* 1. Top section title + CTA */
  .page-blog__top-section {
    padding-top: 10px !important; /* Fixed header spacing */
    padding-bottom: 30px;
  }

  .page-blog__main-title {
    font-size: clamp(1.5em, 6vw, 2.2em);
    margin-bottom: 15px;
  }

  .page-blog__description {
    font-size: 0.95em;
    margin-bottom: 25px;
  }

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

  /* 4. Buttons and button containers */
  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog__btn-register,
  .page-blog__btn-login {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 15px;
  }

  /* 2. Single column long article container (general sections) */
  .page-blog__article-list,
  .page-blog__promo-section {
    padding: 30px 0;
  }

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

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

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

  .page-blog__article-card {
    margin-bottom: 0;
  }

  /* 3. General images and figures */
  .page-blog__article-image,
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
  }

  .page-blog__article-figure {
    height: auto; /* Allow image to define height */
  }

  .page-blog__article-heading {
    font-size: 1.2em;
  }

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

  .page-blog__view-all-button {
    margin-top: 30px;
  }

  /* 5. Registration tutorial and FAQ sections (not explicitly used here, but for completeness if they were) */
  /* Example for a hypothetical .page-blog__faq-section if it were present */
  /* .page-blog__faq-section .page-blog__faq-question { font-size: 1.1em; padding: 15px; } */
  /* .page-blog__faq-section .page-blog__faq-answer { padding: 10px 15px; font-size: 0.9em; } */
}