/* 基础重置和性能优化 */
.ad-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 移动端样式（优先加载） */
.ad-container {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    margin: 0 auto;
}

.ad-column {
    display: flex;
    flex-direction: column;
    gap: 10px; /* 移动端间距减小 */
    width: 100%;
}

.ad-item {
    width: 100%;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    background: #fff;
}

.ad-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.ad-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.ad-item img {
    width: 100%;
    height: auto;
    max-height: 90px; /* 移动端图片高度减小 */
    min-height: 50px;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 4px;
}

.ad-item:hover img {
    transform: scale(1.02);
}

/* PC端样式（大屏适配） */
@media (min-width: 769px) {
    .ad-container {
        display: flex;
        justify-content: center;
        gap: 20px;
        max-width: 1200px;
        padding: 15px 0;
    }

    .ad-column {
        flex: 0 1 48%;
        gap: 15px;
    }

    .ad-item img {
        max-height: 100px;
        min-height: 60px;
        border-radius: 6px;
    }
}

/* 大屏幕额外优化 */
@media (min-width: 1400px) {
    .ad-container {
        max-width: 1400px;
    }
    
    .ad-item img {
        max-height: 120px;
    }
}