/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  color: #333333; /* Dark text for light body background */
  line-height: 1.6;
  background-color: #FFFFFF; /* Explicitly set to match auxiliary/body background */
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  overflow: hidden;
  padding-top: 10px; /* Small top padding, assuming body has header offset */
  margin-bottom: 40px;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  position: relative;
  background-color: #f0f0f0; /* Placeholder background */
}

.page-blog__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-blog__hero-content {
  text-align: center;
  padding: 40px 20px;
  background-color: #FFFFFF;
  border-bottom: 1px solid #e0e0e0;
}

.page-blog__main-title {
  font-size: 38px;
  font-weight: 700;
  color: #017439; /* Brand color for main title */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__intro-text {
  font-size: 18px;
  color: #555555;
  max-width: 800px;
  margin: 0 auto 30px;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 180px;
  text-align: center;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%; /* Ensure buttons don't overflow */
}

.page-blog__btn-primary {
  background-color: #C30808; /* Custom Register/Login color */
  color: #FFFF00; /* Custom Register/Login font color */
  border: 2px solid #C30808;
}

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

.page-blog__btn-secondary {
  background-color: #017439; /* Brand primary color */
  color: #FFFFFF;
  border: 2px solid #017439;
}

.page-blog__btn-secondary:hover {
  background-color: #005f2e;
  border-color: #005f2e;
}

/* Posts Section */
.page-blog__posts-section {
  padding: 40px 0;
  background-color: #f9f9f9;
}

.page-blog__section-title {
  font-size: 32px;
  font-weight: 700;
  color: #017439;
  text-align: center;
  margin-bottom: 40px;
}

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

.page-blog__post-card {
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-blog__post-thumbnail {
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  position: relative;
  background-color: #f0f0f0;
}

.page-blog__post-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-width: 200px; /* Min size enforcement */
  min-height: 200px; /* Min size enforcement */
}

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

.page-blog__post-title {
  font-size: 20px;
  font-weight: 600;
  color: #017439;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__post-meta {
  font-size: 14px;
  color: #888888;
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 16px;
  color: #555555;
  margin-bottom: 0;
}

.page-blog__view-all {
  text-align: center;
}

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

.page-blog__faq-image-wrapper {
  text-align: center;
  margin-bottom: 40px;
  padding: 0 20px;
}

.page-blog__faq-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  min-width: 200px; /* Min size enforcement */
  min-height: 200px; /* Min size enforcement */
}

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

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}
details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-blog__faq-item summary.page-blog__faq-question::-webkit-details-marker {
  display: none;
}
details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: #f5f5f5;
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333; /* Ensure contrast */
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #555555; /* Ensure contrast */
}

/* --- Mobile Responsive Styles (max-width: 768px) --- */
@media (max-width: 768px) {
  .page-blog__container {
    padding: 0 15px;
  }

  /* Hero Section Mobile */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Ensure small top padding */
    margin-bottom: 30px;
  }

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

  .page-blog__main-title {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .page-blog__intro-text {
    font-size: 16px;
    margin-bottom: 25px;
  }

  .page-blog__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Add padding to container */
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important; /* Ensure full width */
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    min-width: unset;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Posts Section Mobile */
  .page-blog__posts-section {
    padding: 30px 0;
  }

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

  .page-blog__posts-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
    margin-bottom: 30px;
  }

  .page-blog__post-card {
    box-sizing: border-box; /* Ensure padding/border is included in width */
  }

  .page-blog__post-thumbnail img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-blog__post-title {
    font-size: 18px;
  }

  .page-blog__post-excerpt {
    font-size: 15px;
  }

  /* Universal image responsive styles */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
  }
  
  .page-blog__hero-image,
  .page-blog__post-thumbnail img,
  .page-blog__faq-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-blog__hero-image-wrapper,
  .page-blog__post-thumbnail,
  .page-blog__faq-image-wrapper,
  .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .page-blog__faq-image-wrapper {
    margin-bottom: 30px;
    padding: 0 15px; /* Ensure image wrapper also has padding */
  }

  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px;
  }
  .page-blog__faq-qtext {
    font-size: 15px;
  }
  details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 15px 15px;
  }
}

/* Placeholder for 1024px media query if needed by general rules */
@media (max-width: 1024px) {
  /* No specific 1024px rules for this page based on prompt */
}