/* style/blog.css */

/* General body styling for dark background and light text, assuming shared.css sets --background-color to #08160F */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #F2FFF6; /* Text Main */
  background-color: #08160F; /* Background */
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: 60px; /* Space below content before next section */
  padding-top: 10px; /* Small top padding, body handles header offset */
  overflow: hidden; /* Ensure no overflow from image */
}

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

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.6); /* Slightly dim the image to make text pop */
}

.page-blog__hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: 90%;
  max-width: 800px;
  padding: 20px;
  box-sizing: border-box;
  color: #F2FFF6;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

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

.page-blog__description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #A7D9B8; /* Text Secondary */
}

.page-blog__btn-primary {
  display: inline-block;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #F2FFF6;
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-2px);
}

/* Overview Section */
.page-blog__overview-section {
  padding: 60px 0;
  background-color: #08160F; /* Background */
  text-align: center;
}

.page-blog__section-title {
  font-size: 2.5em;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 30px;
  font-weight: 600;
}

.page-blog__text-content {
  font-size: 1.1em;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
}

/* Latest Posts Section */
.page-blog__latest-posts-section {
  padding: 60px 0;
  background-color: #08160F; /* Background */
}

.page-blog__post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 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-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

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

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

.page-blog__post-title {
  font-size: 1.4em;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__post-excerpt {
  font-size: 0.95em;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 15px;
  height: 90px; /* Fixed height for excerpt */
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-blog__read-more {
  color: #2AD16F;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
}

.page-blog__read-more i {
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.page-blog__post-link:hover .page-blog__read-more i {
  transform: translateX(5px);
}

.page-blog__post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-top: 1px solid #1E3A2A; /* Divider */
  font-size: 0.85em;
  color: #A7D9B8; /* Text Secondary */
}

.page-blog__post-date,
.page-blog__post-category {
  display: inline-block;
  padding: 4px 8px;
  background-color: rgba(46, 122, 78, 0.3); /* Border color with opacity */
  border-radius: 4px;
}

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

.page-blog__btn-secondary {
  display: inline-block;
  background: transparent;
  color: #2AD16F;
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
  border: 2px solid #2AD16F;
  cursor: pointer;
}

.page-blog__btn-secondary:hover {
  background: #2AD16F;
  color: #F2FFF6;
  transform: translateY(-2px);
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  background-color: #11271B; /* Card BG */
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-blog__cta-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0.15;
  z-index: 1;
}

.page-blog__cta-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.page-blog__cta-title {
  font-size: 2.8em;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 20px;
  font-weight: 700;
}

.page-blog__cta-text {
  font-size: 1.2em;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 40px;
}

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

.page-blog__faq-list {
  margin-top: 40px;
}

.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: 18px 25px;
  cursor: pointer;
  font-size: 1.15em;
  color: #F2FFF6; /* Text Main */
  font-weight: 600;
  list-style: none; /* For <summary> */
}

.page-blog__faq-question::-webkit-details-marker {
  display: none; /* For <summary> */
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  color: #2AD16F;
  transition: transform 0.2s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Rotate plus to become cross */
}

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

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

  .page-blog__hero-section {
    padding-bottom: 40px;
  }

  .page-blog__hero-content {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    padding: 20px 15px;
    margin-top: -100px; /* Pull content up over the dimmed hero image */
    background: linear-gradient(to bottom, transparent, #08160F 50%);
    border-radius: 0 0 12px 12px;
    width: 95% !important;
    max-width: 95% !important;
    box-sizing: border-box !important;
  }

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

  .page-blog__description {
    font-size: 1em;
    margin-bottom: 20px;
  }

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

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

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

  .page-blog__text-content {
    font-size: 0.95em;
  }

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

  .page-blog__post-card {
    margin: 0 10px;
  }

  .page-blog__post-image {
    height: 180px;
  }

  .page-blog__post-title {
    font-size: 1.2em;
  }

  .page-blog__post-excerpt {
    height: auto; /* Allow excerpt to expand */
  }

  .page-blog__cta-title {
    font-size: 2em;
  }

  .page-blog__cta-text {
    font-size: 1em;
    margin-bottom: 30px;
  }

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

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

  /* Mobile image and video 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__cta-section,
  .page-blog__faq-list,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__hero-image {
    filter: brightness(0.4); /* Dim more for mobile */
  }

  .page-blog__view-all-button-wrapper {
    padding: 0 20px;
  }

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

/* Ensure content area images are not too small */
.page-blog__post-image {
  min-width: 200px;
  min-height: 200px;
}

/* Specific contrast fixes if needed */
.page-blog__dark-bg {
  color: #ffffff; /* Deep Green background with white text */
  background: #11A84E; 
}

.page-blog__light-bg {
  color: #333333; /* Light background with dark text (not used here, but for completeness) */
  background: #ffffff;
}

.page-blog__medium-bg {
  color: #000000; /* Medium Green background with black text (not used here, but for completeness) */
  background: #22C768;
}

/* Ensure all images maintain original color */
.page-blog img {
  filter: none; /* No filter by default, unless specified for visual effect like hero */
}

.page-blog__hero-image {
  filter: brightness(0.6); /* Specific filter for hero to allow text overlay */
}

@media (max-width: 768px) {
  .page-blog__hero-image {
    filter: brightness(0.4); /* Dim more for mobile */
  }
}