/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main, #F2FFF6); /* Default text color for dark background */
  background-color: var(--bg, #08160F); /* Dark background */
}

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

.page-blog__section-title {
  font-size: 2.5em;
  font-weight: bold;
  color: var(--text-main, #F2FFF6);
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.2;
}

.page-blog__description {
  font-size: 1.1em;
  color: var(--text-secondary, #A7D9B8);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px auto;
}

/* CTA Button styles */
.page-blog__cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1em;
  transition: background 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
}

.page-blog__cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 60px 0; /* body already handles padding-top */
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 70vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.page-blog__hero-content {
  position: relative; /* Ensure content is above image but not overlapping */
  text-align: center;
  padding: 40px 20px;
  max-width: 900px;
  margin-top: -80px; /* Pull up slightly over the image for visual flow */
  background-color: var(--card-bg, #11271B); /* Use card background for contrast */
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.page-blog__hero-title {
  font-weight: bold;
  color: var(--gold, #F2C14E); /* Using gold for prominence */
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
  /* H1 font size with clamp for responsiveness */
  font-size: clamp(2.2em, 4vw, 3.5em);
}

.page-blog__hero-description {
  font-size: 1.15em;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 30px;
}

/* Latest Articles Section */
.page-blog__latest-articles {
  padding: 60px 0;
  background-color: var(--bg, #08160F);
}

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

.page-blog__article-card {
  background-color: var(--card-bg, #11271B);
  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;
  display: flex;
  flex-direction: column;
}

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

.page-blog__article-image-wrapper {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.page-blog__article-image {
  width: 100%;
  height: 100%;
  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;
  font-weight: bold;
  margin-bottom: 10px;
}

.page-blog__article-title a {
  color: var(--text-main, #F2FFF6);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
  color: var(--glow, #57E38D);
}

.page-blog__article-meta {
  font-size: 0.9em;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 15px;
}

.page-blog__article-excerpt {
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  display: inline-block;
  color: var(--glow, #57E38D);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: auto;
}

.page-blog__read-more:hover {
  color: var(--gold, #F2C14E);
}

.page-blog__view-all-button-wrapper {
  text-align: center;
}

/* Categories Section */
.page-blog__categories {
  padding: 60px 0;
  background-color: var(--deep-green, #0A4B2C);
}

.page-blog__category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-blog__category-item {
  display: inline-block;
  padding: 12px 25px;
  background-color: var(--card-bg, #11271B);
  color: var(--text-main, #F2FFF6);
  text-decoration: none;
  border-radius: 25px;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: 1px solid var(--border, #2E7A4E);
}

.page-blog__category-item:hover {
  background-color: var(--glow, #57E38D);
  color: #08160F;
}

/* Featured Video Section */
.page-blog__featured-video {
  padding: 60px 0;
  background-color: var(--bg, #08160F);
  text-align: center;
}

.page-blog__video-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 30px auto;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

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

.page-blog__video-description {
  font-size: 1.1em;
  color: var(--text-secondary, #A7D9B8);
  max-width: 800px;
  margin: 0 auto 40px auto;
}

/* About Blog Section */
.page-blog__about-blog {
  padding: 60px 0;
  background-color: var(--card-bg, #11271B);
}

.page-blog__about-blog-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
}

.page-blog__text-content {
  flex: 1;
  min-width: 300px;
}

.page-blog__text-content p {
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 1em;
}

.page-blog__image-content {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.page-blog__about-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: block;
  margin: 0 auto;
}

/* CTA Section Bottom */
.page-blog__cta-section--bottom {
  padding: 60px 0;
  background-color: var(--deep-green, #0A4B2C);
  text-align: center;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background-color: var(--bg, #08160F);
}

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

.page-blog__faq-item {
  background-color: var(--card-bg, #11271B);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid var(--divider, #1E3A2A);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--text-main, #F2FFF6);
  cursor: pointer;
  transition: background-color 0.3s ease;
  list-style: none; /* Remove default marker */
}

.page-blog__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for webkit browsers */
}

.page-blog__faq-item[open] .page-blog__faq-question {
  background-color: var(--deep-green, #0A4B2C);
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: var(--glow, #57E38D);
  transition: transform 0.3s ease;
}

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

.page-blog__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  color: var(--text-secondary, #A7D9B8);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-blog__faq-item[open] .page-blog__faq-answer {
  max-height: 500px; /* Adjust as needed for content */
  padding-top: 10px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    margin-top: -60px;
  }
  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__article-title {
    font-size: 1.2em;
  }
  .page-blog__about-blog-content {
    flex-direction: column;
    text-align: center;
  }
  .page-blog__image-content {
    order: -1; /* Image above text on smaller screens */
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-bottom: 40px;
  }
  .page-blog__hero-image-wrapper {
    max-height: 50vh;
  }
  .page-blog__hero-content {
    margin-top: -40px;
    padding: 30px 15px;
  }
  .page-blog__hero-title {
    font-size: clamp(1.8em, 6vw, 2.8em);
  }
  .page-blog__hero-description {
    font-size: 1em;
  }
  .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  .page-blog__description {
    font-size: 0.95em;
    margin-bottom: 20px;
  }
  .page-blog__cta-button {
    padding: 12px 25px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-blog__latest-articles, .page-blog__categories, .page-blog__featured-video, .page-blog__about-blog, .page-blog__cta-section--bottom, .page-blog__faq-section {
    padding: 40px 0;
  }
  .page-blog__article-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-blog__article-image-wrapper {
    height: 180px;
  }
  .page-blog__article-content {
    padding: 20px;
  }
  .page-blog__article-title {
    font-size: 1.1em;
  }
  .page-blog__category-list {
    gap: 10px;
  }
  .page-blog__category-item {
    padding: 10px 20px;
    font-size: 0.9em;
  }
  .page-blog__video-wrapper {
    margin-bottom: 20px;
  }
  .page-blog__video-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }
  .page-blog__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }
  .page-blog__faq-answer {
    font-size: 0.95em;
    padding: 0 20px 15px 20px;
  }

  /* Mobile responsive image styles */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-blog__hero-image-wrapper,
  .page-blog__article-image-wrapper,
  .page-blog__image-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Mobile responsive video styles */
  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  .page-blog__video-section {
    padding-top: 10px !important;
  }

  /* Mobile responsive button styles */
  .page-blog__cta-button,
  .page-blog__read-more,
  .page-blog__category-item {
    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__view-all-button-wrapper,
  .page-blog__cta-section .page-blog__container,
  .page-blog__category-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
  .page-blog__cta-section .page-blog__container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .page-blog__category-list {
    flex-direction: column;
    align-items: center;
  }
}