/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for light background */
  background-color: #ffffff; /* Explicitly set for clarity, though body is handled by shared */
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  height: 600px; /* Adjust as needed */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: var(--header-offset, 120px);
  background-color: #017439; /* Fallback for image loading */
}

.page-blog__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.page-blog__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
  z-index: 1;
}

.page-blog__hero-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
  max-width: 900px;
  padding: 0 20px;
}

.page-blog__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
}

.page-blog__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-blog__hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* General Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background-color: #017439;
  color: #ffffff;
  border: 2px solid #017439;
}

.page-blog__btn-primary:hover {
  background-color: #005a2d;
  border-color: #005a2d;
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.page-blog__btn-secondary:hover {
  background-color: #ffffff;
  color: #017439;
}

.page-blog__btn-large {
  padding: 18px 35px;
  font-size: 1.1em;
}

/* Section common styles */
.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

.page-blog__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 15px;
  color: #017439;
}

.page-blog__section-subtitle {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  color: #555555;
}

.page-blog__dark-bg .page-blog__section-title,
.page-blog__dark-bg .page-blog__section-subtitle {
  color: #ffffff;
}

.page-blog__dark-bg {
  background-color: #017439;
  color: #ffffff;
}

.page-blog__light-bg {
  background-color: #ffffff;
  color: #333333;
}

/* Latest Articles Section */
.page-blog__latest-articles {
  padding: 80px 0;
}

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

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

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

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

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

.page-blog__article-title {
  font-size: 1.4em;
  margin-bottom: 15px;
  color: #017439;
}

.page-blog__article-title a {
  text-decoration: none;
  color: #017439;
  transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
  color: #005a2d;
}

.page-blog__article-excerpt {
  font-size: 0.95em;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more-link {
  display: inline-block;
  color: #017439;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: auto;
}

.page-blog__read-more-link:hover {
  color: #005a2d;
  text-decoration: underline;
}

/* Categories Section */
.page-blog__categories-section {
  padding: 80px 0;
  background-color: #017439;
}

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

.page-blog__category-card {
  background-color: #ffffff;
  color: #017439;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

.page-blog__category-card:hover {
  background-color: #e6ffe6; /* Lighter green tint */
  color: #005a2d;
  transform: translateY(-3px);
}

/* Featured Article/Video Section */
.page-blog__featured-article {
  padding: 80px 0;
}

.page-blog__featured-content-wrapper {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.page-blog__video-wrapper {
  flex: 2;
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  background-color: #000;
}

.page-blog__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.page-blog__text-content {
  flex: 1;
  background-color: #f9f9f9;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-blog__text-content h3 {
  font-size: 1.8em;
  color: #017439;
  margin-bottom: 20px;
}

.page-blog__text-content p {
  margin-bottom: 15px;
  color: #444444;
}

/* Why Follow Section */
.page-blog__why-follow-section {
  padding: 80px 0;
}

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

.page-blog__benefit-item {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-blog__benefit-item h3 {
  font-size: 1.5em;
  color: #ffffff;
  margin-bottom: 15px;
}

.page-blog__benefit-item p {
  color: #f0f0f0;
  font-size: 0.95em;
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  text-align: center;
}

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

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

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

.page-blog__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  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.15em;
  font-weight: bold;
  color: #ffffff;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.05);
  transition: background-color 0.3s ease;
}

.page-blog__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

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

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

.page-blog__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  color: #f0f0f0;
}

.page-blog__faq-item.active .page-blog__faq-answer {
  max-height: 1000px !important; /* Sufficiently large */
  padding: 15px 25px;
}

.page-blog__faq-answer p {
  margin-bottom: 10px;
  font-size: 0.95em;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-title {
    font-size: 2.8em;
  }
  .page-blog__hero-description {
    font-size: 1.1em;
  }
  .page-blog__featured-content-wrapper {
    flex-direction: column;
  }
  .page-blog__text-content {
    width: 100%;
    margin-top: 30px;
  }
  .page-blog__video-wrapper {
    padding-bottom: 56.25%; /* Maintain aspect ratio */
    height: auto;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    height: 500px;
    padding-top: var(--header-offset, 120px) !important;
  }
  .page-blog__hero-title {
    font-size: 2.2em;
  }
  .page-blog__hero-description {
    font-size: 1em;
  }
  .page-blog__hero-actions {
    flex-direction: column;
    gap: 15px;
  }
  .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;
  }
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__section-subtitle {
    font-size: 0.9em;
  }
  .page-blog__container,
  .page-blog__article-card,
  .page-blog__category-card,
  .page-blog__benefit-item,
  .page-blog__faq-item,
  .page-blog__text-content {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-blog__article-grid {
    grid-template-columns: 1fr;
  }
  .page-blog__category-grid,
  .page-blog__benefits-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  .page-blog img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-blog__video,
  .page-blog__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .page-blog__video-wrapper {
    padding-bottom: 56.25% !important; /* Ensure aspect ratio on mobile */
  }
}

@media (max-width: 480px) {
  .page-blog__hero-section {
    height: 450px;
  }
  .page-blog__hero-title {
    font-size: 1.8em;
  }
  .page-blog__hero-description {
    font-size: 0.9em;
  }
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    font-size: 0.9em;
    padding: 12px 20px;
  }
  .page-blog__section-title {
    font-size: 1.8em;
  }
  .page-blog__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }
  .page-blog__faq-answer {
    padding: 10px 20px;
  }
}