/*
	易菇网 · 首页「导航下方」广告位（半通栏 960×130 × 4）
	独立文件，专属前缀 .emad- ，不污染 index.css / theme.css
	引用方式：index.htm 内 <link ... href="{DT_SKIN}emad.css?v=emad20261010a"/>
	断点：>1020px 2 列 ｜ 681~1020px 2 列(更紧凑) ｜ ≤680px 单列
*/

/* 外层：与 .m 同宽（--f-content 1560），上下留白 */
.emad-wrap {
	width: var(--f-content, 1560px);
	max-width: 100%;
	margin: 14px auto 0;
}

/* 1 行 2 个，共 2 行 */
.emad-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

/* 单个广告位：固定比例 960:130，内部 slot 绝对定位铺满 */
.emad-item {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 10px;
	background: #F2F5F4;
	box-shadow: 0 1px 3px rgba(16, 51, 40, .06);
	transition: box-shadow .25s ease, transform .25s ease;
}
.emad-item::before {
	content: "";
	display: block;
	padding-top: 13.5417%; /* 130 / 960 */
}
.emad-item:hover {
	box-shadow: 0 6px 18px rgba(16, 51, 40, .14);
	transform: translateY(-1px);
}

/* 广告位内容槽：铺满整个比例盒 */
.emad-item .emad-slot {
	position: absolute;
	left: 0; top: 0; right: 0; bottom: 0;
	display: block;
}
.emad-item .emad-slot img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0;
}

/* 空位占位（广告位未投放内容时）：淡灰 + 提示 */
.emad-item.emad-empty {
	background: linear-gradient(135deg, #F4F7F6, #EAEFED);
	box-shadow: none;
}
.emad-item.emad-empty .emad-slot {
	display: flex;
	align-items: center;
	justify-content: center;
}
.emad-item.emad-empty .emad-ph {
	font-size: 13px;
	letter-spacing: .5px;
	color: #9CB3AC;
}

/* 兼容：广告位输出若是 <a><img .../></a>，链接铺满 */
.emad-item .emad-slot > a {
	display: block;
	width: 100%;
	height: 100%;
}

/* ---------- 断点 ---------- */
@media (max-width: 1200px) {
	.emad-wrap { width: 100%; max-width: calc(100% - 32px); }
}

@media (max-width: 900px) {
	.emad-grid { gap: 12px; }
	.emad-item { border-radius: 8px; }
}

/* ≤680px：单列，避免 960 宽素材在窄屏被压得过小 */
@media (max-width: 680px) {
	.emad-wrap { margin-top: 10px; max-width: calc(100% - 20px); }
	.emad-grid { grid-template-columns: 1fr; gap: 10px; }
}
