/* 动画效果样式 */

/* 淡入效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 向上滑入效果 */
@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 向右滑入效果 */
@keyframes slideRight {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 向左滑入效果 */
@keyframes slideLeft {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 缩放效果 */
@keyframes scale {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 应用动画到元素 */
.banner-content h1 {
    animation: slideUp 1s ease-out;
}

.banner-content p {
    animation: slideUp 1s ease-out 0.3s;
    animation-fill-mode: both;
}

.banner-content .btn {
    animation: slideUp 1s ease-out 0.6s;
    animation-fill-mode: both;
}

.section-title {
    animation: fadeIn 1.5s ease-out;
}

.service-card {
    animation: scale 0.8s ease-out;
}

.about-text {
    animation: slideRight 1s ease-out;
}

.about-image {
    animation: slideLeft 1s ease-out;
}

.team-member {
    animation: fadeIn 1s ease-out;
}

.contact-info {
    animation: slideRight 1s ease-out;
}

.contact-form {
    animation: slideLeft 1s ease-out;
}

/* 悬停动画效果 */
.btn, .submit-btn, .view-apartments-btn {
    transition: transform 0.3s, background-color 0.3s, box-shadow 0.3s;
}

.btn:hover, .submit-btn:hover, .view-apartments-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.service-card {
    transition: transform 0.5s, box-shadow 0.5s;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.team-member {
    transition: transform 0.5s;
}

.team-member:hover {
    transform: translateY(-10px);
}

.social-links a {
    transition: color 0.3s, transform 0.3s;
}

.social-links a:hover {
    transform: scale(1.2);
}

/* 公寓展示动画 */
.apartment-gallery-overlay {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.apartment-gallery-image img {
    transition: transform 0.5s ease;
}

.apartment-gallery-image:hover img {
    transform: scale(1.05);
}

.gallery-nav-btn, .gallery-close-btn {
    transition: background-color 0.3s, transform 0.3s;
}

.gallery-nav-btn:hover, .gallery-close-btn:hover {
    transform: scale(1.1);
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loading.hide {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0056b3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}