/* ============================================================
   零一时代官网 共享站点样式 (site.css)
   客服悬浮按钮 / 回顶按钮 / 表单消息 / 移动端适配
   ============================================================ */

/* ---------- 1. 客服悬浮按钮 ---------- */
#ly-contact-fab {
  position: fixed;
  right: 20px;
  bottom: 96px;
  z-index: 9998;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.ly-fab-main {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #002FA7 0%, #1e4fd9 100%);
  color: #fff;
  border: none;
  box-shadow: 0 6px 18px rgba(0, 47, 167, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s, box-shadow 0.25s;
}

.ly-fab-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 47, 167, 0.45);
}

.ly-fab-main[aria-expanded="true"] {
  background: #ff6b35;
}

.ly-fab-menu {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  align-items: flex-end;
}

.ly-fab-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 32px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  color: #1f2937;
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.ly-fab-item:hover {
  transform: translateX(-4px);
  box-shadow: 0 6px 18px rgba(0, 47, 167, 0.18);
  color: #002FA7;
}

.ly-fab-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #002FA7;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ly-fab-text {
  line-height: 1.3;
}

.ly-fab-text b {
  font-weight: 700;
  color: #002FA7;
}

.ly-fab-form .ly-fab-icon { background: #10b981; }
.ly-fab-wechat .ly-fab-icon { background: #07c160; }

/* ---------- 2. 微信二维码弹窗 ---------- */
.ly-modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
}

.ly-modal-box {
  background: #fff;
  width: min(380px, calc(100vw - 32px));
  border-radius: 16px;
  padding: 28px 24px 24px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.ly-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 32px;
  color: #64748b;
  cursor: pointer;
}

.ly-modal-close:hover { color: #002FA7; }

.ly-modal-box h3 {
  font-size: 20px;
  font-weight: 700;
  color: #002FA7;
  margin: 0 0 8px;
}

.ly-modal-desc {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 16px;
  line-height: 1.6;
}

.ly-modal-qr {
  width: 180px;
  height: 180px;
  margin: 0 auto 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ly-modal-qr img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 11px;
}

.ly-modal-foot {
  font-size: 13px;
  color: #1f2937;
  margin: 6px 0 4px;
}

.ly-copy-btn {
  margin-left: 6px;
  padding: 2px 10px;
  font-size: 12px;
  background: #002FA7;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.ly-copy-btn:hover { background: #1e4fd9; }

.ly-modal-phone {
  font-size: 13px;
  color: #64748b;
  margin: 8px 0 0;
}

.ly-modal-phone a {
  color: #002FA7;
  font-weight: 700;
  text-decoration: none;
}

/* ---------- 3. 回顶按钮 ---------- */
#ly-back-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 9997;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 47, 167, 0.92);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 47, 167, 0.25);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s, background 0.25s;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ly-back-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#ly-back-top:hover {
  background: #ff6b35;
}

/* ---------- 4. 表单提交消息 ---------- */
.ly-form-msg {
  font-size: 14px;
  text-align: center;
  margin-top: 10px;
  color: #fff;
}

/* ---------- 5. 开班档期滚动条 ---------- */
.ly-ticker {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  margin: 24px auto;
  max-width: 1200px;
  background: linear-gradient(90deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #dbeafe;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0, 47, 167, 0.06);
  overflow: hidden;
}

.ly-ticker-tag {
  flex-shrink: 0;
  padding: 6px 12px;
  background: #002FA7;
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.ly-ticker-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
}

.ly-ticker-track::-webkit-scrollbar { display: none; }

.ly-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  color: #1f2937;
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s;
}

.ly-ticker-item:hover {
  border-color: #002FA7;
  color: #002FA7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 47, 167, 0.15);
}

.ly-ticker-item b { font-weight: 600; }
.ly-ticker-date { color: #002FA7; font-weight: 600; }
.ly-ticker-seats { color: #ff6b35; font-weight: 600; font-size: 12px; }
.ly-ticker-badge {
  font-size: 11px;
  padding: 1px 6px;
  background: #fff7ed;
  color: #ff6b35;
  border-radius: 4px;
}

/* ---------- 6. 双维度课程矩阵 ---------- */
.ly-matrix-wrap {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
}

.ly-matrix-head {
  text-align: center;
  margin-bottom: 28px;
}

.ly-matrix-head h2 {
  font-size: 30px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px;
}

.ly-matrix-head p {
  font-size: 15px;
  color: #64748b;
  margin: 0;
}

.ly-matrix {
  display: grid;
  grid-template-columns: 140px repeat(4, 1fr);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 47, 167, 0.06);
}

.ly-matrix-corner {
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.ly-matrix-th {
  padding: 14px 12px;
  text-align: center;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
}

.ly-matrix-th:last-child { border-right: none; }

.ly-matrix-th-dir {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ly-matrix-th-dir b {
  font-size: 16px;
  font-weight: 700;
  color: var(--dir-color, #002FA7);
}

.ly-matrix-th-dir small {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
  display: block;
}

.ly-matrix-icon {
  font-size: 24px;
  line-height: 1;
}

.ly-matrix-th-type {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  background: #f8fafc;
}

.ly-matrix-th-type b {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.ly-matrix-th-type small {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
}

.ly-matrix-badge {
  font-size: 10px;
  padding: 1px 6px;
  background: #fff7ed;
  color: #ff6b35;
  border-radius: 4px;
  margin-top: 2px;
}

.ly-matrix-cell {
  padding: 14px 12px;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  color: #1f2937;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s;
  background: #fff;
}

.ly-matrix-cell:hover {
  background: #eff6ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 47, 167, 0.12);
  color: #002FA7;
}

.ly-matrix-cell:nth-child(5n) { border-right: none; }

.ly-matrix-cell-empty {
  color: #cbd5e1;
  text-align: center;
  align-items: center;
  justify-content: center;
  background: #fafafa;
}

.ly-cell-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.ly-cell-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ly-cell-duration { font-size: 11px; color: #64748b; }
.ly-cell-price {
  font-size: 13px;
  font-weight: 700;
  color: #ff6b35;
}

.ly-cell-next {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
  margin-top: 2px;
}

.ly-cell-date { color: #002FA7; }
.ly-cell-seats { color: #ff6b35; font-weight: 600; }
.ly-cell-seats.warn { background: #fff7ed; padding: 0 4px; border-radius: 3px; }

.ly-matrix-foot {
  text-align: center;
  margin-top: 20px;
}

.ly-matrix-more {
  display: inline-block;
  padding: 10px 28px;
  background: #002FA7;
  color: #fff;
  text-decoration: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.25s;
}

.ly-matrix-more:hover {
  background: #1e4fd9;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 47, 167, 0.3);
}

@media (max-width: 768px) {
  .ly-matrix { grid-template-columns: 80px repeat(4, 1fr); font-size: 11px; }
  .ly-matrix-head h2 { font-size: 22px; }
  .ly-cell-name { font-size: 12px; }
  .ly-matrix-th-type b, .ly-matrix-th-dir b { font-size: 12px; }
}

/* ---------- 7. 面包屑 ---------- */
.ly-breadcrumb {
  max-width: 1200px;
  margin: 16px auto 0;
  padding: 12px 20px;
  font-size: 13px;
  color: #64748b;
}

.ly-breadcrumb a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.ly-breadcrumb a:hover { color: #002FA7; }

.ly-bc-sep {
  margin: 0 8px;
  color: #cbd5e1;
}

.ly-breadcrumb span:last-child {
  color: #002FA7;
  font-weight: 600;
}

/* ---------- 8. 预约体验课弹窗 ---------- */
.ly-signup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.ly-signup-overlay.active {
  opacity: 1;
  visibility: visible;
}
.ly-signup-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 47, 167, 0.25);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s;
}
.ly-signup-overlay.active .ly-signup-modal {
  transform: translateY(0) scale(1);
}
.ly-signup-header {
  background: linear-gradient(135deg, #002FA7, #1e4fd9);
  color: #fff;
  padding: 24px 28px 20px;
  border-radius: 20px 20px 0 0;
  position: relative;
}
.ly-signup-header h3 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
}
.ly-signup-header p {
  margin: 0;
  font-size: 13px;
  opacity: 0.9;
}
.ly-signup-close {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  transition: background 0.2s;
}
.ly-signup-close:hover { background: rgba(255,255,255,0.35); }
.ly-signup-body {
  padding: 28px;
}
.ly-signup-field {
  margin-bottom: 18px;
}
.ly-signup-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}
.ly-signup-field label .required {
  color: #ff6b35;
  margin-left: 2px;
}
.ly-signup-field input,
.ly-signup-field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}
.ly-signup-field input:focus,
.ly-signup-field select:focus {
  border-color: #002FA7;
  box-shadow: 0 0 0 3px rgba(0, 47, 167, 0.12);
}
.ly-signup-submit {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #002FA7, #1e4fd9);
  color: #fff;
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 6px;
}
.ly-signup-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 47, 167, 0.3);
}
.ly-signup-msg {
  margin-top: 12px;
  font-size: 14px;
  text-align: center;
  min-height: 20px;
}
.ly-signup-success {
  display: none;
  text-align: center;
  padding: 40px 28px;
}
.ly-signup-success.active {
  display: block;
}
.ly-signup-overlay.success .ly-signup-header {
  display: none;
}
.ly-signup-overlay.success .ly-signup-modal {
  border-radius: 20px;
  overflow: hidden;
}
.ly-signup-overlay.success .ly-signup-success {
  padding: 56px 28px 48px;
}
.ly-signup-overlay.success .ly-signup-success-icon {
  width: 72px;
  height: 72px;
  font-size: 36px;
  margin-bottom: 20px;
}
.ly-signup-overlay.success .ly-signup-success p {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
}
.ly-signup-success-icon {
  width: 64px;
  height: 64px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 32px;
}
.ly-signup-success p {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
}

@media (max-width: 480px) {
  .ly-signup-body { padding: 22px 20px; }
  .ly-signup-header { padding: 20px 22px 16px; }
  .ly-signup-header h3 { font-size: 20px; }
}

/* ---------- 9. 教师动作按钮（课程+案例）---------- */
.teacher-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.teacher-act {
  flex: 1;
  padding: 8px 12px;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s;
  border: 1px solid;
}

.teacher-act-course {
  background: #eff6ff;
  color: #002FA7;
  border-color: #dbeafe;
}

.teacher-act-course:hover {
  background: #002FA7;
  color: #fff;
  border-color: #002FA7;
}

.teacher-act-case {
  background: #fff7ed;
  color: #ff6b35;
  border-color: #fed7aa;
}

.teacher-act-case:hover {
  background: #ff6b35;
  color: #fff;
  border-color: #ff6b35;
}

/* ---------- 10. 学员案例行业筛选 ---------- */
.ly-case-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 24px 0;
}

.ly-case-chip {
  padding: 8px 18px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 13px;
  color: #1f2937;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.ly-case-chip:hover {
  border-color: #002FA7;
  color: #002FA7;
}

.ly-case-chip.active {
  background: #002FA7;
  color: #fff;
  border-color: #002FA7;
}

.ly-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.ly-case-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  padding: 20px;
  transition: all 0.25s;
}

.ly-case-card:hover {
  border-color: #002FA7;
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 47, 167, 0.12);
}

.ly-case-tag {
  display: inline-block;
  padding: 3px 10px;
  background: #eff6ff;
  color: #002FA7;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 10px;
}

.ly-case-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px;
}

.ly-case-card p {
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
  margin: 0 0 8px;
}

.ly-case-meta {
  font-size: 11px;
  color: #94a3b8;
  border-top: 1px dashed #e2e8f0;
  padding-top: 8px;
  margin-top: 8px;
}

.ly-case-empty {
  text-align: center;
  padding: 40px;
  color: #94a3b8;
  font-size: 14px;
  display: none;
}

/* ---------- 11. 校区课程标签 ---------- */
.campus-courses {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.campus-courses-label {
  font-size: 12px;
  color: #94a3b8;
  margin-right: 4px;
}

.campus-course-tag {
  display: inline-block;
  padding: 3px 10px;
  background: #eff6ff;
  color: #002FA7;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #dbeafe;
}

.campus-course-highlight {
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: #fff;
  border-color: #ff6b35;
}

.campus-addr {
  font-size: 13px !important;
  line-height: 1.5 !important;
  color: #475569 !important;
}

/* ---------- 12. 在线留言表单 ---------- */
.contact-form-card {
  max-width: 720px;
  margin: 40px auto;
  padding: 36px;
  background: linear-gradient(135deg, #002FA7, #1e4fd9);
  border-radius: 20px;
  color: #fff;
  box-shadow: 0 12px 40px rgba(0, 47, 167, 0.25);
}

.contact-form-card h2 {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 8px;
  text-align: center;
  color: #fff;
}

.contact-form-desc {
  text-align: center;
  opacity: 0.85;
  margin: 0 0 24px;
  font-size: 14px;
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.contact-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form-field > span {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.contact-form-field input,
.contact-form-field textarea {
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  background: rgba(255,255,255,0.95);
  color: #1f2937;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}

.contact-form-field input:focus,
.contact-form-field textarea:focus {
  background: #fff;
  border-color: #ff6b35;
  box-shadow: 0 0 0 3px rgba(255,107,53,0.2);
}

.contact-form-field textarea {
  resize: vertical;
  min-height: 90px;
}

@media (max-width: 600px) {
  .contact-form-row { grid-template-columns: 1fr; }
  .contact-form-card { padding: 24px 18px; }
}

/* ---------- 5. 响应式：移动端客服按钮适配 ---------- */
@media (max-width: 768px) {
  #ly-contact-fab {
    right: 14px;
    bottom: 80px;
  }
  .ly-fab-main {
    width: 50px;
    height: 50px;
  }
  #ly-back-top {
    right: 14px;
    bottom: 16px;
    width: 40px;
    height: 40px;
  }
  .ly-fab-item {
    padding: 8px 12px;
    font-size: 12px;
  }
  .ly-fab-icon {
    width: 28px;
    height: 28px;
  }
}