/*
 * Theme Name:  Grat
 * Description: 子主题，用于安全地添加自定义样式与功能。
 * Template:    astra
 * Version:     1.0.1
 * Author:      Bili
 */

/* ==========================================================================
   子主题自定义样式
   注意：本文件在父主题样式之后加载，可直接覆盖 Astra 的规则。
   建议优先使用 Astra 提供的 CSS 变量（见下方 :root），便于统一调整。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 全局变量覆盖（Astra 全局颜色 / 字体）
   --------------------------------------------------------------------------
   Astra 的调色板变量默认由自定义器输出，此处仅作为示例，
   如需固定品牌色，可在此处覆盖。
*/

/*
:root {
	--ast-global-color-0: #046bd2;  // 主色
	--ast-global-color-1: #045cb4;
	--ast-global-color-2: #1e293b;  // 标题色
	--ast-global-color-3: #334155;  // 正文色
	--ast-global-color-4: #f0f5fa;  // 浅色背景
	--ast-global-color-5: #ffffff;  // 内容背景
	--ast-global-color-6: #d1d5db;  // 边框色
	--ast-global-color-7: #111111;
	--ast-global-color-8: #111111;
	--ast-child-radius: 8px;        // 自定义变量：统一圆角
}
*/

/* --------------------------------------------------------------------------
   2. 自定义样式示例（按需启用 / 修改）
   -------------------------------------------------------------------------- */

/*
// 正文最大宽度与行高
.ast-separate-container .ast-article-post .entry-content {
	max-width: 800px;
	margin-inline: auto;
	line-height: 1.8;
}

// 按钮圆角
.wp-block-button__link,
.ast-button,
button,
input[type="button"],
input[type="submit"] {
	border-radius: var(--ast-child-radius, 6px);
}

// 文章标题颜色
.entry-title a {
	color: var(--ast-global-color-2);
}

// 网站头部固定背景
.site-header {
	background-color: var(--ast-global-color-5);
	box-shadow: 0 1px 6px rgb(0 0 0 / 6%);
}

// 移动端字号微调
@media (max-width: 544px) {
	html {
		font-size: 15px;
	}
}
*/

/* --------------------------------------------------------------------------
   3. 在此下方添加你自己的样式
   -------------------------------------------------------------------------- */




a:active,
a:focus {
	outline: 0;
	border: none;
	-moz-outline-style: none;
}

button,
.button {
	box-shadow: none;
}

html,
body {
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

#ast-scroll-top .ast-icon.icon-arrow {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.uagb-container__video-wrap {
	border-radius: 8px;
}

.wp-block-video video {
	border-radius: 8px;
}

/*限制宽度*/
html,
body {
	overflow-x: hidden;
	width: 100%;
}

img {
	max-width: 100%;
	height: auto;
}


html {
	scroll-padding-top: 100px;
}

@media (max-width:768px) {
	html {
		scroll-padding-top: 70px;
	}
}



/*FAQ*/
.faq-list-wrapper {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
	padding: 0;
}

.faq-title-wrapper {
	margin: 0;
	padding: 22px 22px;
	background-color: #ffffff;
	color: #111827;
	transition: background-color 0.25s ease;
	border-radius: 8px 8px 0 0;
}

.faq-content-wrapper {
	padding: 0 22px;
	background-color: #ffffff;
}

.faq-content-wrapper p {
	margin: 0;
	padding: 0 0 18px;
	color: #4b5563;
	white-space: pre-line;
}

.rank-math-list-item {
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

/* ===== Tab标签样式 ===== */
.wp-block-tab-list {
	position: relative;
}

/* Tab按钮 */
.wp-block-tab-list button[role="tab"] {
	position: relative;
	transition: color 0.25s ease;
	border: none;
}

/* 选中状态 aria-selected="true" */
.wp-block-tab-list button[role="tab"][aria-selected="true"] {
	color: #046BD2 !important;
}

/* 选中按钮底部蓝色线条 */
.wp-block-tab-list button[role="tab"][aria-selected="true"]::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 100%;
	height: 2px;
	background-color: #046BD2;
}

/* ========== spectra 悬浮底栏 Tabs ========== */
@media (max-width: 767px) {
	.uagb-tabs__panel.uagb-tabs__align-center {
		position: fixed !important;
		bottom: 20px !important;
		left: 16px !important;
		right: 16px !important;
		width: auto !important;
		margin: 0 !important;
		padding: 6px 8px !important;
		border-radius: 22px !important;

		/* 液态玻璃毛玻璃 */
		background: rgba(255, 255, 255, 0.22) !important;
		backdrop-filter: blur(24px) saturate(180%) !important;
		-webkit-backdrop-filter: blur(24px) saturate(180%) !important;
		border: 1px solid rgba(255, 255, 255, 0.35) !important;
		box-shadow:
			0 8px 30px rgba(0, 0, 0, 0.12),
			inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;

		z-index: 999 !important;
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		justify-content: space-around !important;
		gap: 2px !important;
		box-sizing: border-box !important;
		-webkit-tap-highlight-color: transparent;
		/* 移除移动端点击高亮 */
	}

	/* Tab项 */
	.uagb-tabs__panel.uagb-tabs__align-center .uagb-tab,
	.uagb-tabs__panel.uagb-tabs__align-center .uagb-tab>a,
	.uagb-tabs__panel.uagb-tabs__align-center .uagb-tab>span {
		flex: 1 !important;
		text-align: center !important;
		margin: 0 !important;
		border-radius: 20px !important;
		padding: 6px 2px !important;
		font-size: 14px !important;
		line-height: 1.2 !important;
		white-space: nowrap !important;
		overflow: hidden !important;
		text-overflow: ellipsis !important;
		transition: all 0.24s ease !important;
		-webkit-tap-highlight-color: transparent;
	}

	/* Tab激活态 */
	.uagb-tabs__panel.uagb-tabs__align-center .uagb-tab.uagb-tabs__active {
		background: rgba(255, 255, 255, 0.4) !important;
		box-shadow:
			0 2px 10px rgba(0, 0, 0, 0.08),
			inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
	}

	/* 页面底部留白，避开悬浮栏；兼容iPhone底部安全区 */
	body {
		padding-bottom: calc(75px + env(safe-area-inset-bottom)) !important;
	}
}