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

.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--page-blog-text-main); /* Default text color for dark background */
  background-color: var(--page-blog-background-color);
}

.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(--page-blog-gold-color);
  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: var(--page-blog-secondary-color);
  border-radius: 2px;
}

.page-blog__description-text {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 30px;
  color: var(--page-blog-text-secondary);
}

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

.page-blog__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  filter: brightness(0.4); /* Darken image for text readability */
}

.page-blog__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay for text */
  border-radius: 10px;
}

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

.page-blog__intro-text {
  font-size: 1.2em;
  color: var(--page-blog-text-main);
  margin-bottom: 30px;
  max-width: 800px;
  line-height: 1.5;
}

.page-blog__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

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

.page-blog__btn-primary {
  background: var(--page-blog-button-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.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 {
  background: none;
  color: var(--page-blog-secondary-color);
  border: 2px solid var(--page-blog-secondary-color);
}

.page-blog__btn-secondary:hover {
  background: var(--page-blog-secondary-color);
  color: var(--page-blog-background-color);
  transform: translateY(-3px);
}

/* About Section */
.page-blog__about-section {
  padding: 60px 0;
  background-color: var(--page-blog-light-bg-color, #f5f5f5);
  color: #333333; /* Dark text for light background */
}

.page-blog__about-section .page-blog__section-title {
  color: var(--page-blog-deep-green);
}

.page-blog__about-section .page-blog__description-text {
  color: #333333;
}

/* Latest Posts Section */
.page-blog__latest-posts-section {
  padding: 80px 0;
  background-color: var(--page-blog-background-color);
}

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

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

.page-blog__post-card:hover {
  transform: translateY(-5px);
}

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

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

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

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

.page-blog__post-title a:hover {
  color: var(--page-blog-secondary-color);
}

.page-blog__post-meta {
  font-size: 0.9em;
  color: var(--page-blog-text-secondary);
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 1em;
  color: var(--page-blog-text-secondary);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--page-blog-secondary-color);
  color: var(--page-blog-background-color);
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  align-self: flex-start;
  transition: background 0.3s ease;
}

.page-blog__read-more-btn:hover {
  background: var(--page-blog-primary-color);
}

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

/* Categories Section */
.page-blog__categories-section {
  padding: 60px 0;
  background-color: var(--page-blog-light-bg-color, #f5f5f5);
  color: #333333; /* Dark text for light background */
}

.page-blog__categories-section .page-blog__section-title {
  color: var(--page-blog-deep-green);
}

.page-blog__categories-section .page-blog__description-text {
  color: #333333;
}

.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 a {
  display: block;
  padding: 12px 25px;
  background-color: var(--page-blog-card-background);
  color: var(--page-blog-text-main);
  text-decoration: none;
  border-radius: 25px;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: 1px solid var(--page-blog-border-color);
}

.page-blog__category-item a:hover {
  background-color: var(--page-blog-secondary-color);
  color: var(--page-blog-background-color);
}

/* In-depth Articles Section */
.page-blog__in-depth-articles-section {
  padding: 80px 0;
  background-color: var(--page-blog-background-color);
}

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

.page-blog__detailed-article-card {
  background-color: var(--page-blog-card-background);
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.page-blog__article-heading {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--page-blog-text-main);
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-blog__detailed-article-card .page-blog__read-more-btn {
  margin-top: auto;
  align-self: flex-start;
}

/* News Section */
.page-blog__news-section {
  padding: 60px 0;
  background-color: var(--page-blog-light-bg-color, #f5f5f5);
  color: #333333; /* Dark text for light background */
}

.page-blog__news-section .page-blog__section-title {
  color: var(--page-blog-deep-green);
}

.page-blog__news-section .page-blog__description-text {
  color: #333333;
}

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

.page-blog__news-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
  display: flex;
  flex-direction: column;
  color: #333333; /* Dark text for news card */
}

.page-blog__news-title {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__news-title a {
  color: var(--page-blog-deep-green);
  text-decoration: none;
}

.page-blog__news-title a:hover {
  color: var(--page-blog-primary-color);
}

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

.page-blog__news-excerpt {
  font-size: 1em;
  color: #555555;
  flex-grow: 1;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
  background-color: var(--page-blog-background-color);
}

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

.page-blog__faq-item {
  background-color: var(--page-blog-card-background);
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--page-blog-border-color);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--page-blog-text-main);
  cursor: pointer;
  list-style: none;
}

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

.page-blog__faq-question:hover {
  color: var(--page-blog-secondary-color);
}

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

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

.page-blog__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 1em;
  color: var(--page-blog-text-secondary);
}

/* Final CTA Section */
.page-blog__cta-final-section {
  padding: 80px 0;
  background-color: var(--page-blog-light-bg-color, #f5f5f5);
  color: #333333; /* Dark text for light background */
}

.page-blog__cta-final-section .page-blog__section-title {
  color: var(--page-blog-deep-green);
}

.page-blog__cta-final-section .page-blog__description-text {
  color: #333333;
}


/* --- General Styling for contrast and colors --- */
.page-blog__dark-section {
  background-color: var(--page-blog-background-color);
  color: var(--page-blog-text-main);
}

.page-blog__light-bg {
  background-color: var(--page-blog-light-bg-color, #f5f5f5);
  color: #333333;
}

.page-blog__card {
  background-color: var(--page-blog-card-background);
  color: var(--page-blog-text-main);
}

/* Ensure all links within dark sections maintain visibility */
.page-blog__dark-section a {
  color: var(--page-blog-secondary-color);
}

.page-blog__dark-section a:hover {
  color: var(--page-blog-gold-color);
}

/* Ensure all links within light sections maintain visibility */
.page-blog__light-bg a {
  color: var(--page-blog-deep-green);
}

.page-blog__light-bg a:hover {
  color: var(--page-blog-primary-color);
}

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(2em, 5vw, 3em);
  }
  .page-blog__section-title {
    font-size: 2em;
  }
}

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

  .page-blog__hero-section {
    padding-top: 10px !important;
    min-height: 450px;
  }

  .page-blog__hero-content {
    padding: 15px;
  }

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

  .page-blog__intro-text {
    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;
    padding: 12px 15px !important;
    font-size: 1em;
  }

  .page-blog__container {
    padding: 0 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-blog__description-text {
    font-size: 0.95em;
  }

  .page-blog__posts-grid,
  .page-blog__article-grid,
  .page-blog__news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__post-card,
  .page-blog__detailed-article-card,
  .page-blog__news-card {
    padding: 20px;
  }

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

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

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

  .page-blog__category-item a {
    width: 100%;
    text-align: center;
    max-width: 300px;
  }

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

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

  /* Image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-width: 200px; /* Ensure images are not too small */
    min-height: 200px;
  }

  .page-blog__post-thumbnail {
    min-width: 200px;
    min-height: 112px; /* ~16:9 aspect for blog thumbnails */
  }

  /* All content sections/cards/containers must have max-width: 100% and padding */
  .page-blog__hero-section,
  .page-blog__about-section,
  .page-blog__latest-posts-section,
  .page-blog__categories-section,
  .page-blog__in-depth-articles-section,
  .page-blog__news-section,
  .page-blog__faq-section,
  .page-blog__cta-final-section,
  .page-blog__post-card,
  .page-blog__detailed-article-card,
  .page-blog__news-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Image CSS min-width/height enforcement for content area (not specific class, but scope) */
.page-blog img:not(.page-blog__hero-image) {
  min-width: 200px;
  min-height: 200px;
}

/* Override for hero image to allow flexible height but maintain aspect on desktop, then full width on mobile */
.page-blog__hero-image {
  min-width: unset;
  min-height: unset;
}

.page-blog__post-thumbnail {
  min-width: 200px;
  min-height: 112px; /* 16:9 aspect for 200px width */
}