/* -------------------------------------------------------------------------- */
/*                              Base Styles                                 */
/* -------------------------------------------------------------------------- */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: #FFFFFF; /* Default body background */
}

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

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

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

/* -------------------------------------------------------------------------- */
/*                                Hero Section                                */
/* -------------------------------------------------------------------------- */
.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: #f5f5f5;
  text-align: center;
  padding-bottom: 50px;
}

.page-blog__hero-image {
  width: 100%;
  max-height: 600px;
  overflow: hidden;
  margin-bottom: 30px;
}

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

.page-blog__hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

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

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

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

/* -------------------------------------------------------------------------- */
/*                                 Buttons                                  */
/* -------------------------------------------------------------------------- */
.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog a[class*="btn"] {
  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%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

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

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

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

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

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

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

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

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

.page-blog__read-more-btn {
  display: inline-block;
  margin-top: 15px;
  color: #017439;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__read-more-btn:hover {
  color: #005f2f;
}

/* -------------------------------------------------------------------------- */
/*                             Latest Posts Section                           */
/* -------------------------------------------------------------------------- */
.page-blog__latest-posts-section {
  padding: 60px 0;
  background-color: #f9f9f9;
}

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

.page-blog__post-card {
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-blog__post-card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  overflow: hidden;
}

.page-blog__post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

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

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

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

/* -------------------------------------------------------------------------- */
/*                             Categories Section                             */
/* -------------------------------------------------------------------------- */
.page-blog__categories-section {
  padding: 60px 0;
  background-color: #017439; /* Brand main color for dark background */
  color: #FFFFFF; /* White text for dark background */
}

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

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

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

.page-blog__category-title {
  font-size: 1.2em;
  margin: 0;
  color: #FFFFFF;
}

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

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

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

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

/* -------------------------------------------------------------------------- */
/*                           Responsive Design (Mobile)                       */
/* -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .page-blog__container {
    padding: 0 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

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

  /* Hero Section */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Ensure small top padding */
    padding-bottom: 30px;
  }

  .page-blog__hero-image {
    max-height: 300px;
  }

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

  .page-blog__hero-description {
    font-size: 1em;
  }

  .page-blog__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  /* Buttons */
  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="btn"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

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

  /* Latest Posts Section */
  .page-blog__latest-posts-section {
    padding: 40px 0;
  }

  .page-blog__post-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-blog__post-card-image {
    height: 180px; /* Adjust height for mobile */
  }

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

  /* Categories Section */
  .page-blog__categories-section {
    padding: 40px 0;
  }

  .page-blog__categories-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

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

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

  /* General Image adaptation */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
}