/* 通用移动端优化样式 */

/* ==================== 全局图片自适应 ==================== */
img {
    max-width: 100%;
    height: auto;
}

/* 图片居中显示 */
img {
    display: inline-block;
}

/* 懒加载占位 */
img[loading=lazy] {
    background: #f0f0f0;
}

/* ==================== 移动端布局优化 ==================== */
@media (max-width: 768px) {
    /* 全局重置 */
    * {
        box-sizing: border-box;
    }
    
    /* 内容容器 */
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* 卡片列表 */
    .card-list {
        gap: 12px !important;
    }
    
    .card-item {
        padding-bottom: 12px !important;
        gap: 10px !important;
    }
    
    .card-item-image {
        width: 80px !important;
        height: 60px !important;
        flex-shrink: 0;
    }
    
    .card-item-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
    }
    
    /* 文章卡片 */
    .article-card {
        flex-direction: column !important;
        gap: 12px !important;
        padding: 16px !important;
    }
    
    .article-card img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin-bottom: 12px !important;
    }
    
    /* 表格横向滚动 */
    .table-wrapper,
    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 13px !important;
        min-width: 600px;
    }
    
    /* 分页优化 */
    .pagination {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 6px !important;
    }
    
    .pagination a,
    .pagination span {
        min-width: 36px !important;
        height: 36px !important;
        padding: 0 10px !important;
        font-size: 13px !important;
    }
    
    /* 列表网格 */
    .grid,
    .row {
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* 间距调整 */
    .section {
        padding: 20px 0 !important;
    }
    
    /* Footer优化 */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .footer-col {
        padding: 0 10px !important;
    }
}

/* 超小屏幕额外优化 */
@media (max-width: 480px) {
    .card-item-image {
        width: 70px !important;
        height: 52px !important;
    }
    
    .article-card {
        padding: 12px !important;
    }
    
    .pagination a,
    .pagination span {
        min-width: 32px !important;
        height: 32px !important;
        font-size: 12px !important;
    }
}
