/* style/blog.css */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text for light body background */
  background-color: var(--background, #FFFFFF); /* Ensure body background is light */
}

.page-blog__hero-section {
  position: relative;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Fixed header spacing */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 500px;
  background: linear-gradient(90deg, #017439 0%, #005f2f 100%); /* Brand color gradient */
  color: #ffffff;
}

.page-blog__hero-container {
  max-width: 800px;
  text-align: center;
  z-index: 1;
  position: relative;
}

.page-blog__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: #FFFFFF;
  line-height: 1.2;
}

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

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

.page-blog__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  z-index: 0;
}

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

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

.page-blog__featured-articles, .page-blog__recent-articles, .page-blog__faq-section {
  padding: 60px 0;
}

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

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

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

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

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

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

.page-blog__article-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: #017439;
}

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

.page-blog__article-link:hover {
  text-decoration: underline;
}

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

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

.page-blog__read-more:hover {
  color: #005f2f;
  text-decoration: underline;
}

.page-blog__articles-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.page-blog__list-item {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__list-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.page-blog__list-image {
  width: 300px;
  height: 200px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.page-blog__list-content {
  padding: 25px;
  flex-grow: 1;
}

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

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

.page-blog__cta-section {
  padding: 80px 20px;
  text-align: center;
  background: linear-gradient(135deg, #017439 0%, #005f2f 100%);
  color: #ffffff;
}

.page-blog__cta-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  color: #FFFFFF;
}

.page-blog__cta-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

.page-blog__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow wrapping for multiple buttons */
}

.page-blog__btn-primary {
  background: #C30808; /* Custom color for register/login */
  color: #FFFF00; /* Custom font color for register/login */
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: 2px solid #C30808;
  box-sizing: border-box;
}

.page-blog__btn-primary:hover {
  background-color: #a00606;
  transform: translateY(-2px);
}

.page-blog__btn-secondary {
  background: #ffffff;
  color: #017439;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.3s ease, color 0.3s ease;
  border: 2px solid #017439;
  box-sizing: border-box;
}

.page-blog__btn-secondary:hover {
  background-color: #e0e0e0;
  color: #005f2f;
  transform: translateY(-2px);
}

/* FAQ Section */
.page-blog__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-blog__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #017439;
  cursor: pointer;
  background-color: #f9f9f9;
  transition: background-color 0.3s ease;
}

.page-blog__faq-question:hover {
  background-color: #f0f0f0;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
  color: #017439;
}

.page-blog__faq-item.active .page-blog__faq-toggle {
  transform: rotate(45deg);
}

.page-blog__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #555555;
}

.page-blog__faq-item.active .page-blog__faq-answer {
  max-height: 1000px !important; /* Sufficiently large for content */
  padding: 15px 25px 20px;
}

.page-blog__faq-answer p {
  margin: 0;
  font-size: 1em;
  line-height: 1.7;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__hero-title {
    font-size: 2.8em;
  }
  .page-blog__cta-title {
    font-size: 2.2em;
  }
  .page-blog__list-item {
    flex-direction: column;
    text-align: center;
  }
  .page-blog__list-image {
    width: 100%;
    height: 250px;
  }
}

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

  .page-blog__hero-section {
    min-height: 400px;
    padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header spacing */
  }

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

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

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

  .page-blog__btn-primary, .page-blog__btn-secondary {
    width: 100%;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px;
    font-size: 1em;
  }

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

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

  .page-blog__articles-grid {
    grid-template-columns: 1fr;
  }

  .page-blog__article-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  .page-blog__article-image {
    max-width: 100% !important;
    height: auto !important;
    width: 100% !important;
    display: block !important;
  }

  .page-blog__list-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-blog__list-image {
    width: 100%;
    height: 200px;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

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

  .page-blog__cta-title {
    font-size: 1.8em;
  }

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

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  
  .page-blog__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }

  .page-blog__faq-answer {
    padding: 0 20px;
  }

  .page-blog__faq-item.active .page-blog__faq-answer {
    padding: 10px 20px 15px;
  }

  /* Ensure all images and containers are responsive */
  .page-blog img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__featured-articles,
  .page-blog__recent-articles,
  .page-blog__cta-section,
  .page-blog__faq-section,
  .page-blog__articles-grid,
  .page-blog__articles-list,
  .page-blog__hero-cta-buttons,
  .page-blog__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__hero-section,
  .page-blog__cta-section {
    padding-left: 0;
    padding-right: 0;
  }

  .page-blog__hero-container {
    padding-left: 15px;
    padding-right: 15px;
  }
}