/* style/blog.css */
.page-blog {
  color: #333333; /* Mặc định chữ đen cho nền sáng */
}

.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  overflow: hidden;
  text-align: center;
  background-color: #E53935;
  padding-top: 10px; /* Nhỏ hơn so với header offset */
}

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

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 20px auto 40px;
  padding: 0 20px;
  color: #ffffff; /* Chữ trắng trên nền tối */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.2em); /* Dùng clamp cho H1 */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  max-width: 100%;
}

.page-blog__hero-description {
  font-size: clamp(1em, 1.5vw, 1.25em);
  line-height: 1.6;
  margin-bottom: 30px;
}

.page-blog__posts-section {
  background-color: #F5F7FA; /* Màu nền từ custom colors */
  padding: 60px 20px;
}

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

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

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

.page-blog__post-card {
  background-color: #FFFFFF; /* Màu nền thẻ từ 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;
  border: 1px solid #E0E0E0; /* Màu viền từ custom colors */
}

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

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

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

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

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

.page-blog__post-excerpt {
  font-size: 0.95em;
  color: #666666;
  margin-bottom: 15px;
  line-height: 1.5;
}

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

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Break long words */
  box-sizing: border-box;
  max-width: 100%;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Màu nút từ custom colors */
  color: #ffffff;
  border: 2px solid transparent;
}

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

.page-blog__btn-secondary {
  background-color: #ffffff;
  color: #E53935; /* Màu nút từ custom colors */
  border: 2px solid #E53935; /* Màu viền từ custom colors */
}

.page-blog__btn-secondary:hover {
  background-color: #E53935;
  color: #ffffff;
}

.page-blog__cta-section {
  background-color: #E53935; /* Màu nền chính từ custom colors */
  padding: 80px 20px;
  text-align: center;
  color: #ffffff; /* Chữ trắng trên nền tối */
}

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

.page-blog__cta-description {
  font-size: 1.2em;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 40px;
}

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

/* Đảm bảo hình ảnh không bị filter */
.page-blog img {
  filter: none; /* Loại bỏ mọi filter ảnh */
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .page-blog__hero-content {
    margin-bottom: 30px;
  }
  .page-blog__main-title {
    font-size: clamp(1.8em, 5vw, 2.8em);
  }
  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__cta-title {
    font-size: 2.2em;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding: 0;
    padding-top: 10px !important;
  }
  .page-blog__hero-content {
    padding: 0 15px;
    margin: 15px auto 30px;
  }
  .page-blog__main-title {
    font-size: 2em !important;
    margin-bottom: 10px;
  }
  .page-blog__hero-description {
    font-size: 1em !important;
    margin-bottom: 20px;
  }
  .page-blog__posts-section {
    padding: 40px 15px;
  }
  .page-blog__section-title {
    font-size: 1.8em !important;
    margin-bottom: 30px;
  }
  .page-blog__post-image {
    height: 180px; /* Adjust height for smaller screens */
  }
  .page-blog__post-title {
    font-size: 1.2em;
  }
  .page-blog__post-excerpt {
    font-size: 0.9em;
  }
  .page-blog__cta-section {
    padding: 60px 15px;
  }
  .page-blog__cta-title {
    font-size: 2em !important;
  }
  .page-blog__cta-description {
    font-size: 1em !important;
    margin-bottom: 30px;
  }
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px !important;
    font-size: 1em !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Mobile specific image handling */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__posts-section,
  .page-blog__cta-section,
  .page-blog__post-card,
  .page-blog__post-grid {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .page-blog__post-grid {
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .page-blog__main-title {
    font-size: 1.8em !important;
  }
  .page-blog__section-title {
    font-size: 1.6em !important;
  }
  .page-blog__cta-title {
    font-size: 1.8em !important;
  }
}