/* =========================================================================
 * rc-contact-form.css —— 联系页（页面版式）+ 联系表单（控件）样式
 * 归属：astra-child 子主题；配色与字体沿用 Astra 全局设置：
 *   主色 #1B9C85 / 深绿 #178E79 / 标题 #0F172A / 正文 #454F5E
 *   浅底 #EDF6EE / 白 #FFFFFF / 深底 #06140C；字体 Montserrat
 * 用法：页面里用 .rc-cf-hero / .rc-cf-main / .rc-cf-info / .rc-cf-trust 这些类；
 *       表单本身由短代码 [rc_contact_form] 输出 .rc-cf 结构。
 * ========================================================================= */

:root {
	--rc-cf-primary: #1B9C85;
	--rc-cf-primary-dark: #178E79;
	--rc-cf-heading: #0F172A;
	--rc-cf-text: #454F5E;
	--rc-cf-tint: #EDF6EE;
	--rc-cf-line: #E3EDE7;
	--rc-cf-dark: #06140C;
	--rc-cf-radius: 14px;
	--rc-cf-shadow: 0 18px 40px -20px rgba(6, 20, 12, .28);
}

/* ---------------------------------------------------------------- 页头 */
.rc-cf-hero {
	position: relative;
	background-image:
		linear-gradient(115deg, rgba(6, 20, 12, .92) 0%, rgba(15, 90, 74, .86) 58%, rgba(27, 156, 133, .78) 100%),
		url("/wp-content/uploads/2020/09/bg-09-free-img.jpg");
	background-size: cover;
	background-position: center;
	color: #fff;
}
.rc-cf-hero::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--rc-cf-primary), #6ED8A8, var(--rc-cf-primary));
}
/* 页头只留「面包屑 + H1」：原引导语与信任标签已移到表单提交按钮下方（见 .rc-cf-formnote），
   否则页头独占半个首屏、把表单挤到折叠线以下。内边距由区块内联样式给出（上 52 / 下 46）。 */
.rc-cf-hero .rc-cf-hero__crumb {
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .72);
	margin: 0 0 10px;
}
.rc-cf-hero .rc-cf-hero__title {
	color: #fff;
	font-size: clamp(26px, 3.2vw, 36px);
	line-height: 1.18;
	margin: 0;
}

/* ------------------------------------------------------------ 主体两栏 */
.rc-cf-main {
	background: #fff;
}
.rc-cf-main .rc-cf-cols {
	gap: 48px;
}
.rc-cf-main h2 {
	color: var(--rc-cf-heading);
	font-size: 26px;
	margin: 0 0 12px;
}
.rc-cf-main .rc-cf-intro {
	color: var(--rc-cf-text);
	margin: 0 0 26px;
}

/* 表单下方的引导语 + 信任标签（原在页头，为让表单尽早上屏而下移） */
.rc-cf-main .rc-cf-formnote {
	margin: 22px 0 0;
	padding: 18px 0 0;
	border-top: 1px dashed var(--rc-cf-line);
}
.rc-cf-main .rc-cf-formnote__lead {
	margin: 0;
	font-size: 14px;
	line-height: 1.75;
	color: var(--rc-cf-text);
}
.rc-cf-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 14px 0 0;
}
.rc-cf-main p.rc-cf-badges span {
	display: inline-block;
	background: var(--rc-cf-tint);
	border: 1px solid var(--rc-cf-line);
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--rc-cf-primary-dark);
}

/* 联系方式条目（用段落而非列表，规避 Gutenberg list-item 校验风险） */
.rc-cf-info {
	margin: 0 0 28px;
}
.rc-cf-info__item {
	position: relative;
	padding: 0 0 18px 42px;
	margin: 0;
	color: var(--rc-cf-text);
	line-height: 1.6;
	font-size: 15px;
}
.rc-cf-info__item:last-child {
	padding-bottom: 0;
}
.rc-cf-info__item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 2px;
	width: 26px;
	height: 26px;
	border-radius: 8px;
	background: var(--rc-cf-tint) center/16px 16px no-repeat;
}
.rc-cf-info__item.is-addr::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B9C85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 1 1 16 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}
.rc-cf-info__item.is-mail::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B9C85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m2 7 10 6 10-6'/%3E%3C/svg%3E");
}
.rc-cf-info__item.is-tel::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B9C85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 2 .7 2.9a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.2-1.2a2 2 0 0 1 2.1-.5c.9.3 1.9.6 2.9.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E");
}
.rc-cf-info__item.is-time::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B9C85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3.5 2'/%3E%3C/svg%3E");
}
.rc-cf-info__item strong {
	display: block;
	color: var(--rc-cf-heading);
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 2px;
}
.rc-cf-info__item a {
	color: var(--rc-cf-primary-dark);
	text-decoration: none;
	word-break: break-all;
}
.rc-cf-info__item a:hover {
	text-decoration: underline;
}

/* 旁边的说明卡 */
.rc-cf-side-card {
	background: var(--rc-cf-tint);
	border-radius: var(--rc-cf-radius);
	padding: 24px 26px;
}
.rc-cf-side-card h3 {
	margin: 0 0 8px;
	font-size: 16px;
	color: var(--rc-cf-heading);
}
.rc-cf-side-card p {
	margin: 0;
	font-size: 14px;
	color: var(--rc-cf-text);
	line-height: 1.7;
}

/* ------------------------------------------------------------ 信任条 */
.rc-cf-trust {
	background: var(--rc-cf-tint);
}
.rc-cf-trust .rc-cf-trust__title,
.rc-cf-faq .rc-cf-faq__title {
	text-align: center;
	color: var(--rc-cf-heading);
	font-size: 28px;
	margin: 0 0 8px;
}
.rc-cf-trust .rc-cf-trust__sub,
.rc-cf-faq .rc-cf-faq__sub {
	text-align: center;
	color: var(--rc-cf-text);
	margin: 0 0 34px;
}
.rc-cf-trust .rc-cf-trust__grid {
	gap: 24px;
	margin-bottom: 0;
}
.rc-cf-trust .rc-cf-trust__grid > .wp-block-column {
	background: #fff;
	border-radius: var(--rc-cf-radius);
	padding: 26px 28px;
	box-shadow: var(--rc-cf-shadow);
}
.rc-cf-trust h3 {
	margin: 0 0 8px;
	font-size: 17px;
	color: var(--rc-cf-heading);
}
.rc-cf-trust p {
	margin: 0;
	font-size: 14px;
	color: var(--rc-cf-text);
	line-height: 1.75;
}

/* ------------------------------------------------------------ 常见问题 */
.rc-cf-faq {
	background: #fff;
}
.rc-cf-faq .rc-cf-faq__list {
	max-width: 900px;
	margin: 0 auto;
}
.rc-cf-faq h3 {
	margin: 0 0 8px;
	font-size: 17px;
	color: var(--rc-cf-heading);
}
.rc-cf-faq .rc-cf-faq__q {
	border-top: 1px solid var(--rc-cf-line);
	padding: 22px 0 20px;
}
.rc-cf-faq .rc-cf-faq__q:first-child {
	border-top: none;
	padding-top: 0;
}
.rc-cf-faq .rc-cf-faq__q p {
	margin: 0;
	font-size: 15px;
	line-height: 1.8;
	color: var(--rc-cf-text);
}

/* ------------------------------------------------------------ 表单 */
.rc-cf {
	background: #fff;
	border: 1px solid var(--rc-cf-line);
	border-radius: var(--rc-cf-radius);
	box-shadow: var(--rc-cf-shadow);
	padding: 32px 34px 30px;
}
.rc-cf .rc-cf__title {
	margin: 0 0 8px;
	font-size: 22px;
	color: var(--rc-cf-heading);
}
.rc-cf .rc-cf__desc {
	margin: 0 0 22px;
	font-size: 14px;
	line-height: 1.7;
	color: var(--rc-cf-text);
}
.rc-cf .rc-cf__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px 18px;
}
.rc-cf .rc-cf__field {
	margin: 0;
	display: flex;
	flex-direction: column;
}
.rc-cf .rc-cf__field--full {
	grid-column: 1 / -1;
}
.rc-cf .rc-cf__field label {
	font-size: 13px;
	font-weight: 600;
	color: var(--rc-cf-heading);
	margin-bottom: 6px;
}
.rc-cf .rc-cf__req {
	color: #d63638;
}
.rc-cf .rc-cf__field input[type="text"],
.rc-cf .rc-cf__field input[type="email"],
.rc-cf .rc-cf__field input[type="tel"],
.rc-cf .rc-cf__field select,
.rc-cf .rc-cf__field textarea {
	width: 100%;
	box-sizing: border-box;
	background: #FBFDFB;
	border: 1px solid var(--rc-cf-line);
	border-radius: 10px;
	padding: 12px 14px;
	font-family: inherit;
	font-size: 15px;
	color: var(--rc-cf-heading);
	line-height: 1.5;
	transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.rc-cf .rc-cf__field textarea {
	resize: vertical;
	min-height: 132px;
}
.rc-cf .rc-cf__field input::placeholder,
.rc-cf .rc-cf__field textarea::placeholder {
	color: #9AA6A0;
}
.rc-cf .rc-cf__field input:focus,
.rc-cf .rc-cf__field select:focus,
.rc-cf .rc-cf__field textarea:focus {
	outline: none;
	background: #fff;
	border-color: var(--rc-cf-primary);
	box-shadow: 0 0 0 3px rgba(27, 156, 133, .14);
}
.rc-cf .rc-cf__field.is-error input,
.rc-cf .rc-cf__field.is-error select,
.rc-cf .rc-cf__field.is-error textarea {
	border-color: #d63638;
	box-shadow: 0 0 0 3px rgba(214, 54, 56, .12);
}
.rc-cf .rc-cf__err {
	display: none;
	font-style: normal;
	font-size: 12.5px;
	color: #d63638;
	margin-top: 5px;
}
.rc-cf .is-error .rc-cf__err,
.rc-cf .rc-cf__err.is-error {
	display: block;
}
.rc-cf .rc-cf__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.rc-cf .rc-cf__consent {
	margin: 20px 0 0;
	font-size: 13px;
	line-height: 1.7;
	color: var(--rc-cf-text);
}
.rc-cf .rc-cf__consent label {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	cursor: pointer;
}
.rc-cf .rc-cf__consent input[type="checkbox"] {
	margin: 3px 0 0;
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
	accent-color: var(--rc-cf-primary);
}
.rc-cf .rc-cf__actions {
	margin: 22px 0 0;
}
.rc-cf .rc-cf__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 190px;
	border: none;
	border-radius: 999px;
	background: var(--rc-cf-primary);
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .02em;
	padding: 14px 32px;
	cursor: pointer;
	transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.rc-cf .rc-cf__submit:hover {
	background: var(--rc-cf-heading);
	transform: translateY(-1px);
	box-shadow: 0 12px 24px -14px rgba(15, 23, 42, .6);
}
.rc-cf .rc-cf__submit[disabled] {
	opacity: .65;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}
.rc-cf .rc-cf__spinner {
	display: none;
	width: 15px;
	height: 15px;
	border: 2px solid rgba(255, 255, 255, .45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: rc-cf-spin .7s linear infinite;
}
.rc-cf .rc-cf__submit.is-loading .rc-cf__spinner {
	display: inline-block;
}
@keyframes rc-cf-spin {
	to { transform: rotate(360deg); }
}
.rc-cf .rc-cf__msg {
	display: none;
	margin-top: 18px;
	border-radius: 10px;
	padding: 14px 16px;
	font-size: 14px;
	line-height: 1.7;
}
.rc-cf .rc-cf__msg.is-ok {
	display: block;
	background: #EDF6EE;
	border: 1px solid #BFE6CC;
	color: #14603F;
}
.rc-cf .rc-cf__msg.is-err {
	display: block;
	background: #FDF0F0;
	border: 1px solid #F2C6C6;
	color: #8A1F1F;
}

/* --------------------------------------------- 提交等待面板（plan/09 §P5-UX）
   场景：留言提交后服务端要同步发通知信 + 自动回复，用户会干等几秒。
   做法：点下去的瞬间显示「正在提交」+ 转圈 + 走秒，超时再升级一句"别刷新"。
   进度条是**不确定型**（来回滑动）而不是百分比 —— 拿不到真实进度就不假装有。 */
.rc-cf .rc-cf__wait {
	display: none;
	margin: 18px 0 0;
	padding: 14px 16px;
	align-items: flex-start;
	gap: 14px;
	background: #EDF6EE;
	border: 1px solid #BFE6CC;
	border-radius: 10px;
}
.rc-cf .rc-cf__wait.is-on {
	display: flex;
	animation: rc-cf-wait-in .28s ease both;
}
@keyframes rc-cf-wait-in {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: none; }
}
.rc-cf .rc-cf__wait-spin {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin-top: 2px;
	border: 2px solid rgba(20, 96, 63, .26);
	border-top-color: var(--rc-cf-primary);
	border-radius: 50%;
	animation: rc-cf-spin .7s linear infinite;
}
.rc-cf .rc-cf__wait-body {
	flex: 1 1 auto;
	min-width: 0;
}
.rc-cf .rc-cf__wait-title {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.7;
	color: var(--rc-cf-heading);
}
.rc-cf .rc-cf__wait-meta {
	margin: 3px 0 0;
	font-size: 12px;
	line-height: 1.6;
	color: #5C6B63;
	font-variant-numeric: tabular-nums;
}
.rc-cf .rc-cf__wait-bar {
	display: block;
	position: relative;
	overflow: hidden;
	height: 3px;
	margin: 10px 0 0;
	border-radius: 999px;
	background: #CFE7D9;
}
.rc-cf .rc-cf__wait-bar::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: -40%;
	width: 40%;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--rc-cf-primary), #6ED8A8);
	animation: rc-cf-wait-slide 1.3s cubic-bezier(.45, .05, .55, .95) infinite;
}
@keyframes rc-cf-wait-slide {
	0% { left: -40%; }
	100% { left: 100%; }
}
.rc-cf .rc-cf__wait-note {
	display: none;
	margin: 10px 0 0;
	font-size: 12.5px;
	line-height: 1.7;
	color: #8A5B00;
}
.rc-cf .rc-cf__wait.is-long .rc-cf__wait-note {
	display: block;
}
@media (prefers-reduced-motion: reduce) {
	.rc-cf .rc-cf__wait.is-on { animation: none; }
	.rc-cf .rc-cf__wait-spin { animation-duration: 2s; }
	.rc-cf .rc-cf__wait-bar::after { animation-duration: 3.4s; }
}
.rc-cf .rc-cf__noscript {
	margin: 16px 0 0;
	font-size: 13px;
	color: #8A1F1F;
}

/* ------------------------------------------------------------ 响应式 */
@media (max-width: 1024px) {
	.rc-cf-main .rc-cf-cols {
		gap: 34px;
	}
}
/* 单列堆叠时（与 WP 核心的 781px 断点对齐）把表单列排到「联系方式」之前，
   否则联系方式一栏就能把表单完全推到手机首屏之外。 */
@media (max-width: 781px) {
	.rc-cf-main .rc-cf-cols > .wp-block-column:first-child {
		order: 2;
	}
	.rc-cf-main .rc-cf-cols > .wp-block-column:last-child {
		order: 1;
	}
}
@media (max-width: 860px) {
	.rc-cf .rc-cf__grid {
		grid-template-columns: 1fr;
	}
	.rc-cf {
		padding: 26px 22px 24px;
	}
}
@media (max-width: 640px) {
	.rc-cf-main .rc-cf-cols {
		gap: 26px;
	}
	/* 页头与主体的内边距是区块内联样式，窄屏要收紧只能用 !important 覆盖 */
	.rc-cf-hero {
		padding-top: 32px !important;
		padding-bottom: 30px !important;
	}
	.rc-cf-main {
		padding-top: 32px !important;
		padding-bottom: 44px !important;
	}
	.rc-cf .rc-cf__submit {
		width: 100%;
	}
}
