/* style/blog.css */
/* Body background is #08160F (dark), so main text should be #F2FFF6 (light) */
.page-blog {
  font-family: Arial, sans-serif;
  color: #F2FFF6; /* Text Main */
  background-color: #08160F; /* Background */
  line-height: 1.6;
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0;
  padding-top: 10px; /* Small top padding for first content block */
  text-align: center;
  overflow: hidden;
  background-color: #08160F; /* Ensure background matches body */
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 675px; /* Limit height for hero image */
}

.page-blog__hero-content {
  padding: 40px 20px;
  max-width: 900px;
  margin-top: -80px; /* Adjust to place content below image, but not overlap */
  position: relative;
  z-index: 1;
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* H1 font size with clamp */
  color: #F2FFF6; /* Text Main */
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 1.15rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 30px;
}

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

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog__read-more-btn {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box; /* Ensure padding/border are included in width */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow long words to break */
  text-align: center;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button color */
  color: #F2FFF6; /* Text Main for contrast */
  border: none;
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-blog__btn-secondary,
.page-blog__read-more-btn {
  background: transparent;
  color: #2AD16F; /* A lighter shade of primary for contrast */
  border: 2px solid #2AD16F;
}

.page-blog__btn-secondary:hover,
.page-blog__read-more-btn:hover {
  background: #2AD16F;
  color: #F2FFF6;
}

/* Section Titles */
.page-blog__section-title {
  font-size: 2.5rem;
  color: #F2FFF6; /* Text Main */
  text-align: center;
  margin-bottom: 40px;
  padding-top: 40px;
  font-weight: bold;
}

/* Latest Posts Section */
.page-blog__latest-posts-section {
  padding: 60px 0;
  background-color: #0A4B2C; /* Deep Green for a section */
}

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

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

.page-blog__post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-blog__post-thumbnail {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-blog__card-content {
  padding: 25px;
}

.page-blog__card-title {
  font-size: 1.4rem;
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.4;
}

.page-blog__card-title a {
  color: #F2FFF6; /* Text Main */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__card-title a:hover {
  color: #57E38D; /* Glow color for hover */
}

.page-blog__card-excerpt {
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 15px;
}

.page-blog__post-date {
  font-size: 0.9rem;
  color: #2AD16F; /* A lighter shade of primary for date */
  display: block;
}

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

/* Categories Section */
.page-blog__categories-section {
  padding: 60px 0;
  background-color: #08160F; /* Background */
}

.page-blog__category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-blog__category-list li a {
  display: block;
  padding: 12px 25px;
  background-color: #11271B; /* Card BG */
  color: #F2FFF6; /* Text Main */
  text-decoration: none;
  border-radius: 25px;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: 1px solid #2E7A4E; /* Border */
}

.page-blog__category-list li a:hover {
  background-color: #2AD16F;
  color: #11271B;
}

/* Featured Article Section */
.page-blog__featured-article-section {
  padding: 60px 0;
  background-color: #0A4B2C; /* Deep Green */
}

.page-blog__featured-card {
  display: flex;
  background-color: #11271B; /* Card BG */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid #2E7A4E; /* Border */
}

.page-blog__featured-thumbnail {
  width: 50%;
  height: auto;
  object-fit: cover;
  display: block;
}

.page-blog__featured-content {
  width: 50%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-blog__featured-title {
  font-size: 2rem;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.3;
}

.page-blog__featured-title a {
  color: #F2FFF6; /* Text Main */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__featured-title a:hover {
  color: #57E38D; /* Glow */
}

.page-blog__featured-excerpt {
  font-size: 1.1rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 30px;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background-color: #08160F; /* Background */
}

.page-blog__faq-list {
  max-width: 800px;
  margin: 0 auto;
}

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2rem;
  font-weight: bold;
  color: #F2FFF6; /* Text Main */
  cursor: pointer;
  background-color: #11271B; /* Card BG */
  transition: background-color 0.3s ease;
  list-style: none; /* Remove default marker */
}

.page-blog__faq-question::-webkit-details-marker {
  display: none; /* Remove default marker for Webkit */
}

.page-blog__faq-question:hover {
  background-color: #1E3A2A; /* Divider for hover */
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: #57E38D; /* Glow */
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
  line-height: 1.8;
}

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

.page-blog__cta-section .page-blog__section-title {
  margin-bottom: 20px;
}

.page-blog__cta-description {
  font-size: 1.2rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__featured-card {
    flex-direction: column;
  }

  .page-blog__featured-thumbnail,
  .page-blog__featured-content {
    width: 100%;
  }

  .page-blog__featured-content {
    padding: 30px;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding: 40px 0;
    padding-top: 10px !important;
  }

  .page-blog__main-title {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }

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

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

  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog__read-more-btn {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

  .page-blog__latest-posts-section,
  .page-blog__categories-section,
  .page-blog__featured-article-section,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

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

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

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

  .page-blog__featured-title {
    font-size: 1.5rem;
  }

  .page-blog__featured-content {
    padding: 25px;
  }

  .page-blog__faq-question {
    font-size: 1rem;
    padding: 15px 20px;
  }

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

  /* Mobile image and container 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__latest-posts-section,
  .page-blog__categories-section,
  .page-blog__featured-article-section,
  .page-blog__faq-section,
  .page-blog__cta-section,
  .page-blog__post-grid,
  .page-blog__post-card,
  .page-blog__featured-card,
  .page-blog__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }

  /* Specific rule for __hero-content to avoid overflow if it has negative margins */
  .page-blog__hero-content {
    margin-top: -50px; /* Adjust for mobile */
    padding: 20px 15px;
    max-width: calc(100% - 30px) !important; /* Account for padding */
    width: 100% !important;
  }
}

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