.page-blog {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default text color for light background */
  background-color: #F5F7FA; /* Custom background color */
}

.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
  background-color: #F5F7FA;
  text-align: center;
}

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

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

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

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 2.8em); /* Responsive font size for H1 */
  font-weight: 700;
  color: #E53935; /* Brand color for H1 */
  line-height: 1.2;
  margin-bottom: 15px;
  letter-spacing: -0.02em;
}

.page-blog__subtitle {
  font-size: 1.1em;
  color: #555555;
  margin-bottom: 30px;
  line-height: 1.6;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

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

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

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

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

.page-blog__recent-posts {
  padding: 60px 0;
  background-color: #F5F7FA;
}

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

.page-blog__section-title {
  font-size: 2.5em;
  font-weight: 700;
  color: #E53935;
  text-align: center;
  margin-bottom: 20px;
}

.page-blog__section-description {
  font-size: 1.1em;
  color: #555555;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.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-radius: 12px;
  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__post-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

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

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

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

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

.page-blog__read-more {
  display: inline-flex;
  align-items: center;
  color: #FF5A4F;
  font-weight: 600;
  font-size: 1em;
}

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

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

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

.page-blog__cta-section {
  background-color: #E53935; /* Dark background from brand color */
  padding: 80px 20px;
  text-align: center;
  color: #ffffff;
}

.page-blog__cta-title {
  font-size: 2.2em;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-blog__cta-description {
  font-size: 1.1em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-blog__post-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-top: 10px !important; /* Ensure small top padding */
    padding-bottom: 40px;
  }

  .page-blog__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em);
  }

  .page-blog__subtitle {
    font-size: 1em;
  }

  .page-blog__cta-group {
    flex-direction: column;
    gap: 15px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
    margin: 0 auto; /* Center buttons when stacked */
  }

  .page-blog__recent-posts {
    padding: 40px 0;
  }

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

  .page-blog__section-description {
    font-size: 1em;
  }

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

  .page-blog__post-image {
    height: 200px; /* Adjust image height for mobile */
  }

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

  .page-blog__post-title {
    font-size: 1.2em;
  }

  .page-blog__post-excerpt {
    font-size: 0.95em;
  }

  .page-blog__cta-section {
    padding: 60px 20px;
  }

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

  .page-blog__cta-description {
    font-size: 1em;
  }

  /* Ensure all images and containers are responsive */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__recent-posts,
  .page-blog__cta-section,
  .page-blog__post-card,
  .page-blog__cta-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  .page-blog__cta-group {
    flex-wrap: wrap !important;
    gap: 10px;
  }
}