/* ===== 首页特有样式 ===== */
.home-hero { }
.events-section { background: #f5f6fa; }
.news-section { background: #fff; }

/* ===== 详情页 ===== */
.detail-wrap { max-width: 1200px; padding: 24px 20px; }
.breadcrumb { font-size: 13px; color: #999; margin-bottom: 20px; }
.breadcrumb a { color: #e53935; }
.breadcrumb a:hover { text-decoration: underline; }
.detail-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.detail-cover { width: 100%; border-radius: 12px; margin-bottom: 20px; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.detail-title { font-size: 26px; font-weight: 700; margin-bottom: 16px; line-height: 1.4; }
.detail-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; background: #f9f9f9; border-radius: 10px; padding: 16px; margin-bottom: 20px;
}
.meta-item { display: flex; flex-direction: column; gap: 4px; }
.meta-label { font-size: 12px; color: #999; }
.meta-item span:last-child { font-size: 14px; color: #333; font-weight: 500; }
.fee-text { font-size: 18px !important; color: #e53935 !important; font-weight: 700 !important; }
.detail-content h2 { font-size: 18px; font-weight: 700; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid #f0f0f0; }
.rich-text { font-size: 15px; line-height: 1.8; color: #444; }
.rich-text p { margin-bottom: 12px; }
.rich-text img { max-width: 100%; border-radius: 8px; margin: 12px 0; }
.rich-text h1,.rich-text h2,.rich-text h3 { margin: 20px 0 10px; font-weight: 700; }

/* ===== 报名卡片 ===== */
.reg-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  overflow: hidden;
  position: sticky;
  top: 80px;
}
.reg-card-header {
  background: linear-gradient(135deg, #e53935, #c62828);
  padding: 20px;
  color: #fff;
}
.reg-card-header h3 { font-size: 18px; font-weight: 700; }
.reg-fee { font-size: 28px; font-weight: 700; margin-top: 4px; }
.reg-form { padding: 20px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 14px; color: #555; margin-bottom: 6px; font-weight: 500; }
.required { color: #e53935; margin-left: 2px; }
.form-field input[type=text],
.form-field input[type=tel],
.form-field input[type=date],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: #e53935; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; }
.check-item { display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.btn-reg {
  width: 100%;
  background: #e53935;
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  margin-top: 8px;
}
.btn-reg:hover { background: #c62828; }
.btn-reg:disabled { background: #ccc; cursor: not-allowed; }
.reg-closed { padding: 40px 20px; text-align: center; color: #999; }
.closed-icon { font-size: 40px; margin-bottom: 12px; }

/* ===== 新闻详情 ===== */
.news-detail { max-width: 800px; margin: 0 auto; }
.news-detail-header { margin-bottom: 24px; }
.news-detail-header h1 { font-size: 26px; font-weight: 700; margin: 12px 0 10px; line-height: 1.4; }
.news-detail-meta { display: flex; gap: 16px; font-size: 13px; color: #999; flex-wrap: wrap; }
.article-nav { display: flex; justify-content: space-between; padding: 20px 0; border-top: 1px solid #f0f0f0; font-size: 14px; }
.art-prev a, .art-next a { color: #e53935; }

@media (max-width: 768px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-meta-grid { grid-template-columns: 1fr; }
  .detail-title { font-size: 20px; }
  /* 移动端隐藏右侧报名卡片，改用底部悬浮按钮+抽屉 */
  .detail-aside { display: none !important; }
  /* 底部留出悬浮按钮空间 */
  .detail-wrap { padding-bottom: 90px; }
}

@media (min-width: 769px) {
  /* 桌面端隐藏悬浮按钮和抽屉 */
  .mobile-fab { display: none !important; }
  .reg-drawer-mask { display: none !important; }
  .reg-drawer { display: none !important; }
}

/* ===== 移动端底部悬浮"我要报名"按钮 ===== */
.mobile-fab {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 12px 20px 16px;
  background: #fff;
  box-shadow: 0 -4px 20px rgba(0,0,0,.15);
  z-index: 900;
}
@media (max-width: 768px) {
  .mobile-fab { display: block; }
}
.mobile-fab-btn {
  width: 100%;
  background: linear-gradient(135deg, #e53935, #c62828);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 2px;
  box-shadow: 0 4px 16px rgba(229,57,53,.4);
  transition: opacity .2s;
}
.mobile-fab-btn:active { opacity: .85; }
.fab-icon { margin-right: 6px; font-style: normal; }

/* ===== 移动端报名抽屉 ===== */
.reg-drawer-mask {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  opacity: 0;
  transition: opacity .3s;
}
.reg-drawer-mask.show {
  display: block;
  opacity: 1;
}
.reg-drawer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-height: 90vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  z-index: 1001;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  -webkit-overflow-scrolling: touch;
}
.reg-drawer.open { transform: translateY(0); }
.reg-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #f0f0f0;
  position: sticky; top: 0;
  background: #fff;
  z-index: 2;
}
.reg-drawer-title {
  font-size: 15px;
  font-weight: 700;
  color: #222;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reg-drawer-fee {
  font-size: 13px;
  color: #e53935;
  font-weight: 600;
  margin-top: 3px;
}
.reg-drawer-close {
  background: #f5f5f5;
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: #666;
  flex-shrink: 0;
}
.reg-drawer-body {
  padding: 0 20px 24px;
}
/* 抽屉内表单样式 */
.reg-drawer-body .reg-form { padding: 16px 0; }
.reg-drawer-body .form-field { margin-bottom: 14px; }
.reg-drawer-body .form-field input[type=text],
.reg-drawer-body .form-field input[type=tel],
.reg-drawer-body .form-field input[type=date],
.reg-drawer-body .form-field select,
.reg-drawer-body .form-field textarea {
  padding: 12px 14px;
  font-size: 16px; /* 防止iOS自动缩放 */
}
.reg-drawer-body .checkbox-group { flex-direction: column; gap: 8px; }
.reg-drawer-body .check-item { padding: 10px; background: #f9f9f9; border-radius: 8px; }
.reg-drawer-body .btn-reg { padding: 16px; font-size: 18px; }
.reg-drawer-body .file-label { padding: 14px 16px; }

/* ===== 文件上传控件 ===== */
.file-upload-wrap { position: relative; }
.file-input {
  position: absolute; width: 0.1px; height: 0.1px; opacity: 0; overflow: hidden;
  z-index: -1;
}
.file-label {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 14px;
  border: 1.5px dashed #d0d0d0;
  border-radius: 8px; background: #fafafa;
  font-size: 13px; color: #666; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.file-label:hover { border-color: #e53935; background: #fff5f5; color: #e53935; }
.file-label .file-icon { font-size: 18px; }
.file-label .file-placeholder { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-hint { display: block; margin-top: 5px; font-size: 12px; color: #aaa; line-height: 1.5; }
.file-preview { margin-top: 6px; }

