/* ============================================================
   通用组件样式 - 按钮 / 卡片 / Banner / 时间轴 / 表单 等
   ============================================================ */

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(13, 71, 161, 0.25);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(13, 71, 161, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-white {
  background: #fff;
  color: var(--color-primary-dark);
  font-weight: 600;
}

.btn-white:hover {
  color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-ghost-white {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}

.btn-ghost-white:hover {
  background: #fff;
  color: var(--color-primary-dark);
}

.btn-lg {
  padding: 15px 36px;
  font-size: 1rem;
}

.btn-sm {
  padding: 8px 18px;
  font-size: var(--fs-small);
}

/* ============ 卡片 ============ */
.card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

/* 通用图文卡片 */
.feature-card {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, rgba(21, 101, 192, 0.1), rgba(0, 168, 232, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--color-primary);
  transition: background var(--transition);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-card:hover .feature-icon {
  background: var(--gradient-primary);
  color: #fff;
}

.feature-card h3 {
  font-size: 1.1875rem;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  line-height: 1.7;
}

/* ============ 页面 Banner（子页通用） ============ */
.page-banner {
  position: relative;
  background: var(--gradient-banner);
  color: #fff;
  padding: 80px 0;
  overflow: hidden;
}

.page-banner::after {
  content: "";
  position: absolute;
  right: -100px;
  top: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 168, 232, 0.18), transparent 70%);
}

.page-banner::before {
  content: "";
  position: absolute;
  left: -80px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 191, 165, 0.12), transparent 70%);
}

.page-banner .container {
  position: relative;
  z-index: 1;
}

.page-banner h1 {
  color: #fff;
  font-size: 2.25rem;
  margin-bottom: 14px;
}

.page-banner p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.0625rem;
  max-width: 640px;
}

/* 仅含面包屑的窄 banner(新闻详情页) */
.page-banner--news {
  padding: var(--space-block) 0;
}

.page-banner--news .breadcrumb {
  margin-top: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb span.sep {
  opacity: 0.5;
}

/* ============ 数据统计块 ============ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-item {
  text-align: center;
  padding: 24px 12px;
}

.stat-num {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.1;
  margin-bottom: 6px;
}

.stat-num .unit {
  font-size: 1.125rem;
  margin-left: 2px;
}

.stat-label {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

/* ============ 时间轴（泽瑞之路） ============ */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-primary-light), var(--color-primary), var(--color-primary-dark));
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 0 40px 48px 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  padding: 0 0 48px 40px;
  text-align: left;
}

.timeline-dot {
  position: absolute;
  top: 4px;
  right: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--color-primary);
  z-index: 1;
}

.timeline-item:nth-child(even) .timeline-dot {
  right: auto;
  left: -9px;
}

.timeline-content {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.timeline-content:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.timeline-year {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.timeline-content h4 {
  font-size: 1.0625rem;
  margin-bottom: 8px;
}

.timeline-content p {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ============ 表单 ============ */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.form-label .required {
  color: #e53e3e;
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  font-size: var(--fs-body);
  color: var(--color-text);
  background: #fff;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12);
}

.form-control::placeholder {
  color: #9ca3af;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8.825L1.175 4 2.238 2.938 6 6.7l3.763-3.763L10.825 4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.form-error {
  display: none;
  color: #e53e3e;
  font-size: var(--fs-xs);
  margin-top: 6px;
}

.form-group.has-error .form-control {
  border-color: #e53e3e;
}

.form-group.has-error .form-error {
  display: block;
}

.form-success {
  display: none;
  padding: 14px 18px;
  border-radius: var(--radius-btn);
  background: rgba(0, 191, 165, 0.1);
  color: #00897b;
  font-size: var(--fs-small);
  margin-bottom: 20px;
  border: 1px solid rgba(0, 191, 165, 0.3);
}

/* ============ Tab 选项卡 ============ */
.tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 24px;
  border-radius: 24px;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-bg-gray);
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--color-primary);
}

.tab-btn.is-active {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(13, 71, 161, 0.25);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
  animation: fadeIn 0.4s ease;
}

/* ============ 回到顶部 ============ */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(13, 71, 161, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition);
  z-index: 900;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

.back-to-top svg {
  width: 22px;
  height: 22px;
}

/* ============ 分隔装饰 ============ */
.divider-wave {
  height: 60px;
  background: var(--color-bg-soft);
  -webkit-mask: radial-gradient(40px at 50% 60px, #0000 98%, #000) 50% 0 / 80px 100%;
  mask: radial-gradient(40px at 50% 60px, #0000 98%, #000) 50% 0 / 80px 100%;
}

/* ============ 通用动画 ============ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-banner {
    padding: 60px 0;
  }
  .page-banner h1 {
    font-size: 1.875rem;
  }
  .page-banner--news {
    padding: var(--space-block) 0;
  }
}

@media (max-width: 768px) {
  .btn-lg {
    padding: 13px 28px;
    font-size: 0.9375rem;
  }
  .page-banner {
    padding: 48px 0;
  }
  .page-banner h1 {
    font-size: 1.625rem;
  }
  .page-banner p {
    font-size: 1rem;
  }
  .page-banner--news {
    padding: var(--space-block) 0;
  }
  .feature-card {
    padding: 24px 20px;
  }
  /* 时间轴单列 */
  .timeline::before {
    left: 18px;
  }
  .timeline-item,
  .timeline-item:nth-child(even) {
    width: 100%;
    left: 0;
    padding: 0 0 32px 48px;
    text-align: left;
  }
  .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
    left: 9px;
    right: auto;
  }
}
