:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --background-color-light: #f5f5f5;
  --button-register-color: #C30808;
  --button-login-color: #C30808;
  --font-color-register-login: #FFFF00;
}

.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark); /* Default text color for light background */
  background-color: var(--background-color-light); /* Assuming body has light background */
}

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

.page-blog__section-title {
  font-size: 2.5em;
  font-weight: 700;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

.page-blog__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.page-blog__description {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.1em;
  color: var(--text-color-dark);
}

/* Hero Section */
.page-blog__hero-section {
  display: flex;
  flex-direction: column; /* Default to column for mobile first */
  align-items: center;
  gap: 40px;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: var(--secondary-color); /* White background for hero */
}

.page-blog__hero-content {
  text-align: center;
  max-width: 800px;
}

.page-blog__main-title {
  font-weight: 800;
  line-height: 1.2;
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: clamp(2.2em, 4vw, 3.5em); 
}

.page-blog__hero-description {
  font-size: 1.2em;
  color: var(--text-color-dark);
  margin-bottom: 30px;
}

.page-blog__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  text-align: center;
  box-sizing: border-box; /* Crucial for responsive buttons */
  max-width: 100%; /* Ensure button doesn't overflow */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-blog__btn-primary {
  background-color: var(--button-register-color); /* Using specific register color */
  color: var(--font-color-register-login); /* Using specific font color */
  border: 2px solid var(--button-register-color);
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-blog__btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--text-color-light);
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 800px;
}

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

/* About Blog Section */
.page-blog__about-blog-section {
    padding: 60px 0;
    background-color: var(--secondary-color);
}

.page-blog__about-blog-section .page-blog__container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.page-blog__text-block {
    font-size: 1.1em;
    color: var(--text-color-dark);
}

.page-blog__text-block p {
    margin-bottom: 15px;
}

.page-blog__about-image-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.page-blog__about-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    object-fit: cover;
}


/* Posts Section */
.page-blog__posts-section {
  padding: 60px 0;
  background-color: var(--background-color-light);
}

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

.page-blog__post-card {
  background-color: var(--secondary-color);
  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;
  display: flex;
  flex-direction: column;
}

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

.page-blog__post-image-wrapper {
  width: 100%;
  height: 225px; /* Fixed height for consistency, adjust as needed */
  overflow: hidden;
}

.page-blog__post-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.page-blog__post-card:hover .page-blog__post-image {
  transform: scale(1.05);
}

.page-blog__post-content {
  padding: 20px;
  flex-grow: 1; /* Allow content to grow and push button to bottom */
  display: flex;
  flex-direction: column;
}

.page-blog__post-title {
  font-size: 1.4em;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__post-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
  opacity: 0.9;
}

.page-blog__post-date {
  font-size: 0.9em;
  color: #777;
  margin-bottom: 15px;
  display: block;
}

.page-blog__post-excerpt {
  font-size: 1em;
  color: var(--text-color-dark);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: var(--text-color-light);
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
  align-self: flex-start; /* Align button to start within flex column */
}

.page-blog__read-more-btn:hover {
  opacity: 0.9;
}

.page-blog__view-all-wrapper {
  text-align: center;
}

.page-blog__view-all-btn {
  display: inline-block;
  padding: 12px 25px;
  background-color: var(--primary-color);
  color: var(--text-color-light);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.page-blog__view-all-btn:hover {
  opacity: 0.9;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background-color: var(--secondary-color);
}

.page-blog__faq-list {
  max-width: 900px;
  margin: 0 auto;
  border-top: 1px solid #e0e0e0;
}

.page-blog__faq-item {
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 10px;
}

.page-blog__faq-item details { /* Ensure details itself is styled */
    margin-bottom: 10px;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  font-size: 1.2em;
  font-weight: 600;
  color: var(--primary-color);
  cursor: pointer;
  list-style: none; /* For details/summary */
}

.page-blog__faq-question::-webkit-details-marker {
    display: none;
}

.page-blog__faq-qtext {
  flex-grow: 1;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  margin-left: 15px;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

.page-blog__faq-answer {
  padding: 0 0 20px 0;
  font-size: 1.05em;
  color: var(--text-color-dark);
  line-height: 1.6;
}

.page-blog__faq-answer p {
    margin-bottom: 10px;
}

/* Bottom CTA Section */
.page-blog__cta-bottom-section {
  padding: 60px 0;
  background-color: var(--background-color-light);
}

.page-blog__cta-bottom-section .page-blog__container {
  padding: 40px;
  border-radius: 10px;
  text-align: center;
}

.page-blog__dark-section {
  background-color: var(--primary-color); /* Dark background */
  color: var(--text-color-light); /* Light text */
}

.page-blog__dark-section .page-blog__section-title {
  color: var(--text-color-light);
}

.page-blog__dark-section .page-blog__section-title::after {
  background-color: var(--text-color-light);
}

.page-blog__dark-section .page-blog__description {
  color: var(--text-color-light);
}

/* Responsive Design */
@media (min-width: 769px) {
  .page-blog__hero-section {
    flex-direction: row;
    justify-content: space-around;
    padding: 80px 40px;
    text-align: left;
  }

  .page-blog__hero-content {
    text-align: left;
    max-width: 50%;
  }

  .page-blog__hero-image-wrapper {
    max-width: 40%;
  }

  .page-blog__cta-buttons {
    justify-content: flex-start;
  }

  .page-blog__about-blog-section .page-blog__container {
    flex-direction: row;
    align-items: center;
  }

  .page-blog__text-block,
  .page-blog__about-image-wrapper {
      flex: 1;
  }

  .page-blog__text-block {
      padding-right: 40px;
  }
}

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

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

  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important; /* body handles --header-offset, this is decorative */
  }

  .page-blog__main-title {
    font-size: clamp(1.8em, 8vw, 2.5em); /* Adjust clamp for smaller screens */
  }

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

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

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
  }

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

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

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

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

  /* Image responsive rules for content area */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__about-blog-section,
  .page-blog__posts-section,
  .page-blog__faq-section,
  .page-blog__cta-bottom-section,
  .page-blog__hero-image-wrapper,
  .page-blog__about-image-wrapper,
  .page-blog__post-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow */
  }

  /* Specific padding for sections */
  .page-blog__hero-section,
  .page-blog__about-blog-section,
  .page-blog__posts-section,
  .page-blog__faq-section,
  .page-blog__cta-bottom-section {
      padding-left: 0;
      padding-right: 0;
  }

  /* Ensure inner container padding is applied */
  .page-blog__about-blog-section .page-blog__container,
  .page-blog__posts-section .page-blog__container,
  .page-blog__faq-section .page-blog__container,
  .page-blog__cta-bottom-section .page-blog__container {
      padding-left: 15px;
      padding-right: 15px;
  }

  .page-blog__faq-question {
    font-size: 1.1em;
    padding: 15px 0;
  }

  .page-blog__faq-toggle {
    font-size: 1.3em;
  }

  .page-blog__faq-answer {
    font-size: 1em;
    padding: 0 0 15px 0;
  }

  .page-blog__cta-bottom-section .page-blog__container {
    padding: 30px 15px;
  }
}

/* Color contrast adjustments for dark background sections */
.page-blog__dark-bg {
  color: var(--text-color-light);
}

.page-blog__light-bg {
  color: var(--text-color-dark);
}

/* Ensure no filter on images */
.page-blog img {
    filter: none;
}