html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.video-background video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

header {
    min-height: 100vh;
    position: relative;
}

header .container {
    position: relative;
    z-index: 3;
}

/* 调整文字颜色和可见度 */
header .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

header .display-3,
header .badge {
    color: #fff;
}

/* 响应式调整 */
@media (max-width: 991.98px) {
    header {
        min-height: auto;
        padding: 6rem 0;
        overflow: hidden;
    }
    
    .video-background {
        height: 100%;
        width: 100vw;
    }
    
    header .row {
        text-align: center;
        margin-right: 0;
        margin-left: 0;
    }
    
    header .profile {
        margin-top: 3rem;
        max-width: 100%;
    }
}

@media (max-width: 767.98px) {
    header {
        padding: 4rem 0;
    }
    
    header .display-3 {
        font-size: 2.5rem;
    }
    
    header .fs-3 {
        font-size: 1.25rem !important;
    }
    
    .video-background video {
        height: 100%;
        width: 100%;
        object-fit: cover;
    }
}

@media (max-width: 575.98px) {
    header .btn {
        width: 100%;
        margin: 0.5rem 0;
    }
    
    header .d-grid {
        display: block !important;
    }
    
    header .profile {
        transform: none;
        width: 100%;
        height: auto;
        margin: 3rem auto 0;
    }
    
    header .profile .profile-img {
        max-width: 100%;
        height: auto;
        position: relative;
        left: 0;
        transform: none;
    }
    
    header .profile .dots-1,
    header .profile .dots-2,
    header .profile .dots-3,
    header .profile .dots-4 {
        display: none;
    }
} 

/* 固定导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 为固定导航腾出空间 */
main {
    padding-top: 76px; /* navbar的高度 */
}

/* 导航链接样式 */
.navbar .nav-link {
    position: relative;
    transition: color 0.3s ease;
}

/* 当前活动项的样式 */
.navbar .nav-link.active {
    color: var(--bs-primary) !important;
}

/* 悬停效果 */
.navbar .nav-link:hover {
    color: var(--bs-primary) !important;
}

/* 下划线动画效果 */
.navbar .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--bs-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
    width: 100%;
} 

/* 企业文化卡片样式 */
#projects .card .d-flex {
    flex-direction: row;
    align-items: stretch;
}

#projects .card .img-fluid {
    width: 50%;
    object-fit: cover;
    height: 100%;
}

#projects .card .p-5 {
    width: 50%;
}

/* 响应式调整 */
@media (max-width: 991.98px) {
    #projects .card .d-flex {
        flex-direction: column !important;
    }
    
    #projects .card .img-fluid {
        width: 100%;
        height: 300px;
        order: -1; /* 图片始终在上方 */
    }
    
    #projects .card .p-5 {
        width: 100%;
        padding: 2rem !important;
    }
}

@media (max-width: 767.98px) {
    #projects .card .img-fluid {
        height: 200px;
    }
    
    #projects .card .p-5 {
        padding: 1.5rem !important;
    }
    
    #projects .card h2 {
        font-size: 1.5rem;
    }
    
    #projects .card p {
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    #projects .card .img-fluid {
        height: 180px;
    }
    
    #projects .card .p-5 {
        padding: 1rem !important;
    }
} 

/* 添加打字机效果的响应式样式 */
@media (max-width: 767.98px) {
    #typed-text {
        display: block !important;
        text-align: center !important;
        font-size: calc(1.5rem + 1.5vw) !important; /* 动态调整字体大小 */
        line-height: 1.2;
        margin: 0 auto;
        max-width: 90vw; /* 限制最大宽度 */
    }
    
    #typed-text span {
        display: inline-block !important;
        white-space: normal !important; /* 允许文字换行 */
        word-wrap: break-word;
    }
} 