/* style/blog.css */

/* Base styles for the blog page */
.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;
}

.page-blog__section-title {
  font-size: 2.5em;
  font-weight: bold;
  color: #F2FFF6; /* Text Main */
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

.page-blog__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #2AD16F 0%, #13994A 100%); /* Button gradient for accent */
  border-radius: 2px;
}

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

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 675px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-blog__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin-top: -120px; /* Adjust to slightly overlap the image, but text is below */
  padding: 40px;
  background: rgba(17, 39, 27, 0.85); /* Card BG with transparency */
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  border: 1px solid #2E7A4E; /* Border */
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.2em); /* Using clamp for responsive H1 */
  color: #F2FFF6; /* Text Main */
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.2;
}

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

.page-blog__cta-button {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

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

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

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

.page-blog__dark-section {
  background-color: #08160F; /* Background */
  color: #F2FFF6; /* Text Main */
}

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

.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.5);
}

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

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

.page-blog__post-title {
  font-size: 1.4em;
  color: #F2FFF6; /* Text Main */
  padding: 15px 20px 0;
  margin-bottom: 10px;
  min-height: 60px; /* Ensure consistent height for titles */
}

.page-blog__post-meta {
  font-size: 0.9em;
  color: #A7D9B8; /* Text Secondary */
  padding: 0 20px;
  margin-bottom: 10px;
}

.page-blog__post-excerpt {
  font-size: 1em;
  color: #A7D9B8; /* Text Secondary */
  padding: 0 20px;
  margin-bottom: 20px;
}

.page-blog__read-more {
  display: inline-block;
  color: #2AD16F; /* Main color */
  text-decoration: none;
  font-weight: bold;
  padding: 0 20px 20px;
}

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

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

.page-blog__btn-secondary {
  background: #11271B; /* Card BG */
  color: #2AD16F; /* Main color */
  border: 2px solid #2AD16F; /* Main color */
}

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

/* Popular Categories Section */
.page-blog__popular-categories {
  padding: 80px 0;
  background-color: #0A4B2C; /* Deep Green, slightly lighter than background for contrast */
  color: #F2FFF6; /* Text Main */
}

.page-blog__light-bg {
  background-color: #0A4B2C; /* Deep Green */
  color: #F2FFF6; /* Text Main */
}

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

.page-blog__category-card {
  display: block;
  background-color: #11271B; /* Card BG */
  color: #F2FFF6; /* Text Main */
  padding: 15px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: 1px solid #2E7A4E; /* Border */
}

.page-blog__category-card:hover {
  background-color: #2E7A4E; /* Border color for hover */
  transform: translateY(-3px);
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 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-radius: 8px;
  margin-bottom: 15px;
  border: 1px solid #2E7A4E; /* Border */
  overflow: hidden; /* For smooth transition on details */
}

.page-blog__faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.1em;
  color: #F2FFF6; /* Text Main */
  transition: background-color 0.3s ease;
}

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

.page-blog__faq-item summary:hover {
  background-color: #2E7A4E; /* Border color for hover */
}

.page-blog__faq-qtext {
  flex-grow: 1;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  margin-left: 15px;
  color: #2AD16F; /* Main color */
}

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

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

.page-blog__cta-container {
  max-width: 800px;
}

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

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

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    margin-top: -80px;
    padding: 30px;
  }
  .page-blog__main-title {
    font-size: clamp(1.8em, 4.5vw, 2.8em);
  }
  .page-blog__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-bottom: 40px;
  }
  .page-blog__hero-content {
    margin-top: -60px;
    padding: 20px;
    max-width: calc(100% - 30px);
  }
  .page-blog__main-title {
    font-size: clamp(1.6em, 6vw, 2.5em);
  }
  .page-blog__description {
    font-size: 1em;
  }
  .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  .page-blog__post-grid {
    grid-template-columns: 1fr;
  }
  .page-blog__post-image {
    height: auto !important;
    max-width: 100% !important;
    width: 100% !important;
    display: block !important;
  }
  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__faq-item,
  .page-blog__cta-section,
  .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-blog__hero-section {
    padding-top: 10px !important; /* body handles --header-offset */
  }
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-blog__cta-button,
  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="button"],
  .page-blog a[class*="btn"] {
    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;
  }
  /* No video section on this page, but if it were, it would also need */
  /* .page-blog__video-section { padding-top: 10px !important; } */
}

@media (max-width: 480px) {
  .page-blog__hero-content {
    margin-top: -40px;
    padding: 15px;
  }
  .page-blog__main-title {
    font-size: clamp(1.4em, 7vw, 2em);
  }
  .page-blog__section-title {
    font-size: 1.5em;
  }
  .page-blog__cta-title {
    font-size: 1.5em;
  }
}

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