/* ========================================
   NEWS PAGE STYLES - LAU BO QUANG KHAI
   ======================================== */

:root {
  --news-primary: #cb2222;
  --news-secondary: #7a0c0c;
  --news-accent: #eae09e;
  --news-text: #333333;
  --news-text-light: #666666;
  --news-bg: #ffffff;
  --news-bg-light: #f8f8f8;
  --news-border: #e0e0e0;
  --news-shadow: rgba(0, 0, 0, 0.1);
  --news-transition: all 0.3s ease;
}

/* ========================================
   MAIN CONTAINER
   ======================================== */
.site-news {
  padding: 60px 0;
  background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
}

/* ========================================
   NEWS HEADER
   ======================================== */
.news-header {
  text-align: center;
  margin-bottom: 50px;
  padding-bottom: 30px;
  border-bottom: 3px solid var(--news-accent);
  position: relative;
}

.news-header::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: var(--news-primary);
}

.news-main-title {
  font-size: 3.6rem;
  font-weight: 700;
  color: var(--news-secondary);
  margin-bottom: 15px;
  font-family: "RobotoB", sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.news-subtitle {
  font-size: 1.6rem;
  color: var(--news-text-light);
  font-style: italic;
}

/* ========================================
   CONTENT WRAPPER
   ======================================== */
.news-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 40px;
}

/* ========================================
   FEATURED ARTICLE
   ======================================== */
.news-featured {
  background: var(--news-bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--news-shadow);
  margin-bottom: 40px;
  transition: var(--news-transition);
}

.news-featured:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.news-featured-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.news-featured-image {
  position: relative;
  overflow: hidden;
  height: 450px;
}

.news-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-featured:hover .news-featured-image img {
  transform: scale(1.1);
}

.news-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: linear-gradient(
    135deg,
    var(--news-primary) 0%,
    var(--news-secondary) 100%
  );
  color: white;
  padding: 8px 20px;
  border-radius: 25px;
  font-size: 1.3rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(203, 34, 34, 0.3);
}

.news-featured-content {
  padding: 35px;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 15px;
  font-size: 1.3rem;
  color: var(--news-text-light);
}

.news-meta i {
  margin-right: 5px;
  color: var(--news-primary);
}

.news-featured-title {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--news-text);
  margin-bottom: 15px;
  line-height: 1.3;
  font-family: "RobotoB", sans-serif;
  transition: var(--news-transition);
}

.news-featured:hover .news-featured-title {
  color: var(--news-primary);
}

.news-featured-desc {
  font-size: 1.6rem;
  color: var(--news-text-light);
  line-height: 1.6;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--news-primary);
  font-size: 1.5rem;
  font-weight: 600;
  transition: var(--news-transition);
}

.news-featured:hover .news-read-more {
  gap: 12px;
}

.news-read-more i {
  transition: var(--news-transition);
}

/* ========================================
   REGULAR NEWS ITEMS
   ======================================== */
.news-item {
  background: var(--news-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px var(--news-shadow);
  margin-bottom: 30px;
  transition: var(--news-transition);
  display: flex;
}

.news-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.news-item-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  width: 100%;
}

.news-item-image {
  position: relative;
  overflow: hidden;
  width: 300px;
  flex-shrink: 0;
}

.news-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-item:hover .news-item-image img {
  transform: scale(1.08);
}

.news-item-content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-item-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--news-text);
  margin-bottom: 12px;
  line-height: 1.4;
  font-family: "RobotoB", sans-serif;
  transition: var(--news-transition);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item:hover .news-item-title {
  color: var(--news-primary);
}

.news-item-desc {
  font-size: 1.4rem;
  color: var(--news-text-light);
  line-height: 1.6;
  margin-bottom: 15px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   SIDEBAR
   ======================================== */
.news-sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
}

.sidebar-widget {
  background: var(--news-bg);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px var(--news-shadow);
  border: 1px solid var(--news-border);
}

.widget-title {
  position: relative;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--news-accent);
}

.widget-title span {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--news-secondary);
  font-family: "RobotoB", sans-serif;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
}

.widget-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--news-primary);
}

/* Latest News List */
.latest-news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.latest-news-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--news-border);
}

.latest-news-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.latest-news-link {
  display: flex;
  gap: 15px;
  text-decoration: none;
  color: inherit;
  transition: var(--news-transition);
}

.latest-news-image {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}

.latest-news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.latest-news-link:hover .latest-news-image img {
  transform: scale(1.1);
}

.latest-news-info {
  flex: 1;
}

.latest-news-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--news-text);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: var(--news-transition);
}

.latest-news-link:hover .latest-news-title {
  color: var(--news-primary);
}

.latest-news-date {
  font-size: 1.2rem;
  color: var(--news-text-light);
}

.latest-news-date i {
  margin-right: 5px;
  color: var(--news-primary);
}

/* Categories List */
.categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item {
  margin-bottom: 12px;
}

.category-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: var(--news-bg-light);
  border-radius: 8px;
  text-decoration: none;
  color: var(--news-text);
  transition: var(--news-transition);
  border-left: 3px solid transparent;
}

.category-link:hover {
  background: var(--news-accent);
  border-left-color: var(--news-primary);
  transform: translateX(5px);
}

.category-name {
  font-size: 1.4rem;
  font-weight: 500;
}

.category-name i {
  margin-right: 8px;
  color: var(--news-primary);
  font-size: 1.2rem;
}

.category-count {
  font-size: 1.2rem;
  color: var(--news-text-light);
  background: white;
  padding: 2px 8px;
  border-radius: 12px;
}

/* Tags List */
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-item {
  display: inline-block;
  padding: 8px 16px;
  background: var(--news-bg-light);
  border: 1px solid var(--news-border);
  border-radius: 20px;
  font-size: 1.3rem;
  color: var(--news-text);
  text-decoration: none;
  transition: var(--news-transition);
}

.tag-item:hover {
  background: var(--news-primary);
  color: white;
  border-color: var(--news-primary);
  transform: translateY(-2px);
}

/* ========================================
   PAGINATION
   ======================================== */
.news-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 50px;
  padding-top: 40px;
  border-top: 2px solid var(--news-border);
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: white;
  border: 2px solid var(--news-border);
  border-radius: 8px;
  color: var(--news-text);
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 600;
  transition: var(--news-transition);
}

.pagination-btn:hover {
  background: var(--news-primary);
  color: white;
  border-color: var(--news-primary);
}

.pagination-numbers {
  display: flex;
  gap: 8px;
}

.pagination-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: white;
  border: 2px solid var(--news-border);
  border-radius: 8px;
  color: var(--news-text);
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 600;
  transition: var(--news-transition);
}

.pagination-number:hover {
  background: var(--news-accent);
  border-color: var(--news-primary);
  color: var(--news-primary);
  transform: translateY(-2px);
}

.pagination-number.active {
  background: var(--news-primary);
  color: white;
  border-color: var(--news-primary);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablets */
@media (max-width: 1024px) {
  .news-content-wrapper {
    grid-template-columns: 1fr 300px;
    gap: 30px;
  }

  .news-main-title {
    font-size: 3.2rem;
  }

  .news-featured-image {
    height: 350px;
  }

  .news-featured-title {
    font-size: 2.4rem;
  }

  .news-item-image {
    width: 250px;
  }
}

/* Mobile Landscape */
@media (max-width: 768px) {
  .site-news {
    padding: 40px 0;
  }

  .news-content-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .news-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
  }

  .news-main-title {
    font-size: 2.8rem;
  }

  .news-subtitle {
    font-size: 1.4rem;
  }

  .news-featured-image {
    height: 280px;
  }

  .news-featured-content {
    padding: 25px;
  }

  .news-featured-title {
    font-size: 2rem;
  }

  .news-featured-desc {
    font-size: 1.4rem;
  }

  .news-item {
    flex-direction: column;
  }

  .news-item-image {
    width: 100%;
    height: 220px;
  }

  .news-item-content {
    padding: 20px;
  }

  .news-item-title {
    font-size: 1.6rem;
  }

  .news-sidebar {
    position: static;
  }

  .news-pagination {
    margin-top: 30px;
    padding-top: 30px;
  }

  .pagination-btn {
    padding: 10px 16px;
    font-size: 1.3rem;
  }

  .pagination-number {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }
}

/* Mobile Portrait */
@media (max-width: 480px) {
  .news-main-title {
    font-size: 2.4rem;
  }

  .news-subtitle {
    font-size: 1.2rem;
  }

  .news-featured-image {
    height: 200px;
  }

  .news-featured-content {
    padding: 20px;
  }

  .news-featured-title {
    font-size: 1.8rem;
  }

  .news-featured-desc {
    font-size: 1.3rem;
    -webkit-line-clamp: 2;
  }

  .news-badge {
    padding: 6px 15px;
    font-size: 1.1rem;
  }

  .news-item-image {
    height: 180px;
  }

  .news-item-content {
    padding: 15px;
  }

  .news-item-title {
    font-size: 1.5rem;
  }

  .news-item-desc {
    font-size: 1.3rem;
  }

  .sidebar-widget {
    padding: 20px;
  }

  .widget-title span {
    font-size: 1.6rem;
  }

  .news-pagination {
    flex-wrap: wrap;
    gap: 8px;
  }

  .pagination-btn {
    padding: 8px 12px;
    font-size: 1.2rem;
  }

  .pagination-numbers {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .pagination-number {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Apply animations if AOS is not available */
.news-featured,
.news-item {
  animation: fadeInUp 0.6s ease;
}

.sidebar-widget {
  animation: slideInLeft 0.6s ease;
}

/* ========================================
   NEWS DETAIL PAGE
   ======================================== */
.site-news-detail {
  padding-top: 40px;
}

.news-detail-article {
  background: var(--news-bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--news-shadow);
  padding: 40px;
}

/* Article Header */
.news-detail-header {
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 2px solid var(--news-accent);
}

.news-detail-title {
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--news-secondary);
  margin-bottom: 20px;
  line-height: 1.3;
  font-family: "RobotoB", sans-serif;
}

.news-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  font-size: 1.4rem;
  color: var(--news-text-light);
}

.news-detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.news-detail-meta i {
  color: var(--news-primary);
}

/* Article Content */
.news-detail-content {
  font-size: 1.6rem;
  line-height: 1.8;
  color: var(--news-text);
  margin-bottom: 40px;
}

.news-detail-content p {
  margin-bottom: 20px;
}

.news-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 20px 0;
}

.news-detail-content h2,
.news-detail-content h3,
.news-detail-content h4 {
  color: var(--news-secondary);
  margin-top: 30px;
  margin-bottom: 15px;
}

.news-detail-content ul,
.news-detail-content ol {
  margin-left: 25px;
  margin-bottom: 20px;
}

.news-detail-content li {
  margin-bottom: 10px;
}

.news-detail-content blockquote {
  border-left: 4px solid var(--news-primary);
  padding-left: 20px;
  margin: 25px 0;
  font-style: italic;
  color: var(--news-text-light);
  background: var(--news-bg-light);
  padding: 20px;
  border-radius: 0 10px 10px 0;
}

/* Share Buttons */
.news-detail-share {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 25px 0;
  border-top: 1px solid var(--news-border);
  border-bottom: 1px solid var(--news-border);
  margin-bottom: 40px;
}

.share-label {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--news-text);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: var(--news-transition);
  font-size: 1.6rem;
}

.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.share-facebook {
  background: #3b5998;
}

.share-twitter {
  background: #1da1f2;
}

.share-pinterest {
  background: #bd081c;
}

/* Related Articles */
.news-related {
  margin-top: 40px;
}

.news-related-title {
  position: relative;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--news-accent);
}

.news-related-title span {
  font-size: 2rem;
  font-weight: 700;
  color: var(--news-secondary);
  font-family: "RobotoB", sans-serif;
  text-transform: uppercase;
}

.news-related-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 80px;
  height: 2px;
  background: var(--news-primary);
}

.news-related-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.news-related-item {
  background: var(--news-bg-light);
  border-radius: 10px;
  overflow: hidden;
  transition: var(--news-transition);
}

.news-related-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px var(--news-shadow);
}

.news-related-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.news-related-image {
  height: 160px;
  overflow: hidden;
}

.news-related-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-related-item:hover .news-related-image img {
  transform: scale(1.1);
}

.news-related-info {
  padding: 20px;
}

.news-related-info h4 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--news-text);
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: var(--news-transition);
}

.news-related-item:hover .news-related-info h4 {
  color: var(--news-primary);
}

.news-related-date {
  font-size: 1.2rem;
  color: var(--news-text-light);
}

.news-related-date i {
  margin-right: 5px;
  color: var(--news-primary);
}

/* Detail Page Responsive */
@media (max-width: 1024px) {
  .news-detail-article {
    padding: 30px;
  }

  .news-detail-title {
    font-size: 2.8rem;
  }

  .news-related-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .news-detail-article {
    padding: 25px;
  }

  .news-detail-title {
    font-size: 2.4rem;
  }

  .news-detail-meta {
    gap: 15px;
    font-size: 1.3rem;
  }

  .news-detail-content {
    font-size: 1.5rem;
  }

  .news-related-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .news-related-image {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .news-detail-article {
    padding: 20px;
    border-radius: 10px;
  }

  .news-detail-title {
    font-size: 2rem;
  }

  .news-detail-meta {
    flex-direction: column;
    gap: 10px;
  }

  .news-detail-share {
    flex-wrap: wrap;
  }

  .share-btn {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  .news-sidebar,
  .news-pagination,
  .news-badge {
    display: none;
  }

  .news-content-wrapper {
    grid-template-columns: 1fr;
  }

  .news-item,
  .news-featured {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
}
