/*
Theme Name: ScienceExplain Child
Theme URI:  https://scienceexplain.site
Template:   kadence
Version:    1.0
Description: Child theme for ScienceExplain — homepage modules rendered by template, not blocks.
*/

/* ---------- 基础 ---------- */
:root {
	--se-blue: #1257d6;
	--se-blue-dark: #0b3f9e;
	--se-blue-soft: #eaf1fd;
	--se-ink: #16202e;
	--se-muted: #5c6b7f;
	--se-line: #e3e9f2;
	--se-bg-soft: #f6f8fc;
}

.se-home {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px 64px;
	box-sizing: border-box;
}

.se-home *,
.se-home *::before,
.se-home *::after {
	box-sizing: border-box;
}

/* ---------- Hero ---------- */
.se-hero {
	margin: 32px auto 8px;
	padding: 72px 40px;
	border-radius: 18px;
	background: linear-gradient(135deg, #0b3f9e 0%, #1257d6 55%, #2f7ae5 100%);
	color: #fff;
	position: relative;
	overflow: hidden;
}

.se-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.16) 0, transparent 42%),
		linear-gradient(0deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
	background-size: auto, 46px 46px, 46px 46px;
	pointer-events: none;
}

.se-hero__inner {
	position: relative;
	z-index: 1;
	max-width: 760px;
}

.se-hero__kicker {
	display: inline-block;
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 600;
	color: #cfe0ff;
	margin-bottom: 18px;
}

.se-hero h1 {
	margin: 0 0 18px;
	font-size: clamp(30px, 4.6vw, 48px);
	line-height: 1.14;
	font-weight: 700;
	color: #fff;
	letter-spacing: -0.02em;
}

.se-hero p {
	margin: 0 0 30px;
	font-size: clamp(16px, 1.5vw, 19px);
	line-height: 1.6;
	color: #e5efff;
	max-width: 620px;
}

.se-hero__btns {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.se-btn {
	display: inline-block;
	padding: 13px 26px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.se-btn--primary {
	background: #fff;
	color: var(--se-blue-dark);
}

.se-btn--primary:hover {
	transform: translateY(-2px);
	color: var(--se-blue-dark);
}

.se-btn--ghost {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.45);
}

.se-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
}

/* ---------- Section ---------- */
.se-section {
	padding: 60px 0 8px;
}

.se-section__head {
	margin-bottom: 28px;
	max-width: 720px;
}

.se-section__kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--se-blue);
	margin-bottom: 10px;
}

.se-section h2 {
	margin: 0 0 10px;
	font-size: clamp(24px, 2.6vw, 32px);
	line-height: 1.22;
	font-weight: 700;
	color: var(--se-ink);
	letter-spacing: -0.015em;
}

.se-section__desc {
	margin: 0;
	color: var(--se-muted);
	font-size: 16px;
	line-height: 1.6;
}

.se-section__more {
	display: inline-block;
	margin-top: 18px;
	font-size: 15px;
	font-weight: 600;
	color: var(--se-blue);
	text-decoration: none;
}

.se-section__more:hover {
	text-decoration: underline;
}

.se-divider {
	height: 1px;
	background: var(--se-line);
	border: 0;
	margin: 0;
}

/* ---------- 文章卡片网格 ---------- */
.se-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.se-card {
	background: #fff;
	border: 1px solid var(--se-line);
	border-radius: 14px;
	overflow: hidden;
	transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.se-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(18, 40, 80, 0.1);
	border-color: #cddcf5;
}

.se-card__link {
	display: block;
	text-decoration: none;
	color: inherit;
	height: 100%;
}

.se-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 132px;
	background: linear-gradient(135deg, #dce8fb 0%, #eef4fd 100%);
	background-size: cover;
	background-position: center;
	color: var(--se-blue);
}

.se-card__media--icon .se-icon {
	width: 40px;
	height: 40px;
}

.se-icon {
	width: 24px;
	height: 24px;
	display: inline-block;
}

.se-card__cat {
	display: block;
	padding: 16px 18px 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--se-blue);
}

.se-card__title {
	margin: 6px 0 8px;
	padding: 0 18px;
	font-size: 18px;
	line-height: 1.32;
	font-weight: 700;
	color: var(--se-ink);
	letter-spacing: -0.01em;
}

.se-card__excerpt {
	margin: 0;
	padding: 0 18px;
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--se-muted);
}

.se-card__meta {
	display: block;
	padding: 12px 18px 18px;
	font-size: 12.5px;
	color: #93a1b5;
}

.se-empty {
	color: var(--se-muted);
	font-size: 15px;
}

/* ---------- 分类入口 ---------- */
.se-cats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.se-cat {
	display: block;
	padding: 26px 22px;
	background: #fff;
	border: 1px solid var(--se-line);
	border-radius: 14px;
	text-decoration: none;
	color: inherit;
	transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.se-cat:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(18, 40, 80, 0.1);
	border-color: #cddcf5;
	color: inherit;
}

.se-cat__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 12px;
	background: var(--se-blue-soft);
	color: var(--se-blue);
	margin-bottom: 16px;
}

.se-cat__icon .se-icon {
	width: 26px;
	height: 26px;
}

.se-cat__name {
	display: block;
	font-size: 17px;
	font-weight: 700;
	color: var(--se-ink);
	margin-bottom: 4px;
}

.se-cat__count {
	display: block;
	font-size: 13px;
	color: var(--se-muted);
}

/* ---------- 订阅 ---------- */
.se-newsletter {
	margin: 56px auto 0;
	padding: 48px 40px;
	border-radius: 18px;
	background: var(--se-blue-soft);
	border: 1px solid #d3e2fa;
	text-align: center;
}

.se-newsletter__icon {
	color: var(--se-blue);
	margin-bottom: 14px;
}

.se-newsletter__icon .se-icon {
	width: 34px;
	height: 34px;
}

.se-newsletter h2 {
	margin: 0 0 10px;
	font-size: clamp(22px, 2.2vw, 28px);
	font-weight: 700;
	color: var(--se-ink);
}

.se-newsletter p {
	margin: 0 auto 26px;
	max-width: 540px;
	color: var(--se-muted);
	font-size: 16px;
	line-height: 1.6;
}

.se-subscribe {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
	max-width: 520px;
	margin: 0 auto;
}

.se-subscribe__input {
	flex: 1 1 260px;
	min-width: 220px;
	padding: 13px 16px;
	font-size: 15px;
	border: 1px solid #cbd7ea;
	border-radius: 8px;
	background: #fff;
	color: var(--se-ink);
}

.se-subscribe__input:focus {
	outline: 2px solid var(--se-blue);
	outline-offset: 1px;
	border-color: var(--se-blue);
}

.se-subscribe__btn {
	padding: 13px 28px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background: var(--se-blue);
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.se-subscribe__btn:hover {
	background: var(--se-blue-dark);
}

.se-form__msg {
	margin-top: 16px;
	font-size: 14.5px;
	font-weight: 600;
}

.se-form__msg--ok {
	color: #17693a;
}

.se-form__msg--error {
	color: #a3231f;
}

.se-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- 站点地图页 ---------- */
.se-sitemap h2 {
	font-size: 20px;
	margin: 28px 0 12px;
	color: var(--se-ink);
}

.se-sitemap ul {
	list-style: none;
	padding: 0;
	margin: 0;
	columns: 2;
	column-gap: 32px;
}

.se-sitemap li {
	padding: 5px 0;
	break-inside: avoid;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
	.se-grid,
	.se-cats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 620px) {
	.se-home {
		padding: 0 16px 48px;
	}
	.se-hero {
		padding: 48px 22px;
	}
	.se-grid,
	.se-cats {
		grid-template-columns: 1fr;
	}
	.se-newsletter {
		padding: 36px 20px;
	}
	.se-sitemap ul {
		columns: 1;
	}
}

/* ---------- 页脚 ---------- */
.se-footer {
	margin-top: 56px;
	background: #0f1c30;
	color: #c8d4e6;
}

.se-footer__inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 52px 24px 36px;
	display: grid;
	grid-template-columns: 1.6fr 1fr 1.4fr;
	gap: 40px;
}

.se-footer__logo {
	display: block;
	font-size: 20px;
	font-weight: 700;
	color: #fff;
	margin-bottom: 12px;
	letter-spacing: -0.01em;
}

.se-footer__brand p {
	margin: 0 0 10px;
	font-size: 14.5px;
	line-height: 1.6;
	max-width: 340px;
}

.se-footer__mail a {
	color: #8fb6ff;
	text-decoration: none;
}

.se-footer__mail a:hover {
	text-decoration: underline;
}

.se-footer__heading {
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #7f93b0;
}

.se-footer__nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	columns: 2;
	column-gap: 20px;
}

.se-footer__nav li {
	margin-bottom: 8px;
	break-inside: avoid;
}

.se-footer__nav a {
	color: #c8d4e6;
	font-size: 14.5px;
	text-decoration: none;
}

.se-footer__nav a:hover {
	color: #fff;
	text-decoration: underline;
}

.se-footer__bottom {
	border-top: 1px solid #1f2f47;
}

.se-footer__bottom > * {
	max-width: 1180px;
	margin: 0 auto;
	padding: 16px 24px;
	font-size: 13px;
	color: #7f93b0;
	text-align: center;
}

.se-footer__bottom p:last-child {
	padding-top: 0;
}

.se-footer__bottom a {
	color: #8fb6ff;
	text-decoration: none;
}

.se-footer__bottom a:hover {
	text-decoration: underline;
}

@media (max-width: 900px) {
	.se-footer__inner {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 620px) {
	.se-footer__inner {
		grid-template-columns: 1fr;
		gap: 28px;
	}
	.se-footer__nav ul {
		columns: 1;
	}
}
