/* style/blog.css */

/* General styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  background-color: #08160F; /* Custom background color */
  color: #F2FFF6; /* Main text color for dark background */
  line-height: 1.6;
  padding-top: 10px; /* Small top padding, assuming shared.css handles header offset on body */
}

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

/* Hero Section */
.page-blog__hero-section {
  padding: 60px 0;
  text-align: center;
}

.page-blog__main-title {
  font-size: 48px;
  font-weight: bold;
  color: #F2FFF6; /* Main text color */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__intro-text {
  font-size: 18px;
  color: #A7D9B8; /* Secondary text color */
  max-width: 800px;
  margin: 0 auto 30px;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  width: 100%; /* Ensure container takes full width */
  max-width: 100%; /* Ensure container takes full width */
  box-sizing: border-box;
  overflow: hidden;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  max-width: 100%; /* Ensure button adapts to container */
  box-sizing: border-box;
}

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

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

.page-blog__btn-secondary {
  background: transparent;
  color: #2AD16F; /* Green color for secondary button text */
  border: 2px solid #2AD16F; /* Green border */
}

.page-blog__btn-secondary:hover {
  background: rgba(42, 209, 111, 0.1);
  transform: translateY(-2px);
}

/* Blog Posts Section */
.page-blog__posts-section {
  padding: 60px 0;
}

.page-blog__section-title {
  font-size: 36px;
  font-weight: bold;
  color: #F2FFF6; /* Main text color */
  text-align: center;
  margin-bottom: 40px;
}

.page-blog__posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

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

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

.page-blog__post-link {
  text-decoration: none;
  display: block;
  color: inherit;
}

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

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

.page-blog__post-title {
  font-size: 22px;
  font-weight: bold;
  color: #F2FFF6; /* Main text color */
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.page-blog__post-excerpt {
  font-size: 16px;
  color: #A7D9B8; /* Secondary text color */
  margin-bottom: 20px;
}

.page-blog__read-more {
  display: inline-block;
  color: #2AD16F; /* Green color for link */
  font-weight: bold;
  text-decoration: none;
}

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

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

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
}

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

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid #2E7A4E; /* Custom border color */
  overflow: hidden;
  background: #11271B; /* Card background color */
}
details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: #F2FFF6; /* Main text color */
}
details.page-blog__faq-item summary.page-blog__faq-question::-webkit-details-marker {
  display: none;
}
details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: #0A4B2C; /* Deep Green for hover */
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #F2FFF6; /* Main text color */
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #2AD16F; /* Green color for toggle icon */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 25px 20px;
  background: #08160F; /* Background color for answer */
  border-radius: 0 0 10px 10px;
  color: #A7D9B8; /* Secondary text color */
}
details.page-blog__faq-item .page-blog__faq-answer p {
  margin: 0;
}


/* General image and container responsive styles */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-blog__section,
.page-blog__card,
.page-blog__container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* --- Responsive styles for mobile (max-width: 768px) --- */
@media (max-width: 768px) {
  .page-blog {
    padding-top: 10px !important; /* Ensure minimal top padding */
    font-size: 15px;
  }

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

  /* Hero Section */
  .page-blog__hero-section {
    padding: 40px 0;
  }

  .page-blog__main-title {
    font-size: 32px;
    margin-bottom: 15px;
  }

  .page-blog__intro-text {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .page-blog__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    padding: 0 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;
  }

  /* Blog Posts Section */
  .page-blog__posts-section {
    padding: 40px 0;
  }

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

  .page-blog__posts-grid {
    grid-template-columns: 1fr; /* Single column for blog posts */
    gap: 20px;
  }

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

  .page-blog__post-title {
    font-size: 18px;
  }

  .page-blog__post-excerpt {
    font-size: 15px;
  }

  /* FAQ Section */
  .page-blog__faq-section {
    padding: 40px 0;
  }

  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px 20px;
  }
  .page-blog__faq-qtext {
    font-size: 16px;
  }
  details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 20px 15px;
  }

  /* General image and container responsive overrides */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}