/* style/blog.css */

/* Define custom colors */
:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg-color: #11271B;
  --background-color: #08160F; /* This will be overridden by shared.css body background, but useful for components */
  --text-main-color: #F2FFF6;
  --text-secondary-color: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green-color: #0A4B2C;
}

.page-blog {
  font-family: Arial, sans-serif;
  color: var(--text-main-color); /* Default text color for the page content */
  background-color: transparent; /* Body background is handled by shared.css */
}

/* Container for max-width content */
.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;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding as body handles header offset */
  background-color: var(--background-color); /* Fallback, though image should cover */
  overflow: hidden; /* Ensure no overflow from image */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 700px; /* Limit height for large screens */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px; /* Space between image and content */
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px; /* Enforce min image size */
}

.page-blog__hero-content {
  max-width: 900px;
  z-index: 1; /* Ensure content is above any potential background layers */
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 4vw, 3.5rem); /* Responsive font size for H1 */
  color: var(--gold-color); /* Gold for main title */
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: bold;
}

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

/* CTA Button */
.page-blog__cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: var(--button-gradient);
  color: var(--text-main-color); /* White text for button */
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  min-width: 150px; /* Ensure button is not too small */
  text-align: center;
  border: none;
}

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

/* Blog Posts Section */
.page-blog__posts-section {
  padding: 60px 0;
  background-color: var(--background-color);
}

.page-blog__section-title {
  font-size: 2.2rem;
  color: var(--gold-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

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

.page-blog__post-card {
  background-color: var(--card-bg-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  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.4);
}

.page-blog__post-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-blog__post-thumbnail {
  width: 100%;
  height: 225px; /* Fixed height for thumbnails */
  object-fit: cover;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px; /* Enforce min image size */
}

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

.page-blog__post-title {
  font-size: 1.3rem;
  color: var(--text-main-color);
  margin-bottom: 10px;
  line-height: 1.4;
  font-weight: bold;
}

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

.page-blog__post-excerpt {
  font-size: 1rem;
  color: var(--text-secondary-color);
  margin-bottom: 20px;
  line-height: 1.5;
  flex-grow: 1; /* Allow excerpt to take available space */
}

.page-blog__read-more {
  display: inline-block;
  color: var(--gold-color);
  font-weight: bold;
  text-decoration: underline;
  margin-top: auto; /* Push to bottom */
}

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

.page-blog__view-all-button {
  padding: 12px 25px;
  font-size: 1.05rem;
}

/* About Section */
.page-blog__about-section {
    padding: 60px 0;
    background-color: var(--deep-green-color); /* A slightly different dark green */
    color: var(--text-main-color);
}

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

.page-blog__about-image {
    flex: 1 1 45%; /* Adjust flex basis for responsiveness */
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    min-width: 200px; /* Enforce min image size */
    min-height: 200px; /* Enforce min image size */
}

.page-blog__about-text {
    flex: 1 1 50%;
    line-height: 1.6;
}

.page-blog__about-text p {
    margin-bottom: 15px;
    color: var(--text-secondary-color);
}

.page-blog__about-cta {
    margin-top: 20px;
    background: var(--gold-color); /* Gold button */
    color: var(--background-color); /* Dark text on gold */
}

.page-blog__about-cta:hover {
    background: var(--glow-color); /* Lighter green on hover */
    color: var(--background-color);
}


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

.page-blog__cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-blog__cta-title {
  font-size: 2.5rem;
  color: var(--gold-color);
  margin-bottom: 25px;
  font-weight: bold;
}

.page-blog__cta-description {
  font-size: 1.15rem;
  color: var(--text-secondary-color);
  margin-bottom: 40px;
  line-height: 1.6;
}

.page-blog__cta-main-button {
  margin-right: 20px;
}

.page-blog__cta-secondary-button {
  background: none;
  border: 2px solid var(--text-main-color);
  color: var(--text-main-color);
  box-shadow: none;
}

.page-blog__cta-secondary-button:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
  box-shadow: none;
}

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

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

.page-blog__faq-item {
  background-color: var(--card-bg-color);
  border: 1px solid var(--border-color);
  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.15rem;
  font-weight: bold;
  color: var(--text-main-color);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

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

/* Hide default marker for details summary */
.page-blog__faq-item summary {
  list-style: none;
}
.page-blog__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--gold-color);
}

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

.page-blog__faq-answer p {
  margin-bottom: 10px;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .page-blog__hero-content {
    padding: 0 15px;
  }
  .page-blog__main-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }
  .page-blog__section-title {
    font-size: 2rem;
  }
  .page-blog__cta-title {
    font-size: 2rem;
  }
  .page-blog__about-content {
      flex-direction: column;
      text-align: center;
  }
  .page-blog__about-image {
      flex: 1 1 100%;
  }
  .page-blog__about-text {
      flex: 1 1 100%;
  }
}

@media (max-width: 768px) {
  /* Enforce mobile responsiveness for images */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Enforce mobile responsiveness for containers with images/content */
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__posts-section,
  .page-blog__about-section,
  .page-blog__cta-section,
  .page-blog__faq-section,
  .page-blog__post-card,
  .page-blog__about-content,
  .page-blog__cta-content,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    overflow: hidden !important; /* Ensure no horizontal scroll */
  }

  /* Specific padding for hero section */
  .page-blog__hero-section {
    padding-top: 10px !important; /* body already handles --header-offset */
    padding-bottom: 40px !important;
  }

  /* Specific padding for other sections */
  .page-blog__posts-section,
  .page-blog__about-section,
  .page-blog__cta-section,
  .page-blog__faq-section {
      padding-top: 40px !important;
      padding-bottom: 40px !important;
  }

  /* Buttons mobile adaptation */
  .page-blog__cta-button,
  .page-blog__cta-main-button,
  .page-blog__cta-secondary-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-right: 0 !important; /* Remove margin for stacked buttons */
    margin-bottom: 15px; /* Add vertical spacing for stacked buttons */
  }
  
  .page-blog__cta-content {
      display: flex;
      flex-direction: column; /* Stack buttons vertically */
      align-items: center;
  }

  .page-blog__posts-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
  }

  .page-blog__post-thumbnail {
    height: auto !important; /* Adjust height for mobile */
  }

  .page-blog__section-title,
  .page-blog__cta-title {
    font-size: 1.8rem;
  }
  .page-blog__description,
  .page-blog__cta-description,
  .page-blog__faq-question {
    font-size: 1rem;
  }
}

/* Ensure content area images meet min size requirements */
.page-blog__post-thumbnail,
.page-blog__about-image {
  min-width: 200px;
  min-height: 200px;
}