/*
Theme Name: ZipRAR Theme
Theme URI: https://ziprar-cn.com/
Author: ZipRAR
Author URI: https://ziprar-cn.com/
Description: ZipRAR 解压缩工具产品主页主题。基于静态产品页 1:1 转化，主打「免费rar压缩包、ZIP免费解压工具」关键词，翡翠绿主色，语义化结构 + 原生 JS 交互，无第三方前端库依赖。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ziprar-theme
Tags: landing-page, one-column, custom-menu, featured-images, translation-ready
*/

/* ------------------------------------------------------------------
   本文件仅承载 WordPress 主题声明与必备基础类。
   页面视觉样式全部来自 static/css/styles.css（functions.php 注册入队），
   避免 @import 带来的渲染阻塞，保证首屏加载速度。
------------------------------------------------------------------ */

/* WordPress 核心基础类 -------------------------------------------------- */
.alignleft {
	float: left;
	margin-right: 1.5em;
	margin-bottom: 1.5em;
}

.alignright {
	float: right;
	margin-left: 1.5em;
	margin-bottom: 1.5em;
}

.aligncenter {
	clear: both;
	display: block;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 1.5em;
}

.alignwide {
	margin-left: -80px;
	margin-right: -80px;
}

.alignfull {
	margin-left: calc( -100vw / 2 + 100% / 2 );
	margin-right: calc( -100vw / 2 + 100% / 2 );
	max-width: 100vw;
	width: 100vw;
}

.wp-caption {
	max-width: 100%;
	margin-bottom: 1.5em;
}

.wp-caption img {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.wp-caption-text {
	text-align: center;
	font-size: 0.875em;
	margin: 0.5em 0 1.5em;
}

.gallery-caption {
	font-size: 0.875em;
}

.bypostauthor {
	line-height: inherit;
}

/* 屏幕阅读器专用文本（跳转链接等） ------------------------------------ */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: #f1f1f1;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	clip-path: none;
	color: #21759b;
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* 编辑器内容宽度对齐 ---------------------------------------------------- */
html .editor-content {
	max-width: 1200px;
}

/* WP 内容页基础排版（page/single/archive/search/404 共用） -------------- */
.ziprar-basic-page {
	max-width: 860px;
	margin: 0 auto;
	padding: 140px 20px 80px;
	color: #1a2332;
}

.ziprar-basic-page .entry-title,
.ziprar-basic-page .archive-title {
	margin: 0 0 16px;
	font-size: 2rem;
	line-height: 1.3;
}

.ziprar-basic-page .entry-meta {
	margin: 0 0 24px;
	font-size: 0.875rem;
	color: #64748b;
}

.ziprar-basic-page .entry-content {
	font-size: 1.0625rem;
	line-height: 1.85;
}

.ziprar-basic-page .entry-content h2 {
	margin: 2em 0 0.8em;
	font-size: 1.5rem;
}

.ziprar-basic-page .entry-content h3 {
	margin: 1.8em 0 0.7em;
	font-size: 1.25rem;
}

.ziprar-basic-page .entry-content p,
.ziprar-basic-page .entry-content ul,
.ziprar-basic-page .entry-content ol {
	margin: 0 0 1.4em;
}

.ziprar-basic-page .entry-content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

.ziprar-basic-page .entry-thumbnail {
	margin: 0 0 28px;
}

.ziprar-basic-page .entry-thumbnail img {
	width: 100%;
	height: auto;
	border-radius: 12px;
}

.ziprar-basic-page .entry-footer,
.ziprar-basic-page .entry-tags {
	margin-top: 32px;
	font-size: 0.9375rem;
	color: #475569;
}

.ziprar-basic-page .archive-item {
	padding: 24px 0;
	border-bottom: 1px solid #e2e8f0;
}

.ziprar-basic-page .archive-item .entry-title {
	margin: 0 0 8px;
	font-size: 1.375rem;
}

.ziprar-basic-page .archive-item .entry-title a {
	color: #0d8a52;
	text-decoration: none;
}

.ziprar-basic-page .archive-item .entry-title a:hover {
	text-decoration: underline;
}

.ziprar-basic-page .archive-description {
	margin-bottom: 28px;
	color: #475569;
}

.ziprar-404 {
	text-align: center;
}

.ziprar-404-search {
	max-width: 420px;
	margin: 32px auto 0;
}

.ziprar-basic-page .nav-links {
	display: flex;
	gap: 16px;
	justify-content: center;
	margin-top: 40px;
}

/* =====================================================================
   资讯列表页 / 文章详情页（与落地页翡翠绿设计语言一致）
   ===================================================================== */

.ziprar-blog {
	color: #1a2332;
	background: #ffffff;
}

/* 顶部横幅 */
.blog-hero {
	background: linear-gradient(180deg, #eff9f4 0%, #ffffff 100%);
	border-bottom: 1px solid #e3f5ec;
	padding: 150px 0 44px;
	text-align: center;
}

.blog-hero .section-kicker {
	justify-content: center;
}

.blog-hero-title {
	font-size: 2.1rem;
	line-height: 1.3;
	margin: 10px 0 12px;
	color: #10231a;
}

.blog-hero-desc {
	max-width: 640px;
	margin: 0 auto;
	color: #5b6b62;
	font-size: 1rem;
	line-height: 1.7;
}

/* 主布局：内容 + 侧边栏 */
.blog-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 36px;
	align-items: start;
	padding-top: 44px;
	padding-bottom: 80px;
}

@media (max-width: 1024px) {
	.blog-layout {
		grid-template-columns: 1fr;
	}
}

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

@media (max-width: 680px) {
	.post-grid {
		grid-template-columns: 1fr;
	}
}

.post-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 30px rgba(13, 138, 82, 0.14);
}

.post-card-cover img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.post-card-body {
	padding: 18px 20px 20px;
}

.post-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	font-size: 0.8125rem;
	color: #64748b;
}

.post-cat-chip {
	background: #e3f5ec;
	color: #0d8a52;
	padding: 3px 12px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	text-decoration: none;
}

.post-cat-chip:hover {
	background: #0d8a52;
	color: #ffffff;
}

.post-card-title {
	font-size: 1.125rem;
	line-height: 1.45;
	margin: 12px 0 8px;
}

.post-card-title a {
	color: #1a2332;
	text-decoration: none;
}

.post-card-title a:hover {
	color: #0d8a52;
}

.post-card-excerpt {
	font-size: 0.9375rem;
	color: #475569;
	line-height: 1.7;
	margin: 0 0 14px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.post-card-more {
	color: #0d8a52;
	font-weight: 600;
	font-size: 0.9375rem;
	text-decoration: none;
}

.post-card-more:hover {
	text-decoration: underline;
}

/* 分页 */
.blog-pagination {
	margin-top: 40px;
}

.blog-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.blog-pagination .page-numbers {
	display: inline-flex;
	min-width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	padding: 0 12px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	color: #1a2332;
	font-size: 0.9375rem;
	text-decoration: none;
	transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.blog-pagination .page-numbers.current {
	background: #0d8a52;
	border-color: #0d8a52;
	color: #ffffff;
}

.blog-pagination .page-numbers:hover:not(.current) {
	border-color: #0d8a52;
	color: #0d8a52;
}

.blog-pagination .page-numbers.dots {
	border: 0;
}

/* 侧边栏 */
.blog-sidebar .side-card {
	background: #f4faf7;
	border: 1px solid #dcefe5;
	border-radius: 12px;
	padding: 20px 22px;
	margin-bottom: 24px;
}

.side-title {
	margin: 0 0 12px;
	font-size: 1.0625rem;
	color: #0d8a52;
}

.side-posts {
	list-style: none;
	margin: 0;
	padding: 0;
}

.side-posts li {
	padding: 10px 0;
	border-bottom: 1px dashed #dcefe5;
}

.side-posts li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.side-posts a {
	display: block;
	color: #1a2332;
	font-size: 0.9375rem;
	line-height: 1.55;
	text-decoration: none;
}

.side-posts a:hover {
	color: #0d8a52;
}

.side-posts time {
	display: block;
	margin-top: 4px;
	font-size: 0.75rem;
	color: #5b6b62;
}

.side-cats {
	list-style: none;
	margin: 0;
	padding: 0;
}

.side-cats li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	border-bottom: 1px dashed #dcefe5;
}

.side-cats li:last-child {
	border-bottom: 0;
}

.side-cats a {
	flex: 1;
	color: #334155;
	font-size: 0.9375rem;
	text-decoration: none;
}

.side-cats a:hover {
	color: #0d8a52;
}

/* 提权到 .blog-sidebar .side-cta（0,2,0），与 .blog-sidebar .side-card 同级且靠后，
   防止浅色背景覆盖深绿渐变导致白字对比度不足。 */
.blog-sidebar .side-cta {
	background: linear-gradient(135deg, #0c7f4c 0%, #0b6b40 100%);
	border-color: #0b6b40;
	color: #ffffff;
}

.blog-sidebar .side-cta h3 {
	margin: 0 0 8px;
	font-size: 1.125rem;
	color: #ffffff;
}

.blog-sidebar .side-cta p {
	margin: 0 0 16px;
	font-size: 0.875rem;
	line-height: 1.7;
	/* 深绿底上的次级文字，保持 ≥4.5:1 对比度 */
	color: rgba(255, 255, 255, 0.92);
}

.blog-sidebar .side-cta .download-button {
	display: inline-flex;
	width: 100%;
	justify-content: center;
	background: #ffffff;
	color: #0d8a52;
	border: 0;
}

/* 面包屑 */
.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	padding: 150px 20px 0;
	font-size: 0.875rem;
	color: #64748b;
}

.breadcrumb a {
	color: #0d8a52;
	text-decoration: none;
}

.breadcrumb a:hover {
	text-decoration: underline;
}

.breadcrumb .current {
	color: #5b6b62;
	max-width: 380px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* 文章详情 */
.post-single {
	background: #ffffff;
	border: 1px solid #e8eef4;
	border-radius: 12px;
	padding: 32px 36px 40px;
	margin-top: 20px;
}

@media (max-width: 680px) {
	.post-single {
		padding: 24px 20px 32px;
	}
}

.post-title {
	font-size: 1.9rem;
	line-height: 1.35;
	margin: 14px 0 0;
	color: #10231a;
}

.post-cover {
	margin: 24px 0 28px;
	border-radius: 12px;
	overflow: hidden;
}

.post-cover img {
	display: block;
	width: 100%;
	aspect-ratio: 21 / 9;
	object-fit: cover;
}

.post-content {
	font-size: 1.0625rem;
	line-height: 1.9;
}

.post-content h2 {
	font-size: 1.375rem;
	line-height: 1.4;
	margin: 1.9em 0 0.8em;
	color: #10231a;
}

.post-content h3 {
	font-size: 1.125rem;
	margin: 1.6em 0 0.7em;
	color: #10231a;
}

.post-content p {
	margin: 0 0 1.35em;
}

.post-content ul,
.post-content ol {
	margin: 0 0 1.35em;
	padding-left: 1.5em;
}

.post-content li {
	margin-bottom: 0.5em;
}

.post-content a {
	color: #0d8a52;
	text-decoration: none;
	border-bottom: 1px solid rgba(13, 138, 82, 0.35);
}

.post-content a:hover {
	border-bottom-color: #0d8a52;
}

.post-content strong {
	color: #10231a;
}

/* 相关文章推荐 */
.related-posts {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid #e8eef4;
}

.related-posts h2 {
	font-size: 1.25rem;
	margin: 0 0 20px;
	color: #10231a;
}

.related-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

@media (max-width: 900px) {
	.related-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 620px) {
	.related-grid {
		grid-template-columns: 1fr;
	}
}

.related-card {
	display: block;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: #1a2332;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.related-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 30px rgba(13, 138, 82, 0.14);
}

.related-card img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.related-card .rc-body {
	padding: 14px 16px 18px;
}

.related-card time {
	font-size: 0.75rem;
	color: #5b6b62;
}

.related-card h3 {
	font-size: 0.9375rem;
	line-height: 1.5;
	margin: 6px 0 0;
}

.blog-empty {
	padding: 40px 0;
	color: #64748b;
}
