/**
 * 移动端响应式样式文件
 * Mobile Responsive CSS
 * 适用于驰瑞电子网站移动端适配
 */

/* ============================================
   基础设置与重置
   ============================================ */

/* 移动端视口设置 */
@-ms-viewport {
    width: device-width;
}

@viewport {
    width: device-width;
}

/* 盒模型统一 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* 禁止文本缩放 */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* ============================================
   移动端断点定义
   ============================================ */

/* 
   断点说明：
   - xs: 320px - 575px (小屏手机)
   - sm: 576px - 767px (大屏手机)
   - md: 768px - 991px (平板)
   - lg: 992px - 1199px (小型桌面)
   - xl: 1200px+ (标准桌面)
*/

/* ============================================
   通用移动端工具类
   ============================================ */

/* 移动端隐藏/显示 */
@media (max-width: 991px) {
    .hidden-mobile {
        display: none !important;
    }
    
    .visible-mobile {
        display: block !important;
    }
    
    .visible-mobile-inline {
        display: inline !important;
    }
    
    .visible-mobile-inline-block {
        display: inline-block !important;
    }
}

@media (min-width: 992px) {
    .hidden-desktop {
        display: none !important;
    }
}

/* 移动端文本对齐 */
@media (max-width: 991px) {
    .text-center-mobile {
        text-align: center !important;
    }
    
    .text-left-mobile {
        text-align: left !important;
    }
    
    .text-right-mobile {
        text-align: right !important;
    }
}

/* ============================================
   小屏手机适配 (max-width: 575px)
   ============================================ */
@media screen and (max-width: 575px) {
    
    /* 容器宽度调整 */
    .c,
    .c2,
    .product_c,
    .cc {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* 字体大小调整 */
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 24px !important;
    }
    
    h2 {
        font-size: 20px !important;
    }
    
    h3 {
        font-size: 18px !important;
    }
    
    h4 {
        font-size: 16px !important;
    }
    
    p {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
}

/* ============================================
   手机适配 (max-width: 767px)
   ============================================ */
@media screen and (max-width: 767px) {
    
    /* 头部导航移动端适配 */
    .header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 999;
    }
    
    .header .header_cen {
        padding: 10px 15px !important;
        flex-wrap: nowrap !important;
    }
    
    .header .header_cen .logo a img {
        width: 120px !important;
        height: auto !important;
    }
    
    /* 移动端菜单按钮 */
    .header .header_cen .phone_menu_trigger {
        display: block !important;
        z-index: 1000;
    }
    
    /* 导航菜单隐藏 */
    .header .header_cen .header_c {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background: #fff;
        overflow-y: auto;
        padding: 20px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    }
    
    .header .header_cen .header_c.active {
        display: block;
    }
    
    .header .header_cen .header_c .header_item {
        display: block;
        margin: 0 !important;
        border-bottom: 1px solid #eee;
    }
    
    .header .header_cen .header_c .header_item .header_item_t a {
        color: #333 !important;
        font-size: 16px !important;
        line-height: 50px !important;
        display: block;
    }
    
    /* 下拉菜单适配 */
    .header .header_cen .header_c .header_item .header_item_b,
    .header .header_cen .header_c .header_item .header_item_c {
        position: static !important;
        display: none !important;
        box-shadow: none !important;
        padding: 10px 0 !important;
    }
    
    .header .header_cen .header_c .header_item.active .header_item_b,
    .header .header_cen .header_c .header_item.active .header_item_c {
        display: block !important;
    }
    
    /* 右侧图标区域 */
    .header .header_cen .header_r {
        display: none;
    }
    
    /* 首页轮播图 */
    .c-banner1 .swiper-slide img {
        height: 300px !important;
        object-fit: cover;
    }
    
    .c-banner1 .swiper-slide .c-wrap .c-title {
        font-size: 24px !important;
    }
    
    .c-banner1 .swiper-slide .c-wrap .c-title1 {
        font-size: 12px !important;
        letter-spacing: 2px !important;
    }
    
    .c-banner1 .swiper-slide .c-wrap .c-title2 {
        font-size: 18px !important;
    }
    
    .c-banner1 .swiper-slide .c-wrap .hr {
        margin-top: 20px !important;
    }
    
    /* 首页产品区域 */
    .i_pro {
        padding: 60px 0 40px !important;
    }
    
    .i_pro .i_pro_l,
    .i_pro .i_pro_r {
        width: 100% !important;
        float: none !important;
    }
    
    .i_pro .i_pro_l {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .i_pro .i_pro_l h2,
    .i_pro .i_pro_l h3 {
        font-size: 24px !important;
    }
    
    .i_pro .i_pro_l .hr {
        margin: 10px auto !important;
    }
    
    .i_pro .i_pro_r .swiper-button-next,
    .i_pro .i_pro_r .swiper-button-prev {
        display: none !important;
    }
    
    /* 产品列表 */
    .i_pro .i_pro_list1 .tp {
        height: 250px !important;
        line-height: 250px !important;
    }
    
    .i_pro .i_pro_list1 p {
        font-size: 16px !important;
        margin-top: 20px !important;
    }
    
    /* 下载区域 */
    .i_dow {
        padding: 40px 0 !important;
    }
    
    .i_dow .i_dow_l,
    .i_dow .i_dow_r {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
    }
    
    .i_dow .i_dow_l {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .i_dow .i_dow_l h2 {
        font-size: 24px !important;
    }
    
    .i_dow .i_dow_l .hr {
        margin: 15px auto !important;
    }
    
    .i_dow .i_dow_r .left,
    .i_dow .i_dow_r .right {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin-bottom: 10px;
    }
    
    .i_dow .i_dow_r ul {
        margin-top: 20px !important;
    }
    
    .i_dow .i_dow_r li {
        width: 100% !important;
        margin-bottom: 10px !important;
    }
    
    /* 关于我们 */
    .i_about {
        padding: 20px 0 !important;
    }
    
    .i_about .left,
    .i_about .right {
        width: 100% !important;
        float: none !important;
    }
    
    .i_about .left {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .i_about .left p {
        margin-top: 30px !important;
        font-size: 16px !important;
        line-height: 1.8 !important;
    }
    
    .i_about .right .right1 {
        font-size: 14px !important;
        line-height: 1.8 !important;
    }
    
    /* 核心数据展示 */
    .i_about .ab_hf .hf_1 {
        width: 50% !important;
        height: auto !important;
        margin-right: 0 !important;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .i_about .ab_hf .hf_1 span {
        font-size: 48px !important;
        float: none !important;
    }
    
    .i_about .ab_hf .hf_1 em {
        float: none !important;
        display: inline-block;
        margin-top: 10px !important;
    }
    
    /* 核心竞争力 */
    .core-competence {
        padding: 40px 0 !important;
    }
    
    .core-competence h2 {
        font-size: 24px !important;
    }
    
    .core-competence .tabs span {
        margin: 0px 10px !important;
    }
    
    .core-competence .mes-box {
        flex-direction: column !important;
    }
    
    .core-competence .mes-box .left,
    .core-competence .mes-box .right {
        flex: 0 0 100% !important;
        width: 100% !important;
        padding: 15px 0 !important;
    }
    
    .mes-list ul {
        flex-direction: column !important;
    }
    
    .mes-list li {
        width: 100% !important;
        margin: 10px 0 !important;
    }
    
    /* 解决方案 */
    .i_solution {
        padding: 60px 0 !important;
    }
    
    .i_solution_t .i_solution_t1 h2,
    .i_solution_t .i_solution_t1 h3 {
        font-size: 24px !important;
    }
    
    .i_solution li {
        width: 100% !important;
        height: 300px !important;
        float: none !important;
        margin-bottom: 15px;
    }
    
    .i_solution li .tp img {
        height: 300px !important;
    }
    
    .i_solution li .li_why {
        top: 200px !important;
        padding: 0 20px !important;
    }
    
    .i_solution li .li_why h2 {
        font-size: 18px !important;
    }
    
    .i_solution li:hover .li_why {
        top: 100px !important;
    }
    
    /* 留言区域 */
    .i_mess {
        height: auto !important;
        padding: 40px 0 !important;
    }
    
    .i_mess .i_mess_l,
    .i_mess .i_mess_r {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
    }
    
    .i_mess .i_mess_l {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .i_mess .i_mess_l h2 {
        font-size: 24px !important;
    }
    
    .i_mess .i_mess_l .hr {
        margin: 15px auto !important;
    }
    
    .i_mess .text1,
    .i_mess .code {
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 15px;
        float: none !important;
    }
    .i_mess .i_mess_r h4{
        font-size: 12px !important;
    }
    
    .i_mess .submit1 {
        width: 100% !important;
        float: none !important;
    }
    
    /* 合作伙伴 */
    .i_hz {
        padding: 60px 0 !important;
    }
    
    .i_hz_t .i_hz_t1 h2,
    .i_hz_t .i_hz_t1 h3 {
        font-size: 24px !important;
    }
    
    .news_5_1 ul li {
        width: 50% !important;
        margin-right: 0 !important;
        padding: 5px;
    }
    
    /* 新闻区域 */
    .i_news {
        padding: 40px 0 !important;
    }
    
    .i_news .i_news_l,
    .i_news .i_news_r {
        width: 100% !important;
        float: none !important;
        margin-top: 30px !important;
    }
    
    .i_news .i_news_l h2 .h2_1,
    .i_news .i_news_l .i_news_laa {
        font-size: 36px !important;
    }
    
    .i_news .i_news_r .tp {
        width: 100% !important;
        height: 200px !important;
        float: none !important;
        margin-bottom: 15px;
    }
    
    .i_news .i_news_r .tp img {
        height: 200px !important;
    }
    
    .i_news .i_news_r .i_news_r2 {
        width: 100% !important;
        height: auto !important;
        float: none !important;
    }
    
    /* 底部 */
    .footer .footer_1,
    .footer .footer_2 {
        width: 100% !important;
        float: none !important;
        margin-top: 40px !important;
    }
    
    .footer .footer_1 {
        text-align: center;
    }
    
    .footer .footer_2 li {
        width: 50% !important;
        margin-right: 0 !important;
        margin-bottom: 20px;
        padding: 0 10px;
    }
    
    .footer .footer_2 li:nth-child(1),
    .footer .footer_2 li:nth-child(2),
    .footer .footer_2 li:nth-child(3),
    .footer .footer_2 li:nth-child(4),
    .footer .footer_2 li:nth-child(5) {
        width: 50% !important;
    }
    
    .footer_3 {
        text-align: center;
        padding: 20px 15px !important;
    }
    
    .footer_3 img,
    .footer_3 span {
        float: none !important;
        display: inline-block;
        margin: 5px;
    }
    
    /* 底部图标 */
    .footer .icon {
        justify-content: center;
        margin-top: 20px !important;
    }
    
    /* 分页 */
    .page p span,
    .page p a,
    .page .current {
        padding: 8px 12px !important;
        font-size: 14px !important;
    }
    
    /* 列表页面 */
    .list-news {
        flex-direction: column !important;
        text-align: center;
    }
    
    .list-news .time {
        margin-right: 0 !important;
        border-right: none !important;
        border-bottom: 1px solid #eee;
        padding-bottom: 15px !important;
        margin-bottom: 15px;
    }
    
    .list-news .news {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .list-news .button {
        margin-top: 15px;
    }
    
    /* 产品列表 */
    .product-list .media {
        margin-bottom: 20px;
    }
    
    /* 文章详情 */
    .article .post h1 {
        font-size: 20px !important;
    }
    
    .article .post p {
        font-size: 14px !important;
        line-height: 1.8 !important;
        margin-bottom: 15px !important;
    }
    
    /* 路径导航 */
    .nav-bread {
        height: 50px !important;
        line-height: 50px !important;
    }
    
    .nav-bread h2 {
        font-size: 18px !important;
    }
    .footer .footer_1 h3 {
        display: none;
    }
    .footer .footer_1 li .li_l {
        display: none;
    }
    .footer .footer_1 li .li_r{
        font-size: 24px;
    }
    .header .header_cen .header_c .header_item .header_item_b .center .l {
        width: 100%;
        padding: .625rem .9375rem;
        border-right: 0;
        border-bottom: 1px solid #e5e5e5;
    }
    .header .header_cen .header_c .header_item .header_item_b .center .r {
        width: 100%;
        padding: .625rem .9375rem;
    }
    .a_menu .ab_hf .hf_1 span {
        font-size: 40px !important;
    }
    .a_menu .ab_hf .hf_1{
        width: 46% !important;
        height: 60px !important;
        float: left;
        margin-right: 2% !important;
    }
    .a_menu .ab_hf .hf_1 em {
        margin-top: 0px !important;
    }
    .a_menu {
        margin-top: -770px !important;
        height: 650px !important;
    }
    .a_menu .a_menu_c .content {
        font-size: 14px !important;
        height: 585px !important;
    }
    .a_list1 li {
        width: 100% !important;
        height: auto !important;
        margin-bottom: 30px;
    }
    .a_list1 li:nth-child(3) {
        margin-top: 0px !important;
        border-bottom: none;
    }
    .a_list1 li:nth-child(4) {
        margin-top: 0px !important;
        border-bottom: none;
    }
    .a_list2 .a_list2_t .right {
        width: 100% !important;
        float: left;
        font-size: 21px;
        color: #333;
        line-height: 30px !important;
        margin-top: 10px !important;
        margin-left: 0px !important;
    }
    .a_list2 li {
        width: 48% !important;
        height: 250px;
        padding: 20px 20px 10px 20px !important;
    }
    .a_list2 li .left {
        /* width: 48px; */
        float: none !important;
    }
    .a_list2 li .right {
        width: 100% !important;
        float: none !important;
    }
    .a_list2 li .right p {
        line-height: 24px !important;
        margin-top: 10px !important;
    }
    .a_list2 li .right h3 {
        margin-top: 10px;
    }
    .a_list2 li:nth-child(3n) {
        margin-right: 2% !important;
    }
}

/* ============================================
   平板适配 (768px - 991px)
   ============================================ */
@media screen and (min-width: 768px) and (max-width: 991px) {
    
    /* 容器 */
    .c,
    .c2,
    .product_c,
    .cc {
        max-width: 720px !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* 头部 */
    .header .header_cen {
        padding: 15px 20px !important;
    }
    
    .header .header_cen .logo a img {
        width: 150px !important;
    }
    
    .header .header_cen .header_c .header_item {
        margin: 0 1rem !important;
    }
    
    /* 首页产品 */
    .i_pro .i_pro_l {
        width: 100% !important;
        float: none !important;
        text-align: center;
        margin-bottom: 30px;
    }
    
    .i_pro .i_pro_r {
        width: 100% !important;
        float: none !important;
    }
    
    /* 关于我们 */
    .i_about .left {
        width: 100% !important;
        float: none !important;
        text-align: center;
        margin-bottom: 30px;
    }
    
    .i_about .right {
        width: 100% !important;
        float: none !important;
    }
    
    .i_about .ab_hf .hf_1 {
        width: 48% !important;
        margin-right: 4% !important;
    }
    
    .i_about .ab_hf .hf_1:nth-child(2n) {
        margin-right: 0 !important;
    }
    
    /* 解决方案 */
    .i_solution li {
        width: 50% !important;
        height: 350px !important;
    }
    
    .i_solution li .tp img {
        height: 350px !important;
    }
    
    /* 留言 */
    .i_mess .i_mess_l,
    .i_mess .i_mess_r {
        width: 100% !important;
        float: none !important;
    }
    
    .i_mess .i_mess_l {
        text-align: center;
        margin-bottom: 30px;
    }
    
    /* 底部 */
    .footer .footer_1 {
        width: 100% !important;
        float: none !important;
        text-align: center;
        margin-bottom: 30px;
    }
    
    .footer .footer_2 {
        width: 100% !important;
        float: none !important;
    }
    
    .footer .footer_2 li {
        width: 33.33% !important;
    }
    
    .footer .footer_2 li:nth-child(1),
    .footer .footer_2 li:nth-child(2),
    .footer .footer_2 li:nth-child(3),
    .footer .footer_2 li:nth-child(4),
    .footer .footer_2 li:nth-child(5) {
        width: 33.33% !important;
    }
}

/* ============================================
   小型桌面适配 (992px - 1199px)
   ============================================ */
@media screen and (min-width: 992px) and (max-width: 1199px) {
    
    .c {
        max-width: 960px !important;
    }
    
    .c2 {
        max-width: 900px !important;
    }
    
    .product_c {
        max-width: 900px !important;
    }
    
    /* 头部 */
    .header .header_cen .header_c .header_item {
        margin: 0 1.5rem !important;
    }
    
    /* 解决方案 */
    .i_solution li {
        width: 50% !important;
    }
    
    /* 底部 */
    .footer .footer_1 {
        width: 30% !important;
    }
    
    .footer .footer_2 {
        width: 65% !important;
    }
    
    .footer .footer_2 li {
        width: 20% !important;
    }
}

/* ============================================
   触摸设备优化
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    
    /* 移除hover效果 */
    .i_pro .i_pro_list1 .swiper-slide:hover .tp img,
    .i_solution li:hover .tp img,
    .i_news .i_news_l .tp:hover img,
    .i_news .i_news_r .swiper-slide:hover .tp img {
        transform: none !important;
    }
    
    .i_solution li .li_why {
        top: auto !important;
        bottom: 0 !important;
        background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
        padding: 20px !important;
    }
    
    .i_solution li .li_why h4,
    .i_solution li .li_why .more {
        display: block !important;
    }
    
    /* 增大点击区域 */
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* 表单元素 */
    input, select, textarea {
        font-size: 16px !important; /* 防止iOS缩放 */
    }
}

/* ============================================
   横屏手机优化
   ============================================ */
@media screen and (max-width: 767px) and (orientation: landscape) {
    
    .c-banner1 .swiper-slide img {
        height: 250px !important;
    }
    
    .header .header_cen .header_c {
        height: calc(100vh - 50px);
    }
}

/* ============================================
   打印样式
   ============================================ */
@media print {
    .header,
    .footer,
    .phone_menu_trigger,
    .swiper-button-next,
    .swiper-button-prev,
    .swiper-pagination {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        text-decoration: underline;
    }
    
    .c, .c2, .product_c, .cc {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ============================================
   辅助功能
   ============================================ */

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    /* 如需暗色模式可在此添加 */
}

/* ============================================
   移动端菜单动画
   ============================================ */
.mobile-menu-open {
    overflow: hidden;
}

.mobile-menu-open .header .header_cen .header_c {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   图片响应式
   ============================================ */
img {
    max-width: 100%;
    height: auto;
}

/* 视频响应式 */
video, embed, iframe {
    max-width: 100%;
}

/* 表格响应式 */
@media screen and (max-width: 767px) {
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
