/**
 * 淮南蓝天救援队 - 自定义样式
 * 参考 blueskyrescue.cn 设计风格
 */

/* ========== CSS 变量 ========== */
:root {
  --primary: #164E86;
  --primary-light: #2A6FB0;
  --primary-hover: #0E3A66;
  --accent: #1890FF;
  --accent-hover: #40A9FF;
  --orange: #F97316;
  --red: #F5222D;
  --bg-page: #F0F2F5;
  --bg-content: #F6F6F6;
  --bg-card: #FFFFFF;
  --bg-footer: #434343;
  --bg-footer-dark: #333333;
  --text-primary: rgba(0, 0, 0, 0.85);
  --text-secondary: rgba(0, 0, 0, 0.65);
  --text-muted: rgba(0, 0, 0, 0.45);
  --text-white: #FFFFFF;
  --border-color: #E8E8E8;
  --shadow-card: 0 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.12);
  --radius: 4px;
  --radius-lg: 8px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* ========== SVG 图标兑底尺寸（防止 Tailwind 未加载时图标撑爆） ========== */
svg {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}
svg[class*="w-4"], svg[class*="h-4"] { width: 16px; height: 16px; }
svg[class*="w-5"], svg[class*="h-5"] { width: 20px; height: 20px; }
svg[class*="w-6"], svg[class*="h-6"] { width: 24px; height: 24px; }
svg[class*="w-7"], svg[class*="h-7"] { width: 28px; height: 28px; }
svg[class*="w-8"], svg[class*="h-8"] { width: 32px; height: 32px; }
svg[class*="w-16"], svg[class*="h-16"] { width: 64px; height: 64px; }
svg[class*="w-20"], svg[class*="h-20"] { width: 80px; height: 80px; }

/* ========== 布局兑底（防止 Tailwind 未加载时布局塌陷） ========== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ========== 全局基础 ========== */
* { box-sizing: border-box; }
html { overflow-x: hidden; font-size: 14px; }
body {
  font-family: var(--font-family);
  color: var(--text-primary);
  background: var(--bg-page);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-hover); }

/* ========== 顶部装饰线 ========== */
.top-deco {
  height: 4px;
  background: linear-gradient(270deg, #00A0E8, transparent 30%, transparent 70%, #00A0E8);
}

/* ========== 导航栏 ========== */
.site-nav {
  background: rgba(22, 78, 134, 0.95);
  backdrop-filter: blur(8px);
  transition: background .3s;
}
.site-nav.scrolled { background: rgba(22, 78, 134, 1); }
.site-nav a { transition: opacity .2s; }
.site-nav a:hover { opacity: .85; }
.nav-link {
  position: relative;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .5px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; width: 0; height: 2px;
  background: #fff;
  transition: all .3s;
  transform: translateX(-50%);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* ========== Hero 区域 ========== */
.hero-section {
  position: relative;
  min-height: 480px;
  background: linear-gradient(135deg, #0E3A66 0%, #164E86 40%, #1A6EB5 100%);
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: .5;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 80px 20px 60px;
}

/* ========== 内容区域 ========== */
.content-area {
  background: var(--bg-content);
  padding: 40px 0;
}
.content-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== 卡片 ========== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: box-shadow .3s, transform .2s;
  overflow: hidden;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.card-body { padding: 16px 20px; }
.card-more {
  font-size: 13px;
  color: var(--text-muted);
}
.card-more a { color: var(--accent); font-size: 13px; }

/* ========== 新闻列表项 ========== */
.news-item {
  padding: 14px 0;
  border-bottom: 1px solid #F0F0F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background .2s;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: #FAFAFA; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.news-item .title {
  font-size: 14px;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 16px;
}
.news-item .title::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
}
.news-item .date {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ========== 按钮 ========== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  height: 40px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s, box-shadow .2s;
  min-height: 44px;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 2px 8px rgba(24,144,255,.3); }
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  height: 40px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
  min-height: 44px;
}
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-orange {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  height: 44px;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  min-height: 44px;
}
.btn-orange:hover { background: #EA6C14; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(249,115,22,.3); }

/* ========== 板块标题样式 ========== */
.section-title {
  text-align: center;
  margin-bottom: 40px;
}
.section-title h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.section-title .sub {
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.section-title .line {
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* ========== 救援业务卡片 ========== */
.scope-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: all .3s;
  border: 1px solid transparent;
}
/* 卡片作为链接跳转详情页 */
a.scope-card {
  display: block;
  color: inherit;
  text-decoration: none;
}
.scope-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}
.scope-card .icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
}
.scope-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.scope-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ========== 页脚 ========== */
.site-footer {
  background: var(--bg-footer);
  color: rgba(255,255,255,.75);
  padding: 48px 0 0;
}
.site-footer a { color: rgba(255,255,255,.75); font-size: 13px; }
.site-footer a:hover { color: #fff; }
.footer-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}
.footer-bottom {
  background: var(--bg-footer-dark);
  padding: 16px 0;
  margin-top: 32px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.45);
}

/* ========== 表单 ========== */
.form-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  min-height: 44px;
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(24,144,255,.2);
}
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  resize: vertical;
}
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(24,144,255,.2);
}
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

/* ========== 标签 ========== */
.tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 2px;
  line-height: 20px;
}
.tag-blue { background: #E6F7FF; color: #1890FF; border: 1px solid #91D5FF; }
.tag-green { background: #F6FFED; color: #52C41A; border: 1px solid #B7EB8F; }
.tag-red { background: #FFF1F0; color: #F5222D; border: 1px solid #FFA39E; }
.tag-orange { background: #FFF7E6; color: #FA8C16; border: 1px solid #FFD591; }
.tag-gray { background: #FAFAFA; color: rgba(0,0,0,.45); border: 1px solid #D9D9D9; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .hero-section { min-height: 320px; }
  .hero-content { padding: 50px 16px 40px; }
  .section-title h2 { font-size: 22px; }
  .content-area { padding: 24px 0; }
  button, a.btn, input[type="submit"] { min-height: 44px; }
}

/* ========== 表格移动端卡片化 ========== */
@media (max-width: 768px) {
  .table-responsive table thead { display: none; }
  .table-responsive table tbody tr {
    display: block;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    background: #fff;
  }
  .table-responsive table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: 6px 0;
    border: none;
    font-size: 13px;
    word-break: break-all;
  }
  .table-responsive table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 12px;
    flex-shrink: 0;
  }
  /* 无 data-label 的单元格（空状态等）居中显示 */
  .table-responsive table tbody td:not([data-label]) {
    justify-content: center;
    color: var(--text-muted);
  }
  /* 操作列：置于卡片底部，标签居左、按钮组居右可换行 */
  .table-responsive table tbody td[data-label="操作"] {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
    justify-content: flex-end;
    align-items: center;
  }
  .table-responsive table tbody td[data-label="操作"]::before {
    margin-right: auto;
  }
  .table-responsive table tbody td[data-label="操作"] form,
  .table-responsive table tbody td[data-label="操作"] button,
  .table-responsive table tbody td[data-label="操作"] a {
    white-space: nowrap;
  }
}

/* ========== 禁用 hover 交互（移动端） ========== */
@media (hover: none) {
  .card:hover { transform: none; box-shadow: var(--shadow-card); }
  .scope-card:hover { transform: none; border-color: transparent; }
}
