/* 移动端专项修复 */

/* 确保在移动设备上页头页脚正确加载 */
@media (max-width: 768px) {
    /* 页头移动端适配 */
    .header-main .container {
        padding: 0 10px;
    }
    
    .header-content {
        position: relative;
    }
    
    .logo img {
        max-height: 40px;
        width: auto;
    }
    
    .logo-text h1 {
        font-size: 1.2rem;
    }
    
    .logo-text span {
        font-size: 0.8rem;
    }
    
    /* 导航菜单移动端 */
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 30px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
    }
    
    .mobile-menu-toggle span {
        width: 25px;
        height: 3px;
        background: #333;
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* 移动端菜单样式 */
    .mobile-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        z-index: 9999;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .mobile-menu.active {
        left: 0;
    }
    
    .mobile-nav-menu {
        list-style: none;
        padding: 60px 0 20px 0;
        margin: 0;
    }
    
    .mobile-nav-menu li {
        border-bottom: 1px solid #eee;
    }
    
    .mobile-nav-menu a {
        display: block;
        padding: 15px 20px;
        color: #333;
        text-decoration: none;
        font-size: 16px;
    }
    
    .mobile-nav-menu a:hover {
        background: #f8f9fa;
        color: #667eea;
    }
    
    .mobile-dropdown-menu {
        display: none;
        background: #f8f9fa;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .mobile-dropdown-menu.active {
        display: block;
    }
    
    .mobile-dropdown-menu li {
        border-bottom: 1px solid #e9ecef;
    }
    
    .mobile-dropdown-menu a {
        padding: 12px 40px;
        font-size: 14px;
        color: #666;
    }
    
    /* 搜索框移动端 */
    .search-container {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #eee;
        display: none;
        z-index: 1000;
    }
    
    .search-container.active {
        display: block;
    }
    
    .search-form {
        display: flex;
        padding: 15px;
    }
    
    .search-form input {
        flex: 1;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 5px 0 0 5px;
        font-size: 16px;
    }
    
    .search-form button {
        padding: 10px 15px;
        background: #667eea;
        color: white;
        border: none;
        border-radius: 0 5px 5px 0;
        cursor: pointer;
    }
    
    /* 页脚移动端 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-section h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .footer-section ul li {
        margin-bottom: 8px;
    }
    
    .qr-codes {
        justify-content: center;
        margin-top: 20px;
    }
    
    .footer-bottom .bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .legal-links {
        justify-content: center;
    }
    
    /* 返回顶部按钮移动端 */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    /* 移动端菜单遮罩 */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
        display: none;
    }
    
    .mobile-menu-overlay.active {
        display: block;
    }
    
    /* Hero区域移动端 */
    .hero-section {
        height: 60vh;
    }
    
    .carousel-slide {
        position: relative;
    }
    
    .carousel-slide img {
        width: 100%;
        height: 60vh;
        object-fit: cover;
    }
    
    .slide-content {
        position: absolute;
        bottom: 20px;
        left: 20px;
        right: 20px;
        color: white;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    }
    
    .slide-content h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .slide-content p {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .cta-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* 产品卡片移动端 */
    .product-categories {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .category-card {
        margin-bottom: 20px;
    }
    
    .category-card img {
        height: 200px;
    }
    
    /* 优势网格移动端 */
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .advantage-item {
        padding: 20px 15px;
    }
    
    .advantage-item i {
        font-size: 2rem;
    }
    
    .advantage-item h3 {
        font-size: 1.1rem;
    }
    
    /* 新闻网格移动端 */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-card img {
        height: 200px;
    }
    
    /* 页面头部移动端 */
    .page-header {
        padding: 60px 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    /* 表单移动端 */
    .form-control {
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    /* 模态框移动端 */
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
}

/* 超小屏幕适配 (< 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .logo-text h1 {
        font-size: 1rem;
    }
    
    .logo-text span {
        font-size: 0.7rem;
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .slide-content h1 {
        font-size: 1.3rem;
    }
    
    .slide-content p {
        font-size: 0.9rem;
    }
    
    .footer-section {
        text-align: center;
    }
}