/**
 * Page to Footer Transition Styles
 * 页面到页脚的自然过渡效果
 */

/* ========== 页面底部渐变过渡 ========== */
main {
    position: relative;
    padding-bottom: 80px;
}

/* 在页面内容底部添加渐变效果 */
main::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(245,245,245,0.3));
    pointer-events: none;
}

/* ========== Footer 优化 ========== */
footer,
.page-footer,
#footer {
    margin-top: 0;
    padding-top: 60px;
    background: linear-gradient(to bottom, #f8f8f8, #f0f0f0);
    box-shadow: 0 -2px 20px rgba(0,0,0,0.05);
    position: relative;
}

/* Footer 顶部装饰线 */
footer::before,
.page-footer::before,
#footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 1200px;
    height: 1px;
    background: linear-gradient(to right, transparent, #D4AF37, transparent);
}

/* ========== 返回顶部按钮优化 ========== */
.backTop,
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #D4AF37, #B8860B);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(212,175,55,0.3);
    transition: all 0.3s ease;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.backTop.show,
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.backTop:hover,
.back-to-top:hover {
    background: linear-gradient(135deg, #B8860B, #9A7209);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(212,175,55,0.4);
}

.backTop i,
.back-to-top i {
    font-size: 20px;
}

/* ========== 页面底部内容区域 ========== */
.page-bottom-section {
    padding: 60px 0;
    background: linear-gradient(to bottom, white, #fafafa);
}

/* ========== 分页区域优化 ========== */
.cbx2,
.pagination-wrapper {
    padding-bottom: 40px;
    position: relative;
}

/* ========== 评论表单区域优化 ========== */
.list1 {
    padding-bottom: 60px;
    background: linear-gradient(to bottom, white, #f8f8f8);
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    main {
        padding-bottom: 60px;
    }
    
    main::after {
        height: 60px;
    }
    
    footer,
    .page-footer,
    #footer {
        padding-top: 40px;
    }
    
    .backTop,
    .back-to-top {
        bottom: 60px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .page-bottom-section {
        padding: 40px 0;
    }
}

@media (max-width: 480px) {
    main {
        padding-bottom: 40px;
    }
    
    main::after {
        height: 40px;
    }
    
    footer,
    .page-footer,
    #footer {
        padding-top: 30px;
    }
    
    .backTop,
    .back-to-top {
        bottom: 50px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .backTop i,
    .back-to-top i {
        font-size: 18px;
    }
}

/* ========== 平滑滚动 ========== */
html {
    scroll-behavior: smooth;
}

/* ========== 页面加载动画 ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

main > section {
    animation: fadeInUp 0.6s ease-out;
}

main > section:nth-child(2) {
    animation-delay: 0.1s;
}

main > section:nth-child(3) {
    animation-delay: 0.2s;
}

main > section:nth-child(4) {
    animation-delay: 0.3s;
}

/* ========== Footer 链接悬停效果 ========== */
footer a,
.page-footer a,
#footer a {
    transition: all 0.3s ease;
    position: relative;
}

footer a::after,
.page-footer a::after,
#footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #D4AF37;
    transition: width 0.3s ease;
}

footer a:hover::after,
.page-footer a:hover::after,
#footer a:hover::after {
    width: 100%;
}

footer a:hover,
.page-footer a:hover,
#footer a:hover {
    color: #D4AF37;
    transform: translateX(3px);
}

/* ========== 页面容器优化 ========== */
.container-wrapper,
.bx,
.cbx,
.cbx2,
.cbxm {
    transition: all 0.3s ease;
}

/* ========== 内容卡片阴影过渡 ========== */
.cson,
.card,
.content-card {
    transition: all 0.3s ease;
}

.cson:hover,
.card:hover,
.content-card:hover {
    transform: translateY(-2px);
}
