/* 通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

/* Header 样式 - 默认透明 */
header {
    background-color: rgba(255, 255, 255, 0); /* 初始时透明 */
    padding: 20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease; /* 平滑过渡效果 */
    border-radius: 20px; /* 圆角 */
    box-shadow: none; /* 初始无阴影 */
}
/* Header 样式 - 滚动之后 */
header.scrolled {
    background-color: rgba(255, 255, 255, 0.3); /* 毛玻璃效果背景 */
    backdrop-filter: blur(10px); /* 背景模糊效果 */
    -webkit-backdrop-filter: blur(10px); /* Safari 支持 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); /* 添加阴影 */
}

/* 导航栏链接样式 */

/* LOGO 样式 */
nav {
    display: flex;
    justify-content: space-between; /* 使 LOGO 和菜单项左右分布 */
    align-items: center; /* 垂直居中对齐 */
}

.logo img {
    width: 150px; /* 根据需要调整 LOGO 的大小 */
    height: auto;
    margin-left: 20px; /* 给 LOGO 左侧留一些间距 */
}


nav ul {
    display: flex;
    justify-content: center;
    list-style-type: none;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white; /* 默认白色文字 */
    font-weight: bold;
    font-size: 16px;
    transition: color 0.3s ease; /* 平滑过渡效果 */
    text-decoration: none; /* 去掉下划线 */
}

nav ul li a:hover {
    color: #d9d9d9;
}


/* 滚动后灰色文字 */
header.scrolled nav ul li a {
    color: #000000;  /* 滚动后灰色文字 */
}

/* 鼠标悬停时加深灰色 */
header.scrolled nav ul li a:hover {
    color: #364449;  /* 鼠标悬停时加深灰色 */
}


/* 首页大图区域 */
#home {
    position: relative;
    background-image: url('../picture/background/homepage_bgc.webp'); /* 替换为你的背景图片路径 */
    background-size: cover; /* 图片自动调整大小以覆盖整个区域 */
    background-position: center; /* 图片居中 */
    background-attachment: fixed; /* 背景图片固定，滚动时不跟随页面内容移动 */
    color: white;
    padding: 200px 0; /* 增加上下内边距，使高度是原来的两倍 */
    text-align: center;
}

#home .hero {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1; /* 确保文本位于背景图之上 */
}

#home h1 {
    font-size: 3em;
    margin-bottom: 20px;
}

#home p {
    font-size: 1.5em;
    margin-bottom: 20px;
}

#home button {
    background-color: #007BFF;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    cursor: pointer;
    margin: 5px;
}

#home button:hover {
    background-color: #0056b3;
}

/* 所有期刊 */
#journals {
    padding: 50px 20px;
    text-align: center;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.journal-list {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 30px;
    max-width: 1100px; /* 限制最大宽度 */
    width: 100%;
}

.journal-item {
    background-color: #f4f4f4;
    /* padding: 20px; */
    padding-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); /* 卡片悬浮效果 */
    width: 300px; /* 固定宽度 */
    height: 400px;
    transition: transform 0.3s ease-in-out; /* 悬浮动画效果 */
    text-align: center;
    
}

.journal-item:hover {
    transform: translateY(-10px); /* 悬浮时上移效果 */
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2); /* 增加阴影效果 */
}

.journal-image {
    width: 100%;
    height: 180px; /* 固定图片高度 */
    object-fit: cover; /* 保证图片不会变形 */
    border-radius: 8px;
    margin-bottom: 15px; /* 图片和文字之间的间隔 */
}

.journal-item h3 {
    font-size: 1.5em;
    min-height: 60px; /* 固定标题高度，确保对齐 */
    display: flex;
    align-items: center; /* 让标题垂直居中 */
    justify-content: center;
}

.journal-item p {
    font-size: 1em;
    color: #666;
    margin-top: auto; /* 让 p 自动对齐到底部 */
    padding: 10px; /* 适当增加 padding，使内容不紧贴边界 */

}
.journal-item a {
    display: block;
    text-decoration: none; /* 去除默认的下划线 */
    color: inherit; /* 确保文本颜色继承父元素的样式 */    

}




/* 响应式设计 */
@media (max-width: 768px) {
    header {
        padding: 10px;
        height: auto; /* Adjust header height for mobile */
    }

    .logo img {
        width: 120px; /* Adjust logo size */
        height: auto;
    }

    #home {
        padding: 150px 20px;
        text-align: left;
    }

    #home h1 {
        font-size: 2em; /* Smaller heading */
    }

    #home p {
        font-size: 1.2em;
    }

    #home button {
        padding: 8px 16px;
        font-size: 1em;
    }

    /* Features Section */
    #features {
        flex-direction: column;
        align-items: center;
    }

    .feature {
        width: 90%;
        margin-bottom: 20px;
        padding: 20px;
    }

    .feature img {
        width: 100%;
        height: auto;
    }

    /* News Section */
    #news .news-items {
        grid-template-columns: 1fr;
    }

    .news-item img {
        width: 100%;
        height: auto;
    }

    footer {
        padding: 40px 20px;
    }

    footer img {
        height: 80px;
    }
}



