/* style/blog.css */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: #FFFFFF; /* Body background is white */
}

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

.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 0;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: #f8f8f8;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 20px;
}

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

.page-blog__hero-content {
  max-width: 800px;
  padding: 0 20px;
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 2.8em);
  color: #017439;
  margin-bottom: 15px;
  line-height: 1.2;
  font-weight: bold;
}

.page-blog__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #555555;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

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

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

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

.page-blog__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #005f2c;
}

.page-blog__latest-posts {
  padding: 60px 0;
  background-color: #ffffff;
}

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

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

.page-blog__post-card {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-blog__post-image {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

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

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

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

.page-blog__post-date {
  font-size: 0.85em;
  color: #777777;
}

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

.page-blog__cta-section {
  background-color: #017439;
  color: #ffffff;
  padding: 80px 0;
  text-align: center;
}

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

.page-blog__cta-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.page-blog__cta-title {
  font-size: 2em;
  margin-bottom: 15px;
  color: #ffffff;
}

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

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

.page-blog__cta-buttons-inline .page-blog__btn-primary {
  background-color: #C30808; /* Register/Login color */
  border-color: #C30808;
  color: #FFFF00; /* Register/Login font color */
}

.page-blog__cta-buttons-inline .page-blog__btn-primary:hover {
  background-color: #9e0606;
  border-color: #9e0606;
}

.page-blog__cta-buttons-inline .page-blog__btn-secondary {
  background-color: #ffffff;
  color: #017439;
  border-color: #ffffff;
}

.page-blog__cta-buttons-inline .page-blog__btn-secondary:hover {
  background-color: #e0e0e0;
}

.page-blog__faq-section {
  padding: 60px 0;
  background-color: #f8f8f8;
}

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

.page-blog__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1em;
  font-weight: bold;
  color: #333333;
  cursor: pointer;
  list-style: none; /* For details/summary */
  -webkit-touch-callout: none; /* Disable callout on iOS */
  -webkit-user-select: none; /* Disable text selection on iOS */
  -khtml-user-select: none; /* Disable text selection on older Safari */
  -moz-user-select: none; /* Disable text selection on Firefox */
  -ms-user-select: none; /* Disable text selection on IE/Edge */
  user-select: none; /* Disable text selection */
}

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

.page-blog__faq-question:hover {
  background-color: #f5f5f5;
}

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

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 0.95em;
  color: #555555;
}

.page-blog__faq-item[open] .page-blog__faq-question {
  background-color: #f5f5f5;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(1.8em, 5vw, 2.5em);
  }

  .page-blog__section-title {
    font-size: 2em;
  }

  .page-blog__cta-title {
    font-size: 1.8em;
  }
}

@media (max-width: 768px) {
  .page-blog__container {
    padding: 0 15px !important;
  }

  .page-blog__hero-section,
  .page-blog__latest-posts,
  .page-blog__cta-section,
  .page-blog__faq-section {
    padding: 40px 0 !important;
  }
  
  .page-blog__hero-section {
    padding-top: 10px !important; /* Ensure small top padding */
  }

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

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

  .page-blog__hero-image,
  .page-blog__post-image,
  .page-blog__cta-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__hero-image-wrapper,
  .page-blog__post-card,
  .page-blog__cta-container,
  .page-blog__faq-item,
  .page-blog__cta-buttons,
  .page-blog__cta-buttons-inline {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
  }

  .page-blog__cta-buttons,
  .page-blog__cta-buttons-inline {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 15px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

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