/**
 * MooTon — Section 背景自动交替 + 卡片颜色自动反转
 *
 * 与 mooton-components.php 中的 OB + DOMDocument 注入配合：
 *   - PHP 端为 entry-content 的直接子元素注入 mooton-alt-section class
 *   - CSS 端用 :nth-child(An+B of S) 自动设置交替背景色
 *
 * 卡片反转规则：
 *   - section 灰底（odd）→ 卡片白底
 *   - section 白底（even）→ 卡片灰底
 *
 * 适用页面：Water Park / Outdoor Playground / Indoor Playground
 */

/* ===== Section 背景交替 ===== */

/* 奇数位 section → 灰底 */
.mooton-alt-sections > .mooton-alt-section:nth-child(odd of .mooton-alt-section) {
	background-color: #f5f8f3 !important;
}

/* 偶数位 section → 白底 */
.mooton-alt-sections > .mooton-alt-section:nth-child(even of .mooton-alt-section) {
	background-color: #ffffff !important;
}

/* ===== 卡片背景反转 ===== */

/*
 * 覆盖两类卡片：
 *   1. .mooton-us-service-card        — US Local Capabilities（spectra container 卡片）
 *   2. .wp-block-column > .wp-block-group.has-background — 流程卡片 / 统计卡片
 *
 * 用 > 子选择器只选 column 的直接子 group，避免误伤卡片内部的 icon 容器。
 */

/* Odd section（灰底）→ 卡片白底 */
.mooton-alt-section:nth-child(odd of .mooton-alt-section) .mooton-us-service-card {
	background-color: #ffffff !important;
}
.mooton-alt-section:nth-child(odd of .mooton-alt-section) .wp-block-column > .wp-block-group.has-background {
	background-color: #ffffff !important;
}

/* Even section（白底）→ 卡片灰底 */
.mooton-alt-section:nth-child(even of .mooton-alt-section) .mooton-us-service-card {
	background-color: #f5f8f3 !important;
}
.mooton-alt-section:nth-child(even of .mooton-alt-section) .wp-block-column > .wp-block-group.has-background {
	background-color: #f5f8f3 !important;
}

/* ===== 分类标题链接：继承颜色、无下划线、保留手型 ===== */
.mooton-alt-sections .wp-block-heading a {
	color: inherit;
	text-decoration: none;
}
