/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

/* 导航栏核心样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-img {
    height: 30px;
}
.logo-text {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* 桌面端导航（默认显示） */
.desktop-nav {
    display: flex;
    gap: 20px; /* 缩小间距避免换行 */
    align-items: center;
}
.nav-item {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    padding: 5px 0;
}
.nav-item.active {
    color: #000;
    font-weight: bold;
    border-bottom: 2px solid #000;
}

/* 移动端导航按钮（默认隐藏） */
.mobile-nav-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    z-index: 20;
}
.mobile-nav-icon {
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
    position: relative;
    transition: all 0.3s ease;
}
.mobile-nav-icon::before,
.mobile-nav-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: #333;
    left: 0;
    transition: all 0.3s ease;
}
.mobile-nav-icon::before {
    top: -8px;
}
.mobile-nav-icon::after {
    bottom: -8px;
}
/* 导航按钮激活状态（叉号） */
.mobile-nav-btn.active .mobile-nav-icon {
    background: transparent;
}
.mobile-nav-btn.active .mobile-nav-icon::before {
    top: 0;
    transform: rotate(45deg);
}
.mobile-nav-btn.active .mobile-nav-icon::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* 移动端导航菜单（默认隐藏） */
.mobile-nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: #fff;
    padding: 80px 20px 20px;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 15;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto; /* 防止菜单项过多溢出 */
}
.mobile-nav-menu.show {
    transform: translateX(0);
}
.mobile-nav-item {
    text-decoration: none;
    color: #333;
    font-size: 18px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.mobile-nav-item.active {
    color: #000;
    font-weight: bold;
}

/* 轮播大图 */
.banner {
    position: relative;
    width: 100%;
    height: 550px;
    overflow: hidden;
}
.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}
.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 2;
}
.banner-title {
    font-size: 36px;
    margin-bottom: 15px;
}
.banner-subtitle {
    font-size: 24px;
    margin-bottom: 25px;
}
.banner-btn {
    padding: 10px 25px;
    background: #ffcc00;
    color: #000;
    font-weight: bold;
    display: inline-block;
}

/* 数字化模块 */
.service-wrap {
    margin-top: -60px;
    position: relative;
    z-index: 5;
}
.service {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    padding: 30px 5%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 0 5%;
    border-radius: 8px;
}
.service-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 20px;
    border-right: 1px solid #eee;
}
.service-item:last-child {
    border-right: none;
}
.service-icon-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.service-text h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
}
.service-text p {
    font-size: 14px;
    color: #666;
}

/* 电话咨询按钮（移动端显示） */
.service-call {
    width: 100%;
    margin-top: 20px;
    text-align: center;
    display: none;
}
.service-call-btn {
    padding: 12px 30px;
    background: #ffcc00;
    color: #000;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* 入口卡片（原有样式保留） */
.entrance {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 30px 5%;
}
.entrance-card {
    position: relative;
    width: 350px;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.entrance-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.entrance-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    font-weight: bold;
    transition: background 0.3s ease;
}
.entrance-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.entrance-card:hover .entrance-overlay {
    background: rgba(0,0,0,0.5);
}

/* 右侧浮动按钮 */
.float-buttons {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}
.float-btn {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}
.float-btn:hover {
    background: #f5f5f5;
}
.float-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}
.float-popup {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.float-popup.show {
    opacity: 1;
    visibility: visible;
}
.qrcode-popup img {
    width: 120px;
    height: 120px;
}
.tel-popup p, .addr-popup p {
    font-size: 16px;
    color: #333;
}

/* 页脚 */
.footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 20px 5%;
    font-size: 14px;
}
.footer p {
    margin-bottom: 8px;
}
.footer a {
    color: #fff;
    text-decoration: none;
}

/* 响应式适配（核心修正） */
@media (max-width: 768px) {
    /* 移动端隐藏桌面导航、显示移动端按钮 */
    .desktop-nav {
        display: none !important;
    }
    .mobile-nav-btn {
        display: flex;
    }

    /* 隐藏浮动按钮，显示电话咨询 */
    .float-buttons {
        display: none !important;
    }
    .service-call {
        display: block;
    }

    /* 导航栏适配手机 */
    .header {
        padding: 10px 3%; /* 缩小内边距 */
    }
    .logo-img {
        height: 26px; /* 缩小logo */
    }
    .logo-text {
        font-size: 16px;
    }

    /* 轮播图适配 */
    .banner {
        height: 250px;
    }
    .banner-title {
        font-size: 24px;
        color: #ffffff;
    }
    .banner-subtitle {
        font-size: 18px;
        color: #ffffff;
    }

    /* 数字化模块适配 */
    .service-wrap {
        margin-top: -30px;
    }
    .service {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    .service-item {
        border-right: none;
        padding: 10px 0;
        justify-content: flex-start;
    }
    .service-icon-img {
        width: 32px;
        height: 32px;
    }
    .service-text h3 {
        font-size: 16px;
    }
    .service-text p {
        font-size: 13px;
    }
    .service-call {
        margin-top: 15px;
    }
    .service-call-btn {
        width: 100%;
        justify-content: center;
    }

    /* 入口卡片适配 */
    .entrance {
        flex-wrap: wrap;
        gap: 15px;
        padding: 20px 5%;
    }
    .entrance-card {
        width: calc(50% - 7.5px);
        height: 150px;
    }
    .entrance-overlay {
        font-size: 20px;
    }
}

/* 针对iPhone XR等小屏手机的精细适配 */
@media (max-width: 414px) {
    .desktop-nav {
        gap: 15px; /* 进一步缩小桌面端导航间距 */
    }
    .nav-item {
        font-size: 14px; /* 缩小桌面端导航文字 */
    }
    .mobile-nav-menu {
        width: 250px; /* 缩小移动端菜单宽度 */
    }
    .banner-btn {
        padding: 8px 15px; /* 缩小按钮内边距 */
        font-size: 14px;
    }
}