/* style/blog.css */
/* body đã padding-top: var(--header-offset); nên page-blog__hero-section chỉ cần padding-top nhỏ */

.page-blog {
  color: #FFF6D6; /* Màu chữ chính cho nền tối */
  background-color: #0A0A0A; /* Màu nền body */
}

.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Chỉ cần một khoảng cách nhỏ */
  box-sizing: border-box;
  text-align: center;
}

.page-blog__hero-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  max-width: 1200px;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 30px;
}

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

.page-blog__main-title {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #F2C14E;
  margin-bottom: 20px;
}

.page-blog__description {
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 30px;
  color: #FFF6D6;
}

.page-blog__btn-primary {
  display: inline-block;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #111111;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(242, 193, 78, 0.4);
}

.page-blog__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(242, 193, 78, 0.6);
}

.page-blog__latest-posts,
.page-blog__categories,
.page-blog__cta-section {
  padding: 60px 20px;
  box-sizing: border-box;
  background-color: #0A0A0A;
}

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

.page-blog__section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #F2C14E;
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.2;
}

.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-color: #111111; /* Card BG */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid #3A2A12; /* Border */
}

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

.page-blog__post-image {
  width: 100%;
  height: 220px; /* 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.5rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__post-title a {
  color: #FFD36B; /* Glow */
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

.page-blog__post-excerpt {
  font-size: 1rem;
  line-height: 1.6;
  color: #FFF6D6; /* Text Main */
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__btn-secondary {
  display: inline-block;
  background: transparent;
  color: #F2C14E;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid #F2C14E;
  transition: background-color 0.3s ease, color 0.3s ease;
  align-self: flex-start;
}

.page-blog__btn-secondary:hover {
  background-color: #F2C14E;
  color: #111111;
}

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

.page-blog__categories-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-blog__category-item {
  display: block;
  background-color: #111111; /* Card BG */
  color: #FFD36B; /* Glow */
  padding: 12px 25px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid #3A2A12; /* Border */
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.page-blog__category-item:hover {
  background-color: #F2C14E;
  color: #111111;
  border-color: #F2C14E;
}

.page-blog__cta-section {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(90deg, #0A0A0A 0%, rgba(242, 193, 78, 0.1) 50%, #0A0A0A 100%);
  border-top: 1px solid #3A2A12;
}

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

.page-blog__cta-description {
  font-size: 1.25rem;
  line-height: 1.6;
  color: #FFF6D6;
  max-width: 800px;
  margin: 0 auto 40px;
}

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

/* Responsive styles */
@media (max-width: 1024px) {
  .page-blog__hero-image {
    height: 500px;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section,
  .page-blog__latest-posts,
  .page-blog__categories,
  .page-blog__cta-section {
    padding: 40px 15px;
  }

  .page-blog__hero-image {
    height: 300px;
    margin-bottom: 20px;
  }

  .page-blog__main-title {
    font-size: 2rem;
    margin-bottom: 15px;
  }

  .page-blog__description {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .page-blog__btn-primary {
    padding: 12px 25px;
    font-size: 0.95rem;
  }

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

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

  .page-blog__post-image {
    height: 180px;
  }

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

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

  .page-blog__category-item {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .page-blog__cta-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
  }

  .page-blog__cta-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
  }

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

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

  /* Mobile responsive for all images */
  .page-blog img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Mobile responsive for all image containers */
  .page-blog__hero-container,
  .page-blog__posts-grid,
  .page-blog__post-card,
  .page-blog__categories-grid,
  .page-blog__cta-buttons,
  .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no horizontal scroll */
  }

  .page-blog__hero-section {
    padding-top: 10px !important; /* body đã xử lý header offset */
  }
}

@media (max-width: 480px) {
  .page-blog__main-title {
    font-size: 1.7rem;
  }

  .page-blog__section-title {
    font-size: 1.8rem;
  }

  .page-blog__cta-title {
    font-size: 1.9rem;
  }
}