/* style/blog.css */

:root {
  --page-blog-primary-color: #11A84E;
  --page-blog-secondary-color: #22C768;
  --page-blog-card-bg: #11271B;
  --page-blog-bg: #08160F;
  --page-blog-text-main: #F2FFF6;
  --page-blog-text-secondary: #A7D9B8;
  --page-blog-border-color: #2E7A4E;
  --page-blog-glow-color: #57E38D;
  --page-blog-gold-color: #F2C14E;
  --page-blog-divider-color: #1E3A2A;
  --page-blog-deep-green: #0A4B2C;
  --page-blog-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --page-blog-light-text: #F2FFF6;
  --page-blog-dark-text: #333333;
  --page-blog-light-bg-color: #ffffff;
}

.page-blog {
  color: var(--page-blog-text-main); /* Default text color for dark body background */
  background-color: var(--page-blog-bg); /* Ensure sections have clear backgrounds */
}

/* Global container for content width */
.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;
  padding-bottom: 60px; /* Space below content */
  text-align: center;
  overflow: hidden;
  color: var(--page-blog-text-main);
  background-color: var(--page-blog-deep-green); /* Use deep green for hero background */
}

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

.page-blog__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7); /* Darken image slightly for text readability */
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  margin-top: -150px; /* Overlap content slightly with image for visual flow */
  padding: 0 20px;
  max-width: 900px;
  background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent background for text */
  padding: 30px;
  border-radius: 8px;
}

.page-blog__main-title {
  color: var(--page-blog-gold-color);
  font-size: clamp(2em, 5vw, 3.2em);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-blog__description {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 30px;
  color: var(--page-blog-text-main);
}

.page-blog__cta-button {
  display: inline-block;
  background: var(--page-blog-button-gradient);
  color: #ffffff;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  opacity: 0.9;
}

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 60px 0;
  background-color: var(--page-blog-light-bg-color);
  color: var(--page-blog-dark-text);
}

.page-blog__section-title {
  font-size: 2.5em;
  font-weight: 700;
  color: var(--page-blog-primary-color);
  text-align: center;
  margin-bottom: 20px;
}

.page-blog__section-description {
  font-size: 1.1em;
  line-height: 1.6;
  color: #555;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

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

.page-blog__post-card {
  background-color: var(--page-blog-light-bg-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-blog__post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

.page-blog__post-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-blog__post-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__post-title a {
  color: var(--page-blog-primary-color);
  text-decoration: none;
}

.page-blog__post-title a:hover {
  text-decoration: underline;
}

.page-blog__post-meta {
  font-size: 0.9em;
  color: #777;
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 1em;
  line-height: 1.6;
  color: #444;
  margin-bottom: 20px;
}

.page-blog__read-more {
  display: inline-block;
  color: var(--page-blog-primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: var(--page-blog-secondary-color);
  text-decoration: underline;
}

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

.page-blog__view-all-button {
  display: inline-block;
  background: var(--page-blog-button-gradient);
  color: #ffffff;
  padding: 12px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

/* Categories Section */
.page-blog__categories-section {
  padding: 60px 0;
  background-color: var(--page-blog-card-bg);
  color: var(--page-blog-text-main);
}

.page-blog__category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-blog__category-item {
  background-color: var(--page-blog-deep-green);
  border: 1px solid var(--page-blog-border-color);
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-blog__category-item a {
  display: block;
  padding: 10px 20px;
  color: var(--page-blog-text-main);
  text-decoration: none;
  font-weight: 500;
}

.page-blog__category-item:hover {
  background-color: var(--page-blog-primary-color);
  transform: translateY(-3px);
}

/* Featured Articles Section */
.page-blog__featured-articles {
  padding: 60px 0;
  background-color: var(--page-blog-light-bg-color);
  color: var(--page-blog-dark-text);
}

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

.page-blog__article-item {
  background-color: var(--page-blog-light-bg-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-blog__article-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

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

.page-blog__article-title {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__article-title a {
  color: var(--page-blog-primary-color);
  text-decoration: none;
}

.page-blog__article-title a:hover {
  text-decoration: underline;
}

.page-blog__article-meta {
  font-size: 0.9em;
  color: #777;
  margin-bottom: 15px;
}

.page-blog__article-excerpt {
  font-size: 1em;
  line-height: 1.6;
  color: #444;
  margin-bottom: 20px;
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  background-color: var(--page-blog-deep-green);
  text-align: center;
  color: var(--page-blog-text-main);
}

.page-blog__cta-title {
  font-size: 2.8em;
  font-weight: 700;
  color: var(--page-blog-gold-color);
  margin-bottom: 20px;
}

.page-blog__cta-description {
  font-size: 1.2em;
  line-height: 1.7;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: var(--page-blog-text-secondary);
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: var(--page-blog-button-gradient);
  color: #ffffff;
}

.page-blog__btn-secondary {
  background: none;
  border-color: var(--page-blog-primary-color);
  color: var(--page-blog-primary-color);
}

.page-blog__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  opacity: 0.9;
}

.page-blog__btn-secondary:hover {
  transform: translateY(-3px);
  background-color: var(--page-blog-primary-color);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background-color: var(--page-blog-light-bg-color);
  color: var(--page-blog-dark-text);
}

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

.page-blog__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-blog__faq-item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15em;
  font-weight: 600;
  color: var(--page-blog-primary-color);
  cursor: pointer;
  outline: none;
  position: relative;
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: var(--page-blog-primary-color);
  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;
  line-height: 1.7;
  color: #555;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-image-wrapper {
    height: 400px;
  }

  .page-blog__hero-content {
    margin-top: -100px;
    padding: 25px;
  }

  .page-blog__main-title {
    font-size: clamp(2em, 6vw, 3em);
  }

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

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 40px;
  }

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

  .page-blog__hero-content {
    margin-top: -80px;
    padding: 20px;
  }

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

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

  .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__section-title {
    font-size: 2em;
  }

  .page-blog__section-description {
    font-size: 1em;
  }

  .page-blog__posts-grid,
  .page-blog__articles-list {
    grid-template-columns: 1fr;
  }

  .page-blog__post-image,
  .page-blog__article-image {
    height: 200px;
  }

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

  .page-blog__category-list {
    flex-direction: column;
    align-items: center;
  }

  .page-blog__category-item {
    width: 100%;
    max-width: 300px;
  }

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

  .page-blog__cta-description {
    font-size: 1em;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .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-left: 15px;
    padding-right: 15px;
  }

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

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

  /* Mobile image and video responsive force */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper,
  .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;
  }
}

@media (max-width: 480px) {
  .page-blog__hero-content {
    margin-top: -60px;
  }

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

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