/*
 * ETheme-Block — section（区段）
 *
 * 视觉契约来自主题：.eth-section（全宽 + 垂直 padding）、
 * .eth-section--tight / --none、.eth-section--bg-*、.eth-module--bg-*、
 * .theme-inverted、.eth-container / -narrow / -wide。
 *
 * 此处刻意不重定义上述任何规则 —— 它们同时服务于既有 25 个区块。
 * 本文件只补 Section 自有的两项结构需求：背景图片层与遮罩层。
 * 遮罩只消费 --etb-overlay-* 别名（组件层令牌约定）。
 */
.etb-section {
	position: relative;
	min-width: 0;
}

.etb-section > .eth-container,
.etb-section > .eth-container-narrow,
.etb-section > .eth-container-wide {
	position: relative;
	min-width: 0;
	z-index: var(--etb-z-raised);
}

/* 背景图片层 */
.etb-section--has-bg {
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

.etb-section--bg-fixed {
	background-attachment: fixed;
}

/* 遮罩层：垫在内容之下、背景图之上，保证文字可读 */
.etb-section__overlay {
	position: absolute;
	inset: 0;
	z-index: var(--etb-z-base);
	background: var(--etb-overlay-dark);
	pointer-events: none;
}

/* iOS 不支持 fixed 背景，降级为普通滚动 */
@media (max-width: 768px) {
	.etb-section--bg-fixed {
		background-attachment: scroll;
	}
}


/*
 * 容器内相邻区块的垂直间距（内容流）—— 与栅格单元保持一致。
 *
 * 前台容器类由 PHP 输出（eth-container / -narrow / -wide）；
 * 编辑器额外带 etb-section__inner，但它同时含 eth-container，故同一条即可覆盖。
 */
.etb-section > .eth-container > * + *,
.etb-section > .eth-container-narrow > * + *,
.etb-section > .eth-container-wide > * + * {
	margin-top: var(--eth-space-s, 1rem);
}
