/* 导航样式 */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    padding: 15px 5%;
}

.container {
    width: 100%;
    /*max-width: 1200px;*/
    margin: 0 auto;
    padding: 0 20px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* padding: 15px 0; */
}

.logo {
    display: flex;
    align-items: center;
}

.logo h1 {
    color: #2c3e50;
    font-size: 24px;
    margin-left: 10px;
}

.logo-icon {
    color: #3498db;
    font-size: 28px;
}

/* 导航菜单 */
.main-menu {
    display: flex;
    list-style: none;
}

.main-menu li {
    position: relative;
}

.main-menu>li>a {
    display: block;
    padding: 10px 15px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 4px;
    margin: 0 5px;
}

.main-menu>li>a:hover {
    /*background: #00bcd1;*/
    background: #932f31;
    color: white !important;
}

/* 选中状态样式 */
.main-menu>li>a.active {
    /*color: #00bcd1;*/
    color: #932f31;
    font-weight: 600;
}

/* 二级下拉菜单 */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    width: 200px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.main-menu li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li {
    border-bottom: 1px solid #f1f1f1;
}

.sub-menu li:last-child {
    border-bottom: none;
}

.sub-menu a {
    display: block;
    padding: 12px 15px;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sub-menu a:hover,
.sub-menu a.active {
    /*background: #00bcd1;*/
    background: #932f31;
    color: white;
    padding-left: 20px;
}

/* 固定导航样式 */
.fixed-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    animation: slideDown 0.5s ease;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
    }

    .main-menu {
        margin-top: 20px;
        flex-direction: column;
        width: 100%;
    }

    .main-menu>li {
        width: 100%;
        text-align: center;
    }

    .main-menu>li>a {
        margin: 5px 0;
    }

    .sub-menu {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: none;
        background: #f8f9fa;
    }

    .main-menu li:hover .sub-menu {
        max-height: 300px;
    }
}

/** @section ToTop */
.ui-to-top {
    position: fixed;
    right: 15px;
    bottom: 55px;
    z-index: 100;
    width: 54px;
    height: 54px;
    font-size: 20px;
    line-height: 50px !important;
    color: #ffffff;
    background: #932f31;
    overflow: hidden;
    text-align: center;
    text-decoration: none;
    transition: 0.45s all ease-in-out;
    transform: translate3d(0, 145px, 0);
}

.ui-to-top:hover {
    color: #ffffff;
    background: #932f31;
    text-decoration: none;
}

.ui-to-top:focus {
    color: #ffffff;
}

.ui-to-top.active {
    transform: translate3d(0, 0, 0);
}