/* 全局重置与基础字体，保持与官网风格一致可自行调整 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8fafc;  /* 柔和背景，与大部分官网融合 */
    color: #0f172a;
    line-height: 1.4;
}

/* 合作伙伴区域容器 - 采用内边距保证呼吸感 */
.partners-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 24px 80px 24px;
}

/* 头部标题与装饰 */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1e293b 0%, #2d3a4f 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 12px;
}

.section-header .sub {
    font-size: 1rem;
    color: #475569;
    max-width: 560px;
    margin: 0 auto;
    font-weight: 400;
}

/* 可选装饰线 */
.section-header::after {
    content: '';
    display: block;
    width: 64px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #a855f7);
    margin: 20px auto 0;
    border-radius: 2px;
}

/* ---------------------------
    核心：合作伙伴Logo网格展示区 
    使用grid实现整齐排列，自动响应
--------------------------- */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 28px 24px;
    align-items: center;
    justify-items: center;
}

/* 单个Logo卡片容器 —— 统一的圆角、边框、柔和阴影及过渡效果 */
.partner-card {
    width: 100%;
    max-width: 200px;
    background: #ffffff;
    border-radius: 24px;
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease-in-out;
    border: 1px solid #eef2f6;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    cursor: pointer;  /* 表示可点击，后续可关联链接 */
}

/* 鼠标悬浮效果：上浮+加强阴影+边框微变色 */
.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -12px rgba(0, 0, 0, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.02);
    border-color: #d9e2ef;
    background-color: #fefefe;
}

/* Logo图片样式：保证最大尺寸，等比例缩放，不会变形 */
.partner-logo {
    max-width: 100%;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(0%);
    transition: filter 0.2s ease;
}

/* 鼠标悬停时Logo恢复彩色 */
.partner-card:hover .partner-logo {
    filter: grayscale(0%);
}

/* 为了让不同形状的Logo视觉对齐，统一容器对图片的约束 */
.partner-card a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-decoration: none;
}

/* 兼容旧版本浏览器，且保证图片不溢出 */
img {
    max-width: 100%;
    vertical-align: middle;
    border-style: none;
}

/* 无数据或loading占位（安全防护） */
.placeholder-note {
    text-align: center;
    color: #94a3b8;
    grid-column: 1 / -1;
    padding: 40px;
}

/* 简洁响应式调整：手机窄屏幕时减少内边距和间距 */
@media (max-width: 640px) {
    .partners-section {
        padding: 40px 20px 60px 20px;
    }
    .partners-grid {
        gap: 20px;
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
    .partner-card {
        padding: 14px 12px;
        border-radius: 20px;
    }
    .partner-logo {
        max-height: 55px;
    }
    .section-header h2 {
        font-size: 1.75rem;
    }
}

/* 中等屏幕优化 (笔记本) */
@media (min-width: 1024px) and (max-width: 1280px) {
    .partners-grid {
        gap: 30px;
    }
}

/* 可选：如果有特别大的Logo需限制高度 */
.partner-card .partner-logo {
    max-height: 70px;
}