.page-blog {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333333; /* Dark text for light body background */
  background-color: #FFFFFF;
  line-height: 1.6;
  font-size: 16px;
}

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

/* Hero/Title Section */
.page-blog__hero-section {
  padding-top: 10px; /* As per fixed header rule */
  padding-bottom: 40px;
  text-align: center;
  background-color: #f5f5f5; /* Light background for contrast */
}

.page-blog__main-title {
  font-size: clamp(28px, 4vw, 48px); /* H1 clamp for responsiveness */
  font-weight: 700;
  color: #017439;
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-blog__description {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: #555555;
}

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

.page-blog__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
  cursor: pointer;
}

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

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

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

/* Article & News Sections */
.page-blog__articles-section,
.page-blog__categories-section,
.page-blog__news-section,
.page-blog__about-section {
  padding: 60px 0;
  background-color: #FFFFFF;
}

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

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

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

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

.page-blog__article-link,
.page-blog__news-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

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

.page-blog__article-title,
.page-blog__news-title {
  font-size: 22px;
  font-weight: 600;
  color: #017439;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__article-meta,
.page-blog__news-meta {
  font-size: 14px;
  color: #777777;
  margin-bottom: 15px;
}

.page-blog__article-excerpt,
.page-blog__news-excerpt {
  font-size: 16px;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  display: inline-block;
  color: #017439;
  font-weight: 600;
  text-decoration: underline;
  margin-top: auto; /* Pushes to bottom */
}

.page-blog__view-all-posts,
.page-blog__view-all-news {
  text-align: center;
  margin-top: 20px;
}

/* Categories Section */
.page-blog__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.page-blog__category-card {
  background-color: #f8f8f8;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__category-image {
  width: 100%;
  height: 200px; /* Consistent height for category images */
  object-fit: cover;
  display: block;
}

.page-blog__category-title {
  font-size: 20px;
  font-weight: 600;
  color: #017439;
  padding: 15px 10px 20px;
}

/* About Section */
.page-blog__about-text {
  font-size: 17px;
  color: #555555;
  line-height: 1.7;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.page-blog__about-text ul {
    list-style: disc inside;
    text-align: left;
    max-width: 600px;
    margin: 20px auto;
    padding-left: 20px;
}

.page-blog__about-text li {
    margin-bottom: 10px;
    color: #555555;
}

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

  .page-blog__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

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

  .page-blog__main-title {
    font-size: 28px;
  }

  .page-blog__description {
    font-size: 15px;
    margin-bottom: 20px;
  }

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

  /* 4. Buttons and button containers */
  .page-blog__btn,
  .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;
  }

  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  /* 2. Single-column long text container (articles, news, about) */
  .page-blog__articles-section,
  .page-blog__categories-section,
  .page-blog__news-section,
  .page-blog__about-section {
    padding: 40px 0;
  }

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

  .page-blog__articles-grid,
  .page-blog__news-grid,
  .page-blog__categories-grid {
    grid-template-columns: 1fr; /* Single column */
    gap: 20px;
  }

  .page-blog__article-card,
  .page-blog__news-card,
  .page-blog__category-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  .page-blog__article-content,
  .page-blog__news-content {
    padding: 15px;
  }

  .page-blog__article-title,
  .page-blog__news-title {
    font-size: 18px;
  }

  .page-blog__article-excerpt,
  .page-blog__news-excerpt {
    font-size: 14px;
  }

  .page-blog__about-text {
    font-size: 14px;
  }

  /* 3. Generic images and figures */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* 5. Registration tutorial and FAQ sections - Not present in this HTML, so no specific mobile styles for them. */
}

/* Color Contrast Fixes (if needed, ensure WCAG AA) */
.page-blog__dark-section {
  background: #017439;
  color: #ffffff;
}