/* style/blog.css */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light body background */
  background-color: #ffffff; /* Explicitly set for contrast calculation */
}

.page-blog__hero-section {
  position: relative;
  background: linear-gradient(135deg, #017439, #005a2e); /* Brand color gradient */
  color: #ffffff;
  padding-bottom: 50px; /* Adjust as needed */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 10px; /* Small top padding, assuming body has header offset */
}

.page-blog__hero-image {
  width: 100%;
  max-height: 500px; /* Max height for desktop hero image */
  overflow: hidden;
  margin-bottom: 30px;
}

.page-blog__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Desktop default */
}

.page-blog__hero-content {
  max-width: 900px;
  padding: 0 20px;
  text-align: center;
}

.page-blog__main-title {
  font-size: clamp(2.5em, 5vw, 3.5em); /* Using clamp for H1 */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #FFFFFF;
}

.page-blog__lead-text {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-blog__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  width: 100%; /* Ensure container takes full width */
  max-width: 600px; /* Limit button group width */
  margin: 0 auto;
  box-sizing: border-box;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  display: inline-block; /* For max-width to work correctly */
  text-align: center;
  box-sizing: border-box; /* Include padding in width calculation */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

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

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

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

.page-blog__btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.page-blog__section {
  padding: 60px 0;
  background-color: #f9f9f9;
}

.page-blog__section:nth-of-type(even) {
  background-color: #ffffff;
}

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

.page-blog__section-title {
  font-size: 2.2em;
  font-weight: 700;
  color: #017439; /* Brand primary color */
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.3;
}

.page-blog__about-blog p {
  font-size: 1.1em;
  margin-bottom: 20px;
  text-align: justify;
}

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

.page-blog__article-card {
  background: #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;
  display: flex;
  flex-direction: column;
}

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

.page-blog__article-image {
  width: 100%;
  height: 220px; /* Fixed height for consistent card images */
  object-fit: cover;
  display: block;
}

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

.page-blog__card-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__card-title a {
  color: #017439; /* Brand primary color */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__card-title a:hover {
  color: #005a2e;
}

.page-blog__card-meta {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 15px;
}

.page-blog__card-excerpt {
  font-size: 1em;
  color: #555;
  margin-bottom: 20px;
  flex-grow: 1; /* Allow excerpt to take available space */
}

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

.page-blog__read-more:hover {
  color: #005a2e;
  text-decoration: underline;
}

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

.page-blog__view-all-button .page-blog__btn-primary {
  background: #017439;
  color: #FFFFFF;
  border-color: #017439;
  padding: 12px 25px;
  font-size: 1em;
}

.page-blog__view-all-button .page-blog__btn-primary:hover {
  background: #005a2e;
  border-color: #005a2e;
}

.page-blog__posts-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.page-blog__post-item {
  display: flex;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__post-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.page-blog__post-thumbnail {
  width: 250px; /* Fixed width for desktop thumbnail */
  height: 150px; /* Fixed height for desktop thumbnail */
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

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

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

.page-blog__post-title a {
  color: #017439;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
  color: #005a2e;
}

.page-blog__post-meta {
  font-size: 0.85em;
  color: #777;
  margin-bottom: 12px;
}

.page-blog__post-excerpt {
  font-size: 0.95em;
  color: #555;
  margin-bottom: 15px;
}

/* FAQ Section Styling */
details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 8px; /* Slightly larger border-radius */
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05); /* Soft shadow */
}
details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px; /* Increased padding */
  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: 1.1em; /* Slightly larger font */
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #017439; /* Brand primary color for question text */
}
.page-blog__faq-toggle {
  font-size: 28px; /* Larger toggle icon */
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 32px; /* Larger toggle area */
  text-align: center;
}
details.page-blog__faq-item[open] .page-blog__faq-question {
  background: #f0f0f0; /* Background for open question */
  border-bottom: 1px solid #e0e0e0;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 25px 25px; /* Increased padding */
  background: #f9f9f9;
  border-radius: 0 0 8px 8px;
}
.page-blog__faq-answer p {
  font-size: 1em;
  color: #555;
  margin-bottom: 0;
}

.page-blog__cta-bottom {
  background: linear-gradient(135deg, #017439, #005a2e);
  color: #ffffff;
  text-align: center;
  padding: 80px 0;
}

.page-blog__cta-bottom .page-blog__section-title {
  color: #ffffff;
  margin-bottom: 25px;
}