/* ============================================
   组合式空调机组（AHU/FCU）核心技术资料汇编
   样式表 - style.css
   ============================================ */

:root {
  --primary: #0e7490;
  --primary-light: #0891b2;
  --primary-bg: #ecfeff;
  --secondary: #1e40af;
  --secondary-light: #3b82f6;
  --secondary-bg: #eff6ff;
  --accent: #ea580c;
  --accent-bg: #fff7ed;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-light: #64748b;
}

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  padding: 20px;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  background: var(--card);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 3px solid var(--primary);
}
.header h1 {
  color: var(--secondary);
  font-size: 2.2em;
  margin-bottom: 10px;
  line-height: 1.3;
}
.header .date {
  color: var(--text-light);
  font-size: 1em;
}

/* Standard Banner */
.std-banner {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 16px 24px;
  border-radius: 10px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95em;
}
.std-banner strong { font-size: 1.1em; }

/* Table of Contents */
.toc {
  background: var(--primary-bg);
  border-radius: 12px;
  padding: 24px 32px;
  margin-bottom: 36px;
  border: 1px solid #a5f3fc;
}
.toc h3 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 1.1em;
}
.toc ol {
  column-count: 2;
  column-gap: 40px;
  padding-left: 20px;
}
.toc li {
  margin-bottom: 6px;
  font-size: 0.92em;
  break-inside: avoid;
}
.toc a {
  color: var(--secondary);
  text-decoration: none;
}
.toc a:hover { text-decoration: underline; }

/* Sections */
.section { margin-bottom: 40px; }
.section h2 {
  color: var(--secondary);
  border-left: 5px solid var(--primary);
  padding-left: 15px;
  margin: 36px 0 20px;
  font-size: 1.5em;
  background: linear-gradient(to right, var(--primary-bg), transparent);
  padding: 12px 15px;
  border-radius: 0 8px 8px 0;
}
.section h3 {
  color: var(--primary);
  margin: 24px 0 12px;
  font-size: 1.2em;
}
.section h4 {
  color: var(--text);
  margin: 16px 0 8px;
  font-size: 1.05em;
}
.section p {
  margin-bottom: 12px;
  text-align: justify;
}
.section ul, .section ol:not(.toc ol) {
  margin-bottom: 12px;
  padding-left: 24px;
}
.section li { margin-bottom: 6px; }

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
  min-width: 640px;
}
th, td {
  border: 1px solid var(--border);
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
}
th {
  background-color: var(--secondary);
  color: white;
  font-weight: 600;
  white-space: nowrap;
}
tr:nth-child(even) { background-color: #f8fafc; }
tr:hover { background-color: #edf2f7; }

/* Tags */
.tag-yes { color: #16a34a; font-weight: 600; }
.tag-warn { color: #d97706; font-weight: 600; }
.tag-no { color: #dc2626; font-weight: 600; }
.tag-new {
  background: var(--accent);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 700;
}

/* Alert Boxes */
.warning-box {
  background-color: var(--danger-bg);
  border-left: 4px solid var(--danger);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 4px;
}
.warning-box strong { color: var(--danger); }

.note-box {
  background-color: var(--accent-bg);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 4px;
}
.note-box strong { color: var(--accent); }

.tip-box {
  background-color: var(--primary-bg);
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 4px;
}
.tip-box strong { color: var(--primary); }

/* Formula Box */
.formula-box {
  background: #f0f4f8;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  padding: 20px;
  margin: 16px 0;
  text-align: center;
  font-size: 1.05em;
  overflow-x: auto;
}

/* AHU Flow Diagram */
.ahu-flow { margin: 24px 0; }
.ahu-flow-title {
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 12px;
  font-size: 1.05em;
}
.flow-track {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  padding: 10px 0;
  gap: 0;
}
.flow-node {
  flex: 0 0 auto;
  min-width: 110px;
  background: var(--secondary-bg);
  border: 2px solid var(--secondary-light);
  border-radius: 8px;
  padding: 12px 10px;
  text-align: center;
  font-size: 0.85em;
  font-weight: 600;
  color: var(--secondary);
  position: relative;
}
.flow-node.highlight {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary);
}
.flow-node.amc-node {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}
.flow-arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 6px;
  color: var(--text-light);
  font-size: 1.2em;
}

/* Energy Bar */
.energy-bar {
  display: flex;
  height: 36px;
  border-radius: 6px;
  overflow: hidden;
  margin: 16px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.energy-seg {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9em;
}
.energy-seg.l1 { background: #16a34a; }
.energy-seg.l2 { background: #84cc16; }
.energy-seg.l3 { background: #eab308; }
.energy-seg.l4 { background: #f97316; }
.energy-seg.l5 { background: #dc2626; }

/* Info Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.info-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.info-card h4 {
  background: var(--secondary);
  color: white;
  padding: 14px 16px;
  margin: 0;
  font-size: 1.05em;
}
.info-card .card-body { padding: 16px; }
.info-card .kv {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.9em;
}
.info-card .kv:last-child { border-bottom: none; }
.info-card .kv .val {
  font-weight: 600;
  color: var(--primary);
  text-align: right;
}

/* ========== 图片样式（固定样式 + 可调尺寸） ========== */
.content-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 1px solid var(--border);
  background: #f8fafc;
  padding: 4px;
}
/* 尺寸调节类 —— 通过添加不同class控制最大宽度 */
.img-sm { max-width: 280px; }
.img-md { max-width: 450px; }
.img-lg { max-width: 700px; }
.img-xl { max-width: 900px; }
.img-full { width: 100%; max-width: none; }
/* 对齐方式 */
.img-center { margin: 24px auto; }
.img-left { float: left; margin: 12px 24px 12px 0; }
.img-right { float: right; margin: 12px 0 12px 24px; }
/* 清除浮动 */
.clearfix::after { content: ""; display: table; clear: both; }
/* 图片说明文字 */
.img-caption {
  text-align: center;
  font-size: 0.85em;
  color: var(--text-light);
  margin-top: -12px;
  margin-bottom: 24px;
  font-style: italic;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-light);
  font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
  body { padding: 10px; }
  .container { padding: 20px; }
  .header h1 { font-size: 1.6em; }
  .toc ol { column-count: 1; }
  .flow-track { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); padding: 6px 0; }
  .img-left, .img-right { float: none; margin: 16px auto; }
}