/* 全局样式 */

body {
    margin: 0;
    font-family: Arial, sans-serif;
}

h3 {
    font-family: Arial, sans-serif; 
    font-size: 1.5em; 
    font-weight: bold; 
    color: #333; 
    margin: 10px 0; 
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    width: 250px;
    height: 100%;
    background: #fff;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.logo {
    display: block;
    margin: 40px auto 20px auto;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

nav {
    margin-top: 40px;
}

nav ul {
    list-style: none;
    padding: 0;
}

nav ul li {
    margin: 20px 0;
    padding-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-size: 18px;
}

nav ul li a.active {
    color: #000;
    font-weight: bold;
}

.main-content {
    margin-left: 250px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.footer {
            text-align: center;
            padding: 10px; 
            background-color: #f1f1f1; 
            position: relative;
            font-size: 10px;
            color: gray; 
        }

/* 主内容区样式 */
.main-content {
    margin-left: 250px; /* 调整主内容的左边距 */
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto; /* 允许垂直滚动 */
}

/* 幻灯片容器样式 */
.slideshow-container {
    position: center;
    width: 100%;
    max-width: 95%;
    margin: auto;
    overflow: hidden; /* 防止图片溢出 */
}

/* 幻灯片样式 */
.mySlides {
    display: none;
}

/* 幻灯片图片样式 */
.slide-img {
    width: 100%;
    height: auto; /* 保持图片宽度自适应，高度自动 */
    max-height: 100vh; /* 限制图片最大高度为80%的视口高度 */
    object-fit: contain; /* 保持图片比例 */
}

/* 幻灯片导航按钮样式 */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none; /* 防止文本被选中 */
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8); /* 按钮悬停时的背景颜色 */
}


/* 幻灯片动画效果 */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4} 
    to {opacity: 1}
}





/* 研究页面容器样式 */
.research-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between; /* 改为space-between确保有两个竖列 */
    align-items: flex-start;
    padding: 20px;
    width: 100%;
}

/* 研究页面帖子样式 */
.research-post {
    flex: 0 1 calc(50% - 20px); /* 调整宽度比例 */
    box-sizing: border-box;
    margin-bottom: 20px; /* 确保每行两个post */
    text-align: center;
}

.research-post .post-img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3; /* 保持图片比例为4:3 */
    object-fit: cover; /* 裁剪图片以适应容器 */
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.research-post .post-img:hover {
    transform: scale(1.05);
}

.research-post h3 {
    margin-top: 10px;
    font-size: 18px;
    font-weight: normal;
}

.research-post h3 a {
    text-decoration: none;
    color: #333;
}

.research-post h3 a:hover {
    color: #007BFF;
}


/* 艺术作品页面容器样式 */
.artwork-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px; /* 设置列间距 */
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px;
    width: 100%;
}







/* 艺术作品页面容器样式 */
.artwork-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px; /* 设置列间距 */
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px;
    width: 100%;
}

/* 艺术作品页面帖子样式 */
.artwork-post {
    flex: 0 1 calc(50% - 30px); /* 设置每个 post 占据 50% 的宽度，并减去间距 */
    box-sizing: border-box;
    margin-bottom: 20px;
    text-align: center;
}

.artwork-post .post-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1; /* 保持图片比例 */
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.artwork-post .post-img:hover {
    transform: scale(1.05);
}

.artwork-post h3 {
    margin-top: 10px;
    font-size: 18px;
    font-weight: normal;
}

.artwork-post h3 a {
    text-decoration: none;
    color: #333;
}


.artwork-post, .design-post {
    display: flex;
    margin-bottom: 20px;
}

.artwork-post h3, .design-post h3 {
    text-align: center;
    margin-top: 10px;
}

.post-link {
    flex: 1;
    margin-right: 20px;
}

.post-description {
    flex: 2;
}

.post-description h3, .post-description h4 {
    margin: 0;
    font-size: 24px;
}

.post-description p {
    margin: 10px 0 0;
    font-size: 16px;
}

.post-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.hidden-link {
    display: none;
}




/* Lightbox 导航按钮样式 */
.lb-next, .lb-prev {
    display: block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.lb-next:hover, .lb-prev:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* 确保 Lightbox 图标路径正确 */
.lb-next, .lb-prev, .lb-close, .lb-loader {
    background-image: url('../images/lightbox/loading.gif');
}

/* 确保Lightbox图片不超过页面大小 */
.lb-image {
    max-width: 800px; /* 确保图片宽度不超过视口宽度的90% */
    max-height: 800px; /* 确保图片高度不超过视口高度的90% */
    width: auto;
    height: auto;
    object-fit: contain; /* 保持图片比例 */
}

.lightbox-info {
    text-align: left;
}

.lightbox-info h4 {
    margin: 0;
}

.lightbox-info p {
    margin: 5px 0;
}

.artwork-post, .design-post {
    position: relative;
}

.image-container {
    position: relative;
    width: 100%;
}

.post-img {
    display: block;
    width: 100%;
    height: auto;
    transition: 0.3s ease;
}

.overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    width: 100%;
    opacity: 0;
    transition: 0.3s ease;
    background-color: rgba(0, 0, 0, 0.6);
}

.artwork-post:hover .post-img, .design-post:hover .post-img {
    opacity: 0.3;
}

.artwork-post:hover .overlay, .design-post:hover .overlay {
    opacity: 1;
}

.text {
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}



/* 返回按钮样式 */
.back-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background: #007BFF;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.back-button:hover {
    background: #0056b3;
}


/* 设计作品页面帖子样式 */
.design-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px; /* 设置列间距 */
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px;
    width: 100%;
}

.design-post {
    flex: 0 1 calc(50% - 30px); /* 设置每个 post 占据 50% 的宽度，并减去间距 */
    box-sizing: border-box;
    margin-bottom: 20px;
    text-align: center;
}

.design-post .post-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1; /* 保持图片比例 */
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.design-post .post-img:hover {
    transform: scale(1.05);
}

.design-post h3 {
    margin-top: 10px;
    font-size: 18px;
    font-weight: normal;
}

.design-post h3 a {
    text-decoration: none;
    color: #333;
}







/* 关于我页面容器样式 */
.about-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: auto;
}

.personal-photo {
    width: 800px;
    margin-bottom: 20px;
}

.about-text {
    width: 100%;
    text-align: left;
}

.about-text h2, .about-text h3 {
    margin-top: 20px;
}

.about-text p {
    line-height: 1.6;
}

.about-text a {
    color: #007BFF;
    text-decoration: none;
}

.about-text a:hover {
    text-decoration: underline;
}

hr {
    border: 0;
    height: 1px;
    background: #ddd;
    margin: 40px 0;
}

.section {
    margin-bottom: 20px;
}
