/* style/blog.css */

/* Base styles for the blog page, respecting body's dark background */
.page-blog {
  font-family: 'Arial', sans-serif;
  color: #ffffff; /* Light text for dark body background */
  line-height: 1.6;
  background-color: transparent; /* Body background handled by shared.css */
}

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

/* 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-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 60px;
  overflow: hidden;
  background-color: #1a1a2e; /* Dark background for the section */
}

.page-blog__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3; /* Slightly dim the background image */
  display: block;
  min-width: 200px;
  min-height: 200px;
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
  border-radius: 8px;
  margin-top: 50px;
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3em); /* Responsive font size for H1 */
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 20px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-blog__hero-description {
  font-size: 1.1em;
  color: #f0f0f0;
  margin-bottom: 30px;
}

/* Section Titles and Descriptions */
.page-blog__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.5em);
  font-weight: 600;
  color: #017439; /* Brand color for section titles */
  text-align: center;
  margin-bottom: 20px;
  padding-top: 40px;
}

.page-blog__section-description {
  font-size: 1em;
  color: #cccccc; /* Lighter text for descriptions */
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

/* Blog Posts Section */
.page-blog__posts-section {
  padding: 60px 0;
  background-color: #1a1a2e; /* Same as body for seamless look */
}

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

.page-blog__post-card {
  background-color: #2a2a4a; /* Slightly lighter dark background for cards */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-width: 200px;
}

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

.page-blog__post-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

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

.page-blog__post-content {
  padding: 20px;
}

.page-blog__post-title {
  font-size: 1.4em;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 10px;
  min-height: 2.8em;
}

.page-blog__post-excerpt {
  font-size: 0.95em;
  color: #cccccc;
  margin-bottom: 15px;
  min-height: 4.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.page-blog__post-date {
  font-size: 0.85em;
  color: #999999;
  display: block;
  margin-bottom: 15px;
}

.page-blog__read-more {
  display: inline-block;
  color: #FFFF00;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: #017439;
}

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

/* CTA Banner Section */
.page-blog__cta-banner {
  padding: 80px 0;
  background: linear-gradient(90deg, #017439 0%, #017439 100%);
  text-align: center;
  color: #FFFFFF;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.page-blog__cta-text {
  max-width: 700px;
}

.page-blog__cta-title {
  font-size: clamp(1.8em, 3.5vw, 2.5em);
  font-weight: 700;
  margin-bottom: 15px;
  color: #FFFFFF;
}

.page-blog__cta-description {
  font-size: 1.1em;
  line-height: 1.6;
  color: #f0f0f0;
}

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

/* Buttons */
.page-blog__cta-button,
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 5px;
  font-size: 1.05em;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background-color: #C30808;
  color: #FFFF00;
  border: 2px solid #C30808;
}

.page-blog__btn-primary:hover {
  background-color: #e00b0b;
  border-color: #e00b0b;
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: #FFFF00;
  border: 2px solid #FFFF00;
}

.page-blog__btn-secondary:hover {
  background-color: #FFFF00;
  color: #C30808;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background-color: #1a1a2e;
}

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

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  background-color: #017439;
  color: #FFFFFF;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  list-style: none;
}

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

.page-blog__faq-qtext {
  flex-grow: 1;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #FFFF00;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  content: '−';
}

.page-blog__faq-answer {
  padding: 20px 25px;
  font-size: 0.95em;
  color: #cccccc;
  background-color: #2a2a4a;
}

.page-blog__faq-answer p {
  margin: 0;
  color: #cccccc;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__post-title {
    font-size: 1.3em;
  }
}

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

  .page-blog__container,
  .page-blog__hero-content,
  .page-blog__cta-content,
  .page-blog__faq-list {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__hero-section {
    padding-bottom: 40px;
  }

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

  .page-blog__main-title {
    font-size: clamp(1.8em, 6vw, 2.5em);
    margin-bottom: 15px;
  }

  .page-blog__hero-description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-blog__section-title {
    font-size: clamp(1.5em, 5vw, 2em);
    padding-top: 30px;
  }

  .page-blog__section-description {
    margin-bottom: 30px;
  }

  .page-blog__post-grid {
    grid-template-columns: 1fr;
  }

  .page-blog__post-image {
    height: 180px;
    min-width: 200px !important;
    min-height: 200px !important;
  }

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

  .page-blog__post-title {
    font-size: 1.2em;
    min-height: auto;
  }

  .page-blog__post-excerpt {
    font-size: 0.9em;
    min-height: auto;
    -webkit-line-clamp: unset;
    display: block;
  }

  .page-blog__cta-banner {
    padding: 50px 0;
  }

  .page-blog__cta-title {
    font-size: clamp(1.6em, 5vw, 2.2em);
  }

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

  .page-blog__cta-button,
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
  }

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

  .page-blog__faq-answer {
    padding: 15px 20px;
    font-size: 0.9em;
  }

  /* Responsive images, videos, buttons - enforce max-width: 100% */
  .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__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;
  }

  .page-blog__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Ensure content area images are not smaller than 200px */
  .page-blog__posts-section img,
  .page-blog__post-image,
  .page-blog__hero-image {
    min-width: 200px !important;
    min-height: 200px !important;
  }
}

/* Ensure content area images meet minimum size requirements */
.page-blog__posts-section img,
.page-blog__post-image,
.page-blog__hero-image {
  min-width: 200px;
  min-height: 200px;
}

/* No CSS filters on images */
.page-blog img {
  filter: none;
}