/* style/blog.css */

/* Custom Colors */
:root {
  --page-blog-bg-color: #08160F;
  --page-blog-card-bg: #11271B;
  --page-blog-text-main: #F2FFF6;
  --page-blog-text-secondary: #A7D9B8;
  --page-blog-btn-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --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-primary-color: #11A84E; /* Main color */
  --page-blog-secondary-color: #22C768; /* Auxiliary color */
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px; /* General padding */
  padding-top: 10px; /* Small top padding as body handles header offset */
  background-color: var(--page-blog-deep-green); /* A darker green for the hero background */
  overflow: hidden; /* Ensure content doesn't overflow */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 1920px; /* Max width for the image */
  margin-bottom: 30px; /* Space between image and content */
  position: relative;
  z-index: 1; /* Ensure image is below text if any overlay */
}

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

.page-blog__hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  color: var(--page-blog-text-main);
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Use clamp for H1 */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--page-blog-text-main);
  letter-spacing: -0.02em;
}

.page-blog__hero-description {
  font-size: 1.125rem;
  margin-bottom: 30px;
  color: var(--page-blog-text-secondary);
}

/* General Section Styling */
.page-blog__section {
  padding: 60px 20px;
  text-align: center;
}

.page-blog__dark-bg {
  background-color: var(--page-blog-bg-color);
  color: var(--page-blog-text-main);
}

.page-blog__light-bg {
  background-color: #ffffff; /* Use white for light background sections */
  color: #333333; /* Ensure contrast */
}

.page-blog__text-contrast-fix {
  color: #333333; /* For light backgrounds, use dark text */
}

.page-blog__section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--page-blog-text-main); /* Default for dark sections */
}

.page-blog__light-bg .page-blog__section-title {
  color: #333333; /* Dark text for titles on light backgrounds */
}

/* Container for content width */
.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%; /* Ensure width: 100% for flex containers */
  box-sizing: border-box;
}

/* Article Grid (Featured Articles) */
.page-blog__article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.page-blog__article-card {
  background-color: var(--page-blog-card-bg);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--page-blog-border-color);
}

.page-blog__article-image {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  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.375rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

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

.page-blog__article-title a:hover {
  color: var(--page-blog-glow-color);
}

.page-blog__article-meta {
  font-size: 0.875rem;
  color: var(--page-blog-text-secondary);
  margin-bottom: 15px;
}

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

/* Button Styling */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  box-sizing: border-box;
  max-width: 100%;
}

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

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: var(--page-blog-glow-color);
  border: 2px solid var(--page-blog-glow-color);
}

.page-blog__btn-secondary:hover {
  background-color: var(--page-blog-glow-color);
  color: var(--page-blog-bg-color); /* Darker text on hover */
  transform: translateY(-2px);
}

/* Article List (Latest Posts) */
.page-blog__article-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 30px;
  text-align: left;
}

.page-blog__list-item {
  display: flex;
  align-items: flex-start;
  background-color: var(--page-blog-card-bg); /* Use card background for list items */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--page-blog-border-color);
  padding: 20px;
  gap: 20px;
}

.page-blog__list-image {
  width: 200px; /* Fixed width for list image */
  height: 150px; /* Fixed height for list image */
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.page-blog__list-content {
  flex-grow: 1;
}

.page-blog__list-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.page-blog__list-title a {
  color: var(--page-blog-text-main);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__list-title a:hover {
  color: var(--page-blog-glow-color);
}

.page-blog__list-meta {
  font-size: 0.875rem;
  color: var(--page-blog-text-secondary);
  margin-bottom: 10px;
}

.page-blog__list-excerpt {
  font-size: 0.9375rem;
  color: var(--page-blog-text-secondary);
  margin-bottom: 15px;
}

/* Pagination */
.page-blog__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 50px;
  gap: 10px;
}

.page-blog__pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: var(--page-blog-card-bg);
  color: var(--page-blog-text-main);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid var(--page-blog-border-color);
}

.page-blog__pagination-link:hover:not(.page-blog__pagination-link--active):not(.page-blog__pagination-link--disabled) {
  background-color: var(--page-blog-primary-color);
  color: #ffffff;
  border-color: var(--page-blog-primary-color);
}

.page-blog__pagination-link--active {
  background: var(--page-blog-btn-gradient);
  color: #ffffff;
  border-color: var(--page-blog-primary-color);
  cursor: default;
}

.page-blog__pagination-link--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Call to Action Section */
.page-blog__cta-section {
  padding: 80px 20px;
  background-color: var(--page-blog-deep-green); /* Use deep green for CTA */
}

.page-blog__cta-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

.page-blog__cta-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--page-blog-text-main);
  line-height: 1.2;
}

.page-blog__cta-description {
  font-size: 1.125rem;
  color: var(--page-blog-text-secondary);
  max-width: 700px;
  margin-bottom: 15px;
}

.page-blog__cta-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  justify-content: center;
  width: 100%; /* Ensure container takes full width for wrapping */
  max-width: 500px; /* Limit max width for button group */
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 20px;
  background-color: #ffffff; /* Light background for FAQ */
  color: #333333; /* Dark text for light background */
}

.page-blog__faq-list {
  margin-top: 30px;
  text-align: left;
}

.page-blog__faq-item {
  background-color: var(--page-blog-card-bg); /* Dark card background for FAQ items */
  border: 1px solid var(--page-blog-border-color);
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--page-blog-text-main); /* Light text for dark FAQ item background */
  background-color: var(--page-blog-card-bg);
  transition: background-color 0.3s ease;
  list-style: none; /* Remove default marker for details/summary */
}

/* Remove default details marker for WebKit browsers */
.page-blog__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-blog__faq-question:hover {
  background-color: var(--page-blog-deep-green); /* Slightly darker on hover */
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  margin-left: 15px;
  color: var(--page-blog-glow-color);
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  content: "−"; /* Changed by JS */
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  color: var(--page-blog-text-secondary);
  line-height: 1.7;
}

/* Media Queries for Responsiveness */
@media (max-width: 1024px) {
  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px;
  }

  .page-blog__hero-image-wrapper {
    margin-bottom: 20px;
  }

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

  .page-blog__hero-description {
    font-size: 1rem;
  }

  .page-blog__section {
    padding: 40px 15px;
  }

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

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

  .page-blog__list-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    padding: 15px;
  }

  .page-blog__list-image {
    width: 100%;
    height: 180px;
    max-width: 300px;
  }

  .page-blog__list-content {
    width: 100%;
  }

  .page-blog__cta-section {
    padding: 60px 15px;
  }

  .page-blog__cta-title {
    font-size: clamp(1.8rem, 4.5vw, 2.5rem);
  }
}

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

  /* Images */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important; /* Ensure content images are 100% wide */
    height: auto !important;
    display: block !important;
  }

  /* All containers with images/videos/buttons */
  .page-blog__hero-section,
  .page-blog__section,
  .page-blog__container,
  .page-blog__article-card,
  .page-blog__list-item,
  .page-blog__cta-section,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Prevent overflow on containers */
  }

  /* Specific top padding for hero on mobile, body handles header */
  .page-blog__hero-section {
    padding-top: 10px !important;
  }
  
  /* Buttons */
  .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,
  .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;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px !important;
  }

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

  .page-blog__article-image {
    height: 180px;
  }

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

  .page-blog__list-item {
    padding: 15px;
  }

  .page-blog__list-image {
    height: 150px;
  }

  .page-blog__pagination {
    gap: 8px;
  }

  .page-blog__pagination-link {
    min-width: 36px;
    height: 36px;
  }

  .page-blog__faq-question {
    padding: 15px 20px;
    font-size: 1rem;
  }

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

/* Ensure content area images are at least 200px */
.page-blog__article-card img,
.page-blog__list-item img {
  min-width: 200px;
  min- /* Adjust height based on aspect ratio, but ensure min-height */
}