/* =====================================================
   SAIXI News List Page
   ===================================================== */
.saixi-news-page {
  overflow-x: hidden;
  color: #0f172a;
  background: #f8fafc;
  font-family: "Inter", sans-serif;
}

.news-main {
  min-height: 100vh;
  background-color: #f8fafc;
}

.news-container {
  width: min(100% - 48px, 1320px);
  margin: 0 auto;
}

/* List Section */
.news-list-section {
  padding: 60px 0 90px;
}

.news-tabs {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
  padding: 0 0 20px;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.news-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 24px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #475569;
  background: #ffffff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02);
  transition: all 0.25s ease;
}

.news-tabs a:hover,
.news-tabs a.is-active {
  color: #ffffff;
  border-color: #1f72ee;
  background: #1f72ee;
  box-shadow: 0 6px 18px rgba(31, 114, 238, 0.28);
  transform: translateY(-1px);
}

/* Cards Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.news-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card:hover {
  transform: translateY(-5px);
  border-color: rgba(31, 114, 238, 0.3);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

.news-card__image {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 200px;
  border-radius: 12px;
  background: #f1f5f9;
}

.news-card__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.news-card:hover .news-card__image img {
  transform: scale(1.06);
}

.news-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 6px 8px 6px 0;
}

.news-card__category {
  display: inline-block;
  width: fit-content;
  margin-bottom: 12px;
  padding: 3px 12px;
  border-radius: 999px;
  color: #1f72ee;
  background: rgba(31, 114, 238, 0.08);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition: all 0.2s ease;
}

.news-card__category:hover {
  background: #1f72ee;
  color: #ffffff;
}

.news-card h2 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card h2 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.news-card h2 a:hover {
  color: #1f72ee;
}

.news-card p {
  margin: 0 0 16px;
  color: #475569;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.news-card__meta time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}

.news-card__meta time i {
  color: #1f72ee;
  font-size: 12px;
}

.news-card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1f72ee;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.news-card__more i {
  font-size: 11px;
  transition: transform 0.2s ease;
}

.news-card__more:hover i {
  transform: translateX(4px);
}

/* Pagination */
.news-pagination {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.news-pagination .pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-pagination li,
.news-pagination a,
.news-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.news-pagination a,
.news-pagination span {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #0f172a;
  background: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02);
  transition: all 0.25s ease;
}

.news-pagination a:hover,
.news-pagination .active a,
.news-pagination .active span,
.news-pagination .current {
  border-color: #1f72ee;
  color: #ffffff;
  background: #1f72ee;
  box-shadow: 0 4px 14px rgba(31, 114, 238, 0.25);
}

/* Responsive */
@media (max-width: 1024px) {
  .news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .news-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .news-card__image {
    min-height: 200px;
    aspect-ratio: 16 / 9;
  }

  .news-card__body {
    padding: 0 4px 4px;
  }
}

/* =====================================================
   News Detail Page (Matching view_article.htm mockup)
   ===================================================== */
.news-detail-main {
  background: #ffffff;
  min-height: 100vh;
}

.news-detail-section {
  padding: 40px 0 90px;
}

.news-detail-container {
  /* width: min(100% - 64px, 960px); */
  margin: 0 auto;
}

/* Topbar Breadcrumbs & Back Link */
.news-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
}

.news-detail-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 13.5px;
  font-weight: 500;
}

.news-detail-breadcrumbs a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.news-detail-breadcrumbs a:hover {
  color: #1f72ee;
}

.news-detail-breadcrumbs i {
  color: #64748b;
  font-size: 13px;
  margin-right: 4px;
}

.news-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1f72ee !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.news-detail-back:hover {
  opacity: 0.85;
}

.news-detail-back i {
  font-size: 12px;
}

/* Article Header */
.news-detail-header {
  margin-bottom: 32px;
}

.news-detail-category {
  display: inline-block;
  color: #1f72ee;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  margin-bottom: 12px;
  transition: opacity 0.2s ease;
}

.news-detail-category:hover {
  opacity: 0.85;
}

.news-detail-header h1 {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.news-detail-header .news-title-line {
  display: block;
  width: 36px;
  height: 3px;
  background: #1f72ee;
  border-radius: 999px;
  margin: 0 0 18px;
}

.news-detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #64748b;
  font-size: 13.5px;
  font-weight: 500;
}

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

.news-detail-meta i {
  color: #64748b;
  font-size: 13px;
}

/* Feature Cover Banner */
.news-detail-cover {
  width: 100%;
  margin: 0 0 40px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.news-detail-cover img {
  display: block;
  width: 100%;
  height: clamp(320px, 42vw, 480px);
  object-fit: cover;
}

/* Article Content Body */
.news-detail-content {
  color: #334155;
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.8;
  margin-bottom: 40px;
}

.news-detail-content p {
  margin: 0 0 22px;
}

.news-detail-content h2,
.news-detail-content h3,
.news-detail-content h4 {
  margin: 36px 0 16px;
  color: #0f172a;
  font-weight: 800;
  line-height: 1.3;
}

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

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

.news-detail-content ul,
.news-detail-content ol {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0 28px;
  padding: 0;
  list-style: none;
}

.news-detail-content li {
  position: relative;
  padding-left: 28px;
  color: #0f172a;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.6;
}

.news-detail-content li::before {
  position: absolute;
  top: 3px;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1f72ee;
  color: #ffffff;
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

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

/* Quote Block */
.news-detail-quote {
  background: #f0f7ff;
  border: 1px solid #e0f2fe;
  border-radius: 12px;
  padding: 32px 40px;
  margin: 40px 0 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.news-detail-quote > i {
  color: #93c5fd;
  font-size: 38px;
  margin-bottom: 12px;
  opacity: 0.85;
}

.news-detail-quote div {
  width: 100%;
}

.news-detail-quote p {
  margin: 0 0 8px;
  color: #1e40af;
  font-size: 15.5px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.7;
}

.news-detail-quote strong {
  display: block;
  margin-top: 14px;
  color: #1f72ee;
  font-size: 14px;
  font-weight: 700;
  font-style: normal;
}

/* Pager (Previous / Next Article) */
.news-detail-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid #e2e8f0;
}

.news-detail-pager__item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  max-width: 48%;
}

.news-detail-pager__item > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1f72ee;
  font-size: 13.5px;
  font-weight: 800;
}

.news-detail-pager__item > span i {
  font-size: 12px;
}

.news-detail-pager__item div {
  display: block;
}

.news-detail-pager__item strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.news-detail-pager__item:hover strong {
  color: #1f72ee;
}

.news-detail-pager__item.is-next {
  align-items: flex-end;
  text-align: right;
}

.news-detail-pager__item.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
  .news-detail-container {
    width: min(100% - 32px, 720px);
  }

  .news-detail-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .news-detail-quote {
    padding: 24px;
  }

  .news-detail-pager {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .news-detail-pager__item,
  .news-detail-pager__item.is-next {
    max-width: 100%;
    align-items: flex-start;
    text-align: left;
  }
}

/* =====================================================
   NEWS PAGE & DETAIL ANIMATION SYSTEM
   ===================================================== */

/* Dynamic Entrance Animations */
[data-animate="pop-in"] {
  opacity: 0;
  transform: scale(0.88) translateY(24px);
  transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1), transform 1.4s cubic-bezier(0.25, 1.35, 0.5, 1);
  will-change: opacity, transform;
}

[data-animate="pop-in"].is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

[data-animate="slide-elastic"] {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 1.6s cubic-bezier(0.16, 1, 0.3, 1), transform 1.6s cubic-bezier(0.25, 1.25, 0.5, 1);
  will-change: opacity, transform;
}

[data-animate="slide-elastic"].is-visible {
  opacity: 1;
  transform: translateX(0);
}

[data-animate="tilt-up"] {
  opacity: 0;
  transform: perspective(1000px) rotateX(16deg) translateY(40px);
  transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1), transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

[data-animate="tilt-up"].is-visible {
  opacity: 1;
  transform: perspective(1000px) rotateX(0deg) translateY(0);
}

[data-animate="fade-up"] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1), transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

[data-animate="fade-up"].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Delays */
.delay-1 { transition-delay: 0.16s !important; }
.delay-2 { transition-delay: 0.32s !important; }
.delay-3 { transition-delay: 0.48s !important; }
.delay-4 { transition-delay: 0.64s !important; }
