/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f9ff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* 让 body 至少占据整个视口高度 */
}

/* 头部导航栏样式 */
header {
    /*background-color: #007BFF;*/
    color: black;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 50px;
    height: 50px;
    margin-right: 10px;
}

.logo h1 {
    margin: 0;
    font-size: 24px;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    color: black;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 18px;
    /* 增大导航栏字体大小 */
    display: flex;
    align-items: center;
}

.nav-links a i {
    margin-right: 8px;
    /* 图标与文字之间的间距 */
}

.nav-links a:hover {
    color: #003366;
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px;
    transition: all 0.3s ease;
}

/* 主体内容样式 */
main {
    background-image: url('/images/smart-community1.jpg');
    background-size: cover;
    background-position: center;
    height: calc(100vh - 148px);
    display: flex;
    justify-content: center;

}


.hero {
    display: flex;
    flex-direction: column;
    /*justify-content: flex-end;*/
    text-align: center;
}

.hero-content {
    /*background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;*/
    padding: 20px;
    
}

.hero-content h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 16px;
    line-height: 1.6;
}

/* 底部样式 */
footer {
    background-color: rgba(208, 216, 230);
    color: rgba(124, 135, 153);
    text-align: center;
    padding: 10px 0;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .nav-links {
        position: absolute;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: #003366;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }

    .nav-links li {
        opacity: 0;
    }

    .burger {
        display: block;
    }
}

.nav-active {
    transform: translateX(0%);
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0px);
    }
}

.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}