/* style.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Microsoft Yahei", sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #000000, #8b0000); /* 黑红渐变 */
    padding: 20px;
}

header {
    text-align: center;
    padding: 30px 0;
    background: linear-gradient(135deg, #710101, #000000);
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
}


header h1 {
    font-size: 2.5em;
    color: #fff;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    animation: fadeInUp 1s ease-out;
}

@media (max-width: 768px) {
    header h1 {
        flex-direction: column;
        align-items: center;
        font-size: 1.5em;
    }

    .icon {
        font-size: 2rem; /* 图标略大一些更醒目 */
    }

    .title-text {
        font-size: 1rem;
        margin-top: 8px;
    }
    header {
        padding: 20px 0;
        box-shadow: none;
        background: #8b0000; /* 简化背景色 */   
    }
    .header::before {
        display: none; /* 移除装饰性光晕 */
    }
}


/* 添加进入动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 可选：在 header 背景中加入装饰性图案或光晕效果 */
header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: rotate(25deg);
    pointer-events: none;
}

main {
    max-width: 1200px;
    margin: 0 auto;
}

.introduction {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.introduction img {
    max-width: 100%;
    height: auto;
    border-radius: 30px;
    margin-bottom: 20px;
}

.introduction p {
    font-size: 1.1em;
    line-height: 1.8;
}



section {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}



.image-gallery .images {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.image-gallery img {
    width: calc(33.33% - 10px); /* 原三列布局 */
    aspect-ratio: 1 / 1; /* 设置宽高比为 1:1（正方形） */
    object-fit: cover; /* 图片裁剪以适应容器 */
    border-radius: 6px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* 鼠标悬停效果（可选） */
.image-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}


@media (max-width: 768px) {
    .image-gallery img {
        width: 100%;
    }
}




.news-list .news-item {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.news-list img {
    width: 100px;
    height: auto;
    border-radius: 6px;
    margin-right: 20px;
}

.news-list .content {
    width: 65%;
    text-align: center; /* 居中对齐 */
    flex-grow: 1; /* 自动扩展以填充剩余空间 */
    text-align: left;
    overflow: hidden; /* 防止内容溢出 */
}


.news-list .content p {
    text-align: center; /* 确保段落内部文字也居中 */
     background-color: #fbf7e6; /* 浅米色背景，突出内容区域 */
    padding: 15px;
    border-radius: 6px;
}


.news-list h3 {
    color: #d43f3a;
    margin-bottom: 10px;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 0.95em;
    color: #310000;
    max-width: 1200px;
    margin: 30px auto; /* 新增：上下间距 + 水平居中 */
}

@media (max-width: 768px) {
    .introduction img {
        width: 100%;
    }
    
    .image-gallery img {
        width: 100%;
    }
    
    .news-list .news-item {
        flex-direction: column;
    }
    
    .news-list img {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .news-list .content {
        width: 100%;
    }
}

/* 三列布局容器 */
.article-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* 单个文章卡片样式 */
.article-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: transform 0.2s ease;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-card h2 {
    font-size: 1.4em;
    color: #9f2e2a;
    margin-bottom: 15px;
    text-align: center;
}

.article-content {
    font-size: 1em;
    line-height: 1.7;
    color: #333;
    background-color: #fff8f0;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px;
}

.introduction {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

/* 新增样式：水平排列版本 */
.introduction--horizontal {
    flex-direction: row;
    align-items: center;
    gap: 100px; /* 从 30px 增加到 50px */
}


.introduction--horizontal img {
    width: 40%;
    height: auto;
    border-radius: 12px;
    flex-shrink: 10;
}

.introduction--horizontal p {
    font-size: 1.1em;
    line-height: 2;
    flex-grow: 1;
}
.image-gallery .images {
    display: flex;
    flex-wrap: wrap; /* 允许换行 */
    gap: 15px; /* 图片之间的间距 */
}

.image-gallery img {
    width: calc(33.33% - 10px); /* 三列布局，减去 gap 影响 */
    aspect-ratio: 1 / 1; /* 关键：强制宽高比为 1:1（正方形） */
    object-fit: cover; /* 裁剪图片以适应容器 */
    border-radius: 6px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}


@media (max-width: 768px) {
    .image-gallery img {
        width: 100%; /* 移动端单列展示，占满宽度 */
    }
}

@media (max-width: 768px) {
    .introduction--horizontal {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 10px;
    }

    .introduction--horizontal img {
        width: 100%;
        height: auto;
        border-radius: 10px;
    }

    .introduction--horizontal p {
        font-size: 1em;
        line-height: 1.6;
        padding: 0 5px;
    }
}