/* 公寓展示轮播样式 */
.apartment-gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.apartment-gallery-overlay.show {
    opacity: 1;
    visibility: visible;
}

.apartment-gallery-container {
    position: relative;
    width: 80%;
    max-width: 1000px;
    height: 90vh;
    max-height: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.apartment-gallery-image {
    width: 100%;
    height: 85%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f5f5f5;
}

.apartment-gallery-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.apartment-gallery-title {
    color: #fff;
    font-size: 24px;
    margin-top: 20px;
    text-align: center;
}

.apartment-gallery-nav {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 2001;
}

.gallery-nav-btn {
    background-color: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.gallery-nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.gallery-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 2002;
}

.gallery-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.gallery-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
}

/* 服务卡片中的查看公寓按钮 */
.view-apartments-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background-color: #0056b3;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
    cursor: pointer;
}

.view-apartments-btn:hover {
    background-color: #0056bf;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .apartment-gallery-container {
        width: 95%;
        height: 60vh;
    }
    
    .gallery-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .apartment-gallery-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .apartment-gallery-container {
        height: 50vh;
    }
    
    .gallery-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .apartment-gallery-title {
        font-size: 18px;
    }
}