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

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

.page-blog__hero-section {
  position: relative;
  overflow: hidden;
  background-color: #E53935; /* Brand primary color for hero background */
  padding-top: 10px; /* Small top padding as per rule */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height of the image wrapper */
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Cover the area, will adjust for mobile later */
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 20px;
  color: #ffffff;
  max-width: 900px;
  margin-top: -100px; /* Adjust to place content below the image but slightly overlap for visual appeal */
  background: linear-gradient(0deg, rgba(229, 57, 53, 0.9) 0%, rgba(255, 90, 79, 0.9) 100%); /* Gradient background for content */
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

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

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Custom button gradient */
  color: #ffffff;
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-blog__btn-secondary {
  background: #ffffff;
  color: #E53935; /* Text color matching primary brand color */
  border: 2px solid #E53935;
}

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

.page-blog__section-title {
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 15px;
  color: #E53935; /* Brand primary color for section titles */
}

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

.page-blog__section-subtitle {
  font-size: 1.2em;
  text-align: center;
  margin-bottom: 40px;
  color: #666666;
}

.page-blog__description--white {
  color: #ffffff;
}

/* Featured Posts Section */
.page-blog__featured-posts {
  padding: 60px 0;
}

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

.page-blog__post-card {
  background: #ffffff; /* Card background from custom colors */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

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

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

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

.page-blog__post-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #E53935; /* Brand primary color for post titles */
}

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

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

.page-blog__read-more {
  display: inline-flex;
  align-items: center;
  color: #FF5A4F; /* Brand auxiliary color for read more link */
  font-weight: 600;
}

.page-blog__read-more .page-blog__arrow {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.page-blog__post-card:hover .page-blog__arrow {
  transform: translateX(5px);
}

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 60px 0;
  background-color: #F5F7FA;
}

.page-blog__post-list {
  display: grid;
  grid-template-columns: 1fr; /* Single column for list layout */
  gap: 20px;
}

.page-blog__list-item {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__list-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.page-blog__list-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 15px;
}

.page-blog__list-image {
  width: 150px; /* Fixed width for list item images */
  height: 90px; /* Fixed height */
  object-fit: cover;
  border-radius: 8px;
  margin-right: 20px;
  flex-shrink: 0;
  display: block;
}

.page-blog__list-content {
  flex-grow: 1;
}

.page-blog__list-title {
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 5px;
  color: #333333;
}

.page-blog__list-meta {
  font-size: 0.85em;
  color: #999999;
  margin-bottom: 10px;
}

.page-blog__list-excerpt {
  font-size: 0.95em;
  color: #555555;
}

.page-blog__load-more {
  text-align: center;
  margin-top: 40px;
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Brand gradient */
  color: #ffffff;
}

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

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

.page-blog__faq-item {
  background: #ffffff;
  border: 1px solid #E0E0E0; /* Border from custom colors */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-item summary {
  list-style: none; /* Hide default marker */
  cursor: pointer;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.1em;
  color: #333333;
  background-color: #f9f9f9;
  transition: background-color 0.3s ease;
}

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

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  font-weight: normal;
  line-height: 1;
  margin-left: 10px;
  color: #E53935;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  content: "−"; /* Change content for open state via JS */
}

.page-blog__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 1em;
  color: #555555;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.page-blog__faq-item[open] .page-blog__faq-answer {
  max-height: 500px; /* Sufficient height for content, adjust if needed */
  transition: max-height 0.5s ease-in;
}

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

/* Global image styles */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Fixed image color rule */
.page-blog img {
  filter: none; /* Ensure no CSS filter changes image color */
}

/* Contrast Fixes (as required by prompt) */
.page-blog__dark-bg {
  color: #ffffff; /* Deep red background with white text */
  background: #E53935;
}

.page-blog__light-bg {
  color: #333333; /* White/light gray background with dark text */
  background: #ffffff;
}

.page-blog__medium-bg {
  color: #000000; /* Auxiliary color background with black text */
  background: #FF5A4F;
}

.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;
}

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    margin-top: -80px;
    padding: 30px 20px;
  }
  .page-blog__main-title {
    font-size: clamp(1.8em, 3.5vw, 3em);
  }
  .page-blog__description {
    font-size: 1em;
  }
  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__section-subtitle {
    font-size: 1.1em;
  }
  .page-blog__post-image {
    height: 180px;
  }
  .page-blog__post-title {
    font-size: 1.3em;
  }
  .page-blog__list-image {
    width: 120px;
    height: 70px;
  }
  .page-blog__list-title {
    font-size: 1.1em;
  }
}

@media (max-width: 768px) {
  /* Global container and padding */
  .page-blog__container {
    padding: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Hero Section */
  .page-blog__hero-section {
    flex-direction: column;
    padding-top: 10px !important; /* Small top padding */
  }
  .page-blog__hero-image-wrapper {
    max-height: 300px; /* Adjust height for mobile */
  }
  .page-blog__hero-image {
    object-fit: contain; /* Ensure image is fully visible, not cropped */
    height: auto;
    width: 100%;
  }
  .page-blog__hero-content {
    margin-top: -50px; /* Less overlap for mobile */
    padding: 25px 15px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  }
  .page-blog__main-title {
    font-size: clamp(1.5em, 6vw, 2em); /* Smaller H1 for mobile */
    margin-bottom: 15px;
  }
  .page-blog__description {
    font-size: 0.95em;
    margin-bottom: 25px;
  }
  .page-blog__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    width: 100%;
  }
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 15px;
    font-size: 1em;
  }

  /* Section Titles */
  .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 10px;
  }
  .page-blog__section-subtitle {
    font-size: 1em;
    margin-bottom: 30px;
  }

  /* Featured Posts */
  .page-blog__featured-posts {
    padding: 40px 0;
  }
  .page-blog__post-grid {
    grid-template-columns: 1fr; /* Single column for featured posts */
    gap: 20px;
  }
  .page-blog__post-image {
    height: 200px; /* Adjust height for single column */
  }
  .page-blog__post-title {
    font-size: 1.2em;
  }
  .page-blog__post-excerpt {
    font-size: 0.9em;
  }

  /* Latest Posts */
  .page-blog__latest-posts {
    padding: 40px 0;
  }
  .page-blog__list-link {
    flex-direction: column; /* Stack image and content vertically */
    align-items: flex-start;
    padding: 10px;
  }
  .page-blog__list-image {
    width: 100%;
    height: 180px; /* Make image wider */
    margin-right: 0;
    margin-bottom: 10px;
  }
  .page-blog__list-title {
    font-size: 1.1em;
  }
  .page-blog__list-excerpt {
    font-size: 0.85em;
  }

  /* CTA Section */
  .page-blog__cta-section {
    padding: 50px 0;
  }

  /* FAQ Section */
  .page-blog__faq-section {
    padding: 40px 0;
  }
  .page-blog__faq-item summary {
    padding: 15px;
    font-size: 1em;
  }
  .page-blog__faq-toggle {
    font-size: 1.2em;
  }
  .page-blog__faq-answer {
    padding: 0 15px 15px 15px;
  }

  /* Enforce image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__list-item,
  .page-blog__cta-section,
  .page-blog__faq-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  /* Specific padding for sections if they have a background to ensure it spans full width */
  .page-blog__featured-posts,
  .page-blog__latest-posts,
  .page-blog__cta-section,
  .page-blog__faq-section {
    padding-left: 0;
    padding-right: 0;
  }
  .page-blog__featured-posts > .page-blog__container,
  .page-blog__latest-posts > .page-blog__container,
  .page-blog__cta-section > .page-blog__container,
  .page-blog__faq-section > .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
  }
}