/**
 * 前台展示样式
 */

/* 重置与基础 */
* { box-sizing: border-box; }
body { margin: 0; background: #f5f7fa; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; }
a { text-decoration: none; }

/* 容器 */
.home-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 顶部 */
.home-header { background: #2c3e50; color: #fff; padding: 0 20px; height: 64px; line-height: 64px; box-shadow: 0 2px 10px rgba(0,0,0,.15); position: sticky; top: 0; z-index: 100; }
.home-header .home-container { display: flex; align-items: center; justify-content: space-between; }
.home-logo { margin: 0; font-size: 20px; font-weight: bold; }
.home-logo i { font-size: 24px; vertical-align: middle; margin-right: 5px; }
.home-slogan { font-size: 14px; opacity: .85; }

/* 项目卡片网格 */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.project-card { display: block; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: all .3s; color: #333; }
.project-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); color: #333; }
.card-cover { position: relative; height: 200px; overflow: hidden; background: #f0f0f0; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.project-card:hover .card-cover img { transform: scale(1.05); }
.card-cover .no-cover { display: flex; align-items: center; justify-content: center; height: 100%; }
.card-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; padding: 20px 15px 12px; opacity: 0; transition: opacity .3s; text-align: center; }
.project-card:hover .card-overlay { opacity: 1; }
.card-body { padding: 15px; }
.card-title { margin: 0 0 10px; font-size: 16px; font-weight: 600; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.card-info { display: flex; gap: 15px; color: #999; font-size: 13px; }
.card-info i { margin-right: 3px; }

/* 标签 */
.tag { display: inline-block; padding: 2px 8px; background: #e8f4ff; color: #1e9fff; border-radius: 3px; font-size: 12px; }
.tag-lg { padding: 4px 12px; font-size: 13px; border-radius: 4px; }

/* 空状态 */
.empty-tip { text-align: center; padding: 80px 0; color: #999; }
.empty-tip p { margin-top: 15px; font-size: 16px; }

/* 分页 */
.home-pagination { margin-top: 30px; text-align: center; }

/* 底部 */
.home-footer { background: #2c3e50; color: rgba(255,255,255,.6); text-align: center; padding: 20px 0; margin-top: 40px; font-size: 14px; }

/* ============ 详情页 ============ */

.detail-header { border-bottom: 2px solid #1e9fff; padding-bottom: 15px; margin-bottom: 20px; }
.detail-title { margin: 0; font-size: 28px; font-weight: 700; color: #333; }

/* 信息网格 */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 30px; }
.info-item { display: flex; align-items: center; background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.info-icon { font-size: 36px; margin-right: 12px; line-height: 1; }
.info-label { font-size: 12px; color: #999; margin-bottom: 4px; }
.info-value { font-size: 16px; font-weight: 600; color: #333; }

/* 段落区块 */
.detail-section { background: #fff; border-radius: 8px; padding: 24px; margin-bottom: 24px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.section-title { margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; font-size: 18px; font-weight: 600; color: #333; }
.section-title i { color: #1e9fff; margin-right: 6px; }
.section-content { color: #555; }

/* 图片画廊 */
.media-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.gallery-item { background: #f8f8f8; border-radius: 6px; overflow: hidden; }
.gallery-img { height: 180px; overflow: hidden; cursor: pointer; }
.gallery-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-img:hover img { transform: scale(1.05); }
.gallery-video { height: 180px; background: #000; }
.gallery-video video { width: 100%; height: 100%; }
.gallery-title { padding: 8px 10px; font-size: 13px; color: #666; text-align: center; }

/* 响应式 */
@media (max-width: 768px) {
    .project-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
    .info-grid { grid-template-columns: repeat(2, 1fr); }
    .media-gallery { grid-template-columns: repeat(2, 1fr); }
    .detail-title { font-size: 22px; }
    .home-slogan { display: none; }
}

@media (max-width: 480px) {
    .project-grid { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .media-gallery { grid-template-columns: 1fr; }
}
