/* ========================================
   课题方案页面 — 专用样式
   ======================================== */

/* ---- 导航栏高亮增强 ---- */
.nav.scrolled .nav-link.active {
  color: var(--color-primary) !important;
  background: linear-gradient(135deg, rgba(0,50,150,0.15) 0%, rgba(0,80,200,0.1) 100%) !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(0,50,150,0.15) !important;
  border-radius: 8px !important;
}

/* ---- 课题卡片分级色顶部条 ---- */
.topic-card { 
  position: relative; 
  overflow: hidden; 
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,50,150,0.08);
}
.topic-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  transition: height 0.3s ease;
  z-index: 1;
}
.topic-card:hover::before { height: 6px; }

/* 科普课题 - 橙黄渐变 */
.topic-card.level-kepu::before {
  background: linear-gradient(90deg, #FF7A00, #FFF500);
}
/* 科创课题 - 蓝绿渐变 */
.topic-card.level-kechuang::before {
  background: linear-gradient(90deg, #00A3FF, #00D166);
}
/* 科考课题 - 黑金渐变 */
.topic-card.level-kekao::before {
  background: linear-gradient(90deg, #001021, #D4AF37);
}

/* ---- 竞赛信息金色徽章 ---- */
.competition-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 50px;
  background: linear-gradient(135deg, #D4AF37, #F5D76E);
  color: #001021;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(212,175,55,0.3);
}

/* 闪光效果 */
.shimmer-effect {
  position: relative;
  overflow: hidden;
}
.shimmer-effect::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

/* ---- 研究方法论步骤编号 ---- */
.method-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary, #003296), var(--color-primary-dark, #002070));
  color: white;
  font-family: var(--font-en, 'Nunito'), sans-serif;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

/* ---- 课题详情面板入场动画 ---- */
.animate-slide-up {
  animation: slideInUp 0.7s ease both;
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 交错延迟 */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* ---- 页面 Hero 标题品牌渐变下划线 ---- */
.page-hero-title {
  position: relative;
  display: block;
  text-align: center;
}
.page-hero-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, var(--color-primary, #003296), var(--color-decoration, #D4AF37));
  margin: 20px auto 0;
  border-radius: 2px;
}

/* ---- 科学笔记本网格纹理背景 ---- */
.bg-notebook {
  background-image: 
    linear-gradient(rgba(0,50,150,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,50,150,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* 课题列表区域网格纹理 */
.topics-grid {
  position: relative;
}
.section-light .topics-grid::before,
.section-white .topics-grid::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background-image: 
    linear-gradient(rgba(0,50,150,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,50,150,0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}
.topics-grid .topic-card {
  position: relative;
  z-index: 1;
}

/* ---- Page Hero ---- */
.page-hero {
  padding: 140px 0 80px;
  background: 
    linear-gradient(135deg, rgba(0,50,150,0.92) 0%, rgba(0,32,80,0.93) 50%, rgba(0,16,33,0.95) 100%),
    url('../images/nature-bg-dark.jpg') center/cover no-repeat;
  color: var(--color-white);
  text-align: center;
  position: relative;
}
.page-hero::after {
  content: 'E=mc\00B2  H\2082O  \2206T  CO\2082  DNA  pH  \03C0r\00B2  NaCl  CaCO\2083';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  font-family: var(--font-en); font-size: 14px; font-weight: 300;
  color: rgba(255,255,255,0.03); letter-spacing: 8px; line-height: 3.5;
  word-spacing: 20px; white-space: normal;
  padding: 100px 40px; overflow: hidden;
  pointer-events: none; z-index: 0;
}
.page-hero-content { max-width: 800px; margin: 0 auto; position: relative; z-index: 1; }
.breadcrumb {
  display: inline-block; font-size: 14px; color: rgba(255,255,255,0.5);
  margin-bottom: 20px; transition: color var(--transition);
}
.breadcrumb:hover { color: rgba(255,255,255,0.8); }
.page-hero-title {
  font-size: 48px; font-weight: 900; margin-bottom: 16px; line-height: 1.2;
  text-shadow: 0 2px 30px rgba(0,16,33,0.5), 0 0 60px rgba(253,210,43,0.15);
}
.page-hero-desc { font-size: 18px; color: rgba(255,255,255,0.85); line-height: 1.8; margin: 32px auto 28px; max-width: 700px; }
.page-hero-tags { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---- Policy Cards ---- */
.policy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.policy-card {
  padding: 32px 28px; border-radius: var(--radius); background: var(--color-bg-light);
  border: 1px solid #e2e8f0; transition: all var(--transition);
}
.policy-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--color-primary-light); }
.policy-tag {
  display: inline-block; padding: 4px 12px; border-radius: 50px; font-size: 12px; font-weight: 700;
  background: rgba(0,50,150,0.1); color: var(--color-primary); margin-bottom: 12px;
  letter-spacing: 1px;
}
.policy-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
.policy-card p { font-size: 14px; color: #4a5568; line-height: 1.7; }

/* ---- Grade Headers ---- */
.grade-header { text-align: center; margin-bottom: 48px; }
.grade-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 28px; border-radius: 50px; font-size: 15px; font-weight: 700;
  letter-spacing: 1px; margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.grade-badge-green { background: linear-gradient(135deg, rgba(72,187,120,0.15), rgba(72,187,120,0.08)); color: #38a169; border: 1px solid rgba(72,187,120,0.2); }
.grade-badge-blue { background: linear-gradient(135deg, rgba(66,153,225,0.15), rgba(66,153,225,0.08)); color: #3182ce; border: 1px solid rgba(66,153,225,0.2); }
.grade-badge-purple { background: linear-gradient(135deg, rgba(128,90,213,0.15), rgba(128,90,213,0.08)); color: #805ad5; border: 1px solid rgba(128,90,213,0.2); }

/* ---- Grade Intro ---- */
.grade-intro {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start;
  margin-bottom: 60px; padding: 32px; border-radius: var(--radius);
  background: var(--color-white); box-shadow: var(--shadow);
}
.section-light .grade-intro { background: var(--color-white); }
.section-white .grade-intro { background: var(--color-bg-light); }
.grade-image { border-radius: var(--radius-sm); overflow: hidden; }
.grade-image img { width: 100%; height: 320px; object-fit: cover; }
.grade-meta h3 { font-size: 18px; font-weight: 700; margin-bottom: 16px; color: var(--color-text); }
.meta-items { display: flex; flex-direction: column; gap: 12px; }
.meta-item { display: flex; gap: 12px; align-items: baseline; font-size: 14px; padding-bottom: 12px; border-bottom: 1px solid #edf2f7; }
.meta-item:last-child { border-bottom: none; padding-bottom: 0; }
.meta-label { flex-shrink: 0; width: 72px; font-weight: 700; color: var(--color-primary); font-size: 13px; }
.meta-value { color: var(--color-text); line-height: 1.6; }

/* ---- Topic Cards ---- */
.topics-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.topic-card {
  padding: 32px; border-radius: var(--radius); background: var(--color-white);
  border: 1px solid #e2e8f0; transition: all var(--transition);
  display: flex;
  gap: 24px;
}
.section-white .topic-card { background: var(--color-bg-light); }
.section-light .topic-card { background: var(--color-white); }
.topic-card:hover { box-shadow: var(--shadow-lg); border-color: var(--color-primary-light); transform: translateY(-2px); }

/* 课题卡片右侧图片 */
.topic-image {
  flex-shrink: 0;
  width: 280px;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  align-self: center;
  background: #f0f0f0;
  border: 2px dashed #ccc;
}
.topic-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}
.topic-card:hover .topic-image img {
  transform: scale(1.05);
}
.topic-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.topic-header-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.topic-num { font-size: 12px; font-weight: 800; color: var(--color-primary); font-family: var(--font-en); letter-spacing: 1px; white-space: nowrap; }
.topic-tags { display: flex; gap: 6px; }
.topic-tag {
  padding: 3px 10px; border-radius: 50px; font-size: 11px; font-weight: 600;
}
.tag-bio { background: rgba(72,187,120,0.1); color: #38a169; }
.tag-eco { background: rgba(56,178,172,0.1); color: #319795; }
.tag-earth { background: rgba(237,137,54,0.1); color: #c05621; }
.tag-env { background: rgba(66,153,225,0.1); color: #2b6cb0; }
.tag-phys { background: rgba(128,90,213,0.1); color: #6b46c1; }
.tag-agri { background: rgba(104,211,145,0.1); color: #2f855a; }
.tag-tech { background: rgba(102,126,234,0.1); color: #5a67d8; }
.topic-lab-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  background: linear-gradient(135deg, rgba(0,50,150,0.08) 0%, rgba(0,16,33,0.08) 100%);
  color: #002070; border: 1px solid rgba(0,50,150,0.15);
}
.topic-lab-badge::before {
  content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}
.topic-title { font-size: 19px; font-weight: 700; margin-bottom: 20px; line-height: 1.4; }
.topic-body { margin-bottom: 16px; }
.topic-section { margin-bottom: 16px; }
.topic-section:last-child { margin-bottom: 0; }
.topic-section h4 { font-size: 13px; font-weight: 700; color: var(--color-primary); letter-spacing: 1px; margin-bottom: 8px; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.topic-section h4::before {
  content: ''; 
  display: inline-flex; 
  width: 18px; 
  height: 18px; 
  flex-shrink: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;
  margin-top: -1px;
}

/* 课题简介 - 书本icon（第一个topic-section） */
.topic-body > .topic-section:first-child h4::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23003296' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E");
}

/* 实施要点 - 清单icon（倒数第二个topic-section） */
.topic-body > .topic-section:nth-last-child(2) h4::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23003296' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'/%3E%3C/svg%3E");
}

/* 预期产出 - 成果icon（最后一个topic-section） */
.topic-body > .topic-section:last-child h4::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23003296' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='7'/%3E%3Cpolyline points='8.21 13.89 7 23 12 20 17 23 15.79 13.88'/%3E%3C/svg%3E");
}
.topic-section p { font-size: 14px; color: #4a5568; line-height: 1.7; }
.topic-section ul { padding-left: 0; }
.topic-section li {
  font-size: 14px; color: var(--color-text); line-height: 1.6;
  padding: 4px 0 4px 18px; position: relative;
}
.topic-section li::before {
  content: ''; position: absolute; left: 0; top: 12px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--color-primary-light);
}
.topic-value {
  font-size: 13px; padding: 12px 16px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(0,50,150,0.06) 0%, rgba(0,16,33,0.06) 100%);
  border: 1px solid rgba(0,50,150,0.1); color: #4a5568; line-height: 1.6;
}
.topic-value span { font-weight: 700; color: var(--color-primary); }

/* ---- Competition Grid ---- */
.comp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.comp-card {
  padding: 28px 24px; border-radius: var(--radius);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  transition: all var(--transition);
}
.comp-card:hover { transform: translateY(-4px); border-color: var(--color-primary); background: rgba(255,255,255,0.08); }
.comp-icon { width: 40px; height: 40px; color: var(--color-primary-light); margin-bottom: 16px; }
.comp-icon svg { width: 100%; height: 100%; }
.comp-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.comp-org { font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 4px; }
.comp-target { font-size: 13px; color: var(--color-accent); font-weight: 500; margin-bottom: 12px; }
.comp-match {
  font-size: 12px; color: rgba(255,255,255,0.6); padding: 8px 12px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04); line-height: 1.6;
}
.comp-match span { color: rgba(255,255,255,0.8); font-weight: 600; }

/* ---- Methodology Timeline ---- */
.method-timeline { max-width: 960px; margin: 0 auto; }
.method-item { display: flex; gap: 32px; margin-bottom: 40px; }
.method-item:last-child { margin-bottom: 0; }
.method-stage {
  flex-shrink: 0; writing-mode: vertical-lr; text-orientation: mixed;
  padding: 20px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 800;
  letter-spacing: 2px; display: flex; align-items: center; justify-content: flex-start;
  min-height: 180px; gap: 12px;
}
.method-stage .method-step-number {
  writing-mode: horizontal-tb;
  margin-bottom: 8px;
}
.stage-green { background: rgba(72,187,120,0.1); color: #38a169; }
.stage-blue { background: rgba(66,153,225,0.1); color: #3182ce; }
.stage-purple { background: rgba(128,90,213,0.1); color: #805ad5; }
.method-content { flex: 1; }
.method-content h3 { font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.method-grade { font-size: 14px; font-weight: 500; color: #4a5568; margin-left: 8px; }
.method-detail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.method-col h4 { font-size: 13px; font-weight: 700; color: var(--color-primary); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }
.method-col ul { padding-left: 0; }
.method-col li {
  font-size: 14px; color: #4a5568; padding: 4px 0 4px 16px;
  position: relative; line-height: 1.6;
}
.method-col li::before {
  content: ''; position: absolute; left: 0; top: 11px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--color-primary-light);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .policy-grid { grid-template-columns: 1fr 1fr; }
  .policy-grid > :last-child { grid-column: 1 / -1; max-width: 500px; margin: 0 auto; }
  .comp-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .page-hero { padding: 90px 0 50px; }
  .page-hero-title { font-size: 28px; line-height: 1.3; }
  .page-hero-desc { font-size: 15px; line-height: 1.6; }
  .hero-tag { font-size: 12px; padding: 6px 12px; }

  .policy-card, .comp-card { padding: 20px 16px; }

  .grade-intro { grid-template-columns: 1fr; padding: 16px; gap: 20px; }
  .grade-image img { height: 200px; object-fit: cover; border-radius: var(--radius-sm); }
  .grade-meta h3 { font-size: 17px; }
  .meta-item { font-size: 13px; }
  .meta-label { width: 64px; font-size: 12px; }

  .topics-grid { grid-template-columns: 1fr; }
  .topic-card { padding: 20px 16px; }
  .topic-title { font-size: 17px; line-height: 1.4; }
  .topic-section h4 { font-size: 12px; }
  .topic-section p, .topic-section li { font-size: 14px; line-height: 1.7; }
  .topic-value { font-size: 13px; line-height: 1.6; }

  .comp-grid { grid-template-columns: 1fr; }
  .comp-card h3 { font-size: 16px; }

  .method-item { flex-direction: column; gap: 16px; }
  .method-stage { writing-mode: horizontal-tb; min-height: auto; padding: 12px 16px; font-size: 13px; }
  .method-content h3 { font-size: 19px; }
  .method-grade { font-size: 13px; display: block; margin: 6px 0 0 0; }
  .method-detail { grid-template-columns: 1fr; gap: 16px; }
  .method-col h4 { font-size: 12px; }
  .method-col li { font-size: 13px; line-height: 1.6; }
}

/* 产品分级色 - 仅用于顶部装饰条，不设置背景色 */
/* .level-kepu 科普课 L1-L2，4-8岁低年级 */
/* .level-kechuang 科创课 L2-L3，6-12岁高年级 */
/* .level-kekao 科考课 L3-L4，8岁+初中 */

/* ---- CTA按钮样式 ---- */
.topic-action {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}
.topic-action .btn {
  display: inline-block;
  padding: 10px 24px;
  border: 2px solid #003296;
  color: #003296;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}
.topic-action .btn:hover {
  background: #003296;
  color: #fff;
}

@media (max-width: 480px) {
  .page-hero-title { font-size: 24px; }
  .page-hero-desc { font-size: 14px; }
  
  .grade-intro { padding: 12px; }
  .grade-image img { height: 180px; }
  
  .topic-card { padding: 16px 14px; }
  .topic-title { font-size: 16px; }
  .topic-num { font-size: 11px; }
  .topic-tag { font-size: 10px; padding: 3px 8px; }
  
  .method-stage { padding: 10px 14px; font-size: 12px; letter-spacing: 1px; }
  .method-content h3 { font-size: 17px; }
  
  body { font-size: 14px; }
  p, li { font-size: 14px; line-height: 1.7; }
}

/* ========================================
   课题卡片折叠详情 (减少文字密集感)
   ======================================== */
.topic-body .topic-section:not(:first-child) {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-bottom: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-bottom 0.3s ease;
}
.topic-card.expanded .topic-section:not(:first-child) {
  max-height: 500px;
  opacity: 1;
  margin-bottom: 16px;
}
.topic-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.2s ease;
  border: none;
  background: none;
  font-family: inherit;
}
.topic-expand-btn:hover { color: var(--color-primary-dark); }
.topic-expand-btn .expand-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 11px;
}
.topic-card.expanded .topic-expand-btn .expand-arrow {
  transform: rotate(180deg);
}

/* 课题卡片分级色左侧条 */
.topic-card.level-kepu { border-left: 4px solid #FF7A00; }
.topic-card.level-kechuang { border-left: 4px solid #0084FF; }
.topic-card.level-kekao { border-left: 4px solid #D4AF37; }

/* Policy 卡片增强 */
.policy-card {
  position: relative;
  padding-top: 40px;
}
.policy-tag {
  position: relative;
  z-index: 1;
}