/* ==========================================================================
   BLOG & BLOG DETAIL CUSTOM STYLES
   ========================================================================== */

/* Blog Hero Section */
.blog-hero {
  background-image: linear-gradient(rgba(12, 13, 20, 0.75), rgba(12, 13, 20, 0.75)), url('../img/bg/blog_hero_lineup.jpg');
  background-size: cover;
  background-position: center;
  padding: 160px 0 80px 0;
  color: white;
}

.blog-hero-title {
  color: white;
  font-size: 2.25rem;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.blog-hero-breadcrumb {
  margin-bottom: 0;
  color: #B0B0C0;
  font-size: 0.9375rem;
  margin-top: 8px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.blog-hero-breadcrumb a {
  color: #B0B0C0;
}

.blog-hero-breadcrumb span {
  color: white;
}

/* Card overrides for Articles */
.article-main-list .product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-main-list .product-card .product-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

.article-main-list .product-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.article-main-list .product-card h3 a {
  color: var(--color-secondary);
}

.article-main-list .product-card .product-info p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Message class */
.text-muted-msg {
  color: var(--color-text-muted);
}

/* Thẻ tag tin tức và Ngày đăng */
.news-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
  display: inline-block;
  margin-bottom: 8px;
}

.news-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: block;
  margin-top: 15px;
}

/* Card Tin tức giới hạn dòng & ảnh lấp đầy */
.product-card .product-thumb {
  width: 100% !important;
  aspect-ratio: 16/9 !important;
  overflow: hidden !important;
  border-top-left-radius: 12px !important;
  border-top-right-radius: 12px !important;
  padding-bottom: 0 !important;
  /* Reset padding-bottom của home.css */
}

.product-card .product-thumb img {
  position: static !important;
  /* Reset position absolute của home.css */
  transform: none !important;
  /* Reset translate(-50%, -50%) của home.css */
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.5s ease !important;
}

.product-card:hover .product-thumb img {
  transform: scale(1.05) !important;
  /* Phóng to nhẹ mượt mà khi hover */
}

.product-card h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 2.8em;
  line-height: 1.4;
  margin-bottom: 10px;
}

.product-card .product-info p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 4.5em;
  line-height: 1.5;
  margin-bottom: 0;
}

.article-main-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.sidebar-widget {
  background: white;
  border: 1px solid #ECECEC;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.widget-title {
  font-size: 1.1rem;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
  padding-bottom: 6px;
  color: var(--color-secondary);
}

/* Widget Danh mục */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  border-bottom: 1px dashed #ECECEC;
}

.category-list li:last-child {
  border-bottom: none;
}

.category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  color: var(--color-secondary);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
}

.category-list a:hover {
  color: var(--color-primary);
  padding-left: 5px;
}

.category-list a span.count {
  background: #F5F5F7;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: normal;
}

.category-list a:hover span.count {
  background: var(--color-primary);
  color: white;
}

/* Widget Tư vấn mua xe (Giống hình) */
.consult-widget {
  background: white;
  border: 1px solid #ECECEC;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.consult-img-wrapper {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.consult-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.consult-content {
  padding: 24px;
}

.consult-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 8px;
}

.consult-hotline {
  font-size: 2.1rem;
  font-weight: 800;
  color: #eb1b2e;
  margin-bottom: 16px;
  display: block;
  letter-spacing: 0.5px;
}

.consult-desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 20px;
  font-style: italic;
}

.consult-btn {
  display: block;
  width: 100%;
  background: #2b353e;
  color: white;
  text-align: center;
  padding: 14px 20px;
  border-radius: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9375rem;
  box-shadow: 0 4px 10px rgba(43, 53, 62, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.consult-btn:hover {
  background: var(--color-primary);
  box-shadow: 0 4px 10px rgba(235, 27, 46, 0.3);
  color: white;
}

/* Widget Tin tức mới */
.recent-posts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.recent-post-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: center;
}

.recent-post-thumb {
  aspect-ratio: 1.2;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #E5E5E5;
}

.recent-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-post-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
}

.recent-post-title a {
  color: var(--color-secondary);
  transition: color 0.3s ease;
}

.recent-post-title a:hover {
  color: var(--color-primary);
}

.recent-post-date {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Widget Sản phẩm */
.widget-product-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px dashed #ECECEC;
  margin-bottom: 12px;
}

.widget-product-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.widget-product-thumb {
  aspect-ratio: 4/3;
  background: #F5F5F7;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.widget-product-thumb img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.widget-product-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 4px;
}

.widget-product-price {
  font-size: 0.8125rem;
  color: var(--color-primary);
  font-weight: 600;
}

/* Phân trang (Pagination) */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid #E5E5E5;
  background: white;
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
}

.page-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.page-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.page-btn.disabled {
  color: #C0C0C0;
  border-color: #EFEFEF;
  cursor: not-allowed;
  background: #FAFAFA;
}

.pagination .page-ellipsis {
  padding: 8px 12px;
  color: var(--color-text-muted);
}

/* ==========================================================================
   CSS SPECIFIC TO SINGLE BLOG POST PAGE (blog-detail.html)
   ========================================================================== */
.article-main {
  background: white;
  border: 1px solid #ECECEC;
  border-radius: 12px;
  padding: 15px;
}

.article-meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-content h2 {
  font-size: 1.5rem;
  margin-top: 32px;
  margin-bottom: 16px;
  color: var(--color-secondary);
  border-left: 4px solid var(--color-primary);
  padding-left: 12px;
}

.article-content p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 20px;
  color: #444;
}

.article-content ul,
.article-content ol {
  margin-bottom: 20px;
  padding-left: 20px;
}

.article-content li {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 8px;
  color: #444;
}

/* ==========================================================================
   RESPONSIVE — BLOG PAGES
   ========================================================================== */

/* Blog Hero — Mobile & Tablet */
@media (max-width: 768px) {
  .blog-hero {
    padding: 120px 0 60px 0;
  }

  .blog-hero-title,
  .detail-hero-title {
    font-size: 1.5rem;
  }

  .blog-hero-desc {
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  .blog-hero {
    padding: 100px 0 40px 0;
  }

  .blog-hero-title,
  .detail-hero-title {
    font-size: 1.25rem;
  }
}

/* Pagination — màn hình rất nhỏ */
@media (max-width: 400px) {
  .pagination {
    gap: 4px;
  }

  .page-btn {
    min-width: 34px;
    height: 34px;
    font-size: 0.8125rem;
  }
}