/* ==========================================================================
   电器·智库 — 广告位公共样式（顶栏轮播 / 通栏 / 侧边位）
   三套模板中完全一致，抽取为全站公共样式
   ========================================================================== */

.ad-tag {
	display: inline-block;
	padding: 0 6px;
	border: 1px solid #ddd;
	border-radius: 3px;
	background: #fff;
	font-size: 11px;
	line-height: 1.7;
	letter-spacing: 1px;
	color: #aaa;
}

/* ---------- 顶部通栏（多条轮播） ---------- */
.top-ad {
	padding: 16px 0 2px;
}

.top-ad-inner {
	position: relative;
	overflow: hidden;
	height: 92px;
	border-radius: 10px;
	background: #faf7f0;
}

.ad-slides {
	position: relative;
	width: 100%;
	height: 100%;
}

.ad-slide {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity .5s;
	font-size: 14px;
	letter-spacing: 2px;
	color: #b3aa99;
}

.ad-slide.active {
	opacity: 1;
}

.ad-slide .ad-dim {
	margin-top: 4px;
	font-size: 12px;
	letter-spacing: 1px;
	color: #c6beae;
}

.ad-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

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

.top-ad-inner .ad-tag {
	position: absolute;
	right: 12px;
	bottom: 8px;
	z-index: 5;
}

.ad-dots {
	position: absolute;
	left: 14px;
	bottom: 12px;
	z-index: 5;
	display: flex;
	gap: 6px;
}

.ad-dots span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #d5cdbc;
	cursor: pointer;
	transition: background .3s;
}

.ad-dots span.active {
	background: var(--copper);
}

/* ---------- 首页中部通栏（单条，尺寸同顶部） ---------- */
/* 上下间距统一为 40px：上方 8px 来自 .headline 的底部内边距，下方接管 .feed 的顶部内边距 */
.mid-ad {
	margin: 24px 0 32px;
}

.mid-ad + .feed {
	padding-top: 0;
}

/* ---------- 侧边 / 内容区广告位 ---------- */
.ad-box {
	margin-bottom: 20px;
}

.ad-box .ad-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.ad-box .ad-head .lbl {
	font-family: var(--serif);
	font-size: 13px;
	letter-spacing: 2px;
	color: var(--muted);
}

.ad-slot {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 112px;
	margin-bottom: 10px;
	border-radius: 10px;
	background: #faf7f0;
	font-size: 13px;
	letter-spacing: 1px;
	color: #b3aa99;
	overflow: hidden;
}

.ad-slot .ad-tag {
	position: absolute;
	right: 8px;
	bottom: 6px;
}

.ad-slot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* 已配置真实广告：按图片原比例撑开，不再套占位虚线框 */
.ad-slot.has-image {
	height: auto;
	border: 0;
	background: none;
}

.ad-slot.has-image img {
	height: auto;
	display: block;
}

@media (max-width: 640px) {
	.top-ad-inner {
		height: 72px;
	}

	.mid-ad {
		margin: 20px 0 28px;
	}

	.ad-slot {
		height: 96px;
	}
}
