/* ================================
   NEWS PAGE STYLES
   ================================ */

/* General Reset for News Page */
.news-page {
  font-family: 'Roboto', sans-serif;
  color: #333;
  background-color: #f8f9fa;
}

/* ================================
   (A) HEADER - Sử dụng style mặc định từ main.css
   ================================ */
/* Header giữ nguyên style từ index.html */

/* ================================
   (B) BREAKING NEWS BAR
   ================================ */
.breaking-news-bar {
  background: #841421;
  color: white;
  padding: 10px 0;
  overflow: hidden;
  position: relative;
}

.breaking-news-container {
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden; /* Vùng này sẽ che chữ chạy */
  position: relative;
}

.breaking-label {
  background: #841214;
  color: #f8ae36;
  padding: 5px 15px;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 3px;
  flex-shrink: 0;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  padding: 5px 15px;
}

.breaking-content {
  display: inline-block;
  animation: scroll-left 30s linear infinite;
  padding-left: 100%;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.breaking-content:hover {
  animation-play-state: paused;
}

.breaking-item {
  display: inline-block;
  margin-right: 50px;
  font-size: 15px;
}

.breaking-item::before {
  content: "●";
  margin-right: 10px;
  color: #ffeb3b;
}

/* ================================
   (C) HERO SECTION - Featured News
   ================================ */
.news-hero {
  padding: 40px 0;
  background: white;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

/* Main Featured Article */
.hero-main {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.3s;
}

.hero-main:hover {
  transform: translateY(-5px);
}

.hero-main img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  transition: transform 0.5s;
}

.hero-main:hover img {
  transform: scale(1.05);
}

.hero-main-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
  padding: 30px;
  color: white;
}

.hero-category {
  background: #841421;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 10px;
}

.hero-main-content h2 {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
}

.hero-meta {
  font-size: 14px;
  opacity: 0.9;
}

.hero-meta i {
  margin-right: 5px;
}

.hero-meta span {
  margin-right: 15px;
}

/* Side Featured Articles */
.hero-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-side-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.3s;
  height: calc((500px - 20px) / 2);
}

.hero-side-item:hover {
  transform: translateY(-3px);
}

.hero-side-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.hero-side-item:hover img {
  transform: scale(1.05);
}

.hero-side-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  padding: 20px;
  color: white;
}

.hero-side-content h3 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
  line-height: 1.3;
}

/* ================================
   (D) CATEGORY GRID
   ================================ */
.category-section {
  padding: 60px 0;
  background: #f8f9fa;
}

.category-header {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
}

.category-title {
  font-size: 28px;
  font-weight: bold;
  color: #841421;
  border-left: 5px solid #841421;
  padding-left: 15px;
  margin: 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.news-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 15px rgba(0,0,0,0.08);
  transition: all 0.3s;
  border: 1px solid #e0e0e0;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(132, 20, 33, 0.15);
  border-color: #841421;
}

.news-card-image {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.news-card:hover .news-card-image img {
  transform: scale(1.1);
}

.news-card-category {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #841421;
  color: white;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}

.news-card-content {
  padding: 20px;
}

.news-card-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-excerpt {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #999;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
}

.news-card-date {
  display: flex;
  align-items: center;
}

.news-card-date i {
  margin-right: 5px;
}

.news-card-views {
  display: flex;
  align-items: center;
}

.news-card-views i {
  margin-right: 5px;
}

/* ================================
   (E) SIDEBAR
   ================================ */
.news-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 40px;
  padding: 60px 0;
}

.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-widget {
  background: white;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 3px 15px rgba(0,0,0,0.08);
  border: 1px solid #e0e0e0;
}

.sidebar-widget-title {
  font-size: 20px;
  font-weight: bold;
  color: #841421;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid #841421;
}

/* Popular Posts */
.popular-post {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: background 0.3s;
  padding: 10px;
  border-radius: 8px;
}

.popular-post:hover {
  background: #f8f9fa;
}

.popular-post:last-child {
  margin-bottom: 0;
}

.popular-post-number {
  font-size: 24px;
  font-weight: bold;
  color: #841421;
  width: 30px;
  flex-shrink: 0;
}

.popular-post-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.popular-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popular-post-content h4 {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 5px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popular-post-meta {
  font-size: 12px;
  color: #999;
}

/* Ad Banner */
.ad-banner {
  background: linear-gradient(135deg, #841421 0%, #6b1016 100%);
  color: white;
  text-align: center;
  padding: 40px 20px;
  border-radius: 10px;
}

.ad-banner h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.ad-banner p {
  margin-bottom: 20px;
  opacity: 0.9;
}

.ad-banner .btn-ad {
  background: white;
  color: #841421;
  padding: 12px 30px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  transition: all 0.3s;
}

.ad-banner .btn-ad:hover {
  background: #f8f9fa;
  transform: translateY(-2px);
}

/* Hot Topics */
.hot-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topic-tag {
  background: #f8f9fa;
  color: #333;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.3s;
  border: 1px solid #e0e0e0;
}

.topic-tag:hover {
  background: #841421;
  color: white;
  border-color: #841421;
}

/* ================================
   (F) FOOTER - Sử dụng style mặc định từ main.css
   ================================ */
/* Footer giữ nguyên style từ index.html */

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-side {
    flex-direction: row;
  }
  
  .hero-side-item {
    height: 240px;
  }
  
  .news-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: relative;
    top: 0;
  }
}

@media (max-width: 768px) {
  .hero-main-content h2 {
    font-size: 24px;
  }
  
  .hero-main img {
    height: 300px;
  }
  
  .hero-side {
    flex-direction: column;
  }
  
  .category-grid {
    grid-template-columns: 1fr;
  }
  
  .breaking-content {
    animation-duration: 20s;
  }
}

/* ================================
   LOADING STATE
   ================================ */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 8px;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}

.skeleton-image {
  height: 200px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

.skeleton-content {
  padding: 20px;
}

.skeleton-title {
  height: 20px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
}

.skeleton-text {
  height: 15px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
}

.skeleton-text:last-child {
  width: 60%;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state i {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.empty-state p {
  font-size: 16px;
}

/* ================================
   PAGINATION STYLES
   ================================ */
.pagination-container {
  margin-top: 40px;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination .page-item {
  display: inline-block;
}

.pagination .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  gap: 5px;
}

.pagination .page-link:hover {
  background: #841421;
  color: white;
  border-color: #841421;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(132, 20, 33, 0.2);
}

.pagination .page-item.active .page-link {
  background: #841421;
  color: white;
  border-color: #841421;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(132, 20, 33, 0.3);
}

.pagination .page-item.disabled .page-link {
  background: #f8f9fa;
  color: #999;
  border-color: #ddd;
  cursor: not-allowed;
  opacity: 0.6;
  pointer-events: none;
}

.pagination .page-item.disabled:hover .page-link {
  transform: none;
  box-shadow: none;
}

.pagination-info {
  color: #666;
  font-size: 14px;
  text-align: center;
  padding: 10px 20px;
  background: #f8f9fa;
  border-radius: 6px;
  font-weight: 500;
}

/* Responsive Pagination */
@media (max-width: 768px) {
  .pagination .page-link {
    min-width: 36px;
    height: 36px;
    padding: 6px 10px;
    font-size: 14px;
  }

  .pagination {
    gap: 5px;
  }

  .pagination-info {
    font-size: 13px;
    padding: 8px 15px;
  }
}

@media (max-width: 480px) {
  .pagination .page-link {
    min-width: 32px;
    height: 32px;
    padding: 4px 8px;
    font-size: 13px;
  }

  .pagination {
    gap: 4px;
  }

  /* Hide text on very small screens, show only icons */
  .pagination .page-link i {
    margin: 0;
  }
}

