/* style/blog.css */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light body background */
  background-color: #f8f9fa; /* Inherited from shared.css body background */
}

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

.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
  background-color: #08160F; /* Dark background for hero */
  color: #F2FFF6;
  text-align: center;
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  opacity: 0.3;
  filter: brightness(0.6);
  min-height: 400px; /* Ensure minimum height for hero image */
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 40px 20px;
}

.page-blog__main-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #F2FFF6;
}

.page-blog__description {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #A7D9B8;
}

.page-blog__cta-button {
  display: inline-block;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__cta-button:hover {
  opacity: 0.9;
}

.page-blog__cta-button--secondary {
  background: #11271B;
  border: 2px solid #2E7A4E;
  color: #F2FFF6;
  margin-left: 10px;
}

.page-blog__cta-button--secondary:hover {
  background: #0A4B2C;
}

.page-blog__section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
  color: #11A84E;
}

.page-blog__section-description {
  font-size: 1rem;
  text-align: center;
  margin-bottom: 40px;
  color: #555555;
}

.page-blog__text-main {
  color: #F2FFF6;
}

.page-blog__text-secondary {
  color: #A7D9B8;
}

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 60px 0;
  background-color: #f8f9fa;
  color: #333333;
}

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

.page-blog__post-card {
  background-color: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: #333333;
}

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

.page-blog__post-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-blog__post-image {
  width: 100%;
  height: 225px;
  object-fit: cover;
  display: block;
  min-width: 200px; /* Ensure min size */
  min-height: 200px; /* Ensure min size */
}

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

.page-blog__post-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #11A84E;
}

.page-blog__post-excerpt {
  font-size: 0.95rem;
  color: #555555;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-blog__post-date {
  font-size: 0.85rem;
  color: #777777;
  text-align: right;
  display: block;
}

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

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

.page-blog__category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.page-blog__category-card {
  background-color: #11271B; /* Custom card background */
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: #F2FFF6;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: 1px solid #2E7A4E; /* Custom border */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-blog__category-card:hover {
  background-color: #0A4B2C;
  transform: translateY(-3px);
}

.page-blog__category-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #57E38D; /* Custom glow color */
}

.page-blog__category-description {
  font-size: 0.9rem;
  color: #A7D9B8; /* Custom secondary text color */
}

/* Featured Article Section */
.page-blog__featured-article {
  padding: 60px 0;
  background-color: #f8f9fa;
  color: #333333;
}

.page-blog__article-content {
  max-width: 900px;
  margin: 0 auto;
}

.page-blog__article-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 30px;
  display: block;
  min-width: 200px; /* Ensure min size */
  min-height: 200px; /* Ensure min size */
}

.page-blog__article-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #11A84E;
}

.page-blog__article-content p {
  margin-bottom: 15px;
  font-size: 1rem;
  color: #333333;
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  background-color: #08160F; /* Custom background */
  text-align: center;
  color: #F2FFF6;
}

.page-blog__cta-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.page-blog__cta-content .page-blog__cta-button {
  margin: 0 5px;
}

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

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

.page-blog__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #333333;
}

.page-blog__faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px;
  font-weight: bold;
  font-size: 1.1rem;
  color: #11A84E;
  display: flex;
  justify-content: space-between;
  align-items: center;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

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

.page-blog__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

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

.page-blog__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 1rem;
  color: #555555;
}

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

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

  .page-blog__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
  }

  .page-blog__hero-content {
    padding: 20px 15px;
  }

  .page-blog__main-title {
    font-size: 2.2rem;
  }

  .page-blog__description {
    font-size: 1rem;
  }

  .page-blog__cta-button {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    margin: 10px 0 !important; /* Adjust margin for stacked buttons */
  }

  .page-blog__cta-content {
    padding: 0 15px;
  }

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

  .page-blog__section-description {
    font-size: 0.95rem;
    margin-bottom: 30px;
  }

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

  .page-blog__post-grid,
  .page-blog__category-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__post-image,
  .page-blog__article-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .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__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-blog__hero-image {
    min-height: 300px;
  }

  .page-blog__article-subtitle {
    font-size: 1.3rem;
  }

  .page-blog__faq-item summary {
    font-size: 1rem;
    padding: 15px;
  }

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

@media (max-width: 480px) {
  .page-blog__main-title {
    font-size: 1.8rem;
  }

  .page-blog__section-title {
    font-size: 1.6rem;
  }

  .page-blog__cta-button--secondary {
    margin-left: 0;
  }
}