.ad-overlay-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    /* 容器只需要控制宽度/间距，高度由子元素撑开 */
    /* 移除容器的 height/max-height，避免布局错乱 */
}

.ad-overlay-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    height: 240px;          /* 固定卡片高度（核心） */
    max-height: 300px;      /* 限制最大高度 */
    min-height: 200px;      /* 保证最小高度 */
    overflow: hidden;       /* 防止内容溢出 */
}

.ad-overlay-card:hover {
    transform: translateY(-5px);
}

.ad-overlay-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 关键：图片适配卡片高度 */
    display: block;
}

.ad-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 10px 16px; /* 适配矮高度 */
}

.ad-overlay-title {
    font-size: 15px;
    font-weight: bold;
    /*color: #8eafdd;*/
    margin: 0 0 3px 0;
    /*background-color: rgba(92, 132, 117, 0.9); !* 新增白色半透明背景 *!*/
    /*padding: 2px 6px; !* 比描述文字更大的内边距 *!*/
    /*border-radius: 3px; !* 圆角 *!*/
    /*display: inline-block; !* 使背景只包裹文字 *!*/
}

.ad-overlay-desc {
    font-size: 12px;
    margin: 0;
    opacity: 1;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.65); /* 新增黑色半透明背景 */
    padding: 2px 4px; /* 添加内边距让文字更易读 */
    border-radius: 2px; /* 添加圆角 */
}

/* ------------------- 2. 列表式广告样式 ------------------- */
.ad-list-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}



.ad-list-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.ad-list-item:last-child {
    border-bottom: none;
}

.ad-list-item:hover {
    background-color: #f9f9f9;
}

.ad-list-img {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 16px;
    flex-shrink: 0;
}

.ad-list-content {
    flex: 1;
}

.ad-list-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.ad-list-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .ad-overlay-container {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
    .ad-overlay-card {
        height: 200px; /* 移动端加高 */
    }
    .ad-card-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .ad-list-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .ad-list-img {
        width: 100%;
        height: 120px;
        margin-right: 0;
        margin-bottom: 10px;
    }
}