/* ==========================================================================
   Financial news flash page
   Reference structure: fude news.html + calendar-new/news.css
   Theme layer: guijinshu variables and responsive clamp convention.
   ========================================================================== */

@keyframes newsSpin { to { transform: rotate(360deg); } }
@keyframes bannerRipple { 0% { transform: scale(0.05); opacity: 0.7; } 60% { opacity: 0.25; } 100% { transform: scale(1); opacity: 0; } }
@keyframes radarSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes glowBreath { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(1.2); } }
@keyframes staticRingPulse { 0%, 100% { opacity: .08; } 50% { opacity: .18; } }

.news-page { background: var(--bg-page); }

/* ====================== Section 1: Hero ====================== */
.cal-hero {
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 19px 0 0;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(26,26,26,.9), rgba(255,116,1,.62)),
    url('../img/fude/recommend/background/bg-banner.webp') center / cover no-repeat;
}
.cal-hero > .container { position: relative; z-index: 2; }
.cal-hero .banner-ripple { position: absolute; left: 50%; top: 50%; z-index: 1; pointer-events: none; }
.cal-hero .banner-ripple::before,
.cal-hero .banner-ripple::after { content: ''; position: absolute; }
.cal-hero .banner-ripple::before {
  width: 2400px; height: 1px; top: 0; left: -1200px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
}
.cal-hero .banner-ripple::after {
  width: 1px; height: 900px; top: -450px; left: 0;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.12), transparent);
}
.cal-hero .radar-static-ring {
  position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.14);
  animation: staticRingPulse 8s ease-in-out infinite;
}
.cal-hero .radar-static-ring:nth-child(1) { width: 260px; height: 260px; top: -130px; left: -130px; }
.cal-hero .radar-static-ring:nth-child(2) { width: 520px; height: 520px; top: -260px; left: -260px; animation-delay: -2.5s; }
.cal-hero .radar-static-ring:nth-child(3) { width: 800px; height: 800px; top: -400px; left: -400px; animation-delay: -5s; }
.cal-hero .radar-sweep {
  position: absolute; width: 800px; height: 800px; top: -400px; left: -400px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 270deg, rgba(255,255,255,.04) 306deg, rgba(255,210,170,.18) 350deg, transparent 360deg);
  animation: radarSpin 8s linear infinite;
}
.cal-hero .ripple-glow {
  position: absolute; width: 200px; height: 200px; top: -100px; left: -100px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.28), rgba(255,210,170,.08) 52%, transparent 72%);
  animation: glowBreath 4s ease-in-out infinite;
}
.cal-hero .ripple-ring {
  position: absolute; width: 1000px; height: 1000px; top: -500px; left: -500px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); transform: scale(.05); animation: bannerRipple 4.2s infinite ease-out;
}
.cal-hero .ripple-ring:nth-child(6) { animation-delay: 0s; }
.cal-hero .ripple-ring:nth-child(7) { animation-delay: -.7s; }
.cal-hero .ripple-ring:nth-child(8) { animation-delay: -1.4s; }
.cal-hero .ripple-ring:nth-child(9) { animation-delay: -2.1s; }
.cal-hero .ripple-ring:nth-child(10) { animation-delay: -2.8s; }
.cal-hero .ripple-ring:nth-child(11) { animation-delay: -3.5s; }
.cal-hero h1 {
  font-size: 56px;
  line-height: 1.3;
  font-weight: 800;
  color: #fff;
  margin-bottom: 59px;
}
.cal-red { color: var(--orange); }
.cal-hero-desc {
  font-size: 20px;
  line-height: 1.6;
  color: #e4e4e4;
  margin-bottom: 44px;
}
.cal-hero-btn {
  width: 166px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0 auto;
  padding: 5px 0;
  border-radius: 30px;
  background: rgba(255,255,255,.16);
  color: #e4e4e4;
  font-size: 20px;
  transition: background .2s;
}
.cal-hero-btn::before {
  content: '';
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #00ff00;
  box-shadow: 0 0 6px #00ff00;
}
.cal-hero-btn:hover { background: rgba(255,255,255,.24); }

/* ====================== Section 2: Nav ====================== */
.cal-nav {
  padding: 39px 0 38px;
  background: #fff;
  position: relative;
  z-index: 3;
}
.cal-nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.cal-nav-group {
  display: flex;
  overflow: hidden;
  padding: 7px;
  border: 1px solid var(--orange);
  border-radius: 6px;
}
.cal-nav-tab {
  width: 257px;
  height: 61px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #fff;
  color: #1d2129;
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
  transition: color .2s, background .2s, opacity .2s;
}
.cal-nav-tab:hover { color: var(--orange); }
.cal-nav-tab.active { background: var(--orange); color: #fff; }
.cal-nav-tab.active:hover { color: #fff; }
/* ====================== Section 3: News Main ====================== */
.news-main {
  padding: 81px 0 80px;
  background: #f3f4f8;
}
.news-layout {
  --news-sticky-offset: 96px;
  --news-panel-height: min(900px, calc(100vh - var(--news-sticky-offset) - 24px));
  display: flex;
  align-items: stretch;
  gap: 20px;
}
.news-timeline-wrap {
  flex: 1;
  min-width: 0;
  height: var(--news-panel-height);
  min-height: var(--news-panel-height);
  max-height: var(--news-panel-height);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 12px;
}
.news-timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 33px 32px 31px;
  border-bottom: 1px solid #eee;
}
.news-timeline-title {
  flex-shrink: 0;
  margin: 0;
  color: #383838;
  font-size: 20px;
  font-weight: 800;
}
.news-timeline-controls { display: flex; align-items: center; gap: 24px; }
.news-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid rgba(255,116,1,.22);
  border-radius: 4px;
  background: rgba(255,116,1,.08);
  color: var(--t-600);
  font-size: 17px;
}
.news-date-icon {
  width: 19px;
  height: 19px;
  display: inline-block;
  background: url('../img/fude/edu/icons/article/icon_calendar.webp') center / contain no-repeat;
}
.news-only-important {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--t-600);
  font-size: 16px;
  cursor: pointer;
  user-select: none;
}
.news-only-important input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 1.5px solid var(--t-600);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: background .2s, border-color .2s;
}
.news-only-important input[type="checkbox"]:checked {
  background: var(--orange);
  border-color: var(--orange);
}
.news-only-important input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: 0;
  border-left: 0;
  transform: translate(-50%, -60%) rotate(45deg);
}
.news-timeline {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 32px 32px;
  scrollbar-width: thin;
  scrollbar-color: rgba(153, 153, 153, .35) transparent;
}
.news-timeline::-webkit-scrollbar {
  width: 6px;
}
.news-timeline::-webkit-scrollbar-track {
  background: transparent;
}
.news-timeline::-webkit-scrollbar-thumb {
  background: rgba(153, 153, 153, .35);
  border-radius: 999px;
}
.news-loading {
  padding: 60px 0;
  color: var(--t-400);
  font-size: 16px;
  text-align: center;
}
.news-item {
  position: relative;
  margin-left: 30px;
  padding-left: 20px;
  background-image: repeating-linear-gradient(to bottom, rgba(36,40,42,.2) 0, rgba(36,40,42,.2) 4px, transparent 4px, transparent 8px);
  background-size: 1px 100%;
  background-repeat: no-repeat;
  background-position: left top;
}
.news-item:first-child { background-position: left 36px; background-size: 1px calc(100% - 36px); }
.news-item:last-child { background-size: 1px 36px; }
.news-item:only-child { background: none; }
.news-item::after {
  content: '';
  position: absolute;
  z-index: 1;
  left: -10px;
  top: 28px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(36,40,42,.2);
  box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 12px #24282a;
}
.news-item-time {
  width: 150px;
  padding: 25px 0 0;
  color: #24282a;
  font-size: 14px;
}
.news-item-title {
  display: block;
  margin-bottom: 4px;
  padding: 16px 20px 0 0;
  color: #1e202b;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 700;
}
.news-item-content {
  padding: 16px 20px 16px 0;
  margin-bottom: 4px;
  color: var(--t-600);
  font-size: 15px;
  line-height: 2;
}
.news-item-toggle {
  margin-left: 4px;
  color: var(--t-400);
  font-size: 13px;
  cursor: pointer;
}
.news-item-toggle:hover { color: var(--orange); }
.news-item.important .news-item-title,
.news-item.important .news-item-content { color: var(--down); }
.news-item.important::after { box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 12px var(--down); }
.news-scroll-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 0;
  color: var(--t-400);
  font-size: 14px;
}
.news-scroll-loading::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid #eee;
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: newsSpin .6s linear infinite;
}
.news-retry-btn {
  padding: 20px 0;
  color: var(--t-400);
  font-size: 14px;
  text-align: center;
  cursor: pointer;
}
.news-retry-btn span { color: var(--orange); margin-left: 6px; }
.news-retry-btn:hover span { text-decoration: underline; }
.news-end {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 0;
}
.news-end-line { flex: 1; height: 1px; background: #eee; }
.news-end-text { color: #ccc; font-size: 13px; white-space: nowrap; }

/* ====================== Sidebar ====================== */
.news-sidebar {
  width: 450px;
  flex-shrink: 0;
  align-self: flex-start;
  position: sticky;
  top: var(--news-sticky-offset);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.news-sidebar-academy,
.news-sidebar-tags,
.news-sidebar-demo {
  flex: 0 0 auto;
  background: #fff;
  border-radius: 12px;
}
.news-sidebar-academy { padding: 24px; }
.news-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 27px;
  padding-bottom: 30px;
  border-bottom: 1px solid #eee;
}
.news-sidebar-header h4,
.news-sidebar-tags h4 {
  color: #383838;
  font-size: 20px;
  font-weight: 800;
}
.news-view-more {
  flex-shrink: 0;
  color: var(--t-400);
  font-size: 13px;
  transition: color .2s;
}
.news-view-more:hover { color: var(--orange); }
.news-academy-list { display: flex; flex-direction: column; gap: 20px; }
.news-academy-item {
  display: block;
  padding: 15px 30px 19px 19px;
  border-radius: 6px;
  background: #f8f9fa;
  transition: background .2s;
}
.news-academy-item:hover h5 { color: var(--orange); }
.news-academy-placeholder {
  cursor: default;
  border: 1px dashed #dfe3ea;
  background: linear-gradient(135deg, #fafbfc 0%, #f3f5f8 100%);
}
.news-academy-placeholder:hover h5 { color: #7d8794; }
.news-academy-placeholder .news-academy-badge {
  background: #c7ced8 !important;
  color: #fff;
}
.news-academy-placeholder h5 { color: #7d8794; }
.news-academy-placeholder p { color: #9aa3af; }
.news-academy-placeholder .news-academy-meta { color: #b3bbc6; }
.news-academy-badge {
  display: inline-block;
  padding: 8px 11px;
  border-radius: 6px;
  margin-bottom: 23px;
  color: #fff;
  font-size: 16px;
}
.news-academy-item:nth-child(4n+1) .news-academy-badge { background: #667eea; }
.news-academy-item:nth-child(4n+2) .news-academy-badge { background: #52c41a; }
.news-academy-item:nth-child(4n+3) .news-academy-badge { background: #fa8c16; }
.news-academy-item:nth-child(4n+4) .news-academy-badge { background: #722ed1; }
.news-academy-item h5 {
  margin-bottom: 18px;
  color: #222;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
  transition: color .2s;
}
.news-academy-item p {
  margin-bottom: 21px;
  color: var(--t-600);
  font-size: 16px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-academy-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #ccc;
  font-size: 14px;
}
.news-sidebar-tags { padding: 34px 54px 34px 35px; }
.news-sidebar-tags h4 {
  margin-bottom: 27px;
  padding-bottom: 30px;
  border-bottom: 1px solid #eee;
}
.news-tags-grid { display: flex; flex-wrap: wrap; gap: 14px 12px; }
.news-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  background: #fff;
  color: var(--t-600);
  font-size: 16px;
  white-space: nowrap;
  transition: color .2s, border-color .2s, background .2s;
}
.news-tag:hover { color: var(--orange); border-color: var(--orange); background: rgba(255,116,1,.08); }
.news-sidebar-demo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
}
.news-demo-text { flex: 1; min-width: 0; }
.news-demo-text h4 {
  margin-bottom: 8px;
  color: #383838;
  font-size: 20px;
  font-weight: 800;
}
.news-demo-text p { margin-bottom: 16px; color: var(--t-600); font-size: 13px; }
.news-demo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
  border-radius: 6px;
  background: var(--orange);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: background .2s;
}
.news-demo-btn:hover { background: var(--orange-soft); color: #fff; }
.news-demo-icon { flex-shrink: 0; }
.news-demo-icon img { width: 120px; height: auto; }

@media (max-width: 1080px) {
  .cal-hero .radar-sweep { display: none; }
  .cal-hero .radar-static-ring:nth-child(1) { width: 140px; height: 140px; top: -70px; left: -70px; }
  .cal-hero .radar-static-ring:nth-child(2) { width: 300px; height: 300px; top: -150px; left: -150px; }
  .cal-hero .radar-static-ring:nth-child(3) { width: 480px; height: 480px; top: -240px; left: -240px; }
  .cal-hero .banner-ripple::before { width: 600px; left: -300px; }
  .cal-hero .banner-ripple::after { height: 400px; top: -200px; }
  .cal-hero .ripple-ring { width: 600px; height: 600px; top: -300px; left: -300px; }
  .cal-hero .ripple-ring:nth-child(n+9) { display: none; }
  .cal-hero .ripple-glow { width: 100px; height: 100px; top: -50px; left: -50px; }

  .cal-hero {
    min-height: auto;
    padding: clamp(40px, 11.11vw, 80px) 0 clamp(34px, 9.26vw, 60px);
  }
  .cal-hero h1 {
    font-size: clamp(24px, 6.5vw, 56px);
    margin-bottom: clamp(18px, 5vw, 59px);
  }
  .cal-hero-desc {
    font-size: clamp(13px, 3.5vw, 20px);
    margin-bottom: clamp(18px, 5vw, 44px);
  }
  .cal-hero-btn {
    width: clamp(132px, 36vw, 166px);
    gap: clamp(10px, 3vw, 18px);
    font-size: clamp(14px, 3.8vw, 20px);
  }
  .cal-nav { padding: clamp(20px, 6vw, 39px) 0; }
  .cal-nav-bar { flex-wrap: wrap; gap: clamp(10px, 2.8vw, 24px); }
  .cal-nav-group {
    max-width: 100%;
    overflow-x: auto;
    padding: 5px;
    scrollbar-width: none;
  }
  .cal-nav-group::-webkit-scrollbar { display: none; }
  .cal-nav-tab {
    width: auto;
    height: clamp(42px, 12vw, 61px);
    padding: 0 clamp(18px, 5vw, 32px);
    font-size: clamp(13px, 3.6vw, 24px);
    flex-shrink: 0;
  }
  .news-main { padding: clamp(22px, 6vw, 81px) 0 clamp(30px, 8vw, 80px); }
  .news-layout { flex-direction: column; gap: clamp(16px, 4vw, 24px); }
  .news-sidebar {
    width: 100%;
    gap: clamp(16px, 4vw, 24px);
    position: static;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }
  .news-timeline-wrap { height: auto !important; min-height: 0; max-height: none; }
  .news-timeline-header {
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(10px, 3vw, 16px);
    padding: clamp(16px, 4.5vw, 33px) clamp(14px, 4vw, 32px);
  }
  .news-timeline-title { font-size: clamp(16px, 4.2vw, 20px); }
  .news-timeline-controls { width: 100%; gap: clamp(12px, 3vw, 24px); flex-wrap: wrap; }
  .news-date-badge { font-size: clamp(12px, 3.3vw, 17px); padding: 5px 10px; }
  .news-date-icon { width: clamp(14px, 4vw, 19px); height: clamp(14px, 4vw, 19px); }
  .news-only-important { font-size: clamp(12px, 3.3vw, 16px); }
  .news-timeline {
    max-height: 70vh;
    padding: 0 clamp(14px, 4vw, 32px) clamp(20px, 6vw, 32px);
  }
  .news-item { margin-left: clamp(20px, 6vw, 30px); padding-left: clamp(14px, 4vw, 20px); }
  .news-item::after {
    left: -8px;
    top: 24px;
    width: 14px;
    height: 14px;
    box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 10px #24282a;
  }
  .news-item.important::after { box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 10px var(--down); }
  .news-item:first-child { background-position: left 31px; background-size: 1px calc(100% - 31px); }
  .news-item:last-child { background-size: 1px 31px; }
  .news-item-time { width: auto; padding: clamp(14px, 4vw, 25px) 0 0; font-size: clamp(12px, 3.2vw, 14px); }
  .news-item-title,
  .news-item-content {
    font-size: clamp(13px, 3.4vw, 15px);
    padding: clamp(8px, 2.7vw, 16px) clamp(6px, 2vw, 20px) clamp(22px, 6vw, 30px) 0;
  }
  .news-end { padding: clamp(16px, 4vw, 32px) 0; }

  .news-sidebar-academy,
  .news-sidebar-tags,
  .news-sidebar-demo { border-radius: clamp(8px, 2.2vw, 12px); }
  .news-sidebar-academy,
  .news-sidebar-tags { padding: clamp(16px, 4vw, 34px); }
  .news-sidebar-header,
  .news-sidebar-tags h4 {
    margin-bottom: clamp(16px, 4vw, 27px);
    padding-bottom: clamp(16px, 4vw, 30px);
  }
  .news-sidebar-header h4,
  .news-sidebar-tags h4 { font-size: clamp(16px, 4.5vw, 20px); }
  .news-academy-list { gap: clamp(12px, 3vw, 20px); }
  .news-academy-item { padding: clamp(12px, 3.5vw, 19px); }
  .news-academy-badge { margin-bottom: clamp(12px, 3.5vw, 23px); font-size: clamp(12px, 3.4vw, 16px); }
  .news-academy-item h5 { font-size: clamp(14px, 3.8vw, 18px); margin-bottom: clamp(8px, 2.8vw, 18px); }
  .news-academy-item p { font-size: clamp(13px, 3.4vw, 16px); margin-bottom: clamp(10px, 3vw, 21px); }
  .news-academy-meta { font-size: clamp(12px, 3.2vw, 14px); }
  .news-tags-grid { gap: clamp(8px, 2.5vw, 14px); }
  .news-tag { padding: clamp(6px, 2vw, 8px) clamp(12px, 3.5vw, 18px); font-size: clamp(12px, 3.3vw, 16px); }
  .news-sidebar-demo { padding: clamp(16px, 4.5vw, 24px); }
  .news-demo-text h4 { font-size: clamp(16px, 4.2vw, 20px); }
  .news-demo-icon img { width: clamp(80px, 24vw, 120px); }

}

@media (max-width: 480px) {
  .cal-hero { padding: 36px 0 30px; }
  .news-timeline-header { padding: 16px 12px 12px; }
  .news-timeline { max-height: 60vh; padding: 0 12px 16px; }
  .news-item { margin-left: 20px; padding-left: 14px; }
  .news-item::after { left: -7px; top: 20px; width: 12px; height: 12px; }
  .news-item:first-child { background-position: left 26px; background-size: 1px calc(100% - 26px); }
  .news-item:last-child { background-size: 1px 26px; }
  .news-sidebar-demo { align-items: flex-start; }
  .news-demo-icon img { width: 76px; }
}
