/**
 * Project Template Styles
 */

/* Archive Page Styles */
.projects-archive-hero {
    background-color: #f8fafc;
    padding: 5rem 0 3rem;
    position: relative;
    text-align: center;
}

.projects-archive-hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0), #fff);
}

.archive-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.archive-hero-content .section-tag {
    display: inline-block;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #5c8dff;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 5px;
}

.archive-hero-content .section-tag::after {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    background-color: #5c8dff;
    margin: 8px auto 0;
}

.archive-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #333;
    line-height: 1.2;
}

.archive-subtitle {
    font-size: 1.25rem;
    color: #718096;
    margin: 0 auto;
    max-width: 700px;
    line-height: 1.6;
}

.projects-archive-content {
    padding: 4rem 0;
}

.projects-filter {
    margin-bottom: 3rem;
    text-align: center;
}

.filter-toggle {
    display: inline-flex;
    background-color: #f1f5f9;
    border-radius: 50px;
    padding: 6px;
}

.filter-button {
    background: none;
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-button.active {
    background-color: #fff;
    color: #5c8dff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.filter-button:hover:not(.active) {
    color: #4a5568;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.project-card {
    background-color: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #edf2f7;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-image {
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* 当图片加载失败时的样式 */
.project-image img:not([src]), 
.project-image img[src=""], 
.project-image img.error, 
.project-image img[src$="1x1.gif"] {
    background-color: #e0e0e0;
    position: relative;
}

.project-image img:not([src])::before, 
.project-image img[src=""]::before, 
.project-image img.error::before, 
.project-image img[src$="1x1.gif"]::before {
    content: "Image is not available";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 16px;
    text-align: center;
    padding: 20px;
}

/* CSS备用方案：使用JavaScript失败的情况下 */
.project-image .img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e0e0e0;
    color: #666;
    font-size: 16px;
    text-align: center;
    height: 240px;
    width: 100%;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-badge.ongoing {
    background-color: rgba(46, 213, 115, 0.1);
    color: #2ed573;
}

.project-badge.completed {
    background-color: rgba(113, 128, 150, 0.1);
    color: #718096;
}

.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.project-title a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-title a:hover {
    color: #5c8dff;
}

.project-meta {
    display: flex;
    margin-bottom: 1rem;
}

.project-date {
    color: #718096;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.project-date i {
    margin-right: 0.5rem;
}

.project-excerpt {
    color: #718096;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    flex-grow: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    color: #5c8dff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    margin-top: auto;
}

.project-link i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.project-link:hover {
    color: #3366cc;
}

.project-link:hover i {
    transform: translateX(5px);
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 0.25rem;
    color: #718096;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination .page-numbers.current {
    background-color: #5c8dff;
    color: #fff;
}

.pagination .page-numbers:not(.current):hover {
    background-color: #f1f5f9;
    color: #4a5568;
}

.pagination .prev,
.pagination .next {
    font-size: 0.75rem;
}

.no-projects {
    text-align: center;
    padding: 3rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    color: #718096;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .archive-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .project-hero, .projects-archive-hero {
        padding-top: 6rem;
        padding: 6rem 0 2rem;
    }
    
    .projects-archive-hero {
        padding: 6rem 0 2rem;
    }
    
    .archive-title {
        font-size: 2rem;
    }
    
    .archive-subtitle {
        font-size: 1.125rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .filter-toggle {
        width: 100%;
        display: flex;
    }
    
    .filter-button {
        flex: 1;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .project-hero .project-title {
        font-size: 2rem;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .project-sidebar {
        position: static;
    }
    
    .related-projects {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .projects-archive-hero {
        padding: 3rem 0 1.5rem;
    }
    
    .archive-title {
        font-size: 1.75rem;
    }
    
    .archive-subtitle {
        font-size: 1rem;
    }
    
    .filter-toggle {
        flex-direction: column;
        background: none;
        padding: 0;
        gap: 0.5rem;
    }
    
    .filter-button {
        width: 100%;
        border-radius: 0.25rem;
    }
}

/* Project Single Page Styles */
.project-single {
    margin-bottom: 4rem;
}

/* Project Hero Section */
.project-hero {
    background-color: #f0f7ff;
    padding: 5rem 0 3rem;
    margin-bottom: 3rem;
    position: relative;
}

/* 确保project内容不会被header遮挡 */
.project-hero, .projects-archive-hero {
    padding-top: 7rem;
}

.project-hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, rgba(240, 247, 255, 0), #fff);
}

.project-hero-content {
    max-width: 900px;
}

.project-hero .section-tag {
    display: inline-block;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #5c8dff;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 5px;
}

.project-hero .section-tag::after {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    background-color: #5c8dff;
    margin: 8px 0 0;
}

.project-hero .project-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #1a202c;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.project-status {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.project-status.ongoing {
    background-color: rgba(46, 213, 115, 0.15);
    color: #1db954;
}

.project-status.ongoing::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #1db954;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(29, 185, 84, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(29, 185, 84, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(29, 185, 84, 0);
    }
}

.project-status.completed {
    background-color: rgba(113, 128, 150, 0.15);
    color: #4a5568;
}

.project-date, .project-timeline {
    color: #718096;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.project-date i, .project-timeline i {
    margin-right: 0.5rem;
    color: #5c8dff;
}

/* Project Content */
.project-content-wrapper {
    margin-bottom: 4rem;
}

.project-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.project-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #4a5568;
}

.project-featured-image {
    margin-bottom: 2rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.project-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.project-featured-image:hover img {
    transform: scale(1.02);
}

.project-overview {
    margin-bottom: 3rem;
}

.project-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #edf2f7;
    position: relative;
}

.project-content h2::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: #5c8dff;
}

.project-section {
    margin-bottom: 3rem;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.gallery-item {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* Project Sidebar */
.project-sidebar {
    position: sticky;
    top: 2rem;
}

.sidebar-section {
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #edf2f7;
}

.sidebar-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #edf2f7;
}

.project-team {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.team-member {
    display: flex;
    align-items: center;
}

.team-member .member-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    width: 100%;
    transition: transform 0.3s ease;
}

.team-member .member-link:hover {
    transform: translateX(5px);
}

.member-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1rem;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.member-role {
    font-size: 0.875rem;
    color: #718096;
}

.project-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-details-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    flex-direction: column;
}

.project-details-list li:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #718096;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 1rem;
    color: #2d3748;
}

.publication-list, .download-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.publication-list li, .download-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #edf2f7;
}

.publication-list li:last-child, .download-list li:last-child {
    border-bottom: none;
}

.publication-link, .download-link {
    color: #5c8dff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.publication-link:hover, .download-link:hover {
    color: #3366cc;
}

.download-link i {
    margin-right: 0.5rem;
}

/* Related Projects */
.related-projects-section {
    background-color: #f8fafc;
    padding: 4rem 0;
    margin-top: 3rem;
}

.related-projects-section .section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 2rem;
    text-align: center;
}

.related-projects {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.related-project {
    background-color: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.related-project:hover {
    transform: translateY(-5px);
}

.related-project .project-image {
    display: block;
    overflow: hidden;
}

.related-project .project-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-project:hover .project-image img {
    transform: scale(1.05);
}

.related-project .project-title {
    padding: 1.5rem 1.5rem 0.5rem;
}

.related-project .project-title a {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-project .project-title a:hover {
    color: #5c8dff;
}

.related-project .project-excerpt {
    padding: 0 1.5rem 1rem;
    font-size: 0.9375rem;
    color: #718096;
    line-height: 1.6;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    padding: 0 1.5rem 1.5rem;
    color: #5c8dff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.3s ease;
}

.read-more-link i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.read-more-link:hover {
    color: #3366cc;
}

.read-more-link:hover i {
    transform: translateX(5px);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .project-hero .project-title {
        font-size: 2.5rem;
    }
    
    .project-grid {
        grid-template-columns: 1.5fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    .project-hero {
        padding: 3rem 0 1.5rem;
    }
    
    .project-hero .project-title {
        font-size: 1.75rem;
    }
    
    .project-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .project-gallery {
        grid-template-columns: 1fr;
    }
    
    .related-projects {
        grid-template-columns: 1fr;
    }
}

/* 不同上下文中的图片占位符样式 */

/* 项目卡片中的占位符 */
.project-image .img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e0e0e0;
    color: #666;
    font-size: 16px;
    text-align: center;
    height: 240px;
    width: 100%;
}

/* 项目详情页特色图片的占位符 */
.project-featured-image .img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e0e0e0;
    color: #666;
    font-size: 18px;
    text-align: center;
    height: 400px;
    width: 100%;
    border-radius: 8px;
}

/* 项目画廊中的占位符 */
.gallery-item .img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e0e0e0;
    color: #666;
    font-size: 14px;
    text-align: center;
    height: 150px;
    width: 100%;
    border-radius: 4px;
}

/* 团队成员图片的占位符 */
.member-image .img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e0e0e0;
    color: #666;
    font-size: 12px;
    text-align: center;
    height: 80px;
    width: 80px;
    border-radius: 50%;
    padding: 8px;
    line-height: 1.2;
}

/* 相关项目中的占位符 */
.related-project .project-image .img-placeholder {
    height: 200px;
    border-radius: 6px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .project-featured-image .img-placeholder {
        height: 300px;
        font-size: 16px;
    }
    
    .gallery-item .img-placeholder {
        height: 120px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .project-image .img-placeholder {
        height: 180px;
        font-size: 14px;
    }
    
    .project-featured-image .img-placeholder {
        height: 200px;
    }
    
    .member-image .img-placeholder {
        height: 60px;
        width: 60px;
        font-size: 10px;
    }
}

/* 轮播样式 */
.projects-carousel {
    margin-bottom: 3rem;
    position: relative;
}

.carousel-container {
    overflow: hidden;
    position: relative;
    margin-bottom: 1.5rem;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    padding: 0 1rem;
    transition: all 0.3s ease;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.carousel-control {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    color: #5c8dff;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-control:hover {
    background-color: #5c8dff;
    color: #fff;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #cbd5e0;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background-color: #5c8dff;
    transform: scale(1.3);
}

.carousel-dot:hover:not(.active) {
    background-color: #a0aec0;
} 