/*
Theme Name: MH Magazine Lite
Theme URI: https://www.englishtour.cn/
Description: 基于 MH Magazine lite 设计风格的 Typecho 主题，包含主页、分类页、文章详情页三套模板，支持响应式布局。
Author: admin
Author URI: https://www.englishtour.cn/
Version: 1.0.0
*/

/* ==========================================================================
   1. 变量与重置
   ========================================================================== */

:root {
	--accent: #e64946;
	--dark: #2a2a2a;
	--border: #ebebeb;
	--muted: #979797;
	--bg-light: #f5f5f5;
	--font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica,
	        "Segoe UI", Arial, "PingFang SC", "Hiragino Sans GB",
	        "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body, div, span, h1, h2, h3, h4, h5, h6, p, a, ul, ol, li,
form, input, textarea, img, nav, header, footer, article, aside, figure,
blockquote, cite, table, th, td { margin: 0; padding: 0; border: 0; }
article, aside, figure, footer, header, nav, section { display: block; }
ol, ul { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; }
img { max-width: 100%; height: auto; vertical-align: bottom; }
input, button, textarea { font-family: inherit; }
a { color: #000; text-decoration: none; }
a:hover { color: var(--accent); }

html {
	overflow-y: scroll;
}

body {
	font-family: var(--font);
	font-size: 14px;
	line-height: 1.6;
	color: #000;
	background: #f7f7f7;
	word-wrap: break-word;
}

/* ==========================================================================
   2. 布局容器
   ========================================================================== */

.outer {
	width: 95%;
	max-width: 1080px;
	margin: 25px auto;
	background: #fff;
	box-shadow: 0 0 10px rgba(50, 50, 50, .17);
}

.main { padding: 25px; background: #fff; }
.main::after { content: ""; display: block; clear: both; }
.content { float: left; width: 65.83%; margin-right: 2.5%; }
.sidebar { float: right; width: 31.66%; }

/* ==========================================================================
   3. 页头与导航
   ========================================================================== */

.site-header { background: #fff; }
.site-logo { padding: 20px; }
.site-title { font-size: 32px; line-height: 1; text-transform: uppercase; }
.site-title a { color: #000; }
.site-title a:hover { color: var(--accent); }

.main-nav-wrap { position: relative; background: var(--dark); }

.nav-toggle {
	position: absolute; top: 0; left: 0; width: 1px; height: 1px;
	opacity: 0; pointer-events: none;
}
.nav-toggle-label {
	display: none; padding: 14px 20px; cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.nav-toggle-label span {
	display: block; width: 22px; height: 2px;
	margin: 4px 0 4px auto; background: #fff;
	transition: background-color .25s ease-out;
}
.nav-toggle-label:hover span { background: var(--accent); }
.nav-toggle:focus-visible ~ .nav-toggle-label {
	outline: 2px solid var(--accent); outline-offset: -2px;
}

.main-nav { border-bottom: 5px solid var(--accent); }
.menu::after { content: ""; display: block; clear: both; }
.menu > li { float: left; position: relative; }
.menu > li > a {
	display: block; padding: 10px 20px; color: #fff; font-size: 14px;
	font-weight: 700; text-transform: uppercase;
	border-left: 1px solid rgba(255, 255, 255, .1);
	transition: background-color .25s ease-out;
}
.menu > li:first-child > a { border-left: 0; }
.menu > li:hover, .menu > li.current-menu-item { background: var(--accent); }
.menu > li:hover > a { color: #fff; }
.menu > li.has-children > a::after {
	content: "\25BE"; display: inline-block; margin-left: 6px;
	font-size: 9px; vertical-align: middle;
}

.sub-menu {
	display: none; position: absolute; left: 0; top: 100%;
	z-index: 999; min-width: 16em; background: var(--dark);
}
.menu > li:hover > .sub-menu,
.menu > li:focus-within > .sub-menu { display: block; }
.sub-menu li { width: 100%; }
.sub-menu li:hover { background: var(--accent); }
.sub-menu li a {
	display: block; padding: 10px 20px; color: #fff; font-size: 13px;
	font-weight: 700; border-top: 1px solid rgba(255, 255, 255, .08);
}
.sub-menu li:first-child a { border-top: 0; }

/* ==========================================================================
   4. 页面标题（列表页）
   ========================================================================== */

.page-header {
	margin-bottom: 25px; padding-bottom: 15px;
	border-bottom: 1px solid var(--border);
}
.page-title { font-size: 28px; line-height: 1.3; margin-bottom: 8px; }
.page-desc { font-size: 13px; color: var(--muted); }

/* ==========================================================================
   5. 文章列表
   ========================================================================== */

.post {
	padding-bottom: 20px; margin-bottom: 20px;
	border-bottom: 1px solid var(--border);
}
.post::after { content: ""; display: block; clear: both; }
.post-thumb { float: left; width: 235px; margin-right: 20px; }
.post-thumb img { display: block; width: 100%; }
.post-body { overflow: hidden; }
.post-title { font-size: 20px; line-height: 1.3; }
.post-title a { color: #000; }
.post-title a:hover { color: var(--accent); }
.post-meta { margin-top: 5px; font-size: 13px; color: var(--muted); }
.post-meta span { margin-right: 12px; }
.post-meta a { color: var(--muted); }
.post-meta a:hover { color: var(--accent); }
.post-excerpt { margin-top: 10px; }

/* ==========================================================================
   6. 文章详情
   ========================================================================== */

.entry-header { margin-bottom: 20px; }
.entry-title { font-size: 28px; line-height: 1.3; margin-bottom: 10px; }
.entry-meta {
	font-size: 13px; color: var(--muted); padding: 5px 0;
	border-top: 1px dotted var(--border);
	border-bottom: 1px dotted var(--border);
}
.entry-meta span { margin-right: 15px; }
.entry-meta a { color: var(--muted); }
.entry-meta a:hover { color: var(--accent); }

.entry-thumbnail { margin-bottom: 20px; }
.entry-thumbnail img { width: 100%; }

.entry-content { font-size: 15px; line-height: 1.8; color: var(--dark); }
.entry-content p,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content ul,
.entry-content ol,
.entry-content blockquote,
.entry-content pre,
.entry-content figure { margin-bottom: 20px; }
.entry-content h2 {
	font-size: 24px; margin-top: 30px; padding-bottom: 5px;
	border-bottom: 2px solid var(--accent);
}
.entry-content h3 { font-size: 20px; margin-top: 25px; }
.entry-content h4 { font-size: 17px; margin-top: 20px; }
.entry-content ul { list-style: square; margin-left: 25px; }
.entry-content ol { list-style: decimal; margin-left: 25px; }
.entry-content li { margin-bottom: 6px; }
.entry-content blockquote {
	padding: 10px 0 10px 20px; border-left: 5px solid var(--accent);
	color: #666; font-style: italic; background: #fafafa;
}
.entry-content a { color: var(--accent); font-weight: 600; }
.entry-content a:hover { text-decoration: underline; }
.entry-content img { display: block; max-width: 100%; margin: 20px auto; }
.entry-content code {
	padding: 2px 6px; font-family: Consolas, Courier New, monospace;
	font-size: 13px; color: #c7254e; background: #f9f2f4; border-radius: 3px;
}
.entry-content pre {
	padding: 15px; overflow: auto; background: var(--bg-light);
	border: 1px solid var(--border); border-radius: 3px;
}
.entry-content pre code { padding: 0; color: #000; background: none; }

/* 文章标签 */
.entry-tags { margin: 25px 0; font-size: 12px; color: #fff; }
.entry-tags::after { content: ""; display: block; clear: both; }
.entry-tags li {
	float: left; margin: 0 6px 6px 0; background: var(--dark);
	text-transform: uppercase; font-weight: 700;
	transition: background-color .25s ease-out;
}
.entry-tags li:hover { background: var(--accent); }
.entry-tags li a { display: block; padding: 8px 15px; color: #fff; }

/* 作者简介 */
.author-box {
	padding: 25px 0; margin-bottom: 25px;
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}
.author-box::after { content: ""; display: block; clear: both; }
.author-avatar {
	float: left; width: 70px; height: 70px; margin-right: 20px;
	border: 1px solid var(--border); border-radius: 50%;
	overflow: hidden; font-size: 0; line-height: 0;
}
.author-avatar img {
	display: block; width: 100%; height: 100%;
	object-fit: cover; border-radius: 50%; background: var(--bg-light);
}
.author-info { overflow: hidden; }
.author-name { font-size: 16px; font-weight: 700; margin-bottom: 5px; }
.author-desc { font-size: 13px; color: #666; line-height: 1.6; }

/* 上下篇导航 */
.post-nav {
	padding-bottom: 25px; margin-bottom: 25px;
	border-bottom: 1px solid var(--border);
}
.post-nav::after { content: ""; display: block; clear: both; }
.post-nav-prev, .post-nav-next { float: left; width: 48%; }
.post-nav-next { float: right; text-align: right; }
.post-nav span {
	display: block; font-size: 12px; font-weight: 700;
	color: var(--accent); text-transform: uppercase; margin-bottom: 5px;
}
.post-nav a { font-size: 14px; font-weight: 600; line-height: 1.4; }
.post-nav a:hover { color: var(--accent); }

/* ==========================================================================
   7. 评论区
   ========================================================================== */

.comments-area {
	margin-top: 25px; padding-top: 25px;
	border-top: 1px solid var(--border);
}
.comments-title { font-size: 20px; margin-bottom: 20px; }
.comment-list { margin-bottom: 25px; }
.comment {
	padding-bottom: 20px; margin-bottom: 20px;
	border-bottom: 1px solid var(--border);
}
.comment::after { content: ""; display: block; clear: both; }
.comment-avatar {
	float: left; width: 50px; height: 50px; margin-right: 15px;
	border: 1px solid var(--bg-light); border-radius: 50%;
	overflow: hidden; font-size: 0; line-height: 0;
}
.comment-avatar img {
	display: block; width: 100%; height: 100%;
	object-fit: cover; border-radius: 50%; background: var(--bg-light);
}
.comment-body { overflow: hidden; }
.comment-meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.comment-author {
	font-size: 15px; font-weight: 700; color: #000; margin-right: 10px;
}
.comment-content { font-size: 14px; color: var(--dark); }
.comment-reply { margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--accent); }

/* 评论表单 */
.comment-form { margin-top: 25px; }
.comment-form p { margin-bottom: 15px; }
.comment-form label {
	display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	display: block; width: 100%; padding: 10px; font-size: 14px;
	background: var(--bg-light); border: 1px solid rgba(0, 0, 0, .1);
	border-radius: 0; outline: none;
	transition: border-color .25s ease-in-out;
	-webkit-appearance: none; appearance: none;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--accent); }
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form input[type="submit"],
.comment-form button[type="submit"] {
	display: inline-block; min-width: 150px; padding: 10px 20px;
	font-size: 14px; font-weight: 700; color: #fff; background: var(--accent);
	border: 0; border-radius: 0; cursor: pointer; text-transform: uppercase;
	transition: background-color .1s linear;
	-webkit-appearance: none; appearance: none;
}
.comment-form input[type="submit"]:hover,
.comment-form button[type="submit"]:hover { background: var(--dark); }

/* 姓名 / 邮箱 / 网站三项并排（自适应，窄屏自动换行） */
.comment-form form > p:nth-of-type(2),
.comment-form form > p:nth-of-type(3),
.comment-form form > p:nth-of-type(4) {
	float: left;
	width: calc(33.333% - 14px);
	margin-right: 21px;
}
.comment-form form > p:nth-of-type(2) { clear: left; }
.comment-form form > p:nth-of-type(4) { margin-right: 0; }
.comment-form form > p:nth-of-type(5) { clear: both; }

/* ==========================================================================
   8. 分页
   ========================================================================== */

.pagination { margin-top: 25px; text-align: center; }
.pagination .nav-links { display: inline-block; }
.pagination a, .pagination span {
	display: inline-block; min-width: 42px; padding: 10px 15px;
	margin: 0 3px 5px 0; background: var(--bg-light); color: #000;
	font-weight: 700; text-align: center;
	transition: background-color .25s ease-out, color .25s ease-out;
}
.pagination .current, .pagination a:hover {
	background: var(--accent); color: #fff;
}
.pagination .dots { background: none; color: var(--muted); }
.pagination .next, .pagination .prev { min-width: auto; }

/* ==========================================================================
   9. 侧边栏
   ========================================================================== */

.widget { margin-bottom: 25px; overflow: hidden; }
.widget-title {
	font-size: 16px; text-transform: uppercase; padding-bottom: 5px;
	margin-bottom: 20px; border-bottom: 3px solid var(--accent);
}

.search-form { padding: 5%; background: var(--bg-light); }
.search-field {
	display: block; width: 100%; padding: 10px; font-size: 12px;
	text-transform: uppercase; color: #1f1e1e; background: #fff;
	border: 1px solid var(--border); border-radius: 0; outline: none;
	-webkit-appearance: none; appearance: none;
}
.search-field:focus { border-color: var(--accent); }
.search-submit { display: none; }

.popular-item {
	padding: 20px 0; border-bottom: 1px dotted var(--border);
}
.popular-item:first-child { padding-top: 0; }
.popular-item::after { content: ""; display: block; clear: both; }
.popular-thumb { float: left; width: 80px; margin-right: 15px; }
.popular-thumb img { display: block; width: 100%; }
.popular-body { overflow: hidden; }
.popular-title { font-size: 14px; line-height: 1.3; }
.popular-title a:hover { color: var(--accent); }
.popular-meta { margin-top: 5px; font-size: 11px; color: var(--muted); }

.tagcloud a {
	display: inline-block; padding: 5px 10px; margin: 0 4px 8px 0;
	font-size: 12px; font-weight: 700; color: #fff; background: var(--dark);
	text-transform: uppercase; transition: background-color .25s ease-out;
}
.tagcloud a:hover { color: #fff; background: var(--accent); }

/* ==========================================================================
   10. 页脚
   ========================================================================== */

.site-footer {
	padding: 10px 25px; background: var(--dark);
	border-top: 3px solid #999; font-size: 12px; color: #999;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--accent); }

/* ==========================================================================
   11. 响应式
   ========================================================================== */

@media screen and (max-width: 1120px) {
	.menu > li > a { padding: 10px 15px; font-size: 12px; }
}

@media screen and (max-width: 900px) {
	.outer { width: 100%; margin: 0 auto; }
	.main, .site-logo { padding: 20px; }
	.site-footer { padding: 10px 20px; }
	.widget { margin-bottom: 20px; }
	.page-title, .entry-title { font-size: 24px; }

	/* 评论表单：三项变两列 */
	.comment-form form > p:nth-of-type(2),
	.comment-form form > p:nth-of-type(3),
	.comment-form form > p:nth-of-type(4) {
		width: calc(50% - 10px);
		margin-right: 20px;
	}
	.comment-form form > p:nth-of-type(3),
	.comment-form form > p:nth-of-type(4) { margin-right: 0; }
	.comment-form form > p:nth-of-type(4) { clear: left; }
}

@media screen and (max-width: 767px) {
	.nav-toggle-label { display: block; }
	.main-nav { display: none; }
	.nav-toggle:checked ~ .main-nav { display: block; }

	.menu > li { float: none; width: 100%; }
	.menu > li > a {
		padding: 12px 20px; border-left: 0;
		border-top: 1px solid rgba(255, 255, 255, .1);
	}
	.menu > li:first-child > a { border-top: 0; }
	.menu > li.has-children > a::after { float: right; }

	.sub-menu {
		display: block; position: static; min-width: 0; background: #1e1e1e;
	}
	.sub-menu li a {
		padding: 10px 20px 10px 35px;
		border-top: 1px solid rgba(255, 255, 255, .06);
	}

	.content, .sidebar { float: none; width: 100%; margin: 0; }
	.sidebar { margin-top: 20px; }

	.post-nav-prev, .post-nav-next {
		float: none; width: 100%; text-align: left;
	}
	.post-nav-next { margin-top: 15px; }
}

@media screen and (max-width: 620px) {
	.post-thumb { width: 80px; margin-right: 15px; }
	.post-title { font-size: 14px; }
	.post-meta { font-size: 11px; }
	.post-excerpt { display: none; }

	.entry-content { font-size: 14px; }
	.author-avatar { width: 50px; height: 50px; }
	.comment-avatar { width: 40px; height: 40px; }

	.pagination a, .pagination span {
		min-width: 36px; padding: 8px 10px; font-size: 12px;
	}

	/* 评论表单：三项各自占满一行 */
	.comment-form form > p:nth-of-type(2),
	.comment-form form > p:nth-of-type(3),
	.comment-form form > p:nth-of-type(4) {
		float: none;
		width: 100%;
		margin-right: 0;
		clear: both;
	}
}