/* 工地案例页面专用样式 */

/* 案例网格布局 */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.case-item {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.case-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.case-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.case-item:hover .case-image img {
    transform: scale(1.1);
}

.case-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 69, 19, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.case-item:hover .case-overlay {
    opacity: 1;
}

.case-overlay i {
    font-size: 2rem;
    color: white;
}

.case-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(139, 69, 19, 0.85);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    pointer-events: none;
}

.case-info {
    padding: 25px;
    text-align: center;
}

.case-info h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.case-info p {
    color: #666;
    font-size: 0.95rem;
}

/* 图片浏览模态框 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #8B4513;
}

.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: #fff;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    z-index: 2001;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(139, 69, 19, 0.7);
}

.modal-nav-btn:hover {
    background: rgba(139, 69, 19, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

.modal-caption {
    color: #fff;
    font-size: 1.2rem;
    margin-top: 15px;
    font-weight: 500;
}

.modal-counter {
    color: #bbb;
    font-size: 1rem;
    margin-top: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .cases-grid {
        grid-template-columns: 1fr;
    }

    .modal-nav-btn {
        font-size: 35px;
        width: 45px;
        height: 45px;
    }
    
    .modal-prev {
        left: 10px;
    }
    
    .modal-next {
        right: 10px;
    }
    
    .modal-close {
        font-size: 28px;
        top: 10px;
        right: 15px;
    }
}
