/*!
 * 移动端响应式优化样式
 * 专为手机和平板设备优化
 */

/* 移动端基础优化 */
@media (max-width: 768px) {
    /* 全局间距优化 */
    .space-p-tb {
        padding-top: 30px !important;
        padding-bottom: 30px !important;
    }
    
    .space-p-tb-md {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
    
    /* 标题字体大小优化 */
    h2.text-center {
        font-size: 24px !important;
        margin-bottom: 25px !important;
    }
    
    /* 产品卡片样式优化 */
    .product-card {
        display: block;
        margin-bottom: 20px;
        text-decoration: none;
        transition: transform 0.3s ease;
    }
    
    .product-card:hover {
        transform: translateY(-3px);
    }
    
    .product-card img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .product-title {
        margin-top: 10px;
        font-size: 16px;
        color: #333;
        font-weight: 500;
    }
    
    /* 信息卡片样式优化 */
    .card-container {
        margin-bottom: 20px;
        position: relative;
        display: block;
        max-width: 100%;
    }
    
    .info-card {
        display: block;
        position: relative;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        transition: transform 0.3s ease;
        text-decoration: none;
    }
    
    .info-card:hover {
        transform: translateY(-3px);
    }
    
    .info-card img {
        width: 100%;
        height: auto;
        display: block;
    }
    
    .card-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(transparent, rgba(0,0,0,0.7));
        color: white;
        padding: 20px 15px 15px;
    }
    
    .card-overlay h4 {
        margin: 0 0 8px;
        font-size: 16px;
        font-weight: bold;
    }
    
    /* 轮播图优化 */
    .portal-top-banner {
        margin-top: 50px;
    }
    
    .carousel-inner .item img {
        max-height: 200px;
        object-fit: cover;
    }
    
    /* 导航栏优化 */
    .navbar-brand img {
        max-height: 30px;
    }
    
    .navbar-toggle {
        margin-top: 8px;
    }
    
    /* 页脚优化 */
    .portal-footer .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .space-p-tb {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
    
    h2.text-center {
        font-size: 20px !important;
        margin-bottom: 20px !important;
    }
    
    .product-card img {
        border-radius: 6px;
    }
    
    .info-card {
        border-radius: 6px;
    }
    
    .card-overlay {
        padding: 15px 10px 10px;
    }
    
    .card-overlay h4 {
        font-size: 14px;
    }
}

/* 平板设备优化 */
@media (min-width: 768px) and (max-width: 991px) {
    .product-card {
        margin-bottom: 25px;
    }
    
    .card-container {
        margin-bottom: 25px;
    }
}

/* 改善触摸体验 */
@media (hover: none) and (pointer: coarse) {
    .product-card:hover,
    .info-card:hover {
        transform: none;
    }
    
    .product-card:active,
    .info-card:active {
        transform: translateY(-1px);
    }
}

/* 图片加载优化 */
.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 链接样式优化 */
a.product-card,
a.info-card {
    color: inherit;
    text-decoration: none;
}

a.product-card:hover,
a.info-card:hover {
    text-decoration: none;
    color: inherit;
}

/* 防止文字溢出 */
.card-container,
.product-card {
    word-wrap: break-word;
    overflow-wrap: break-word;
}