/* 手机端优化样式 */

/* 手机端基础优化 */
@media (max-width: 768px) {
    /* 基础布局优化 */
    body {
        font-size: 14px;
        line-height: 1.5;
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }
    
    html {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }
    
    .container {
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    * {
        max-width: 100%;
    }
    
    img, video, iframe {
        max-width: 100%;
        height: auto;
    }
    
    /* 导航栏优化 */
    .navbar {
        padding: 0.5rem 0;
        backdrop-filter: blur(5px);
        width: 100%;
        box-sizing: border-box;
    }
    
    .nav-container {
        padding: 0 15px;
        width: 100%;
        box-sizing: border-box;
        max-width: 100%;
    }
    
    .nav-logo h2 {
        font-size: 1.2rem;
    }
    
    /* 汉堡菜单优化 */
    .hamburger {
        display: flex !important;
        flex-direction: column;
        cursor: pointer;
        padding: 5px;
        z-index: 1001;
    }
    
    .hamburger span {
        width: 25px;
        height: 3px;
        background: #2563eb;
        margin: 3px 0;
        transition: 0.3s;
        border-radius: 2px;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* 导航菜单优化 */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        width: 100%;
        height: calc(100vh - 60px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s ease;
        z-index: 999;
        display: flex !important;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 1rem 0;
    }
    
    .nav-menu a {
        font-size: 1.1rem;
        padding: 0.8rem 1.5rem;
        border-radius: 25px;
        transition: all 0.3s ease;
    }
    
    /* 主要内容区域优化 */
    .hero {
        padding: 80px 0 40px;
        text-align: center;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        line-height: 1.4;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 12px 24px;
        font-size: 1rem;
        box-sizing: border-box;
    }
    
    /* 关于我们区域优化 */
    .about {
        width: 100%;
        box-sizing: border-box;
        padding: 2rem 0;
    }
    
    .about-content {
        width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    
    .about-text,
    .about-image {
        width: 100%;
        box-sizing: border-box;
    }
    
    .stats {
        width: 100%;
        box-sizing: border-box;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* 产品卡片优化 */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 10px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .product-card {
        margin: 0;
        padding: 1.5rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .product-image {
        height: 120px;
        margin-bottom: 1rem;
    }
    
    .product-image i {
        font-size: 2.5rem;
    }
    
    .product-title {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }
    
    .product-description {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }
    
    .product-features {
        margin-bottom: 1rem;
    }
    
    .feature-tag {
        font-size: 0.8rem;
        padding: 4px 8px;
        margin: 2px;
    }
    
    .product-price {
        margin-bottom: 1rem;
    }
    
    .price {
        font-size: 1.5rem;
    }
    
    .product-btn {
        width: 100%;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* 案例展示优化 */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .portfolio-card {
        padding: 1.5rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .portfolio-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }
    
    .portfolio-card p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* 服务展示优化 */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .service-card {
        padding: 1.5rem;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }
    
    .service-card i {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .service-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }
    
    .service-card p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* 联系表单优化 */
    .contact-form {
        padding: 2rem 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .contact-content {
        width: 100%;
        box-sizing: border-box;
    }
    
    .contact-info {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 2rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px 16px;
        font-size: 1rem;
        border-radius: 8px;
    }
    
    .form-group textarea {
        min-height: 120px;
    }
    
    /* 页脚优化 */
    .footer {
        padding: 2rem 0 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }
    
    .footer-section h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .footer-section p,
    .footer-section a {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .footer-bottom {
        margin-top: 1.5rem;
        padding-top: 1rem;
        font-size: 0.8rem;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .product-card,
    .portfolio-card,
    .service-card {
        padding: 1rem;
    }
    
    .contact-form {
        padding: 1.5rem 0.5rem;
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .product-card,
    .portfolio-card,
    .service-card {
        padding: 0.8rem;
    }
}

/* 手机端触摸优化 */
@media (max-width: 768px) {
    /* 触摸目标大小优化 */
    .btn,
    .nav-menu a,
    .product-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* 触摸反馈 */
    .btn:active,
    .nav-menu a:active,
    .product-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    /* 滚动优化 */
    .nav-menu {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 防止水平滚动 */
    body {
        overflow-x: hidden;
        position: relative;
        width: 100%;
    }
    
    html {
        overflow-x: hidden;
        width: 100%;
    }
    
    section {
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    /* 输入框优化 */
    input,
    textarea {
        font-size: 16px; /* 防止iOS缩放 */
    }
}

/* 手机端性能优化 */
@media (max-width: 768px) {
    /* 减少动画复杂度 */
    .product-card:hover,
    .portfolio-card:hover,
    .service-card:hover {
        transform: none;
    }
    
    /* 简化阴影效果 */
    .product-card,
    .portfolio-card,
    .service-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    /* 优化图片加载 */
    .product-image,
    .portfolio-image {
        background-size: cover;
        background-position: center;
    }
}


