﻿/* qy_mobile.css - 移动端样式文件（修正版） */
/* 版本: 2026.1 - 修复CSS嵌套错误 */
/* 移动端基础调整 */
@media screen and (max-width: 768px) {
    body {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
        background-color: #f8f8f8;
        -webkit-tap-highlight-color: rgba(0, 123, 255, 0.3);
    }
    
    .content {
        width: 100% !important;
        padding: 0 10px;
    }
    
    /* ============================================
       公司名称移动端优化（移到正确位置）
       ============================================ */
    .company-name {
        font-size: 62px !important; /* 移动端保持较大字体 */
        text-align: center;
        margin-bottom: 10px !important;
        flex-direction: column;
        color: #c00a27 !important; /* 保持红色主题 */
        line-height: 1.2;
    }
    
    .company-name-main {
        font-size: 1em !important;
        padding: 0 10px !important;
        color: #c00a27 !important;
        background: linear-gradient(135deg, #c00a27 0%, #ff2a2a 100%) !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        background-clip: text !important;
    }
    
    /* 移动端调整装饰线 */
    .company-name-main::before,
    .company-name-main::after {
        width: 30px !important;
    }
    
    .company-name-main::before {
        left: -40px !important;
    }
    
    .company-name-main::after {
        right: -40px !important;
    }
    
    .company-name-sub {
        font-size: 16px !important; /* 增大副标题 */
        padding: 5px 15px !important;
        margin-top: 8px !important;
        letter-spacing: 2px !important;
        color: #666 !important;
    }
    
    #header {
        padding: 15px 0 !important;
    }
    
    .company-info {
        flex-direction: column !important;
        text-align: center !important;
        gap: 15px !important;
    }
    
    .company-logo img {
        width: 100px !important;
        height: 100px !important;
        cursor: pointer;
    }
    
    .company-contact {
        flex-direction: column !important;
        gap: 10px !important;
        align-items: center !important;
    }
    
    .contact-item {
        justify-content: center !important;
        color: #555;
        font-size: 14px;
    }
    
    .contact-item.phone-clickable {
        cursor: pointer;
    }
    
    .contact-item.phone-clickable:hover {
        color: #007bff;
    }
    
    .contact-item i {
        color: #007bff;
        font-style: normal;
        font-weight: bold;
    }
    
    /* 电话链接特殊样式 */
    a.tel-link {
        color: #007bff !important;
        text-decoration: none !important;
        font-weight: bold !important;
        display: inline-block !important;
        transition: color 0.3s ease !important;
        background: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }
    
    a.tel-link:hover, a.tel-link:active {
        color: #0056b3 !important;
        text-decoration: none !important;
        background: none !important;
        transform: none !important;
    }
    
    /* 页脚电话链接特殊处理 */
    #footer a.tel-link {
        color: #ffcc00 !important;
    }
    
    #footer a.tel-link:hover {
        color: #ff9900 !important;
        text-decoration: none !important;
    }
    
    /* 所有可点击放大图片的通用样式 */
    .clickable-image {
        cursor: pointer !important;
        transition: transform 0.3s ease !important;
        -webkit-tap-highlight-color: rgba(0, 123, 255, 0.3);
    }
    
    .clickable-image:hover {
        transform: scale(1.02) !important;
    }
    
    /* 轮播图特殊样式 - 确保可点击 */
    #jdt {
        border-radius: 6px !important;
        overflow: hidden !important;
    }
    
    #jdt img {
        cursor: pointer !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        -webkit-tap-highlight-color: rgba(0, 123, 255, 0.3);
    }
    
    #jdt p {
        margin: 0 !important;
    }
    
    #jdt_page {
        bottom: 8px !important;
        z-index: 10 !important;
    }
    
    #jdt_page a, #jdt_page strong {
        width: 10px !important;
        height: 10px !important;
        margin: 0 3px !important;
        cursor: pointer !important;
    }
    
    /* 主导航菜单 - 手机版优化为一行显示 */
    .mainMenu {
        padding: 10px 0 !important;
        background: linear-gradient(to bottom, #ffffff, #f0f0f0) !important;
        border-top: 1px solid #e0e0e0 !important;
        border-bottom: 1px solid #e0e0e0 !important;
    }
    
    .mainMenu .content {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0 5px !important;
        justify-content: flex-start !important;
        scrollbar-width: none !important;
    }
    
    .mainMenu .content::-webkit-scrollbar {
        display: none !important;
    }
    
    .mainMenu li {
        display: inline-block !important;
        width: auto !important;
        text-align: center !important;
        margin: 0 2px !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }
    
    .mainMenu li a {
        padding: 10px 15px !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 20px !important;
        background-color: #f8f9fa !important;
        font-size: 14px !important;
        display: inline-block !important;
        margin: 2px !important;
        min-width: 70px !important;
        color: #555 !important;
        font-weight: bold !important;
        transition: all 0.3s ease !important;
    }
    
    .mainMenu li a:hover {
        background-color: #e9ecef !important;
        color: #007bff !important;
    }
    
    .mainMenu li.xz a {
        background-color: #007bff !important;
        color: #fff !important;
        border-color: #007bff !important;
    }
    
    /* 当菜单项较少时（如3个），居中显示 */
    .mainMenu .content.three-items {
        justify-content: center !important;
    }
    
    /* 二列布局移动端调整为单列 */
    .layout-container {
        flex-direction: column;
        gap: 10px;
        margin: 15px 0 !important;
    }
    
    .mainLeft, .mainRight {
        width: 100% !important;
    }
    
    .mainLeft {
        order: 2;
        flex: 0 0 auto !important;
    }
    
    .mainRight {
        order: 1;
    }
    
    /* 通用盒子样式调整 */
    .box {
        background-color: #fff;
        border-radius: 8px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
        margin-bottom: 15px !important;
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .box:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12) !important;
    }
    
    .box h2 {
        background: linear-gradient(to right, #007bff, #0056b3) !important;
        color: #fff !important;
        padding: 12px 15px !important;
        font-size: 16px !important;
        font-weight: bold !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
        margin: 0 !important;
    }
    
    .box_txt, .box_nr, .box_lx {
        padding: 15px !important;
        line-height: 1.8 !important;
    }
    
    .box_txt strong {
        display: block;
        margin: 10px 0;
        font-size: 16px;
        color: #007bff;
    }
    
    /* 联系我们模块 */
    .box_txt p img {
        max-width: 120px !important;
        margin: 0 auto 10px !important;
        display: block !important;
        cursor: pointer;
    }
    
    /* 子栏目列表 */
    .box_lb {
        padding: 10px !important;
    }
    
    .box_lb li {
        display: inline-block;
        margin-right: 8px;
        margin-bottom: 8px;
    }
    
    .box_lb li a {
        display: block;
        padding: 6px 12px !important;
        background-color: #f8f9fa;
        border-radius: 4px;
        border: 1px solid #e0e0e0;
        font-size: 13px !important;
    }
    
    .box_lb li a:hover {
        background-color: #e9ecef;
        border-color: #007bff;
    }
    
    .box_lb li.xz a {
        background-color: #007bff;
        color: #fff;
        border-color: #007bff;
    }
    
    /* 新闻列表 */
    .box_news {
        padding: 10px !important;
    }
    
    .box_news li {
        padding: 8px 0 !important;
        border-bottom: 1px dashed #e0e0e0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .box_news li:last-child {
        border-bottom: none;
    }
    
    .box_news li em {
        color: #999;
        font-size: 12px;
        font-style: normal;
        min-width: 70px;
        text-align: right;
    }
    
    .box_news li a {
        flex: 1;
        padding-right: 10px;
        color: #555;
        font-size: 14px;
    }
    
    .box_news li a:hover {
        color: #007bff;
    }
    
    /* 图片列表 - 增加点击放大功能 */
    .box_tp {
        padding: 10px !important;
        display: flex;
        flex-wrap: wrap;
        gap: 10px !important;
    }
    
    .box_tp li {
        flex: 0 0 calc(50% - 5px) !important;
        background-color: #f8f9fa;
        border-radius: 6px;
        overflow: hidden;
        transition: transform 0.3s ease;
    }
    
    .box_tp li:hover {
        transform: translateY(-3px);
    }
    
    .box_tp li a {
        display: block;
        padding: 8px;
        text-align: center;
    }
    
    .box_tp li img {
        border-radius: 4px;
        margin-bottom: 8px;
        width: 100%;
        height: 150px;
        object-fit: cover;
        cursor: pointer;
    }
    
    .box_tp li p {
        color: #fff !important; /* 改为白色 */
        background: rgba(255, 51, 51, 0.8); /* 红色背景 */
        font-weight: bold;
        margin-top: 5px;
        font-size: 14px;
        padding: 3px 8px;
        border-radius: 4px;
    }
    
    /* 分类广告样式 */
    .box_classad {
        padding: 10px !important;
    }
    
    .box_classad dt {
        padding: 8px 0 !important;
        border-bottom: 1px solid #f0f0f0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .box_classad dt .date {
        color: #999;
        font-size: 11px !important;
        min-width: 60px;
    }
    
    .box_classad dt a {
        flex: 1;
        padding: 0 10px !important;
        color: #555;
        font-weight: bold;
        font-size: 14px;
    }
    
    .box_classad dt a:hover {
        color: #007bff;
    }
    
    .box_classad dd {
        padding: 8px 0 10px 60px !important;
        color: #666;
        font-size: 12px !important;
        line-height: 1.6;
        border-bottom: 1px dashed #e0e0e0;
    }
    
    .box_classad dd:last-child {
        border-bottom: none;
    }
    
    /* 详细内容样式 */
    .box_sj {
        color: #999;
        font-size: 11px !important;
        padding: 8px 15px !important;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .box_dtp {
        padding: 10px !important;
        text-align: center;
    }
    
    .box_dtp img {
        max-height: 250px !important;
        object-fit: contain;
        cursor: pointer;
    }
    
    .box_jg {
        padding: 8px 15px !important;
        font-size: 18px !important;
        color: #fff !important; /* 改为白色 */
        background: #ff3333; /* 红色背景 */
        font-weight: bold;
        border-radius: 4px;
        text-align: center;
    }
    
    .box_nr {
        padding: 15px !important;
        line-height: 1.8 !important;
        text-align: justify;
        text-justify: inter-ideograph;
        font-size: 15px !important;
    }
    
    /* 表单样式 */
    .wenbenkuang, select.wenbenkuang {
        width: 100% !important;
        box-sizing: border-box;
        margin: 5px 0 !important;
        font-size: 16px;
        padding: 12px !important;
    }
    
    .go-wenbenkuang {
        width: 100% !important;
        padding: 15px !important;
        font-size: 16px;
    }
    
    /* 留言表单样式 */
    .box_lx {
        padding: 15px !important;
        line-height: 1.8;
        background-color: #f8f9fa;
        border-radius: 6px;
    }
    
    /* 验证码样式 */
    #yzimg {
        height: 44px !important;
        margin-left: 10px;
        cursor: pointer;
    }
    
    /* 分页样式 */
    .page {
        padding: 15px !important;
        text-align: center;
    }
    
    .page a, .page span {
        display: inline-block;
        padding: 8px 12px !important;
        margin: 2px !important;
        border: 1px solid #ddd;
        border-radius: 4px;
        color: #555;
        font-size: 14px;
        min-width: 36px;
    }
    
    .page a:hover {
        background-color: #007bff;
        color: #fff;
        border-color: #007bff;
    }
    
    .page span {
        background-color: #007bff;
        color: #fff;
        border-color: #007bff;
    }
    
    /* 页脚 */
    #footer {
        background: linear-gradient(to right, #007bff, #0056b3) !important;
        color: #fff;
        padding: 25px 10px !important;
        margin-top: 30px !important;
        text-align: center;
        font-size: 13px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        line-height: 1.6;
    }
    
    #footer a {
        color: white;
    }
    
    #footer a:hover {
         text-decoration: none; /* 去掉链接默认下划线 */
    }
    
    /* 页脚电话可点击 */
    #footer a[href^="tel:"] {
        color: white; !important;
        font-weight: bold !important;
        text-decoration: none !important;
    }
}

/* ============================================
   小屏幕手机（单独的媒体查询）
   ============================================ */
@media screen and (max-width: 480px) {
    /* 公司名称进一步调整 */
    .company-name {
        font-size: 48px !important; /* 小屏幕适当减小 */
    }
    
    .company-name-main {
        padding: 0 8px !important;
    }
    
    .company-name-main::before,
    .company-name-main::after {
        width: 20px !important;
        display: block !important; /* 小屏幕仍然显示 */
    }
    
    .company-name-main::before {
        left: -30px !important;
    }
    
    .company-name-main::after {
        right: -30px !important;
    }
    
    .company-name-sub {
        font-size: 14px !important;
        letter-spacing: 1px !important;
    }
    
    /* 轮播图在小屏幕上优化 */
    #jdt img {
        max-height: 200px !important;
    }
    
    .mainMenu li a {
        padding: 8px 12px !important;
        font-size: 13px !important;
        min-width: 60px !important;
    }
    
    /* 当只有3个菜单时，等宽显示 */
    .mainMenu .content:has(li:nth-child(3):last-child) {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px !important;
    }
    
    .mainMenu .content:has(li:nth-child(3):last-child) li {
        width: 100% !important;
        margin: 0 !important;
    }
    
    .mainMenu .content:has(li:nth-child(3):last-child) li a {
        width: 100% !important;
        box-sizing: border-box !important;
        text-align: center !important;
        padding: 10px 5px !important;
    }
    
    /* 内容区域进一步优化 */
    .company-logo img {
        width: 80px !important;
        height: 80px !important;
    }
    
    .contact-item {
        font-size: 13px !important;
    }
    
    .box h2 {
        font-size: 15px !important;
        padding: 10px 12px !important;
    }
    
    .box_tp li {
        flex: 0 0 100% !important;
        margin: 8px 0 !important;
    }
    
    .box_tp li img {
        height: 180px;
    }
    
    .box_news li em {
        font-size: 11px !important;
        min-width: 60px;
    }
    
    .box_news li a {
        font-size: 13px !important;
    }
    
    .box_classad dt a {
        font-size: 13px !important;
    }
    
    .box_classad dd {
        font-size: 11px !important;
        padding-left: 50px !important;
    }
    
    #footer {
        padding: 20px 8px !important;
        font-size: 12px !important;
    }
}

/* ============================================
   超小屏幕手机
   ============================================ */
@media screen and (max-width: 360px) {
    .company-name {
        font-size: 36px !important; /* 超小屏幕进一步减小 */
    }
    
    .company-name-main::before,
    .company-name-main::after {
        display: none !important; /* 超小屏幕隐藏装饰线 */
    }
    
    .company-name-sub {
        font-size: 12px !important;
    }
    
    /* 轮播图在超小屏幕上优化 */
    #jdt img {
        max-height: 180px !important;
    }
    
    .mainMenu li a {
        padding: 8px 10px !important;
        font-size: 12px !important;
        min-width: 55px !important;
    }
    
    /* 3个菜单时的特殊处理 */
    .mainMenu .content:has(li:nth-child(3):last-child) {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 3px !important;
    }
    
    .mainMenu .content:has(li:nth-child(3):last-child) li a {
        padding: 8px 3px !important;
        font-size: 11px !important;
    }
    
    .company-logo img {
        width: 70px !important;
        height: 70px !important;
    }
    
    .contact-item {
        font-size: 12px !important;
    }
    
    .box h2 {
        font-size: 14px !important;
        padding: 8px 10px !important;
    }
    
    .box_tp li img {
        height: 160px;
    }
    
    .box_nr {
        font-size: 14px !important;
        padding: 12px !important;
    }
    
    .wenbenkuang, select.wenbenkuang {
        padding: 10px !important;
        font-size: 15px;
    }
    
    #footer {
        font-size: 11px !important;
        padding: 18px 5px !important;
    }
}

/* 其余样式保持不变... */

/* 平板设备 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .content {
        width: 95% !important;
        max-width: 100%;
    }
    
    .mainLeft {
        flex: 0 0 35%;
    }
    
    .mainRight {
        flex: 1;
    }
    
    .box_tp li {
        flex: 0 0 calc(50% - 10px);
    }
    
    .company-name {
        font-size: 28px !important;
    }
    
    .company-logo img {
        width: 110px !important;
        height: 110px !important;
    }
    
    /* 平板上的菜单保持原有样式 */
    .mainMenu li {
        display: inline-block !important;
    }
    
    .mainMenu li a {
        padding: 15px 25px !important;
        border: none !important;
        border-radius: 4px !important;
        background: none !important;
        font-size: 16px !important;
    }
    
    .mainMenu li.xz a {
        background-color: #007bff !important;
        color: #fff !important;
    }
    
    /* 平板上的轮播图 */
    #jdt img {
        max-height: 400px !important;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    a, button, input, select, .mainMenu li a {
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    /* 图片点击区域优化 */
    .clickable-image {
        min-height: 44px !important;
    }
    
    /* 轮播图点击优化 */
    #jdt img {
        min-height: 150px !important;
        -webkit-tap-highlight-color: rgba(0, 123, 255, 0.3);
    }
    
    /* 电话链接在触摸设备上保持简洁 */
    a.tel-link {
        min-height: auto !important;
        line-height: normal !important;
        padding: 0 !important;
    }
    
    .mainMenu li a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 12px 15px !important;
    }
    
    .go-wenbenkuang:active,
    button:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .box_lb li a:active,
    .page a:active,
    .mainMenu li a:active {
        background-color: #e0e0e0;
    }
    
    .box_tp li:active {
        transform: translateY(-3px);
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    }
    
    /* 图片点击反馈 */
    .clickable-image:active,
    #jdt img:active {
        opacity: 0.9;
        transform: scale(0.98);
    }
    
    /* 改善表单输入体验 */
    input, textarea, select {
        font-size: 16px !important; /* 防止iOS缩放 */
    }
}

/* 防止移动端横屏时内容过宽 */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .content {
        max-width: 100% !important;
    }
    
    .mainMenu .content {
        justify-content: flex-start !important;
        overflow-x: auto !important;
    }
    
    .box_tp li {
        flex: 0 0 calc(33.333% - 10px) !important;
    }
    
    /* 横屏时轮播图优化 */
    #jdt img {
        max-height: 250px !important;
    }
}