/* 移动设备增强样式 */
@media (max-width: 992px) {
    /* 导航样式增强 */
    header {
        position: sticky;
        top: 0;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    /* 页面通用样式优化 */
    section {
        padding-top: 40px;
        padding-bottom: 40px;
    }
    
    /* 提高触摸区域友好性 */
    .btn, a, button {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 优化全局字体大小，提高可读性 */
    body {
        font-size: 16px;
    }

    /* 导航菜单优化 */
    header .container {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    nav {
        order: 3;
        width: 100%;
        margin-top: 15px;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
    }

    nav ul li {
        margin: 5px 0;
        width: 100%;
    }

    nav ul li a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 10px 15px;
    }

    /* 手机版联系信息调整 */
    .contact-info {
        padding: 10px 0;
    }
    
    /* 联系我们页面背景优化 */
    body.contact-page {
        background-size: cover;
        background-position: top center;
        background-repeat: no-repeat;
    }
    
    body.contact-page .page-banner {
        padding: 100px 0 60px;
    }
}

@media (max-width: 768px) {
    /* 更适合小屏幕的图像缩放 */
    .service-item img,
    .advantage-item .icon img,
    .partner-logo img {
        transition: transform 0.3s ease;
    }
    
    .service-item:hover img,
    .advantage-item:hover .icon img,
    .partner-logo:hover img {
        transform: scale(1.05);
    }
    
    /* 加强视觉层次，突出重要内容 */
    .section-title {
        margin-bottom: 25px;
    }
    
    /* 适应触摸屏的滑动行为 */
    .carousel-slide, 
    .carousel-track {
        touch-action: pan-y;
    }
    
    /* 增强轮播指示器的可见性 */
    .carousel-indicators .indicator {
        background-color: rgba(0, 0, 0, 0.3);
    }
    
    .carousel-indicators .indicator.active {
        background-color: #0056b3;
        transform: scale(1.2);
    }

    /* 优化服务网格布局 */
    .service-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* service-grid h3移动端样式 */
    .service-grid h3 {
        font-size: 20px;
        margin: 0 0 30px 0;
        padding: 15px 0;
        border-radius: 10px;
    }
    
    .service-grid h3::before {
        width: 50px;
        height: 2px;
        bottom: 6px;
    }

    /* 优化合作伙伴布局 */
    .partner-row {
        flex-wrap: wrap;
        justify-content: center;
    }

    .partner-logo {
        width: calc(50% - 20px);
        margin: 10px;
    }

    /* 页脚优化 */
    .footer-top {
        flex-direction: column;
        align-items: center;
    }

    .footer-logo {
        margin-bottom: 20px;
        justify-content: space-around;
        width: 100%;
    }
    
    .footer-logo p {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .qr-code {
        width: 85%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .qr-code img {
        width: 100px;
        height: 100px;
    }

    /* 优化主横幅内容 */
    .banner-content {
        width: 90%;
        left: 5%;
        text-align: center;
    }

    .banner-content h1, 
    .banner-content h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .banner-content .btn {
        padding: 12px 25px;
        font-size: 16px;
    }

    /* 世界地图优化 */
    .world-map {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .location-markers .marker {
        transform: scale(0.8);
    }
    
    /* 联系我们页面在移动端的进一步优化 */
    body.contact-page {
        background-size: cover;
        background-position: center top;
    }
    
    body.contact-page .page-banner {
        padding: 80px 0 40px;
    }

    /* company-stats移动端样式优化 */
    .company-stats {
        flex-direction: column;
        padding: 15px 10px;
    }
    
    .stat-item {
        width: 100%;
        margin: 8px 0;
        flex-direction: row;
        height: 80px;
    }
    
    .stat-content {
        flex: 1;
    }

    /* 联系我们页面图标的移动端优化 */
    .contact-icon {
        width: 36px;
        height: 36px;
        padding: 8px;
        margin-right: 12px;
    }
    
    .company-icon {
        width: 26px;
        height: 26px;
        padding: 5px;
    }
    
    .branch-icon {
        width: 22px;
        height: 22px;
        padding: 4px;
    }
    
    .location-icon {
        width: 18px;
        height: 18px;
        padding: 3px;
    }
    
    .branch-address {
        margin-top: 8px;
    }
}

/* 适配最小屏幕设备 */
@media (max-width: 576px) {
    /* 更紧凑的间距 */
    section {
        padding-top: 30px;
        padding-bottom: 30px;
    }
    
    /* 调整按钮大小和文本比例 */
    .btn {
        padding: 10px 20px;
        font-size: 15px;
    }
    
    /* 增强表单元素可用性 */
    input, select, textarea {
        font-size: 16px; /* 防止iOS自动缩放 */
        padding: 12px;
    }

    /* 超小屏幕上的优势网格 */
    .advantage-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* 进一步优化合作伙伴显示 */
    .partner-logo {
        width: calc(100% - 20px);
        max-width: 200px;
    }

    /* 优化小屏幕上的标题 */
    .section-title h2 {
        font-size: 22px;
    }

    .section-title h3 {
        font-size: 18px;
    }

    /* 调整横幅内容大小 */
    .banner-content h1, 
    .banner-content h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    /* 优化视频容器比例 */
    .video-container {
        padding-bottom: 60%; /* 更适合手机垂直显示 */
    }
    
    /* 联系我们页面在超小屏幕上的优化 */
    body.contact-page .page-banner {
        padding: 70px 0 30px;
    }
    
    body.contact-page .banner-title h1 {
        font-size: 24px;
    }

    .company-stats {
        border-radius: 10px;
    }
    
    .stat-item {
        padding: 15px 10px;
        height: 70px;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        padding: 8px;
        margin-right: 15px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .stat-desc {
        font-size: 14px;
    }

    .contact-item {
        margin-bottom: 15px;
    }
    
    .contact-icon {
        width: 32px;
        height: 32px;
        padding: 7px;
        margin-right: 10px;
    }
    
    .company-icon {
        width: 24px;
        height: 24px;
        padding: 4px;
    }
    
    .branch-icon {
        width: 20px;
        height: 20px;
        padding: 4px;
    }
    
    .location-icon {
        width: 16px;
        height: 16px;
        padding: 3px;
    }
    
    .branch-address {
        margin-top: 6px;
    }

    /* 资质荣誉部分移动端优化 */
    .year-honors {
        margin-top: 20px;
    }
    
    .honors-left, .honors-right {
        width: 100%;
    }
    
    .honors-list {
        padding: 15px;
    }
    
    .honors-list p {
        font-size: 13px;
        padding-left: 15px;
        margin-bottom: 10px;
    }
    
    .honors-list p:before {
        top: 7px;
        width: 5px;
        height: 5px;
    }
    
    .honor-box {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .honor-box span {
        font-size: 14px;
    }
    
    .honors-right {
        flex-direction: column;
        gap: 10px;
    }

    /* 联系我们页面在小屏幕上的优化 */
    .contact-main {
        padding: 30px 0;
    }
    
    .company-info, .branch-item {
        padding: 20px;
        margin-bottom: 20px;
        border-radius: 6px;
    }
    
    .company-info h2, .branch-item h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .contact-logo {
        height: 40px;
        margin-bottom: 15px;
    }
    
    .info-header {
        margin-bottom: 15px;
    }
    
    .contact-details {
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .contact-item, .branch-address {
        margin-bottom: 0;
    }
    
    .contact-text, .address-text {
        font-size: 14px;
    }
    
    .contact-icon, .location-icon {
        width: 32px;
        height: 32px;
        padding: 7px;
        margin-right: 10px;
    }
    
    .company-icon, .branch-icon {
        width: 22px;
        height: 22px;
        padding: 4px;
        margin-right: 8px;
    }
    
    .branch-offices {
        gap: 20px;
    }
}

/* 针对高像素密度设备优化图像 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* 考虑为高DPI设备提供较小的背景图 */
    .hero-banner,
    .advantage,
    .page-banner {
        background-size: cover;
        background-position: center;
    }
}

/* 针对暗色模式的优化 */
@media (prefers-color-scheme: dark) {
    /* 网站本身不启用暗色模式，但可以优化系统界面元素 */
    ::-webkit-scrollbar {
        width: 8px;
        background-color: #333;
    }
    
    ::-webkit-scrollbar-thumb {
        background-color: #555;
        border-radius: 4px;
    }
}

/* 针对横屏模式的优化 */
@media (orientation: landscape) and (max-width: 992px) {
    .hero-banner {
        height: 70vh;
    }
    
    .order-banner,
    .about-banner {
        height: 50vh;
    }
}

/* 移动导航菜单增强 */
@media (max-width: 768px) {
    /* 创建汉堡菜单样式 */
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        width: 30px;
        height: 30px;
        position: relative;
        cursor: pointer;
        z-index: 1001;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #0056b3;
        margin: 5px 0;
        transition: all 0.3s ease;
    }

    /* 默认隐藏导航菜单 */
    nav {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 15px;
        z-index: 1000;
    }

    /* 菜单打开时的样式 */
    nav.open {
        display: block;
        animation: slideDown 0.3s ease;
    }

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

/* 时间轴移动端样式 */
@media (max-width: 992px) {
    .timeline-container {
        margin-top: 40px;
        padding: 40px 20px;
        border-radius: 15px;
    }
    
    .timeline {
        padding: 0 15px;
    }
    
    .timeline::before {
        display: none; /* 在移动端隐藏中央时间线 */
    }
    
    .timeline-item {
        flex-direction: column !important;
        align-items: flex-start;
        margin-bottom: 50px;
        padding-left: 0; /* 移除左边距 */
        position: relative;
    }
    
    .timeline-year {
        flex: none;
        width: auto;
        margin: 0 0 20px 0;
        padding: 18px 25px;
        font-size: 18px;
        text-align: left;
        border-radius: 12px;
        box-shadow: 0 8px 25px rgba(0, 86, 179, 0.25);
        position: relative;
        overflow: visible;
    }
    
    .timeline-year:hover {
        transform: translateY(-3px) scale(1.02);
    }
    
    .timeline-content {
        width: 100%;
        margin: 0;
        padding: 30px;
        border-radius: 15px;
    }
    
    .timeline-content::before {
        display: none;
    }
    
    .timeline-content h4 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .timeline-content p {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    /* 移动端时间点位置调整 */
    .timeline-item .timeline-dot {
        top: 25px; /* 调整到年份标签的垂直中心 */
        transform: translateY(-50%);
    }
    
    .timeline-item:nth-child(odd) .timeline-dot {
        left: -12px;
    }
    
    .timeline-item:nth-child(even) .timeline-dot {
        right: -12px;
    }
    
    .timeline-dot::before {
        width: 6px;
        height: 6px;
    }
    
    .timeline-item:hover .timeline-dot {
        transform: translateY(-50%) scale(1.15);
        box-shadow: 0 0 0 10px rgba(0, 86, 179, 0.15);
    }
}

@media (max-width: 768px) {
    .timeline-container {
        margin-top: 30px;
        padding: 30px 15px;
        border-radius: 12px;
    }
    
    .timeline {
        padding: 0 10px;
    }
    
    .timeline-item {
        margin-bottom: 40px;
    }
    
    .timeline-year {
        padding: 15px 20px;
        font-size: 16px;
        margin-bottom: 15px;
        border-radius: 10px;
    }
    
    .timeline-content {
        padding: 25px;
        border-radius: 12px;
    }
    
    .timeline-content h4 {
        font-size: 16px;
        margin-bottom: 12px;
        padding-left: 15px;
    }
    
    .timeline-content h4::before {
        width: 3px;
        height: 16px;
    }
    
    .timeline-content p {
        font-size: 13px;
        margin-bottom: 8px;
        padding-left: 15px;
    }
    
    .timeline-dot {
        top: 20px;
        width: 18px;
        height: 18px;
        border: 3px solid #0056b3;
    }
    
    .timeline-item:nth-child(odd) .timeline-dot {
        left: -9px;
    }
    
    .timeline-item:nth-child(even) .timeline-dot {
        right: -9px;
    }
    
    .timeline-dot::before {
        width: 5px;
        height: 5px;
    }
}

@media (max-width: 576px) {
    .timeline-container {
        margin-top: 20px;
        padding: 25px 10px;
        border-radius: 10px;
    }
    
    .timeline {
        padding: 0 5px;
    }
    
    .timeline-item {
        margin-bottom: 35px;
    }
    
    .timeline-year {
        padding: 12px 18px;
        font-size: 15px;
        margin-bottom: 12px;
        border-radius: 8px;
        box-shadow: 0 6px 20px rgba(0, 86, 179, 0.2);
    }
    
    .timeline-content {
        padding: 20px;
        border-radius: 10px;
    }
    
    .timeline-content h4 {
        font-size: 15px;
        margin-bottom: 10px;
        line-height: 1.3;
        padding-left: 12px;
    }
    
    .timeline-content h4::before {
        width: 3px;
        height: 14px;
    }
    
    .timeline-content p {
        font-size: 12px;
        margin-bottom: 6px;
        line-height: 1.5;
        padding-left: 12px;
    }
    
    .timeline-content p::before {
        font-size: 12px;
    }
    
    .timeline-dot {
        top: 18px;
        width: 16px;
        height: 16px;
        border: 2px solid #0056b3;
        box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.1);
    }
    
    .timeline-item:nth-child(odd) .timeline-dot {
        left: -8px;
    }
    
    .timeline-item:nth-child(even) .timeline-dot {
        right: -8px;
    }
    
    .timeline-dot::before {
        width: 4px;
        height: 4px;
    }
    
    .timeline-item:hover .timeline-dot {
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 0 0 6px rgba(0, 86, 179, 0.15);
    }
} 