/* ========================================
   企牛云 - 公共样式文件
   ======================================== */

/* 全局重置与变量 */
* {
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0066ff;
    --primary-light: #e6f0ff;
    --primary-dark: #0052d6;
    --dark: #0a192f;
    --dark2: #112240;
    --light: #f0f7ff;
    --gray-bg: #f8f9fa;
}

/* ========================================
   导航栏
   ======================================== */
.navbar {
    background: var(--dark);
    padding: 15px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 999;
}

.nav-link {
    color: #ccd6f6 !important;
    position: relative;
}

.nav-link.active {
    color: #fff !important;
}

.nav-link.active::after {
    content: "";
    width: 60%;
    height: 2px;
    background: var(--primary);
    position: absolute;
    bottom: 0;
    left: 20%;
}

/* 导航下拉菜单（代运营服务） */
.nav-item.dropdown {
    position: relative;
}
.nav-item.dropdown .nav-link {
    cursor: pointer;
}
.nav-item.dropdown .nav-link::after {
    content: "▾";
    border: none;
    margin-left: 0.3em;
    font-size: 0.75em;
    vertical-align: middle;
    opacity: 0.7;
    transition: 0.2s;
}
.nav-item.dropdown:hover .nav-link::after {
    opacity: 1;
}
/* 下拉面板 */
.nav-item.dropdown .dropdown-menu {
    display: block;
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition: visibility 0s 0.25s, opacity 0.25s ease, transform 0.25s ease;
    position: absolute;
    top: 100%;
    left: 0;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 200px;
    background: #fff;
    z-index: 1000;
    overflow: hidden;
}
/* 顶部彩色装饰条 */
.nav-item.dropdown .dropdown-menu::before {
    content: "";
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    margin-bottom: 4px;
}
/* hover 时显示 */
.nav-item.dropdown:hover > .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition: visibility 0s, opacity 0.25s ease, transform 0.25s ease;
}
/* 下拉项 */
.nav-item.dropdown .dropdown-item {
    padding: 12px 22px;
    color: #333;
    font-size: 15px;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}
.nav-item.dropdown .dropdown-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
    transition: height 0.2s ease;
}
.nav-item.dropdown .dropdown-item:hover,
.nav-item.dropdown .dropdown-item:focus {
    background: var(--primary-light);
    color: var(--primary);
}
.nav-item.dropdown .dropdown-item:hover::before {
    height: 60%;
}
/* 子页面激活时，父级菜单高亮 */
.nav-item.dropdown.active-parent > .nav-link {
    color: #fff !important;
}

/* ========================================
   手机端导航优化
   ======================================== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        padding-top: 10px;
        padding-bottom: 10px;
    }
    /* 手机端激活下划线紧贴文字底部 */
    .navbar-nav .nav-link.active::after {
        bottom: 2px;
        left: 0;
        width: 100%;
    }
    /* 父级菜单已展开子项，不再叠加激活横线 */
    .navbar-nav .nav-item.dropdown.active-parent > .nav-link::after {
        display: none !important;
    }
    .navbar-nav .nav-link {
        padding: 8px 0 !important;
        line-height: 1.5;
    }
    /* 手机端下拉菜单默认展开 */
    .navbar-nav .dropdown-menu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 0 0 16px !important;
        margin: 0 !important;
        min-width: auto !important;
        background: transparent !important;
        overflow: visible !important;
        position: static !important;
    }
    .navbar-nav .nav-item.dropdown > .dropdown-menu::before {
        display: none !important;
    }
    .navbar-nav .dropdown-menu .dropdown-item {
        color: #ccd6f6 !important;
        padding: 8px 0 !important;
        font-size: 14px;
    }
    .navbar-nav .dropdown-menu .dropdown-item::before {
        display: none;
    }
    .navbar-nav .dropdown-menu .dropdown-item:hover {
        background: transparent !important;
        color: #fff !important;
    }
    .navbar-nav .nav-item.dropdown .nav-link::after {
        opacity: 0.5;
        font-size: 0.7em;
    }
}

/* ========================================
   页面顶部Banner（子页面通用）
   ======================================== */
.page-banner {
    margin-top: 76px;
    background: linear-gradient(135deg, var(--dark), var(--dark2));
    padding: 100px 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.page-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.14;
    z-index: 0;
}

.page-banner .container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.page-banner h1 {
    font-size: 44px;
    font-weight: 700;
    margin-bottom: 20px;
}

.page-banner .lead,
.page-banner p {
    max-width: 920px;
    margin: 0 auto;
    opacity: 0.92;
    font-size: 19px;
    line-height: 1.7;
}

/* ========================================
   通用区块
   ======================================== */
.section {
    padding: 80px 0;
}

.section-title {
    position: relative;
    margin-bottom: 45px;
    font-weight: bold;
}

.section-title.text-center::after {
    content: "";
    width: 60px;
    height: 3px;
    background: var(--primary);
    display: block;
    margin: 12px auto 0;
}

.section-title.text-start::after {
    content: "";
    width: 60px;
    height: 3px;
    background: var(--primary);
    display: block;
    margin: 12px 0 0 0;
}

/* ========================================
   卡片悬浮动效
   ======================================== */
.card-hover {
    transition: 0.3s ease all;
    border: 0;
    border-radius: 12px;
}

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(0, 102, 255, 0.13);
}

/* ========================================
   图片盒子通用
   ======================================== */
.img-box {
    width: 100%;
    min-height: 260px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 6px 24px rgba(0, 102, 255, 0.08);
}

.img-box-sm {
    min-height: 180px;
}

/* ========================================
   底部Footer
   ======================================== */
.footer {
    background: var(--dark);
    color: #a8b2d1;
    padding: 60px 0 20px;
    margin-top: 40px;
}

.footer a {
    color: #ccd6f6;
    text-decoration: none;
}

/* ========================================
   按钮样式
   ======================================== */
.btn-primary {
    background: var(--primary);
    border: none;
    padding: 12px 30px;
}

.btn-primary:hover {
    background: #0052d9;
}

.btn-outline-light {
    border: 1px solid #fff;
    padding: 12px 30px;
}

/* ========================================
   流程步骤
   ======================================== */
.step-item {
    text-align: center;
    padding: 20px;
}

.step-num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-weight: bold;
}

/* ========================================
   右侧悬浮工具栏
   ======================================== */
.float-tool {
    position: fixed;
    right: 20px;
    bottom: 40px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.float-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    text-decoration: none;
}

.float-btn.wx {
    background: var(--primary);
    color: #fff;
}

/* ========================================
   弹窗
   ======================================== */
.modal-content {
    border-radius: 12px;
    border: 0;
}
