/* ========== 移动端优化样式 ========== */

/* 移动端通用优化 */
@media only screen and (max-width: 768px) {
    /* 1. 简化页面布局 */
    .container {
        padding: 0 10px;
    }
    
    /* 2. 隐藏不必要的装饰元素 */
    .decoration, .bg-pattern, .particle-effect {
        display: none !important;
    }
    
    /* 3. 优化字体大小 */
    h1 { font-size: 24px !important; }
    h2 { font-size: 20px !important; }
    h3 { font-size: 18px !important; }
    p { font-size: 14px !important; line-height: 1.6; }
    
    /* 4. 简化导航栏 */
    .header .menu {
        display: none !important;
    }
    
    /* 5. 优化按钮样式 */
    .btn {
        width: 100% !important;
        padding: 12px 20px !important;
        font-size: 16px !important;
    }
    
    /* 6. 优化表单输入 */
    input, textarea, select {
        font-size: 16px !important;
        padding: 12px !important;
    }
}

/* ========== 固定电话悬浮按钮 ========== */
.mobile-phone-float {
    position: fixed;
    right: 15px;
    bottom: 80px;
    z-index: 99999;
    display: none;
}

@media only screen and (max-width: 768px) {
    .mobile-phone-float {
        display: block;
    }
}

.mobile-phone-btn {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(238, 90, 90, 0.4);
    cursor: pointer;
    animation: phonePulse 2s infinite;
    text-decoration: none;
}

.mobile-phone-btn::before {
    content: "📞";
    font-size: 24px;
}

@keyframes phonePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(238, 90, 90, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(238, 90, 90, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(238, 90, 90, 0);
    }
}

/* 电话提示气泡 */
.phone-tip {
    position: absolute;
    right: 65px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    color: #333;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: tipBounce 2s infinite;
}

.phone-tip::after {
    content: "";
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-left-color: #fff;
}

@keyframes tipBounce {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(-5px); }
}

/* ========== 移动端底部导航栏 ========== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    border-top: 1px solid #eee;
    display: none;
    z-index: 99998;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

@media only screen and (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }
    
    /* 底部内容避开导航栏 */
    body {
        padding-bottom: 70px;
    }
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666;
    font-size: 11px;
    padding: 5px 0;
}

.mobile-nav-item.active {
    color: var(--main_color, #1890ff);
}

.mobile-nav-item .icon {
    font-size: 20px;
    margin-bottom: 3px;
}

.mobile-nav-item.phone-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: #fff;
    border-radius: 25px 25px 0 0;
    margin: 0 5px;
}

.mobile-nav-item.phone-btn .icon {
    font-size: 24px;
}

/* ========== 移动端h1标签优化 ========== */
@media only screen and (max-width: 768px) {
    /* 隐藏不必要的h1标签 */
    .page-header h1, 
    .section-title h1,
    .banner-content h1,
    .hero h1,
    .page-title h1,
    h1.section-heading,
    .content-block h1 {
        display: none !important;
    }
    
    /* 只保留必要的h1标签（如首页主标题），但缩小尺寸 */
    h1 {
        font-size: 20px !important;
        font-weight: 500 !important;
        margin-bottom: 15px !important;
    }
    
    /* 文章页h1标题保留，但优化样式 */
    .article-content h1,
    .news-detail h1 {
        display: block !important;
        font-size: 22px !important;
        line-height: 1.4;
        font-weight: 600;
        margin-bottom: 20px;
    }
    
    /* 隐藏大型横幅中的h1 */
    .jumbotron h1,
    .hero-banner h1,
    .banner h1 {
        display: none !important;
    }
    
    /* 隐藏侧边栏和其他次要区域的h1 */
    .sidebar h1,
    .widget h1,
    .footer h1 {
        display: none !important;
    }
}

/* ========== 额外的移动端简约优化 ========== */
@media only screen and (max-width: 768px) {
    /* 简化banner区域 */
    .banner, .jumbotron, .hero {
        height: auto !important;
        min-height: 150px !important;
        padding: 30px 0 !important;
    }
    
    /* 隐藏banner装饰元素 */
    .banner .decoration,
    .banner .bg-effect,
    .banner .pattern {
        display: none !important;
    }
    
    /* 简化侧边栏 */
    .sidebar {
        display: none !important;
    }
    
    /* 优化内容区域宽度 */
    .main-content {
        width: 100% !important;
        float: none !important;
    }
    
    /* 简化页脚 */
    .footer .f_links,
    .footer .f_nav {
        display: none !important;
    }
    
    .footer .f_contact {
        text-align: center;
    }
    
    /* 隐藏面包屑导航 */
    .breadcrumb {
        display: none !important;
    }
    
    /* 简化分享按钮 */
    .share-buttons {
        display: none !important;
    }
    
    /* 优化文章列表 */
    .news-list .item {
        padding: 15px 0 !important;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .news-list .item:last-child {
        border-bottom: none;
    }
    
    /* 简化案例展示 */
    .cases-grid .item {
        margin-bottom: 15px;
    }
    
    /* 优化按钮组 */
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin-bottom: 10px;
    }
}
