/* 智考888 整站共享样式 — 优路教育红 */
:root {
  --red: #E60012;
  --red-deep: #D7000F;
  --red-hover: #c40010;
  --bg: #f5f5f5;
  --white: #fff;
  --text: #333;
  --muted: #666;
  --light: #999;
  --border: #e5e5e5;
  --max: 1200px;
  --ok: #1a7f37;
  --bad: #d64545;
  /* learn aliases */
  --panel: #fff;
  --panel2: #fafafa;
  --line: #e5e5e5;
  --accent: #E60012;
  --accent2: #E60012;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 14px;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.wrap { width: min(100% - 24px, var(--max)); margin-inline: auto; }

/* —— 顶栏 —— */
.top-bar {
  background: #fafafa;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  gap: 12px;
  flex-wrap: wrap;
}
.top-bar-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.top-bar-links a { color: var(--muted); }
.top-bar-links a:hover { color: var(--red); }
.top-bar-links .sep { color: #ddd; }

/* —— Logo 行 / 品牌 —— */
.logo-row { background: var(--white); padding: 16px 0; }
.logo-row-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-badge {
  width: 48px; height: 48px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1.15;
  text-align: center;
  border-radius: 4px;
}
.brand-name {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  letter-spacing: 0.02em;
}
.brand-sub {
  font-size: 12px;
  color: var(--light);
  margin-top: 2px;
}

/* —— 红色主按钮 —— */
.btn-red, button.primary, .zk-btn-primary {
  display: inline-block;
  border: 0;
  background: var(--red);
  color: #fff !important;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 600;
  border-radius: 4px;
  text-align: center;
}
.btn-red:hover, button.primary:hover, .zk-btn-primary:hover {
  background: var(--red-hover);
  color: #fff !important;
}
button:disabled { opacity: .45; cursor: not-allowed; }

/* —— 楼层标题竖条 —— */
.floor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.floor-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #222;
}
.floor-title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: var(--red);
  border-radius: 1px;
  flex-shrink: 0;
}
.floor-more { color: var(--muted); font-size: 13px; }
.floor-more:hover { color: var(--red); }

/* —— 白卡片 —— */
.card, .zk-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

/* —— 表格 / 输入 —— */
table.zk-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}
table.zk-table th, table.zk-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
}
table.zk-table th { background: #fafafa; font-weight: 600; }
input, select, textarea {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  background: var(--white);
  color: var(--text);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--red);
}

/* —— 红色主导航 —— */
.main-nav {
  background: var(--red);
  position: relative;
  z-index: 40;
}
.main-nav-inner {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.main-nav-inner::-webkit-scrollbar { display: none; }
.nav-item { position: relative; flex-shrink: 0; }
.nav-item > a,
.nav-item > button {
  display: block;
  color: #fff !important;
  padding: 0 22px;
  height: 48px;
  line-height: 48px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav-item:hover > a,
.nav-item > a:hover,
.nav-item:hover > button,
.nav-item > button.active {
  background: rgba(0,0,0,0.12);
  color: #fff !important;
}
.nav-drop {
  display: none;
  position: absolute;
  left: 0; top: 100%;
  min-width: 200px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  border-top: 2px solid var(--red-deep);
  padding: 8px 0;
  z-index: 50;
}
.nav-item:hover .nav-drop { display: block; }
.nav-drop a {
  display: block;
  padding: 10px 18px;
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
}
.nav-drop a:hover {
  background: #fff5f5;
  color: var(--red);
}

/* —— 学习中心壳 —— */
.learn-shell main#main,
body.learn-page main#main {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px 88px;
}
.learn-top {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}
.learn-top-inner {
  width: min(100% - 24px, 1200px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  flex-wrap: wrap;
  padding: 8px 0;
}
.learn-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.learn-brand .brand-badge {
  width: 40px; height: 40px; font-size: 12px;
}
.learn-brand .brand-name { font-size: 18px; }
.learn-brand .brand-tag {
  font-size: 13px;
  color: var(--red);
  font-weight: 700;
  padding-left: 10px;
  border-left: 1px solid var(--border);
  margin-left: 4px;
}
.learn-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  flex-wrap: wrap;
}
.learn-nav a,
.learn-nav button,
.tabs button {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
}
.learn-nav a:hover,
.learn-nav button:hover,
.tabs button:hover { color: var(--red); background: #fff5f5; }
.learn-nav button.active,
.tabs button.active {
  color: var(--red);
  background: #fff5f5;
}
.learn-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}
.learn-right .nick { color: var(--muted); font-size: 13px; }
.learn-right .linkish,
a.linkish {
  color: var(--red);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
}
button.ghost {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
}
button.ghost:hover { border-color: var(--red); color: var(--red); }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 8px rgba(0,0,0,.04);
}
.bottom-nav button {
  border: 0; background: transparent; color: var(--muted);
  font-size: 11px; padding: 8px 2px; cursor: pointer;
}
.bottom-nav button.active { color: var(--red); font-weight: 700; }
@media (min-width: 900px) {
  .bottom-nav {
    max-width: 960px; margin: 0 auto; left: 50%;
    transform: translateX(-50%); border-radius: 12px 12px 0 0;
  }
}


/* —— 分段楼层：工程类 / 消防类 —— */
.seg-floor .floor-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.05em;
  background: var(--red);
  margin-right: 10px;
  vertical-align: -0.12em;
  border-radius: 1px;
}
.seg-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
  align-items: start;
}
.seg-subhd {
  font-size: 15px;
  font-weight: 700;
  color: #222;
  margin-bottom: 12px;
  padding-left: 2px;
}
.prac-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.prac-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 14px 14px 12px;
  transition: border-color .15s, box-shadow .15s;
}
.prac-card:hover {
  border-color: var(--red);
  box-shadow: 0 4px 14px rgba(230,0,18,.08);
  color: inherit;
}
.prac-ico {
  width: 36px; height: 36px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.prac-name { font-weight: 600; color: #222; font-size: 14px; line-height: 1.35; }
.prac-go { color: var(--red); font-size: 12px; font-weight: 600; }
.seg-news {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 14px 16px 12px;
  min-height: 220px;
}
.news-list { display: flex; flex-direction: column; gap: 0; }
.news-list li + li { border-top: 1px dashed var(--border); }
.news-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  align-items: flex-start;
}
.news-list .news-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.news-list strong {
  font-size: 14px; font-weight: 600; color: #222;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.news-list em {
  font-style: normal; font-size: 12px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.news-list .date { flex-shrink: 0; color: var(--light); font-size: 12px; padding-top: 2px; }
.news-empty { color: var(--muted); padding: 16px 0; font-size: 13px; }
.seg-more {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--red);
  font-weight: 600;
}
.floor-compact { padding-top: 12px; padding-bottom: 12px; }
.course-grid-sm { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .seg-grid { grid-template-columns: 1fr; }
  .course-grid-sm { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .prac-grid { grid-template-columns: 1fr; }
}

/* news detail */
.news-detail-wrap { max-width: 860px; margin: 24px auto 48px; background: #fff; border: 1px solid var(--border); padding: 28px 28px 36px; }
.news-detail-wrap h1 { font-size: 24px; line-height: 1.4; margin: 0 0 12px; color: #222; }
.news-meta { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.news-body { font-size: 15px; line-height: 1.8; color: #333; }
.news-body p { margin: 0 0 14px; }
.news-back { display: inline-block; margin-bottom: 16px; color: var(--red); font-weight: 600; font-size: 13px; }
