/* 项目列表页样式 */
.projects-page {
    display: flex;
    justify-content: center;
    background: #1b1b1b;
    min-height: 100vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    padding: 10% 0;
    margin: 0;
}

/* 页面横幅 */
.page-banner {
    width: 100%;
    height: 100vh; /* 2/3的视口高度 */
    position: relative;
    background-image: url('../images/worklist.jpg'); 
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 横幅遮罩 */
.page-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* 黑色遮罩 */
    z-index: 1;
}



.banner-content {
    position: relative;
    height: 100%;
    top: 50%;
    transform: translateY(-10%);
    z-index: 2;
    text-align: center;
    color: #ffffff;
    
}

.banner-content h1 {
    font-size: 6rem;
    margin-bottom: 3rem;
    font-weight: 500;
}


.banner-content p {
    font-size: 1.5rem;
    opacity: 0.9;
    color: #ffffff97;
}



 /* 添加以下样式 */
 .banner-scroll-down {
    position: absolute;
    top: 85%;
    /* left: 50%; */
    /* transform: translateX(-50%); */
    /* transform: translateY(-20%); */
    animation: fadeIn 1.5s ease forwards;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    
 }
 
 .banner-scroll-down span {
     position: relative;
    color: rgb(255, 255, 255); 
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    animation: fadeIn 2s ease forwards;
    text-align: center;
 }
 
 .banner-scroll-line {
     width: 30px;
     height: 60px;
     background-color: rgba(255, 255, 255, 0.068);
     margin-bottom: 10px;
     position: relative;
     overflow: hidden;
     /* 添加椭圆外框 */
     border-radius: 20px;
     box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.772);
 }
 
 .banner-scroll-dot {
     width: 4px;
     height: 4px;
     background-color: #fff;
     border-radius: 50%;
     position: absolute;
     left: 50%;
     transform: translateX(-50%);
     animation: scrollDown 2s ease infinite;
     /* 添加椭圆光晕效果 */
     box-shadow: 0 0 10px 2px rgb(255, 255, 255);
 }
 
 
 
 @keyframes scrollDown {
     0% {
         top: -4px;
         opacity: 0;
     }
     30% {
         opacity: 2.5;
     }
     100% {
         top: 60px;
         opacity: 0;
     }
 }
 
 @keyframes fadeIn {
     from {
         opacity: 0;
         transform: translateY(20px);
     }
     to {
         opacity: 1;
         transform: translateY(0);
     }
 }






.project-grid {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    /* 24列网格系统 */
    gap: 0.75rem;
    width: 97%;
    position: relative;
    z-index: 2;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    transition: all 0.5s ease;
    counter-reset: project-counter;
   
}

/* 确保筛选后布局不变 */
.project-grid:has(.filtered.show) {
    grid-template-columns: repeat(24, 1fr);
}

/* 添加类似参考代码的响应式类 */
@media (max-width: 1024px) {
    .project-grid {
        display: flex;
        flex-direction: column;
        gap: 40px;
    }
    
    .project-card,
    .project-card:nth-child(-n+2) {
        width: 100%;
    }
}


.project-card {
    position: relative;
    width: 100%;
    height: 40vh;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
     border-radius: 20px;
    /* 添加圆角 */
}

/* 2+3+2+3重复布局 */
.project-card.layout-2 {
    grid-column: span 12; /* 2个项目/行 */
    height: 50vh;
}

.project-card.layout-3 {
    grid-column: span 8; /* 3个项目/行 */
}

/* 确保筛选后布局不变 */
.project-card.filtered.show.layout-2,
.project-card.filtered.show.layout-3 {
    display: block;
}

/* 筛选后保持布局 */
.project-card.filtered {
    display: none;
}

.project-card.filtered.show {
    display: block;
}

/* 悬停动画增强 */
.project-card:hover {
    transform: scale(0.98);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    transition: background-color 0.5s ease;
}

.project-card:hover::before {
    background: rgba(0, 0, 0, 0.6);
}

.card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    text-decoration: none;
}

.project-content {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -40%);
    width: 90%;
    text-align: center;
    color: #ffffff;
    z-index: 2;
    opacity: 0;
    transition: all 0.5s ease;
}

.project-card:hover .project-content {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.project-content h3 {
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    line-height: 1.2;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease;
    white-space: pre-line;
}

.project-card:hover .project-content h3 {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.1s;
}

.card-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease;
}

.project-card:hover .card-tags {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.3s;
}

.tag {
    padding: 6px 12px;


    font-size: 1rem;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.tag:not(:last-child)::after {
    content: ' / ';
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.5);
}

/* 响应式布局 */
@media (max-width: 1400px) {
    .banner-content h1 {
        font-size: 5rem;
    }

    .banner-content p {
        font-size: 1.4rem;
    }

    .project-content h3 {
        font-size: 3rem;
    }

    .tag {
        font-size: 0.95rem;
    }
}

@media (max-width: 1200px) {
    .banner-content h1 {
        font-size: 4.5rem;
        margin-bottom: 2.5rem;
    }

    .banner-content p {
        font-size: 1.3rem;
    }

    .project-content h3 {
        font-size: 2.8rem;
        margin-bottom: 1.2rem;
    }

    .tag {
        font-size: 0.9rem;
        padding: 5px 10px;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 30px;
        width: 70%;
    }
    
    .project-card,
    .project-card:nth-child(-n+2) {
        grid-column: span 1;
    }

    .project-card {
        height: 50vh;
    }
}

@media (max-width: 992px) {
    .banner-content h1 {
        font-size: 4rem;
        margin-bottom: 2rem;
    }

    .banner-content p {
        font-size: 1.2rem;
    }

    .project-content h3 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .project-grid {
        width: 80%;
        gap: 35px;
    }

    .project-card {
        height: 45vh;
    }
}

@media (max-width: 768px) {
    .banner-content h1 {
        font-size: 3.5rem;
        margin-bottom: 1.8rem;
    }

    .banner-content p {
        font-size: 1.1rem;
    }

    .project-content h3 {
        font-size: 2.2rem;
        margin-bottom: 0.8rem;
        letter-spacing: 1px;
    }

    .tag {
        font-size: 0.85rem;
        padding: 4px 8px;
    }

    .project-grid {
        width: 85%;
        gap: 30px;
        padding: 0 20px;
    }

    .project-card {
        height: 40vh;
    }
}

@media (max-width: 480px) {
    .banner-content h1 {
        font-size: 3rem;
        margin-bottom: 1.5rem;
    }

    .banner-content p {
        font-size: 1rem;
    }

    .project-content h3 {
        font-size: 2rem;
        margin-bottom: 0.6rem;
        letter-spacing: 0.5px;
    }

    .tag {
        font-size: 0.8rem;
        padding: 3px 6px;
    }

    .project-grid {
        width: 90%;
        gap: 25px;
        padding: 0 15px;
    }

    .project-card {
        height: 35vh;
    }

    .banner-scroll {
        font-size: 0.9rem;
    }
}








/* 需要添加到 projects.css 文件中 */
 /* 过滤器容器样式 */

 
 .filter-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.filter-title {
    color: #bbbbbb;
    font-weight: 500;
    margin-right: 10px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0 auto;
}

/* 基本按钮样式 */
.filter-tag {
    /* 确保基础样式 */
    margin: 0 8px;
    color: white;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    user-select: none;
}

/* 确保悬停效果 */
.filter-tag:hover {
    background-color: var(--filter-color) !important;
    color: white !important;
    border-color: var(--filter-color) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 确保激活状态 */
.filter-tag.active {
    background-color: transparent !important;
    color: white !important;
    border-color: white !important;
}

/* 全部按钮颜色 */
.filter-tag[data-tag="all"] {
    --filter-color: #333;
}

/* 按钮按下效果 */
.filter-tag:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* 项目卡片过渡 */
.project-card {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 修改filter-wrapper样式 */
.filter-wrapper {
    position: -webkit-sticky; /* Safari兼容 */
    position: sticky;
    /* 在navbar下方固定 */
    top: 0px; /* 改为导航栏高度 */
    z-index: 999; /* 低于导航栏但高于其他内容 */
    background-color: rgb(61, 61, 61);
    padding: 20px 0;
    margin-top: 0; /* 移除负边距 */
    transition: all 0.3s ease;
    width: 100%;
}

/* 移除或修改以下样式，因为它们可能与新布局冲突 */
.filter-wrapper.sticky {
    background-color: rgba(61, 61, 61, 0.95);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.2);
}

.filter-wrapper.fixed {
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    background-color: rgba(61, 61, 61, 0.95);
}