/* gallery.css - 完整作品集样式 */

body {
    font-family: 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 2rem;
    text-align: center;
}

.back-home {
    display: inline-block;
    margin-top: 10px;
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.back-home:hover {
    color: #1abc9c;
}

.full-gallery-container {
    padding: 30px;
    max-width: 1600px;
    margin: 0 auto;
}

.full-gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    justify-items: center;
}

.photo-item {
    width: 100%; /* 改为百分比宽度 */
    aspect-ratio: 1/1; /* 保持正方形比例 */
    max-width: 300px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.scaled-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.5s;
}

.gallery-photo {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 每行5列 */
    gap: 20px;
    padding: 15px;
    justify-items: center;
}

.photo-item:hover .gallery-photo {
    opacity: 1;
}

.photo-caption {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    background: rgba(0,0,0,0.7);
    padding: 8px;
    font-size: 14px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    overflow: auto;
}

.modal-content {
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#caption {
    margin: 15px auto;
    color: #fff;
    text-align: center;
    width: 80%;
    font-size: 16px;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #bbb;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .full-gallery {
        grid-template-columns: repeat(auto-fill, minmax(23%, 1fr));
    }
}

@media (max-width: 900px) {
    .full-gallery {
        grid-template-columns: repeat(auto-fill, minmax(30%, 1fr));
    }
}

@media (max-width: 600px) {
    .full-gallery {
        grid-template-columns: repeat(auto-fill, minmax(45%, 1fr));
    }
    
    .photo-caption {
        font-size: 12px;
        padding: 5px;
    }
}