/* ==========================================================================
   松滋高中学生论坛 · 布局系统
   --------------------------------------------------------------------------
   1. 容器与栅格
   2. 页头（粘性导航 / 站标 / 用户区 / 搜索面板 / 移动端）
   3. 主体与页面标题
   4. 页脚
   5. 回到顶部
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 容器与栅格
   -------------------------------------------------------------------------- */
.svhs-page {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.svhs-main {
	flex: 1 0 auto;
}

.svhs-container {
	width: 100%;
	max-width: var(--svhs-wide);
	margin: 0 auto;
	padding: 0 20px;
}

.svhs-container--wide {
	max-width: var(--svhs-max);
}

.svhs-container--content {
	max-width: var(--svhs-content);
}

.svhs-container--flush {
	padding: 0;
}

.svhs-grid {
	display: grid;
	gap: var(--svhs-s5);
}

.svhs-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.svhs-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.svhs-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.svhs-grid--auto {
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.svhs-grid--auto-sm {
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* 主栏 + 侧栏 */
.svhs-layout {
	display: grid;
	gap: var(--svhs-s7);
	align-items: start;
}

.svhs-layout--sidebar-right {
	grid-template-columns: minmax(0, 1fr) 320px;
}

.svhs-layout--sidebar-left {
	grid-template-columns: 300px minmax(0, 1fr);
}

@media (max-width: 1024px) {
	.svhs-layout--sidebar-right,
	.svhs-layout--sidebar-left {
		grid-template-columns: minmax(0, 1fr);
	}
	.svhs-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.svhs-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
	.svhs-container { padding: 0 16px; }
	.svhs-grid--2,
	.svhs-grid--3,
	.svhs-grid--4 { grid-template-columns: minmax(0, 1fr); }
	.svhs-grid--auto { grid-template-columns: minmax(0, 1fr); }
	.svhs-grid--auto-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   2. 页头
   -------------------------------------------------------------------------- */
.svhs-header {
	position: sticky;
	top: 0;
	z-index: var(--svhs-z-header);
	background: rgba(255, 255, 255, .94);
	backdrop-filter: saturate(180%) blur(16px);
	-webkit-backdrop-filter: saturate(180%) blur(16px);
	border-bottom: 1px solid var(--svhs-line-soft);
	transition: box-shadow var(--svhs-t) var(--svhs-ease),
		background var(--svhs-t) var(--svhs-ease),
		border-color var(--svhs-t) var(--svhs-ease);
}

.svhs-header.is-stuck {
	box-shadow: 0 1px 12px rgba(17, 24, 39, .06);
	background: rgba(255, 255, 255, .98);
	border-bottom-color: var(--svhs-line);
}

.svhs-header-inner {
	display: flex;
	align-items: center;
	gap: var(--svhs-s6);
	height: var(--svhs-header-h);
}

/* 站标 */
.svhs-brand {
	flex-shrink: 0;
}

.svhs-brand-link {
	display: flex;
	align-items: center;
	gap: 11px;
	color: var(--svhs-ink);
	text-decoration: none;
}

.svhs-brand-link:hover {
	color: var(--svhs-ink);
}

.svhs-brand-mark {
	display: flex;
	line-height: 0;
	filter: drop-shadow(0 3px 8px rgba(30, 90, 168, .22));
	transition: transform var(--svhs-t) var(--svhs-ease-out);
}

.svhs-brand-link:hover .svhs-brand-mark {
	transform: translateY(-1px) scale(1.03);
}

.svhs-brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.svhs-brand-name {
	font-size: 17px;
	font-weight: 800;
	letter-spacing: .3px;
	color: var(--svhs-ink);
	white-space: nowrap;
}

.svhs-brand-tagline {
	font-size: 11.5px;
	color: var(--svhs-muted-2);
	letter-spacing: .6px;
	margin-top: 1px;
}

/* 主导航 */
.svhs-nav {
	margin-left: var(--svhs-s2);
	flex: 1 1 auto;
	min-width: 0;
}

.svhs-nav-list {
	display: flex;
	align-items: center;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.svhs-nav-list > li {
	position: relative;
}

.svhs-nav-list > li > a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 13px;
	border-radius: var(--svhs-r-sm);
	font-size: 14.5px;
	font-weight: 500;
	color: var(--svhs-ink-2);
	text-decoration: none;
	white-space: nowrap;
	transition: background var(--svhs-t-fast) var(--svhs-ease),
		color var(--svhs-t-fast) var(--svhs-ease);
}

.svhs-nav-icon {
	width: 17px;
	height: 17px;
	opacity: .75;
}

.svhs-nav-list > li > a:hover {
	background: var(--svhs-primary-soft);
	color: var(--svhs-primary);
}

.svhs-nav-list > li.current-menu-item > a,
.svhs-nav-list > li.current-menu-ancestor > a,
.svhs-nav-list > li.current_page_item > a,
.svhs-nav-list > li.current_page_parent > a {
	background: var(--svhs-primary-soft);
	color: var(--svhs-primary);
	font-weight: 600;
}

.svhs-nav-list > li.current-menu-item > a .svhs-nav-icon,
.svhs-nav-list > li.current_page_item > a .svhs-nav-icon {
	opacity: 1;
}

/* 二级菜单 */
.svhs-nav-list .sub-menu {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	min-width: 190px;
	background: #fff;
	border: 1px solid var(--svhs-line);
	border-radius: var(--svhs-r-md);
	box-shadow: var(--svhs-sh-dropdown);
	padding: 7px;
	list-style: none;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity var(--svhs-t) var(--svhs-ease),
		transform var(--svhs-t) var(--svhs-ease),
		visibility var(--svhs-t);
	z-index: var(--svhs-z-dropdown);
}

.svhs-nav-list > li:hover > .sub-menu,
.svhs-nav-list > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.svhs-nav-list .sub-menu a {
	display: block;
	padding: 8px 12px;
	border-radius: var(--svhs-r-xs);
	font-size: 14px;
	color: var(--svhs-ink-2);
}

.svhs-nav-list .sub-menu a:hover {
	background: var(--svhs-primary-soft);
	color: var(--svhs-primary);
}

/* 页头工具区 */
.svhs-header-tools {
	display: flex;
	align-items: center;
	gap: var(--svhs-s2);
	margin-left: auto;
	flex-shrink: 0;
}

.svhs-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid transparent;
	border-radius: var(--svhs-r-sm);
	background: transparent;
	color: var(--svhs-ink-2);
	transition: all var(--svhs-t-fast) var(--svhs-ease);
}

.svhs-icon-btn:hover {
	background: var(--svhs-primary-soft);
	color: var(--svhs-primary);
}

/* 用户下拉 */
.svhs-user {
	position: relative;
}

.svhs-user-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 10px 4px 4px;
	border: 1px solid var(--svhs-line);
	border-radius: var(--svhs-r-full);
	background: #fff;
	color: var(--svhs-ink);
	transition: all var(--svhs-t-fast) var(--svhs-ease);
}

.svhs-user-trigger:hover {
	border-color: #c9d9ee;
	background: var(--svhs-primary-soft);
}

.svhs-user-name {
	font-size: 14px;
	font-weight: 500;
	max-width: 96px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.svhs-user-caret {
	width: 15px;
	height: 15px;
	color: var(--svhs-muted-2);
	transform: rotate(90deg);
	transition: transform var(--svhs-t) var(--svhs-ease);
}

.svhs-user.is-open .svhs-user-caret {
	transform: rotate(-90deg);
}

.svhs-dropdown {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: 268px;
	background: #fff;
	border: 1px solid var(--svhs-line);
	border-radius: var(--svhs-r-lg);
	box-shadow: var(--svhs-sh-dropdown);
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px) scale(.98);
	transform-origin: top right;
	transition: opacity var(--svhs-t) var(--svhs-ease),
		transform var(--svhs-t) var(--svhs-ease-out),
		visibility var(--svhs-t);
	z-index: var(--svhs-z-dropdown);
}

.svhs-user.is-open .svhs-dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

.svhs-dropdown-head {
	display: flex;
	gap: 12px;
	padding: 16px;
	background: linear-gradient(135deg, var(--svhs-primary-soft), #f7fbff);
	border-bottom: 1px solid var(--svhs-line-soft);
}

.svhs-dropdown-head strong {
	display: block;
	font-size: 15px;
	margin-bottom: 2px;
}

.svhs-dropdown-meta {
	display: block;
	font-size: 12px;
	color: var(--svhs-muted);
	margin-bottom: 6px;
}

.svhs-verify-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11.5px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: var(--svhs-r-full);
}

.svhs-verify-chip svg {
	width: 12px;
	height: 12px;
}

.svhs-verify-chip.is-ok {
	background: var(--svhs-success-soft);
	color: #0b7a44;
}

.svhs-verify-chip.is-warn {
	background: var(--svhs-warning-soft);
	color: #985f0d;
}

.svhs-dropdown-body {
	padding: 7px;
}

.svhs-dropdown-body a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 11px;
	border-radius: var(--svhs-r-sm);
	font-size: 14px;
	color: var(--svhs-ink-2);
}

.svhs-dropdown-body a svg {
	width: 17px;
	height: 17px;
	color: var(--svhs-muted-2);
}

.svhs-dropdown-body a:hover {
	background: var(--svhs-primary-soft);
	color: var(--svhs-primary);
}

.svhs-dropdown-body a:hover svg {
	color: var(--svhs-primary);
}

.svhs-dropdown-danger {
	color: #b32d2e !important;
}

.svhs-dropdown-danger svg {
	color: #d63638 !important;
}

.svhs-dropdown-danger:hover {
	background: var(--svhs-danger-soft) !important;
	color: #a32627 !important;
}

.svhs-auth-actions {
	display: flex;
	align-items: center;
	gap: var(--svhs-s2);
}

/* 搜索面板 */
.svhs-search-panel {
	border-top: 1px solid var(--svhs-line-soft);
	background: #fff;
	padding: var(--svhs-s4) 0;
	animation: svhsSlideDown var(--svhs-t) var(--svhs-ease-out);
}

@keyframes svhsSlideDown {
	from { opacity: 0; transform: translateY(-8px); }
	to { opacity: 1; transform: translateY(0); }
}

.svhs-search-form {
	display: flex;
	align-items: center;
	gap: var(--svhs-s3);
	position: relative;
}

.svhs-search-form-icon {
	position: absolute;
	left: 15px;
	width: 18px;
	height: 18px;
	color: var(--svhs-muted-2);
	pointer-events: none;
}

.svhs-search-form input[type="search"] {
	padding-left: 44px;
	height: 44px;
	border-radius: var(--svhs-r-full);
	background: var(--svhs-surface-2);
	border-color: var(--svhs-line);
}

.svhs-search-form input[type="search"]:focus {
	background: #fff;
}

.svhs-search-form .svhs-btn {
	border-radius: var(--svhs-r-full);
	height: 44px;
	padding: 0 26px;
	flex-shrink: 0;
}

/* 移动端菜单按钮 */
.svhs-menu-toggle {
	display: none;
}

.svhs-menu-close-icon {
	display: none;
}

/* --------------------------------------------------------------------------
   3. 主体与页面标题
   -------------------------------------------------------------------------- */
.svhs-main {
	display: block;
}

.svhs-content-area {
	padding: var(--svhs-s8) 0 var(--svhs-s10);
}

.svhs-content-area--tight {
	padding: var(--svhs-s6) 0 var(--svhs-s9);
}

.svhs-page-header {
	margin-bottom: var(--svhs-s7);
}

.svhs-page-eyebrow {
	display: inline-block;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: var(--svhs-primary);
	background: var(--svhs-primary-soft);
	padding: 4px 12px;
	border-radius: var(--svhs-r-full);
	margin-bottom: var(--svhs-s3);
}

.svhs-page-title {
	margin: 0 0 var(--svhs-s2);
	font-size: 30px;
	letter-spacing: -.02em;
	line-height: 1.3;
}

.svhs-page-subtitle {
	margin: 0;
	font-size: 15px;
	color: var(--svhs-muted);
	max-width: 680px;
	line-height: 1.8;
}

/* 面包屑 */
.svhs-crumbs {
	margin-bottom: var(--svhs-s4);
}

.svhs-crumbs-list {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 13px;
}

.svhs-crumb a {
	color: var(--svhs-muted);
}

.svhs-crumb a:hover {
	color: var(--svhs-primary);
}

.svhs-crumb.is-current {
	color: var(--svhs-ink-2);
	font-weight: 500;
}

.svhs-crumb-sep {
	display: flex;
	color: var(--svhs-muted-2);
}

.svhs-crumb-sep svg {
	width: 13px;
	height: 13px;
}

/* 区块标题 */
.svhs-section {
	margin-bottom: var(--svhs-s9);
}

.svhs-section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--svhs-s4);
	margin-bottom: var(--svhs-s5);
}

.svhs-section-title {
	position: relative;
	margin: 0;
	padding-left: 15px;
	font-size: 21px;
	letter-spacing: -.01em;
}

.svhs-section-title::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 4px;
	height: 20px;
	border-radius: var(--svhs-r-full);
	background: var(--svhs-grad-primary);
}

.svhs-section-title small {
	display: inline-block;
	margin-left: 10px;
	font-size: 13px;
	font-weight: 400;
	color: var(--svhs-muted-2);
	vertical-align: 2px;
}

.svhs-section-more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--svhs-muted);
	flex-shrink: 0;
	padding-bottom: 3px;
}

.svhs-section-more svg {
	width: 15px;
	height: 15px;
	transition: transform var(--svhs-t-fast) var(--svhs-ease);
}

.svhs-section-more:hover {
	color: var(--svhs-primary);
}

.svhs-section-more:hover svg {
	transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   4. 页脚
   -------------------------------------------------------------------------- */
.svhs-footer {
	background: #16233a;
	color: rgba(255, 255, 255, .72);
	margin-top: auto;
	position: relative;
}

.svhs-footer::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	background: var(--svhs-grad-primary);
}

.svhs-footer-inner {
	padding: var(--svhs-s9) 20px var(--svhs-s6);
}

.svhs-footer-main {
	display: grid;
	grid-template-columns: minmax(0, 1.7fr) repeat(2, minmax(0, 1fr));
	gap: var(--svhs-s8);
	padding-bottom: var(--svhs-s7);
	border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.svhs-footer-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: var(--svhs-s4);
}

.svhs-footer-logo strong {
	font-size: 17px;
	color: #fff;
	font-weight: 700;
	letter-spacing: .3px;
}

.svhs-footer-desc {
	font-size: 14px;
	color: rgba(255, 255, 255, .82);
	margin-bottom: var(--svhs-s3);
	font-weight: 500;
}

.svhs-footer-note {
	font-size: 13px;
	line-height: 1.85;
	color: rgba(255, 255, 255, .5);
	margin: 0;
	max-width: 460px;
}

.svhs-footer-links h4 {
	font-size: 14px;
	color: #fff;
	margin: 0 0 var(--svhs-s4);
	font-weight: 600;
	letter-spacing: .5px;
}

.svhs-footer-links ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.svhs-footer-links a,
.svhs-footer-links span {
	font-size: 13.5px;
	color: rgba(255, 255, 255, .62);
}

.svhs-footer-links a:hover {
	color: #fff;
}

.svhs-footer-widgets {
	grid-column: 1 / -1;
}

.svhs-footer-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: var(--svhs-s4);
	padding-top: var(--svhs-s5);
}

.svhs-copyright {
	margin: 0;
	font-size: 13px;
	color: rgba(255, 255, 255, .45);
}

.svhs-copyright .svhs-sep {
	margin: 0 6px;
	opacity: .5;
}

.svhs-footer-menu {
	display: flex;
	gap: var(--svhs-s5);
	list-style: none;
	margin: 0;
	padding: 0;
}

.svhs-footer-menu a {
	font-size: 13px;
	color: rgba(255, 255, 255, .55);
}

.svhs-footer-menu a:hover {
	color: #fff;
}

@media (max-width: 860px) {
	.svhs-footer-main {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: var(--svhs-s7);
	}
	.svhs-footer-brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 520px) {
	.svhs-footer-main {
		grid-template-columns: minmax(0, 1fr);
	}
	.svhs-footer-inner {
		padding: var(--svhs-s8) 16px var(--svhs-s5);
	}
	.svhs-footer-bottom {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* --------------------------------------------------------------------------
   5. 回到顶部
   -------------------------------------------------------------------------- */
.svhs-to-top {
	position: fixed;
	right: 26px;
	bottom: 30px;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: var(--svhs-r-full);
	background: var(--svhs-primary);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--svhs-sh-primary);
	z-index: var(--svhs-z-header);
	transition: all var(--svhs-t) var(--svhs-ease-out);
	animation: svhsFadeUp var(--svhs-t-slow) var(--svhs-ease-out);
}

.svhs-to-top svg {
	width: 19px;
	height: 19px;
	transform: rotate(-90deg);
}

.svhs-to-top:hover {
	background: var(--svhs-primary-hover);
	transform: translateY(-3px);
	box-shadow: 0 10px 26px rgba(30, 90, 168, .3);
}

@keyframes svhsFadeUp {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
	.svhs-to-top {
		right: 16px;
		bottom: 20px;
		width: 40px;
		height: 40px;
	}
}

/* --------------------------------------------------------------------------
   6. 移动端导航
   -------------------------------------------------------------------------- */
@media (max-width: 940px) {
	.svhs-brand-tagline {
		display: none;
	}

	.svhs-nav {
		position: fixed;
		top: var(--svhs-header-h);
		left: 0;
		right: 0;
		bottom: 0;
		margin: 0;
		background: #fff;
		border-top: 1px solid var(--svhs-line);
		padding: var(--svhs-s4) var(--svhs-s5) var(--svhs-s9);
		overflow-y: auto;
		transform: translateX(-100%);
		opacity: 0;
		visibility: hidden;
		transition: transform var(--svhs-t-slow) var(--svhs-ease-out),
			opacity var(--svhs-t) var(--svhs-ease),
			visibility var(--svhs-t-slow);
		z-index: var(--svhs-z-header);
	}

	.svhs-nav.is-open {
		transform: translateX(0);
		opacity: 1;
		visibility: visible;
	}

	.svhs-nav-list {
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
	}

	.svhs-nav-list > li > a {
		padding: 13px 14px;
		font-size: 15.5px;
		border-radius: var(--svhs-r-md);
	}

	.svhs-nav-icon {
		width: 19px;
		height: 19px;
	}

	.svhs-nav-list .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 0;
		border-left: 2px solid var(--svhs-line);
		border-radius: 0;
		padding: 0 0 0 14px;
		margin: 2px 0 6px 14px;
		display: block;
		transition: none;
	}

	.svhs-menu-toggle {
		display: inline-flex;
	}

	.svhs-header.is-menu-open .svhs-menu-open-icon {
		display: none;
	}

	.svhs-header.is-menu-open .svhs-menu-close-icon {
		display: block;
	}

	.svhs-user-name {
		display: none;
	}

	.svhs-user-trigger {
		padding: 4px;
		border: 0;
		background: transparent;
	}

	.svhs-user-trigger .svhs-level,
	.svhs-user-caret {
		display: none;
	}

	.svhs-dropdown {
		position: fixed;
		top: var(--svhs-header-h);
		right: 12px;
		left: 12px;
		width: auto;
		transform-origin: top center;
	}
}

@media (max-width: 560px) {
	.svhs-auth-actions .svhs-btn--ghost {
		display: none;
	}

	.svhs-search-form {
		flex-wrap: wrap;
	}

	.svhs-search-form input[type="search"] {
		flex: 1 1 100%;
	}
}

/* 移动端菜单打开时锁定滚动 */
body.svhs-nav-open {
	overflow: hidden;
}
