@charset "utf-8";
/* CSS Document */


/* 头部菜单 */
header #nav>li .sub-menu>li>a {
    white-space: pre-line !important;
}

/* 回到顶部按钮样式 */
#back-to-top {
    position: fixed;
    bottom: 10%;
    right: 5%;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    z-index: 10000;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

#back-to-top:hover {
    background-color: #005bb5;
    transform: translateY(-3px);
}

#back-to-top .icon {
    width: 45px;
    height: 45px;
    display: block;
}

/* 悬浮窗整体 */
#floating-sidebar {
    position: fixed;
    top: 40%;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    align-items: flex-end;
}

/* 每个按钮 */
.sidebar-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-color: #0073e6;
    color: #fff;
    padding: 10px 12px;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    font-size: 14px;
    overflow: hidden;
    max-width: 45px;
    transition: max-width 0.4s ease;
    position: relative;
}

/* 图标 */
.sidebar-btn .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* 文字标签 */
.sidebar-btn .label {
    margin-left: 10px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    color: #fff;
}

/* 悬浮时文字显现 */
.sidebar-btn:hover {
    max-width: 380px;
    background-color: #005bb5;
}

.sidebar-btn:hover .label {
    opacity: 1;
    transform: translateX(0);
}

/* 弹出表单模态框 */
#sidebar-form-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s ease;
}

#sidebar-form-modal h3{
    margin-top:1rem;
}

#sidebar-form-modal .modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 25px;
    border-radius: 10px;
    width: 350px;
    max-width: 90%;
    animation: slideIn 0.3s ease;
}

#sidebar-form-modal input,
#sidebar-form-modal textarea {
    border-radius: 8px;
}

#sidebar-form-modal input[type="submit"] {
    padding: 5px;
}

#close-modal {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    transition: color 0.3s ease;
}

#close-modal:hover {
    color: #0073e6;
}

/* 动画 */
@keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }
@keyframes slideIn { from {transform: translateY(-30px); opacity: 0;} to {transform: translateY(0); opacity: 1;} }

/* 表单样式 */
#contact-form-container form label {
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
}
#contact-form-container form input,
#contact-form-container form textarea {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
}
#contact-form-container form input:submit {
    display: inline-block;
    padding: 6px 12px;
    background-color: #0073e6;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* 手机端 li 间距 */
@media (max-width: 992px) {
    #nav li {
        margin-bottom: 10px; /* 每个 li 之间的间距 */
    }
    #nav li:last-child {
        margin-bottom: 0; /* 最后一个不要多余间距 */
    }
}