/* style/blog.css */

/* --- General Styles --- */
.page-blog {
  font-family: 'Arial', sans-serif;
  color: #F2FFF6; /* Main text color for dark body background */
  background-color: transparent; /* body handles #08160F */
  line-height: 1.6;
}

.page-blog__section-title {
  font-size: clamp(28px, 4vw, 48px); /* H1 size constraint applied to H2s */
  font-weight: 700;
  color: #F2FFF6; /* Light text for dark background */
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__section-description {
  font-size: 18px;
  color: #A7D9B8; /* Secondary text color */
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Buttons --- */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 150px;
  text-align: center;
  box-sizing: border-box; /* Crucial for responsive buttons */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #F2FFF6;
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 0 15px rgba(87, 227, 141, 0.5); /* Glow effect */
}

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

.page-blog__btn-secondary:hover {
  background-color: rgba(42, 209, 111, 0.1);
  color: #57E38D;
  border-color: #57E38D;
}

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

/* --- Hero Section --- */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-bottom: 60px; /* Space for content below image */
  padding-top: 10px; /* Small top padding */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height for hero image */
  overflow: hidden;
  position: relative;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-height: 200px; /* Min size requirement */
  filter: none; /* Ensure no filter is used */
}

.page-blog__hero-content {
  position: relative; /* Ensure content is above image but not overlapping */
  z-index: 2;
  padding: 20px;
  max-width: 900px;
  margin-top: -100px; /* Pull content up over the image bottom */
  background-color: rgba(8, 22, 15, 0.8); /* Semi-transparent background for readability */
  border-radius: 10px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.page-blog__main-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  color: #F2FFF6;
  margin-bottom: 15px;
  line-height: 1.1;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.page-blog__description {
  font-size: 19px;
  color: #A7D9B8;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Latest Posts Section --- */
.page-blog__latest-posts-section,
.page-blog__categories-section,
.page-blog__faq-section,
.page-blog__cta-bottom-section {
  max-width: 1200px;
  margin: 60px auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

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

.page-blog__post-card,
.page-blog__category-card {
  background-color: #11271B; /* Card BG color */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid #2E7A4E; /* Border color */
}

.page-blog__post-card:hover,
.page-blog__category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(87, 227, 141, 0.2); /* Glow effect on hover */
}

.page-blog__post-thumbnail,
.page-blog__category-thumbnail {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  min-height: 200px; /* Min size requirement */
  filter: none; /* Ensure no filter is used */
}

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

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

.page-blog__post-title a {
  color: #F2FFF6;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
  color: #57E38D;
}

.page-blog__post-meta {
  font-size: 14px;
  color: #A7D9B8;
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 16px;
  color: #A7D9B8;
  margin-bottom: 20px;
  flex-grow: 1; /* Pushes read more button to bottom */
}

.page-blog__read-more-btn {
  display: inline-block;
  color: #2AD16F;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  align-self: flex-start;
}

.page-blog__read-more-btn:hover {
  color: #57E38D;
  text-decoration: underline;
}

.page-blog__view-all-button-wrapper {
  text-align: center;
  margin-top: 50px;
}

/* --- Categories Section --- */
.page-blog__category-card {
  text-align: center;
}

.page-blog__category-title {
  font-size: 20px;
  font-weight: 700;
  color: #F2FFF6;
  margin-top: 15px;
  margin-bottom: 10px;
}

.page-blog__category-description {
  font-size: 15px;
  color: #A7D9B8;
  padding: 0 15px 15px;
}

/* --- FAQ Section --- */
.page-blog__faq-section {
  background-color: #0A4B2C; /* Deep Green background for FAQ */
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-top: 40px;
}

.page-blog__faq-image-wrapper {
  text-align: center;
}

.page-blog__faq-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  min-height: 200px; /* Min size requirement */
  filter: none; /* Ensure no filter is used */
}

.page-blog__faq-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-blog__faq-item {
  background-color: #11271B; /* Card BG color */
  border-radius: 10px;
  border: 1px solid #2E7A4E;
  overflow: hidden;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 18px;
  font-weight: 600;
  color: #F2FFF6;
  cursor: pointer;
  background-color: #1A3427;
  border-bottom: 1px solid #2E7A4E;
}

.page-blog__faq-item[open] .page-blog__faq-question {
  border-bottom: 1px solid #57E38D;
}

.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: 700;
  color: #57E38D;
  margin-left: 15px;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  color: #F2FFF6;
}

.page-blog__faq-answer {
  padding: 15px 25px 20px;
  font-size: 16px;
  color: #A7D9B8;
  line-height: 1.7;
}

.page-blog__faq-answer p {
  margin: 0;
}

/* --- Bottom CTA Section --- */
.page-blog__cta-bottom-section {
  text-align: center;
  padding: 60px 20px;
  background-color: #11271B; /* Card BG color */
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid #2E7A4E;
}

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    margin-top: -80px;
    padding: 15px;
  }
  .page-blog__main-title {
    font-size: clamp(28px, 4.5vw, 48px);
  }
  .page-blog__description {
    font-size: 17px;
  }
  .page-blog__section-title {
    font-size: clamp(24px, 3.5vw, 40px);
  }
  .page-blog__post-title {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-bottom: 40px;
    padding-top: 10px !important; /* Ensure small top padding */
  }
  .page-blog__hero-content {
    margin-top: -60px;
    padding: 10px;
  }
  .page-blog__main-title {
    font-size: clamp(24px, 6vw, 36px);
  }
  .page-blog__description {
    font-size: 16px;
  }
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-blog__latest-posts-section,
  .page-blog__categories-section,
  .page-blog__faq-section,
  .page-blog__cta-bottom-section {
    margin: 40px auto;
    padding: 20px 15px;
  }
  .page-blog__posts-grid,
  .page-blog__categories-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-blog__post-thumbnail,
  .page-blog__category-thumbnail {
    height: 180px;
    min-height: 200px !important;
  }
  .page-blog__faq-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .page-blog__faq-image {
    min-height: 200px !important;
  }

  /* Mobile image responsive adaptation */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-blog__hero-image-wrapper,
  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__faq-image-wrapper,
  .page-blog__cta-buttons,
  .page-blog__faq-items {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  /* Specific override for sections that already have padding */
  .page-blog__latest-posts-section,
  .page-blog__categories-section,
  .page-blog__faq-section,
  .page-blog__cta-bottom-section {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

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