/* 合作伙伴模块整体容器 */
.i_m {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* 标题区域：居中且层次分明 */
.i_name {
    text-align: center;
    margin-bottom: 30px;
}

.i_name h2 {
    font-size: 28px;
    color: #333;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.i_name .line {
    width: 60px;
    height: 3px;
    background-color: #0066cc; /* 主题色，可替换 */
    margin: 0 auto 10px;
    border-radius: 2px;
}

.i_name h3 {
    font-size: 14px;
    color: #999;
    margin: 0;
    font-weight: normal;
    letter-spacing: 1px;
}

/* 核心布局：Grid 网格系统 */
.i_md ul {
    display: grid;
    /* 4列等宽布局，自动适配1200px容器 */
    grid-template-columns: repeat(4, 1fr);
    /* 间距统一使用 gap，避免 margin 塌陷 */
    gap: 24px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 单个合作伙伴卡片 */
.i_md ul li {
    /* 固定宽高比，确保8个logo整齐划一 */
    aspect-ratio: 4 / 3;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 悬停交互：轻微上浮 + 阴影 */
.i_md ul li:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #0066cc;
}

/* 合作伙伴 Logo 图片：自适应且不变形 */
/* 默认状态：显示彩色 */
.i_md ul li img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(0); /* 修改为 0，显示原色 */
    transition: filter 0.3s ease;
}

/* 悬停状态：变为灰色 */
.i_md ul li:hover img {
    filter: grayscale(100%); /* 修改为 100%，变为灰度 */
}

/* 响应式适配：平板/手机端自动调整列数 */
@media (max-width: 992px) {
    .i_md ul {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .i_md ul {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .i_name h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .i_md ul {
        grid-template-columns: 1fr;
    }
    .i_md ul li {
        aspect-ratio: 3 / 2;
    }
}