/* 移动端响应式样式 - 头部优化 */

/* 移动端菜单按钮 - 现代化设计 */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    position: relative;
    backdrop-filter: blur(10px);
}

.mobile-menu-btn:hover {
    box-shadow: 0 4px 16px rgba(27, 81, 160, 0.15);
    transform: translateY(-1px);
}

.mobile-menu-btn:active {
    transform: scale(0.96);
}

.mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 2.5px;
    background: #1b51a0;
    margin: 4px auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
}

.mobile-menu-btn.active {
    background: #1b51a0;
    box-shadow: 0 4px 16px rgba(27, 81, 160, 0.3);
}

.mobile-menu-btn.active span {
    background: #fff;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* 移动端侧边菜单遮罩层 */
.mobile-sidebar-overlay {
    display: none;
}

/* 移动端侧边菜单 - 高级UI设计 */
.mobile-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    z-index: 999;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
}

.mobile-sidebar.active {
    left: 0;
}

/* 自定义滚动条 */
.mobile-sidebar::-webkit-scrollbar {
    width: 4px;
}

.mobile-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.mobile-sidebar::-webkit-scrollbar-thumb {
    background: rgba(27, 81, 160, 0.2);
    border-radius: 2px;
}

.mobile-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(27, 81, 160, 0.3);
}

/* 侧边栏头部 - 渐变设计 */
.mobile-sidebar-header {
    padding: 12px 24px 12px;
    background: linear-gradient(135deg, #1b51a0 0%, #2d6bc6 50%, #3880e9 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* 头部装饰背景 */
.mobile-sidebar-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.mobile-sidebar-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.mobile-sidebar-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

.mobile-sidebar-header h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: #fff;
    margin-right: 12px;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 侧边栏内容区 */
.mobile-sidebar-content {
    padding: 16px 0;
}

.mobile-sidebar-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-sidebar-content ul li {
    margin: 0 12px 8px;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.mobile-sidebar-content ul li:last-child {
    margin-bottom: 0;
}

/* 链接样式 - 卡片化设计 */
.mobile-sidebar-content ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* 链接前置图标 */
.mobile-sidebar-content ul li a::before {
    content: '';
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #3880e9 0%, #1b51a0 100%);
    border-radius: 50%;
    margin-right: 12px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* 悬停效果 */
.mobile-sidebar-content ul li a:hover {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f2ff 100%);
    color: #1b51a0;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(27, 81, 160, 0.12);
}

.mobile-sidebar-content ul li a:hover::before {
    width: 8px;
    height: 8px;
    box-shadow: 0 0 8px rgba(27, 81, 160, 0.4);
}

/* 激活状态 */
.mobile-sidebar-content ul li a:active {
    transform: translateX(2px) scale(0.98);
    background: linear-gradient(135deg, #e0f0ff 0%, #d0e7ff 100%);
}

/* 箭头图标 */
.mobile-sidebar-content ul li a::after {
    content: '›';
    font-size: 24px;
    color: #ccc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 300;
    flex-shrink: 0;
}

.mobile-sidebar-content ul li a:hover::after {
    color: #1b51a0;
    transform: translateX(4px);
}

/* 链接文字容器 */
.mobile-sidebar-content ul li a span {
    flex: 1;
    display: flex;
    align-items: center;
}

/* 平板设备 (768px - 1199px) */
@media screen and (max-width: 1199px) {
    .container {
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
    }

    .header .top-box {
        width: 100%;
        /* padding: 0 20px; */
        box-sizing: border-box;
    }

    .header .search-box .container {
        width: 100%;
        padding: 0 20px;
    }

    .header .search-items {
        width: 100%;
        padding: 0 20px 20px;
        box-sizing: border-box;
    }

    .search-items .item {
        width: 19%;
    }

    .search-items .item i {
        width: 45px;
        height: 45px;
        background-size: 225px 45px;
    }

    .search-items .item1 i { background-position: 0 0; }
    .search-items .item2 i { background-position: -45px 0; }
    .search-items .item3 i { background-position: -90px 0; }
    .search-items .item4 i { background-position: -135px 0; }
    .search-items .item5 i { background-position: -180px 0; }

    .search-items .item-txt p {
        font-size: 18px;
    }

    .search-items .sub-links {
        font-size: 13px;
    }

    .nav .container {
        width: 100%;
        padding: 0 10px;
    }

    .nav li {
        width: 16.66%;
    }

    .nav li a {
        font-size: 16px;
        padding-left: 50px;
    }

    .nav li span {
        left: 15px;
    }
}

/* 移动设备 (最大宽度 767px) */
@media screen and (max-width: 767px) {
    .header {
        height: auto;
        background: url(../images/top.png) no-repeat center center;
        background-size: cover;
        min-height: 100%;
        position: relative;
    }

    /* 显示移动端菜单按钮和侧边栏 */
    .mobile-menu-btn,
    .mobile-sidebar {
        display: block;
    }

    /* 顶部工具栏 - 移动端重新布局 */
    .header .m-top {
        height: auto;
        line-height: normal;
        padding: 8px 0;
        position: relative;
    }

    .header .top-box {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 15px;
        gap: 10px;
    }

    /* 左侧放置菜单按钮 */
    .header .m-top .fl {
        display: flex;
        align-items: center;
        width: auto;
    }

    .header .m-top .fl ul {
        display: none;
    }

    /* 右侧内容靠右显示 */
    .header .m-top .fr {
        width: auto;
        margin-left: auto;
        flex-shrink: 0;
    }

    .header .m-top .fr ul {
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 3px;
    }

    .header .m-top .fr ul li {
        font-size: 11px;
        white-space: nowrap;
    }

    .header .m-top .fr ul li:not(:last-child)::after {
        margin: 0 5px;
        font-size: 11px;
    }

    .header .m-top a,
    .header .m-top span {
        font-size: 11px;
    }

    .header .m-top .fr ul li img {
        width: 16px;
        height: 16px;
    }

    .header .ipv6-tag {
        width: 80px;
        height: 22px;
        line-height: 22px;
        font-size: 11px;
        margin-left: 3px;
        border-radius: 0 11px 11px 0;
    }

    /* Logo 和搜索区域 */
    .header .search-box {
        padding: 15px 0;
    }

    .header .search-box .container {
        padding: 0 15px;
    }

    .logo-area {
        margin-bottom: 15px;
        text-align: center;
    }

    .logo-area .u-logo {
        max-width: 280px;
        width: 80%;
    }

    /* 搜索框 */
    .searchbox {
        width: 100%;
        max-width: 400px;
        height: 40px;
        margin-bottom: 15px;
    }

    .searchbox .input-box {
        height: 40px;
    }

    .searchbox input {
        font-size: 14px;
        padding: 0 15px;
    }

    .searchbox .btn-box {
        height: 40px;
    }

    .searchbox .btn-box img {
        height: 40px;
    }

    /* 快捷服务图标 - 两排展示,不滑动 */
    .header .search-items {
        width: 100%;
        padding: 0 15px 15px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        overflow: visible;
        box-sizing: border-box;
    }

    .search-items .item {
        width: 100%;
        margin-bottom: 0;
        margin-right: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px 6px;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        box-sizing: border-box;
    }

    .search-items .item i {
        width: 40px;
        height: 40px;
        margin-right: 0;
        margin-bottom: 6px;
        background-size: 200px 40px;
        flex-shrink: 0;
    }

    .search-items .item1 i { background-position: 0 0; }
    .search-items .item2 i { background-position: -40px 0; }
    .search-items .item3 i { background-position: -80px 0; }
    .search-items .item4 i { background-position: -120px 0; }
    .search-items .item5 i { background-position: -160px 0; }

    .search-items .item-txt {
        text-align: center;
        width: 100%;
    }

    .search-items .item-txt p {
        font-size: 14px;
        margin-bottom: 5px;
        font-weight: 600;
        line-height: 1.2;
    }

    .search-items .sub-links {
        font-size: 11px;
        display: flex;
        flex-direction: column;
        gap: 3px;
        width: 100%;
        line-height: 1.3;
    }

    .search-items .sub-links a {
        display: block;
        padding: 2px 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .search-items .sub-links span {
        display: none;
    }

    /* 导航栏 - 横向滑动,使用精灵图 */
    .nav {
        height: 60px;
        overflow: hidden;
    }

    .nav .container {
        padding: 0;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav .container::-webkit-scrollbar {
        display: none;
    }

    .nav ul {
        display: flex;
        flex-wrap: nowrap;
        width: max-content;
        min-width: 100%;
    }

    .nav li {
        width: auto;
        min-width: 140px;
        height: 60px;
        flex-shrink: 0;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: none;
        display: inline-block;
    }

    .nav li:last-child {
        border-right: none;
    }

    .nav li a {
        color: #fff;
        font-size: 16px;
        line-height: 60px;
        width: 100%;
        height: 100%;
        display: block;
        padding-left: 60px;
        padding-right: 15px;
        position: relative;
        text-decoration: none;
        white-space: nowrap;
    }

    .nav li span {
        position: absolute;
        left: 20px;
        top: 18px;
        display: inline-block;
        height: 30px;
        background: url(../images/nav-icon.png) no-repeat;
    }

    .nav li .nav0 { background-position: -168px -2px; width: 24px; }
    .nav li .nav1 { background-position: 0 -2px; width: 24px; }
    .nav li .nav2 { width: 27px; background-position: -25px -2px; }
    .nav li .nav3 { width: 27px; background-position: -52px -2px; }
    .nav li .nav4 { width: 27px; background-position: -80px -2px; }
    .nav li .nav5 { width: 28px; background-position: -108px -2px; }

    .nav li:hover {
        background: #3880e9;
    }
}

/* 超小屏幕设备 (最大宽度 480px) */
@media screen and (max-width: 480px) {
    /* 顶部工具栏 */
    .header .top-box {
        padding: 0 10px;
    }

    .mobile-menu-btn {
        width: 26px;
        height: 26px;
    }

    .mobile-menu-btn span {
        width: 18px;
    }

    .header .m-top .fr ul li {
        font-size: 10px;
    }

    .header .m-top .fr ul li:not(:last-child)::after {
        margin: 0 3px;
    }

    .header .m-top a,
    .header .m-top span {
        font-size: 10px;
    }

    .header .ipv6-tag {
        width: 70px;
        height: 20px;
        line-height: 20px;
        font-size: 10px;
        border-radius: 0 10px 10px 0;
    }

    .header .m-top .fr ul li img {
        width: 14px;
        height: 14px;
    }

    .logo-area .u-logo {
        max-width: 240px;
    }

    /* 搜索框 */
    .searchbox {
        height: 38px;
    }

    .searchbox .input-box {
        height: 38px;
    }

    .searchbox input {
        font-size: 13px;
        padding: 0 12px;
    }

    .searchbox .btn-box {
        height: 38px;
    }

    .searchbox .btn-box img {
        height: 38px;
    }

    /* 快捷服务 */
    .header .search-items {
        padding: 0 10px 15px;
        gap: 8px;
    }

    .search-items .item {
        width: 100%;
        padding: 8px 4px;
    }

    .search-items .item i {
        width: 36px;
        height: 36px;
        margin-bottom: 5px;
        background-size: 180px 36px;
    }

    .search-items .item1 i { background-position: 0 0; }
    .search-items .item2 i { background-position: -36px 0; }
    .search-items .item3 i { background-position: -72px 0; }
    .search-items .item4 i { background-position: -108px 0; }
    .search-items .item5 i { background-position: -144px 0; }

    .search-items .item-txt p {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .search-items .sub-links {
        font-size: 11px;
        gap: 2px;
    }

    /* 导航栏 */
    .nav {
        height: 56px;
    }

    .nav li {
        min-width: 130px;
        height: 56px;
    }

    .nav li a {
        font-size: 15px;
        line-height: 56px;
        padding-left: 55px;
    }

    .nav li span {
        left: 18px;
        top: 16px;
    }
}

/* 横屏模式优化 */
@media screen and (max-width: 767px) and (orientation: landscape) {
    .header {
        background-size: cover;
        background-position: center center;
        min-height: 100%;
    }

    .header .m-top {
        padding: 5px 0;
    }

    .logo-area {
        margin-bottom: 10px;
    }

    .logo-area .u-logo {
        max-width: 200px;
    }

    .searchbox {
        margin-bottom: 10px;
    }

    .header .search-items {
        padding-bottom: 10px;
    }

    .search-items .item {
        padding: 6px 4px;
    }

    .nav {
        height: 52px;
    }

    .nav li {
        height: 52px;
        min-width: 120px;
    }

    .nav li a {
        line-height: 52px;
        font-size: 15px;
    }

    .nav li span {
        top: 14px;
    }
}

