.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text for light body background */
  background-color: #F5F7FA; /* Body background color from shared */
}

/* Container for general content width */
.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Section styling */
.page-blog__section {
  padding: 60px 0;
}

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

.page-blog__dark-section {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Button gradient as dark section background */
  color: #ffffff;
}

.page-blog__section-title {
  font-size: 36px;
  font-weight: bold;
  color: #E53935; /* Brand primary color for titles */
  text-align: center;
  margin-bottom: 40px;
}

.page-blog__section-title--light {
  color: #ffffff;
}

/* Hero Section */
.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: #f5f7fa; /* Match body background */
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  max-height: 675px; /* Limit height for hero image */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-blog__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-height: 200px; /* Min size requirement */
}

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

.page-blog__main-title {
  font-size: clamp(28px, 4vw, 48px); /* H1 font size with clamp */
  font-weight: 700;
  line-height: 1.2;
  color: #E53935; /* Brand primary color */
  margin-bottom: 20px;
}

.page-blog__description {
  font-size: 18px;
  color: #333333;
  margin-bottom: 30px;
}

/* Latest Posts Section */
.page-blog__blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

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

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

.page-blog__blog-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-blog__blog-card-image {
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.page-blog__blog-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-width: 200px; /* Min size requirement */
  min-height: 200px; /* Min size requirement */
}

.page-blog__blog-card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-blog__blog-card-title {
  font-size: 22px;
  font-weight: 600;
  color: #E53935;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__blog-card-meta {
  font-size: 14px;
  color: #666666;
  margin-bottom: 15px;
}

.page-blog__blog-card-excerpt {
  font-size: 16px;
  color: #333333;
  margin-bottom: 20px;
  flex-grow: 1;
}

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

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

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

/* Categories Section */
.page-blog__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.page-blog__category-card {
  display: block;
  background-color: rgba(255, 255, 255, 0.1); /* Light background for contrast */
  color: #ffffff;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-blog__category-card:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

/* CTA Section */
.page-blog__cta-content {
  text-align: center;
}

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

.page-blog__button-primary,
.page-blog__button-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: opacity 0.3s ease;
  max-width: 100%; /* For mobile */
  box-sizing: border-box; /* For mobile */
  white-space: normal; /* For mobile */
  word-wrap: break-word; /* For mobile */
}

.page-blog__button-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border: none;
}

.page-blog__button-primary:hover {
  opacity: 0.9;
}

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

.page-blog__button-secondary:hover {
  opacity: 0.9;
}

/* FAQ Section */
.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;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 18px;
  font-weight: 600;
  color: #333333;
  cursor: pointer;
  list-style: none; /* Remove default marker for details summary */
  position: relative;
}

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

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

.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #E53935;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Rotate plus to become cross */
}

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

.page-blog__faq-answer p {
  margin-bottom: 0;
}

/* General image and container responsiveness */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .page-blog__section {
    padding: 40px 0;
  }

  .page-blog__container {
    padding: 0 15px;
  }

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

  .page-blog__main-title {
    font-size: 32px; /* Adjust H1 for mobile */
    margin-bottom: 15px;
  }

  .page-blog__description {
    font-size: 16px;
    margin-bottom: 20px;
  }

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

  /* Blog Grid for mobile */
  .page-blog__blog-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

  .page-blog__blog-card {
    margin: 0 auto; /* Center cards if they are narrower than full width */
  }

  /* Categories Grid for mobile */
  .page-blog__categories-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 15px;
  }

  /* CTA Buttons for mobile */
  .page-blog__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    padding: 0 15px;
  }

  .page-blog__button-primary,
  .page-blog__button-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 20px;
    padding-right: 20px;
  }

  /* General image and container responsiveness for mobile */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__cta-buttons,
  .page-blog__blog-card-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* Removed padding-left/right here to avoid double padding with .page-blog__container */
  }

  .page-blog__hero-section,
  .page-blog__latest-posts,
  .page-blog__categories-section,
  .page-blog__cta-section,
  .page-blog__faq-section {
    padding-left: 0;
    padding-right: 0;
  }

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

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

/* Contrast fix classes (as per instruction) */
.page-blog__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-blog__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}