/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Body background is dark #1a1a2e, so text should be light */
  background-color: transparent; /* Rely on body background from shared.css */
}

.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;
  padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
  background-color: #017439; /* Brand color background for hero */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

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

.page-blog__hero-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 900px;
  color: #ffffff;
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-blog__subtitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

/* CTA Button */
.page-blog__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-sizing: border-box;
}

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

.page-blog__btn-primary:hover {
  background-color: #005a2e;
  transform: translateY(-2px);
}

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

.page-blog__btn-secondary:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
}

/* Sections */
.page-blog__section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 25px;
  text-align: center;
  line-height: 1.3;
}

.page-blog__section-description {
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

.page-blog__sub-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 20px;
}

/* Recent Posts Section */
.page-blog__recent-posts {
  padding: 80px 0;
  background-color: #1a1a2e; /* Dark background */
  color: #ffffff;
}

.page-blog__recent-posts .page-blog__section-title,
.page-blog__recent-posts .page-blog__section-description {
  color: #ffffff;
}

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

.page-blog__post-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.page-blog__post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

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

.page-blog__post-card h3.page-blog__post-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 15px 20px 10px;
  color: #ffffff;
  line-height: 1.4;
}

.page-blog__post-meta {
  font-size: 0.9rem;
  color: #cccccc;
  margin: 0 20px 10px;
}

.page-blog__post-excerpt {
  font-size: 1rem;
  color: #e0e0e0;
  margin: 0 20px 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  display: inline-block;
  color: #FFFF00; /* Custom color for links */
  font-weight: 600;
  padding: 0 20px 20px;
  text-decoration: none;
}

.page-blog__read-more:hover {
  text-decoration: underline;
}

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

/* Content Area */
.page-blog__content-area {
  padding: 80px 0;
}

.page-blog__light-bg {
  background-color: #f8f9fa;
  color: #333333;
}

.page-blog__dark-section {
  background-color: #017439; /* Brand primary color */
  color: #ffffff;
}

.page-blog__light-bg .page-blog__section-title,
.page-blog__light-bg .page-blog__sub-title {
  color: #333333;
}

.page-blog__dark-section .page-blog__section-title,
.page-blog__dark-section .page-blog__sub-title {
  color: #ffffff;
}

.page-blog__content-area p,
.page-blog__content-area li {
  font-size: 1.1rem;
  margin-bottom: 15px;
}

.page-blog__checklist,
.page-blog__features-list,
.page-blog__safety-tips {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
}

.page-blog__checklist li,
.page-blog__features-list li,
.page-blog__safety-tips li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.page-blog__checklist li::before,
.page-blog__features-list li::before,
.page-blog__safety-tips li::before {
  content: '✔'; /* Checkmark icon */
  position: absolute;
  left: 0;
  color: #FFFF00; /* Custom color for checkmark */
  font-weight: bold;
}

.page-blog__cta-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  margin-top: 50px;
}

.page-blog__cta-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
}

.page-blog__faq-list {
  margin-top: 40px;
  margin-bottom: 40px;
}

.page-blog__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #ffffff;
}

.page-blog__faq-section .page-blog__faq-item {
    background-color: #ffffff; /* White background for FAQ items in light section */
    color: #333333;
    border: 1px solid #e0e0e0;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  list-style: none; /* Hide default marker for summary */
}

.page-blog__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for webkit browsers */
}

.page-blog__faq-item summary {
    outline: none;
}

.page-blog__faq-item summary:hover {
    background-color: #f0f0f0;
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  font-weight: bold;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Rotate '+' to 'x' or use '−' */
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  line-height: 1.7;
  color: #555555;
}

.page-blog__faq-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 40px auto 0;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Conclusion Section */
.page-blog__conclusion-section {
  padding: 80px 0;
  text-align: center;
  background-color: #017439;
  color: #ffffff;
}

.page-blog__conclusion-section p {
  max-width: 900px;
  margin: 0 auto 30px;
}

.page-blog__final-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    padding: 30px 15px;
  }

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

  .page-blog__subtitle {
    font-size: 1.1rem;
  }

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

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

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

  /* Mobile responsive for all images */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Mobile responsive for all containers holding images/content */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-image-wrapper,
  .page-blog__cta-wrapper,
  .page-blog__faq-image {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  
  .page-blog__hero-section {
    padding: 10px 0 40px 0; /* Adjust hero padding for mobile */
  }

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

  .page-blog__main-title {
    font-size: 2rem;
  }

  .page-blog__subtitle {
    font-size: 1rem;
  }

  .page-blog__cta-button,
  .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;
    text-align: center;
  }

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

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

  .page-blog__post-card {
    margin-bottom: 20px;
  }

  .page-blog__recent-posts,
  .page-blog__content-area,
  .page-blog__faq-section,
  .page-blog__conclusion-section {
    padding: 40px 0;
  }

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

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

  .page-blog__checklist li,
  .page-blog__features-list li,
  .page-blog__safety-tips li {
    font-size: 1rem;
  }

  .page-blog__cta-wrapper {
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .page-blog__main-title {
    font-size: 1.8rem;
  }

  .page-blog__section-title {
    font-size: 1.5rem;
  }

  .page-blog__sub-title {
    font-size: 1.2rem;
  }

  .page-blog__cta-button {
    padding: 12px 20px;
    font-size: 1rem;
  }
}

/* Color Contrast Fixes (applied based on body background being dark) */
.page-blog__dark-section {
  background-color: #017439;
  color: #ffffff;
}

.page-blog__light-bg {
  background-color: #f8f9fa;
  color: #333333;
}

.page-blog__post-card {
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark body */
  color: #ffffff;
}

.page-blog__post-card h3.page-blog__post-title,
.page-blog__post-card p {
  color: #ffffff;
}

.page-blog__read-more {
  color: #FFFF00; /* Custom yellow for links on dark background */
}

.page-blog__faq-section .page-blog__faq-item {
    background-color: #ffffff; /* White background for FAQ items in light section */
    color: #333333;
    border: 1px solid #e0e0e0;
}

.page-blog__faq-section .page-blog__faq-answer {
    color: #555555;
}

.page-blog__checklist li::before,
.page-blog__features-list li::before,
.page-blog__safety-tips li::before {
  color: #FFFF00; /* Custom yellow for checkmark */
}

.page-blog__btn-primary {
  background-color: #017439;
  color: #ffffff;
}

.page-blog__btn-secondary {
  background-color: #ffffff;
  color: #017439;
}