/* style/blog.css */

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

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

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

.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__sub-title {
  font-size: 1.8em;
  color: #017439;
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: bold;
}

/* Hero Section */
.page-blog__hero-section {
  padding-top: 10px; /* Adjusted for header offset */
  padding-bottom: 40px;
  background-color: #f5f5f5;
  text-align: center;
}

.page-blog__hero-image-wrapper {
  margin-bottom: 20px;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.page-blog__main-title {
  font-size: 3em;
  color: #017439;
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.2;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.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;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.page-blog__btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, 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: #f0f0f0;
  color: #017439;
}

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

.page-blog__article-card {
  background-color: #FFFFFF;
  border-radius: 8px;
  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 {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

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

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

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

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

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

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

.page-blog__read-more {
  color: #017439;
  font-weight: bold;
  display: block;
  margin-top: auto;
}

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

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

/* SEO Text Section */
.page-blog__seo-text {
  padding: 60px 0;
}

.page-blog__article-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-blog__seo-text p {
  margin-bottom: 15px;
  font-size: 1.05em;
  color: #333333;
}

.page-blog__seo-text ul {
  margin-bottom: 15px;
  padding-left: 25px;
  list-style-type: disc;
  color: #333333;
}

.page-blog__seo-text li {
  margin-bottom: 8px;
  font-size: 1.05em;
}

.page-blog__figure {
  margin: 30px 0;
  text-align: center;
}

.page-blog__figure-image {
  width: 100%;
  height: auto;
  max-width: 800px;
  border-radius: 8px;
  object-fit: cover;
}

.page-blog__figure-caption {
  font-size: 0.9em;
  color: #777777;
  margin-top: 10px;
}

.page-blog__cta-buttons--bottom {
  margin-top: 40px;
  margin-bottom: 20px;
}

/* Responsive Styles */

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

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

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

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

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

  .page-blog__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__btn {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 10px 15px;
  }

  /* 2. Single column long article container */
  .page-blog__article-wrap {
    padding: 0 15px;
  }

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

  .page-blog__sub-title {
    font-size: 1.4em;
    margin-top: 25px;
    margin-bottom: 10px;
  }

  .page-blog__article-grid {
    grid-template-columns: 1fr; /* Single column layout for cards */
    gap: 20px;
  }

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

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

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

  .page-blog__card-excerpt {
    font-size: 0.95em;
  }

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

  /* Ensure content containers also adapt */
  .page-blog__section,
  .page-blog__article-card,
  .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 4. Buttons and button containers (already covered above, but re-emphasize) */
  .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: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important; /* Ensure buttons wrap if needed */
    gap: 10px;
  }

  .page-blog__cta-buttons {
    flex-direction: column; /* Default to column for CTA group */
  }

  /* 5. Registration tutorial and FAQ blocks (general text readability) */
  .page-blog p,
  .page-blog li {
    font-size: 1em;
  }

  .page-blog__seo-text {
    padding: 30px 0;
  }
}