/* Comic Blog Hot Section */
.comic-blog-hot {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 100%;
  padding: 40px 0;
}

/* Hàng 1: 3 box lớn phân đều */
.row-large {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Hàng 2: 4 box nhỏ phân đều */
.row-small {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* Box lớn */
.blog-item.large {
  aspect-ratio: 16 / 9;
  width: 100%;
}

/* Box nhỏ */
.blog-item.small {
  aspect-ratio: 16 / 9;
  width: 100%;
}

.blog-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: #000;
  display: block;
  text-decoration: none;
  color: inherit;
}

.blog-item:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.blog-item:hover .blog-title {
  color: var(--primary-color);
}

.blog-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.2) 80%,
    transparent 100%
  );
  padding: 20px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.blog-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-item.large .blog-title {
  font-size: 14px;
  -webkit-line-clamp: 4;
}

.blog-item.small .blog-title {
  font-size: 14px;
  -webkit-line-clamp: 2;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  opacity: 0.95;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.blog-item.small .blog-meta {
  font-size: 11px;
}

.blog-author {
  font-weight: 600;
}

.blog-date {
  opacity: 0.9;
}

/* Responsive cho mobile - scroll horizontal */
@media (max-width: 430px) {
  .comic-blog-hot {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .comic-blog-hot::-webkit-scrollbar {
    display: none;
  }

  .blog-item.large,
  .blog-item.small {
    display: block;
    min-width: calc(100vw - 80px);
    max-width: calc(100vw - 80px);
    aspect-ratio: 16 / 9;
    scroll-snap-align: center;
    flex-shrink: 0;
  }

  .blog-overlay {
    padding: 16px;
  }

  .blog-title {
    font-size: 16px !important;
    -webkit-line-clamp: 3 !important;
  }

  .blog-meta {
    font-size: 12px !important;
  }
}

/* Comic Blog Row - Layout chính */
.comic-blog-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  padding-bottom: 40px;
}

/* Span8 - Main Content */
.comic-blog-span8 {
  padding: 0 20px 20px 0;
}

/* Post Item trong Main Content */
.post-item {
  display: flex;
  gap: 20px;
  padding-bottom: 25px;
  margin-bottom: 25px;
}

.post-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.post-thumbnail {
  flex-shrink: 0;
  width: 200px;
  overflow: hidden;
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-thumbnail:hover img {
  transform: scale(1.05);
}

.post-content-blog {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.post-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.post-title:hover {
  color: var(--primary-color);
}

.post-excerpt {
  font-size: 14px;
  color: #999;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 13px;
  color: #999;
}

.post-author {
  font-weight: 600;
  color: #fff;
}

/* Span4 - Sidebar */
.comic-blog-span4 {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-self: start;
  position: sticky;
  top: 20px;
}

/* Widget/Section trong Sidebar */
.sidebar-widget {
  padding: 0 0 0 25px;
}

.widget-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.widget-title span {
  padding: 10px 20px;
  background-color: var(--primary-color);
  position: relative;
}

.widget-title span::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 30px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid var(--primary-color);
  transform: rotate(90deg);
}

/* Small Post Item trong Sidebar */
.sidebar-post {
  display: flex;
  gap: 12px;
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.sidebar-post-thumbnail {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  overflow: hidden;
  background: #000;
}

.sidebar-post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-post-content {
  flex: 1;
}

.sidebar-post-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 6px;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-post-title:hover {
  color: var(--primary-color);
}

.sidebar-post-date {
  font-size: 12px;
  color: #999;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  background: #fff;
  color: #666;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 5px;
}

.page-link:hover {
  background: #f5f5f5;
  border-color: #999;
  color: #333;
}

.page-link.active {
  background: var(--primary-color);
  color: #fff;
}

.page-link.page-next {
  padding: 0 14px;
}

.page-dots {
  color: #999;
  padding: 0 5px;
  font-size: 16px;
  font-weight: 600;
}

.page-info {
  margin-left: auto;
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

.page-info span {
  color: #fff;
}

/* Responsive */
@media (max-width: 1024px) {
  .comic-blog-row {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .comic-blog-span4 {
    grid-template-columns: repeat(2, 1fr);
    display: grid;
  }

  .sidebar-widget {
    padding: 0;
  }
}

@media (max-width: 768px) {
  .post-item {
    flex-direction: column;
  }

  .post-thumbnail {
    width: 100%;
    height: 200px;
  }

  .comic-blog-span8 {
    padding: 0;
  }

  .comic-blog-span4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .comic-blog-span8,
  .sidebar-widget {
    padding: 20px 0;
  }

  .post-title {
    font-size: 18px;
  }

  .post-thumbnail {
    height: 180px;
  }

  .pagination {
    gap: 6px;
    justify-content: center;
  }

  .page-link {
    min-width: 40px;
    height: 40px;
    font-size: 13px;
  }

  .page-info {
    font-size: 13px;
  }
}
