/* =========================================
   xinyi_building.css
   信义社区营造研究中心专用样式
   ========================================= */

/* 1. Hero 区域 (顶部大图) */
.xinyi-hero {
    position: relative;
    height: 400px;
    margin-top: 80px;
    background: url('/images/background.png') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    color: #333;
}

.xinyi-hero .hero-content {
    max-width: 1000px;
    padding: 0 20px;
}

.xinyi-hero .hero-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.3;
    color: #1a1a1a;
}

.xinyi-hero .hero-title span {
    color: var(--primary-blue); /* 使用 global.css 定义的蓝色 */
}

.xinyi-hero .hero-desc {
    font-size: 20px;
    color: var(--text-sub);
    font-weight: 500;
    letter-spacing: 1px;
}

/* 2. 资源/内容区域容器 */
.resource-section {
    padding: 60px 0 100px;
    background-color: #f5f9fc;
}

.resource-group {
    margin-bottom: 60px;
}

/* 标题样式：带左侧蓝条 */
.group-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 5px solid var(--primary-blue);
}

/* 3. 介绍卡片 (Intro Card) */
.intro-card {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    line-height: 1.8;
    color: #444;
}

.intro-text p {
    margin-bottom: 15px;
    text-indent: 2em; /* 首行缩进 */
}

/* 4. PDF 网格系统 (Grid System) */
.pdf-grid {
    display: grid;
    /* 自动填充，每列最小宽度 300px，确保长标题能放下 */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* 单列布局 (用于 5-8 这种重点/单独的项目) */
.pdf-grid.one-col {
    grid-template-columns: 1fr;
    max-width: 800px; /* 限制最大宽度，防止太宽难看 */
}

/* 5. PDF 卡片样式 */
.pdf-card {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

/* 悬停效果：整体变蓝，阴影加深，上浮 */
.pdf-card:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, #1890ff 0%, #0056ff 100%);
    box-shadow: var(--hover-shadow);
    border-color: transparent;
}

/* 左侧 PDF 图标 */
.pdf-icon {
    width: 50px;
    height: 50px;
    background: #f0f7ff;
    color: #1890ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
    transition: all 0.3s;
}

/* 右侧信息 */
.pdf-info {
    flex: 1;
    min-width: 0; /* 防止 flex 子元素溢出 */
}

.pdf-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    transition: color 0.3s;
    line-height: 1.4;
    
    /* 超过两行省略号，适应长标题 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pdf-info p {
    font-size: 12px;
    color: #999;
    transition: color 0.3s;
}

/* 悬停时的内部元素变色逻辑 */
.pdf-card:hover .pdf-icon {
    background: #fff;
    color: #1890ff;
}

.pdf-card:hover .pdf-info h3 {
    color: #fff;
}

.pdf-card:hover .pdf-info p {
    color: rgba(255,255,255,0.8);
}

/* 6. 特殊卡片样式：大卡片 (Large Card) */
/* 用于第5-8部分的单行展示 */
.large-card {
    padding: 30px;
}

.large-card .pdf-info h3 {
    font-size: 18px; /* 字体稍微大一点 */
}