.page-blog {
  font-family: Arial, sans-serif;
  color: #333333;
  background-color: #F5F7FA;
}

.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, header offset handled by body */
  padding-bottom: 60px;
  background: #F5F7FA;
}

.page-blog__hero-container {
  max-width: 1170px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 40px 16px;
  gap: 40px;
}

.page-blog__hero-content {
  flex: 1 1 45%;
  min-width: 300px;
  color: #333333;
}

.page-blog__main-title {
  font-size: 2.8em;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #E53935;
  max-width: 600px;
}

.page-blog__hero-description {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 30px;
  color: #333333;
  max-width: 550px;
}

.page-blog__hero-image {
  flex: 1 1 45%;
  text-align: center;
  min-width: 300px;
}

.page-blog__hero-side-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

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

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

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
  box-shadow: 0 6px 20px rgba(229, 57, 53, 0.6);
}

.page-blog__btn-secondary {
  background: #ffffff;
  color: #E53935;
  border: 2px solid #E53935;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-blog__btn-secondary:hover {
  background: #f0f0f0;
  color: #FF5A4F;
  border-color: #FF5A4F;
}

.page-blog__container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 40px 16px;
}

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

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

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

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

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

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

.page-blog__post-thumbnail {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.page-blog__post-thumbnail img {
  width: 100%;
  height: 100%;
  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;
  margin-bottom: 10px;
  line-height: 1.4;
}

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

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

.page-blog__post-date {
  font-size: 0.9em;
  color: #777777;
  margin-bottom: 15px;
  display: block;
}

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

.page-blog__read-more-btn {
  display: inline-block;
  margin-top: auto; /* Push to bottom */
  color: #E53935;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-blog__read-more-btn:hover {
  color: #FF5A4F;
  text-decoration: underline;
}

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

/* Categories Section */
.page-blog__categories-section {
  padding: 60px 0;
  background-color: #E53935;
  color: #ffffff;
}

.page-blog__categories-section .page-blog__section-title,
.page-blog__categories-section .page-blog__section-description {
  color: #ffffff;
}

.page-blog__category-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  max-width: 900px;
}

.page-blog__category-item {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 25px;
  padding: 10px 20px;
  transition: background 0.3s ease;
}

.page-blog__category-item:hover {
  background: rgba(255, 255, 255, 0.3);
}

.page-blog__category-item a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05em;
}

/* CTA Bottom Section */
.page-blog__cta-bottom-section {
  padding: 60px 0;
  background-color: #F5F7FA;
}

.page-blog__cta-bottom-section .page-blog__section-title {
  color: #E53935;
}

.page-blog__cta-bottom-section .page-blog__section-description {
  color: #333333;
}

.page-blog__cta-bottom-section .page-blog__cta-buttons {
  justify-content: center;
  margin-top: 30px;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-container {
    padding: 30px 16px;
    gap: 30px;
  }

  .page-blog__main-title {
    font-size: 2.4em;
  }

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

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

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

  .page-blog__posts-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

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

  .page-blog__category-item {
    padding: 8px 16px;
    font-size: 1em;
  }
}

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

  .page-blog__hero-container {
    flex-direction: column;
    padding: 20px 15px;
    gap: 30px;
  }

  .page-blog__hero-content {
    order: 2; /* Content after image on mobile */
    flex: none;
    width: 100%;
  }

  .page-blog__hero-image {
    order: 1; /* Image before content on mobile */
    flex: none;
    width: 100%;
  }

  .page-blog__main-title {
    font-size: 2em;
    text-align: center;
    max-width: 100%;
  }

  .page-blog__hero-description {
    font-size: 0.95em;
    text-align: center;
    max-width: 100%;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 10px;
    align-items: center;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
  }

  .page-blog__container {
    padding: 30px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }

  .page-blog__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
    max-width: 100%;
  }

  /* Blog Posts Grid */
  .page-blog__posts-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-blog__post-thumbnail {
    height: 200px;
  }

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

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

  /* Categories List */
  .page-blog__category-list {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .page-blog__category-item {
    width: 100%;
    text-align: center;
    padding: 10px 15px;
  }

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

  .page-blog__post-thumbnail img {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important; /* Keep height for consistent card appearance */
    object-fit: cover !important;
  }

  /* Ensure all containers handle overflow */
  .page-blog__latest-posts-section,
  .page-blog__categories-section,
  .page-blog__cta-bottom-section {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Color Contrast Fixes - Ensure readability */
.page-blog__dark-section {
  background: #E53935;
  color: #ffffff;
}

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

.page-blog__card {
  background: #ffffff;
  color: #333333;
  border: 1px solid #E0E0E0;
}

.page-blog__post-title a {
  color: #E53935; /* Ensure title links have brand color */
}

.page-blog__read-more-btn {
  color: #E53935; /* Ensure read more links have brand color */
}