/* =========================================
   index.css
   仅用于 index.ejs (首页)
   ========================================= */

.section-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #1a1a1a;
    letter-spacing: 1px;
    padding-top: 20px;
}

/* Hero Section (Index Specific) */
.hero-section {
    /* 保持不变 */
    position: relative;
    height: 600px;
    margin-top: 80px;
    background: url('/images/background.png') no-repeat center top;
    background-size: cover;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* 需要修改宽度的限制，以防字体变大后折行 */
.hero-content { 
    padding-top: 40px; 
    max-width: 1000px; /* 原来是 600px，改为 800px 给大字体更多空间 */
}

/* 1. 基金会名称 (副标题) */
.hero-subtitle { 
    font-size: 28px; /* 原 18px -> 24px */
    color: var(--text-main); 
    letter-spacing: 2px; 
    margin-bottom: 12px; 
    font-weight: 600; 
}

/* 2. 主标题 (AI+社区营造) */
.hero-title { 
    font-size: 72px; /* 原 52px -> 72px (显著加大) */
    font-weight: 800; 
    color: #1a1a1a; 
    margin-bottom: 20px; 
    line-height: 1.1; /* 防止大字体行距过高 */
}
.hero-title span { 
    color: var(--primary-blue); 
    margin-right: 12px; 
}

/* 3. 描述语 (资助创新 · 赋能治理) */
.hero-desc { 
    font-size: 26px; /* 原 18px -> 26px */
    color: var(--text-sub); 
    margin-bottom: 35px; 
    font-weight: 500; /*稍微加粗一点点以匹配字号 */
}


.hero-btns { 
    display: flex; 
    gap: 15px; 
}

.btn { 
    display: inline-flex;     /* 使用 Flex 布局 */
    justify-content: center;  /* 确保文字水平居中 */
    align-items: center;      /* 确保文字垂直居中 */
    width: 170px;             /* 【设定固定宽度】 */
    padding: 12px 0;          /* 上下保持间距，左右设为0即可 */

    border-radius: 12px; 
    font-size: 16px; 
    cursor: pointer; 
    transition: all 0.3s; 
    font-weight: 600; 
}

.btn-primary { 
    background: linear-gradient(90deg, #1890ff 0%, #0056ff 100%); 
    color: #fff; 
    border: none; 
    box-shadow: 0 4px 10px rgba(24, 144, 255, 0.3); 
}

.btn-outline { 
    background: transparent; 
    border: 1px solid #1890ff; 
    color: #1890ff; 
}

.btn:hover { 
    transform: translateY(-2px); 
}

/* Mission Section (宗旨板块) */
.mission-section {
    padding: 80px 0 20px;
    background-color: #f5f9fc;
}

.mission-box {
    background: #fff;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 60px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 50, 150, 0.06);
    text-align: center;
    position: relative;
    border-top: 4px solid #1890ff;
}

.mission-box::before {
    content: "“";
    font-size: 80px;
    color: #e6f7ff;
    font-family: serif;
    position: absolute;
    top: -20px;
    left: 20px;
    line-height: 1;
}

.mission-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.mission-text {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    text-align: justify;
    text-align-last: left;
}

.mission-text strong { color: #1890ff; font-weight: 600; }

@media (max-width: 768px) {
    .mission-box { padding: 30px 20px; }
    .mission-text { text-align: left; text-align-last: left; }
}

/* Support Directions */
.support-section { padding: 80px 0; scroll-margin-top: 80px; }
.support-content-rows { display: flex; flex-direction: column; gap: 20px; }
.support-row { display: flex; gap: 20px; width: 100%; height: 320px; }

.support-card {
    flex: 1; display: flex; flex-direction: column; background: #fff; border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--card-shadow); cursor: pointer; min-width: 0;
    transition: flex 0.4s cubic-bezier(0.25, 1, 0.5, 1), background 0.3s ease, box-shadow 0.3s ease;
}

.support-card.active {
    flex: 2; background: linear-gradient(135deg, #1890ff 0%, #0056ff 100%); box-shadow: var(--hover-shadow);
}

.card-image { height: 180px; width: 100%; overflow: hidden; flex-shrink: 0; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.support-card.active .card-image img { transform: scale(1.05); }

.card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; width: 100%; overflow: hidden; }

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #000;
    transition: color 0.3s;

    white-space: normal;        /* 允许换行 */
    word-break: break-word;     /* 中文安全换行 */
}

.card-desc { font-size: 13px; color: #666; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; transition: color 0.3s; }

.support-card.active .card-title { color: #fff; }
.support-card.active .card-desc { color: rgba(255, 255, 255, 0.9); }

/* Outcomes (Software Tools) */
.outcomes-section { padding: 60px 0 80px; scroll-margin-top: 80px; }
.outcomes-container { display: flex; justify-content: center !important; flex-wrap: wrap; gap: 20px; }

.tool-card {
    background: #fff; border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--card-shadow); display: flex; flex-direction: column; margin-bottom: 20px;
    transition: all 0.3s ease; cursor: default; z-index: 1; position: relative;
}

.outcomes-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

/* 第一行两个 */
.tool-card:nth-child(1),
.tool-card:nth-child(2) {
    grid-column: span 3;
}

/* 第二行三个 */
.tool-card:nth-child(n+3) {
    grid-column: span 2;
}

.tool-card:hover { transform: translateY(-5px); background: linear-gradient(135deg, #1890ff 0%, #0056ff 100%); box-shadow: var(--hover-shadow); }

/* Tool Header */
.tool-header {
    background: #1890ff; padding: 20px; color: #fff; display: flex; justify-content: space-between; align-items: center; transition: background 0.3s;
}
.tool-card:hover .tool-header { background: transparent; }
.tool-header h3 { font-size: 18px; font-weight: 700; margin-bottom: 5px; }
.tool-header p { font-size: 12px; opacity: 0.9; }
.compact-header { padding: 15px 20px !important; }

/* Status Badge */
.status-badge {
    background: rgba(255,255,255,0.2); padding: 4px 8px; border-radius: 4px; font-size: 12px; color: #fff; transition: all 0.3s;
}
.tool-card:hover .status-badge { background: #fff; color: #1890ff; font-weight: 600; }
.download-badge { background-color: #e6f7ff !important; color: #1890ff !important; }

/* Tool Body */
.tool-body {
    padding: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 200px; background: #fff; transition: background 0.3s;
}
.tool-card:hover .tool-body { background: transparent; }

.qr-box { width: 150px; height: 150px; margin-bottom: 5px; }
.qr-box img { width: 100%; height: 100%; }

.scan-text {
    width: 80%; padding: 8px; border-radius: 20px; background: #f0f7ff; color: #1890ff; text-align: center; font-size: 12px; font-weight: 600; transition: all 0.3s;
}
.tool-card:hover .scan-text { background: #fff; color: #1890ff; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }


/* 默认不显示“查看详情”按钮 */
.support-card .card-action {
    display: none;
  }
  
  /* 仅 active 卡片显示 */
  .support-card.active .card-action {
    display: block;
  }

  
/* Download Specific Body */
.download-section-body {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: unset !important; padding: 25px 20px !important;
    background: linear-gradient(to bottom, #ffffff 0%, #f7faff 100%); height: auto;
}

.btn-download-hero {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 10px 15px;
    background: white; border: 1px solid #e1e8f5; border-radius: 8px; color: #333; font-weight: 600; font-size: 14px; text-decoration: none; transition: all 0.3s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}
.icon-box { font-size: 16px; }

.btn-download-hero:hover {
    background: #1890ff; border-color: #1890ff; color: white; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(24, 144, 255, 0.2);
}

.file-meta { margin-top: 10px; font-size: 12px; color: #999; }
.tool-card:hover .file-meta { color: rgba(255,255,255,0.8); }

/* History Section */
.history-section { padding: 60px 0 80px; scroll-margin-top: 80px; }

/* 修改原有的 .history-card */
.history-card {
    background: #fff; 
    color: #333; 
    border-radius: 20px; 
    overflow: hidden; 
    margin-bottom: 24px; 
    display: flex; 
    align-items: center; 
    height: 180px; 
    box-shadow: var(--card-shadow); 
    position: relative; 
    transition: all 0.4s ease; 
    
    /* 修改这里：将 default 改为 pointer，鼠标放上去会变小手 */
    cursor: pointer; 
    
    /* 确保作为 a 标签时没有下划线 */
    text-decoration: none; 
}

/* 保持原有的 hover 效果 */
.history-card:hover { 
    background: linear-gradient(90deg, #1e80ff 0%, #1890ff 100%); 
    color: #fff; 
    transform: scale(1.02); 
    box-shadow: var(--hover-shadow); 
}

/* 新增：增加点击时的按压效果 (Active Effect) */
.history-card:active {
    transform: scale(0.98); /* 点击时稍微缩小 */
    transition: transform 0.1s; /* 快速过渡 */
    box-shadow: 0 4px 12px rgba(0, 86, 255, 0.2); /* 阴影也相应收缩 */
}
.history-bg-img { width: 35%; height: 100%; object-fit: cover; flex-shrink: 0; }
.history-content { flex: 1; padding: 0 40px; }

.year-tag { display: inline-block; background: #1890ff; color: #fff; padding: 4px 12px; border-radius: 15px; font-weight: 700; font-size: 12px; margin-right: 10px; vertical-align: middle; transition: all 0.3s; }
.history-card:hover .year-tag { background: #fff; color: #1890ff; }

.history-title { display: inline-block; font-size: 20px; font-weight: 700; vertical-align: middle; }
.history-desc { margin-top: 15px; font-size: 14px; opacity: 0.8; line-height: 1.8; color: #666; transition: color 0.3s; }
.history-card:hover .history-desc { color: rgba(255,255,255,0.9); }

/* =========================
   卡片基础结构
========================= */

.support-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    overflow: hidden;
}

.card-image img {
    width: 100%;
    display: block;
}

.card-body {
    padding: 20px;
}

.card-title {
    margin-bottom: 10px;
    font-size: 18px;
}

.card-summary {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.card-action {
    text-align: center;
}

/* =========================
   按钮样式（保持背景底框 + 蓝字）
========================= */

.detail-toggle {
    display: inline-block;
    padding: 8px 22px;
    border: 1px solid var(--primary-blue, #2c5cff);
    background: #ffffff;
    color: var(--primary-blue, #2c5cff);
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
}

.detail-toggle:hover {
    background: var(--primary-blue, #2c5cff);
    color: #ffffff;
}

/* =========================
   Modal 遮罩
========================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 21, 37, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

/* 纯CSS触发机制 */
.modal-overlay:target {
    display: flex;
}

/* =========================
   Modal 主体
========================= */

.modal {
    background: #ffffff;
    width: 90%;
    max-width: 760px;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.18);
    padding: 32px 36px;
    position: relative;
    overflow-y: auto;
    animation: modalFadeIn 0.25s ease-out;
}

/* 标题 */

.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-blue, #2c5cff);
}

/* 内容 */

.modal-content p {
    font-size: 15px;
    line-height: 1.9;
    margin-bottom: 16px;
    text-align: justify;
}

/* =========================
   关闭按钮
========================= */

.modal-close {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 24px;
    text-decoration: none;
    color: #888;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #000;
}

/* =========================
   动画
========================= */

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


