/*!
 * Git-alpha Theme Custom Styles
 * 基于 Bootstrap 5.3.8 的现代化重构
 */

:root {
	--theme-color: #00a67c;
	--theme-hover: #e74c3c;
	--text-main: #333;
	--text-secondary: #666;
	--text-muted: #999;
	--bg-body: #f8f8f8;
	--bg-white: #ffffff;
	--border-color: #eee;
	--border-light: #f0f0f0;
}

/* ==========================================================================
   基础样式 (Base)
   ========================================================================== */
body {
	background-color: var(--bg-body);
	color: var(--text-main);
	font-size: 14px;
	font-family: "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

/* 链接样式 */
a {
	color: var(--theme-color);
	text-decoration: none;
	transition: all 0.25s ease;
}

a:hover {
	color: var(--theme-hover);
	text-decoration: none;
}

/* 排版 */
h1, h2, h3, h4, h5, h6 {
	margin: 10px 0;
	font-weight: 700;
	line-height: 1.4;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

/* 列表重置 */
ul, ol {
	padding-left: 2rem;
}

ul.nav, ul.navbar-nav, .widget ul, .social ul, .footer ul {
	padding-left: 0;
	list-style: none;
}

/* 辅助类兼容 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.pull-left { float: left !important; }
.pull-right { float: right !important; }
.hidden { display: none !important; }
.visible { display: block !important; }

/* WordPress Caption */
.wp-caption {
	display: block;
	margin: 0 auto 15px;
	padding: 10px 5px 0;
	border: 1px solid #CCC;
	background: #f7f7f7;
	text-align: center;
	max-width: 100%;
}

.wp-caption img {
	display: block;
	margin: 0 auto;
	max-width: 100%;
	height: auto;
}

.wp-caption p {
	margin: 0;
	padding: 5px;
	line-height: 1.5;
}

/* ==========================================================================
   导航栏样式 (Header & Navigation)
   ========================================================================== */
.navbar {
	background-color: #fff;
	box-shadow: 0 2px 15px rgba(0, 0, 0, .05);
	margin-bottom: 30px;
	padding: 0;
	height: 70px;
	position: relative;
	z-index: 999;
}

.navbar > .container,
.navbar > .container-fluid {
	display: flex;
	align-items: center;
	height: 100%;
	position: relative;
}

/* 导航菜单 */
.navbar .navbar-nav {
	display: flex;
	flex-direction: row;
	margin: 0;
	padding: 0;
	height: 100%;
}

.navbar .navbar-nav > li {
	position: relative;
	height: 100%;
	display: flex;
	align-items: center;
}

.navbar .navbar-nav > li > a {
	display: flex;
	align-items: center;
	padding: 0 20px;
	height: 100%;
	color: #555;
	font-size: 1rem;
	font-weight: 500;
	position: relative;
	transition: all 0.3s;
}

/* 导航线条效果 */
.navbar .navbar-nav > li > a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 3px;
	background: var(--theme-color);
	transition: width 0.3s;
}

.navbar .navbar-nav > li:hover > a,
.navbar .navbar-nav > li.current-menu-item > a,
.navbar .navbar-nav > li.current-menu-ancestor > a {
	color: var(--theme-color);
}

.navbar .navbar-nav > li:hover > a::after,
.navbar .navbar-nav > li.current-menu-item > a::after,
.navbar .navbar-nav > li.current-menu-ancestor > a::after {
	width: 100%;
}

/* 下拉菜单 */
.navbar .navbar-nav li ul.sub-menu,
.navbar .navbar-nav li ul.children {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 1000;
	min-width: 200px;
	padding: 10px 0;
	background-color: #fff;
	box-shadow: 0 5px 20px rgba(0,0,0,0.1);
	border-radius: 0 0 6px 6px;
	border-top: 2px solid var(--theme-color);
}

.navbar .navbar-nav li:hover > ul.sub-menu,
.navbar .navbar-nav li:hover > ul.children {
	display: block;
	animation: fadeInUp 0.2s ease-in-out;
}

.navbar .navbar-nav li ul.sub-menu li,
.navbar .navbar-nav li ul.children li {
	display: block;
	width: 100%;
}

.navbar .navbar-nav li ul.sub-menu li a,
.navbar .navbar-nav li ul.children li a {
	padding: 8px 20px;
	display: block;
	width: 100%;
	color: #666;
	font-size: 0.9rem;
	transition: all 0.2s;
}

.navbar .navbar-nav li ul.sub-menu li a:hover,
.navbar .navbar-nav li ul.children li a:hover {
	background-color: #f8f9fa;
	color: var(--theme-color);
	padding-left: 28px;
}

/* 搜索按钮 - 圆形设计 */
.toggle-search {
	width: 40px;
	height: 40px;
	line-height: 40px;
	text-align: center;
	background: #f5f5f5;
	color: #666;
	border-radius: 50%;
	cursor: pointer;
	transition: all .3s ease;
	margin-left: 20px;
}

.toggle-search:hover {
	background: var(--theme-color);
	color: #fff;
	transform: rotate(90deg);
}

.search-expand {
	position: absolute;
	top: 70px;
	right: 0;
	display: none;
	width: 300px;
	background: #fff;
	box-shadow: 0 5px 15px rgba(0,0,0,0.1);
	padding: 15px;
	z-index: 999;
	border-top: 2px solid var(--theme-color);
}

.search-expand input.search {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 3px;
	outline: none;
}

.search-expand input.search:focus {
	border-color: var(--theme-color);
}

/* Logo 文字效果 */
.g-logo h1 {
	font-family: 'Handlee', cursive, sans-serif;
	margin: 0;
	padding: 30px 0;
	cursor: pointer;
}

.g-mono {
	color: #fff;
	text-shadow: 0 0 2px var(--theme-color);
	font-size: 2.5rem;
	font-weight: bold;
	transition: all .3s;
}

.g-bloger {
	color: #fff;
	text-shadow: 0 0 2px var(--theme-color);
	font-size: 1.2rem;
	margin-left: 5px;
	transition: all .3s;
}

.g-logo h1:hover .g-mono { letter-spacing: 2px; }
.g-logo h1:hover .g-bloger { opacity: 0.5; margin-left: 10px; }


/* ==========================================================================
   布局结构 (Layout)
   ========================================================================== */
.site {
	margin: 0 auto;
	padding-top: 10px;
	max-width: 1200px;
}

.content-wrap { float: left; width: 71%; }
.sidebar { float: right; width: 28%; }
.main-content { float: left; width: 73%; }
.widget-area { float: right; width: 25%; }

.content { background-color: #fff; border-radius: 4px; overflow: hidden; }

/* 面包屑导航 */
.breadcrumb {
	margin: 0 0 20px;
	padding: 10px 15px;
	background-color: #fff;
	border-radius: 4px;
	font-size: 0.9rem;
	color: #666;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: var(--theme-color); }
.breadcrumb .divider { margin: 0 5px; color: #ccc; }

/* 标题栏 */
.base-tit {
	padding: 15px 20px;
	border-bottom: 1px solid var(--border-light);
	background-color: #fff;
	color: var(--theme-color);
	font-size: 1rem;
	font-weight: bold;
	border-radius: 4px 4px 0 0;
}

/* ==========================================================================
   文章列表 (Archives & Lists)
   ========================================================================== */
.excerpt {
	background-color: #fff;
	margin-bottom: 20px;
	border: 1px solid #f0f0f0;
	border-radius: 6px;
	transition: all 0.3s ease;
	overflow: hidden;
	padding: 20px;
	display: flex; /* 使用 Flex 布局 */
	align-items: flex-start;
}

.excerpt:hover {
	box-shadow: 0 10px 30px rgba(0,0,0,0.08);
	border-color: transparent;
	transform: translateY(-3px);
}

.excerpt-pic {
	flex-shrink: 0;
	margin-right: 25px;
	width: 260px;
	height: 165px;
	overflow: hidden;
	border-radius: 6px;
}

.excerpt-pic img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.excerpt:hover .excerpt-pic img {
	transform: scale(1.05);
}

.excerpt-body {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	height: 165px; /* 与图片高度一致 */
}

.excerpt-title {
	margin: 0 0 12px;
	font-size: 1.35rem;
	line-height: 1.4;
}

.excerpt-title a { color: #333; font-weight: 700; transition: color 0.2s; }
.excerpt-title a:hover { color: var(--theme-color); }

.excerpt-text {
	color: #666;
	font-size: 0.95rem;
	line-height: 1.6;
	margin-bottom: 15px;
	flex-grow: 1;
	/* 多行省略 */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}

.excerpt-more {
	color: #999;
	font-size: 0.85rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* 包含作者、时间等的容器 */
.auth-span {
	display: flex;
	align-items: center;
}

.auth-span span {
	margin-right: 15px;
	display: flex;
	align-items: center;
}

.auth-span span i {
	margin-right: 5px;
}

.excerpt-more .btn-readmore {
	padding: 5px 15px;
	border: 1px solid #eee;
	border-radius: 20px;
	color: #999;
	font-size: 0.8rem;
	transition: all 0.2s;
}

.excerpt-more .btn-readmore:hover {
	border-color: var(--theme-color);
	background-color: var(--theme-color);
	color: #fff;
}

/* ==========================================================================
   卡片样式 (Grid Layout)
   ========================================================================== */
.card-item {
	position: relative;
	float: left;
	width: 285px;
	margin: 0 13px 20px 0;
	background-color: #fff;
	border-radius: 4px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
	transition: all 0.2s;
	overflow: hidden;
}

.card-item:nth-child(3n) { margin-right: 0; }
.card-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.card-thumbnail {
	height: 180px;
	overflow: hidden;
}

.card-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.card-item:hover .card-thumbnail img { transform: scale(1.1); }

.card-title {
	padding: 12px 15px;
	height: 68px;
	font-size: 1rem;
	line-height: 1.4;
	font-weight: bold;
	overflow: hidden;
}

.card-title a { color: #333; }
.card-title a:hover { color: var(--theme-color); }

.card-meta {
	padding: 0 15px 12px;
	color: #999;
	font-size: 0.8rem;
	display: flex;
	justify-content: space-between;
}

/* ==========================================================================
   文章详情 (Single Post)
   ========================================================================== */
.article {
	background-color: #fff;
	border-radius: 4px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.article-header {
	padding: 30px 30px 10px;
	border-bottom: 1px solid #f0f0f0;
}

.article-title {
	margin-bottom: 15px;
	font-size: 1.75rem;
	color: #333;
}

.article-meta {
	margin-bottom: 15px;
	color: #999;
	font-size: 0.85rem;
}

.article-meta span { margin-right: 15px; }
.article-meta i { margin-right: 5px; }

.article-content {
	padding: 30px;
	color: #444;
	font-size: 1rem;
	line-height: 1.8;
}

.article-content p { margin-bottom: 1.5em; }
.article-content img { max-width: 100%; height: auto; border-radius: 4px; }

.article-content h2,
.article-content h3 {
	margin: 30px 0 15px;
	padding-bottom: 10px;
	border-bottom: 1px solid #eee;
	color: #333;
}

.article-content blockquote {
	margin: 20px 0;
	padding: 15px 20px;
	border-left: 4px solid var(--theme-color);
	background-color: #f9f9f9;
	color: #666;
	border-radius: 0 4px 4px 0;
}

.article-content pre {
	padding: 15px;
	background: #f6f6f6;
	border-radius: 4px;
	border: 1px solid #eee;
}

.article-tags {
	padding: 20px 30px;
	border-top: 1px solid #eee;
}

.article-tags a {
	display: inline-block;
	margin: 0 5px 5px 0;
	padding: 3px 10px;
	background: #f5f5f5;
	color: #666;
	border-radius: 3px;
	font-size: 0.85rem;
	transition: all 0.2s;
}

.article-tags a:hover {
	background: var(--theme-color);
	color: #fff;
}

/* ==========================================================================
   侧边栏 (Sidebar & Widgets)
   ========================================================================== */
.widget {
	background-color: #fff;
	margin-bottom: 20px;
	border-radius: 4px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
	overflow: hidden;
}

.widget h3 {
	margin: 0;
	padding: 15px 20px;
	border-bottom: 1px solid var(--border-light);
	font-size: 1rem;
	color: #333;
	background: #fff;
	position: relative;
}

.widget h3::before {
	content: '';
	position: absolute;
	left: 0;
	top: 15px;
	bottom: 15px;
	width: 4px;
	background: var(--theme-color);
}

.widget ul { padding: 0; margin: 0; }

.widget li {
	padding: 10px 20px;
	border-bottom: 1px solid #f9f9f9;
	color: #666;
}

.widget li:last-child { border-bottom: none; }
.widget li a { color: #666; display: block; }
.widget li a:hover { color: var(--theme-color); transform: translateX(5px); }

/* 标签云 */
.tagcloud { padding: 15px; }
.tagcloud a {
	display: inline-block;
	margin: 3px;
	padding: 3px 8px;
	background: #f5f5f5;
	color: #666;
	font-size: 12px !important;
	border-radius: 3px;
}
.tagcloud a:hover { background: var(--theme-color); color: #fff; }

/* ==========================================================================
   评论 (Comments)
   ========================================================================== */
#comments {
	padding: 20px 30px;
	border-bottom: 1px solid #eee;
	color: #333;
	font-size: 1.1rem;
	font-weight: bold;
}

.commentlist { padding: 0 30px; }
.comment { padding: 20px 0; border-bottom: 1px dashed #eee; }
.comment:last-child { border-bottom: none; }

.c-avatar .avatar {
	float: left;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	margin-right: 15px;
}

.c-main {
	margin-left: 65px;
}

.c-author { font-weight: bold; margin-right: 10px; color: #333; }
.c-meta { color: #999; font-size: 0.85rem; }
.c-floor { float: right; color: #ccc; font-size: 0.85rem; }

.comment-content {
	margin-top: 10px;
	line-height: 1.6;
	color: #555;
}

.comment-reply-link {
	float: right;
	font-size: 0.85rem;
	color: var(--theme-color);
}

/* 评论框 */
#respond {
	padding: 30px;
	background: #fff;
	margin-top: 20px;
	border-radius: 4px;
}

.comt-area textarea {
	width: 100%;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 10px;
	height: 120px;
	resize: vertical;
	outline: none;
	transition: border 0.2s;
}

.comt-area textarea:focus { border-color: var(--theme-color); }

.comt-ctrl {
	margin-top: 10px;
	overflow: hidden;
}

.comt-submit {
	float: right;
	padding: 8px 30px;
	background: var(--theme-color);
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s;
}

.comt-submit:hover { background: #008f6b; }


/* ==========================================================================
   页脚 (Footer)
   ========================================================================== */
/* Footer Bar (上面的四个色块区域) */
#footbar {
	background-color: #31353a;
	color: #ccc;
	padding-top: 0;
	border-top: 2px solid var(--theme-color);
}

#footbar ul {
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
}

#footbar ul li {
	flex: 1;
	min-width: 250px;
	padding: 20px;
	box-sizing: border-box;
}

#footbar p {
	display: inline-block;
	padding: 5px 15px;
	margin-bottom: 10px;
	color: #fff;
	font-weight: bold;
	border-radius: 3px;
}

#footbar p.first { background-color: #0096d6; }
#footbar p.second { background-color: #00b274; }
#footbar p.third { background-color: #d75ba2; }
#footbar p.fourth { background-color: #e9ac40; }

#footbar span {
	display: block;
	font-size: 0.9rem;
	line-height: 1.6;
	color: #aaa;
}

/* 底部主要区域 */
.footer {
	position: relative;
	background-color: #fff;
	padding: 30px 0;
	text-align: center;
	clear: both;
	border-top: 1px solid #eee;
}

.footer-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 15px;
}

.footer-copyright {
	color: #888;
	font-size: 0.9rem;
	line-height: 1.8;
}

.footer-copyright a { color: #555; font-weight: 500; }
.footer-copyright a:hover { color: var(--theme-color); }

/* 社交图标 */
.social {
	display: inline-block;
	margin-bottom: 15px;
}

.social a {
	display: inline-block;
	width: 40px;
	height: 40px;
	line-height: 40px;
	text-align: center;
	color: #fff;
	border-radius: 50%;
	margin: 0 5px;
	transition: transform 0.2s;
}

.social a:hover { transform: translateY(-3px); }

.sinaweibo { background: #e6162d; }
.qq { background: #3eb0d8; }
.baidu { background: #2932e1; }
.email { background: #5d7592; }
.weixin { background: #2bae63; }
.git { background: #333; }

/* ==========================================================================
   响应式适配 (Responsive)
   ========================================================================== */
@media screen and (max-width: 1200px) {
	.site { padding: 0 10px; }
	.card-item { width: 31%; margin-right: 3.5%; }
	.card-item:nth-child(3n) { margin-right: 0; }
}

@media screen and (max-width: 992px) {
	.content-wrap { width: 100%; float: none; }
	.sidebar, .widget-area { display: none; } /* 或改为放置到底部 */
	.main-content { width: 100%; float: none; }
	.card-item { width: 48%; margin-right: 4%; }
	.card-item:nth-child(3n) { margin-right: 4%; }
	.card-item:nth-child(2n) { margin-right: 0; }
}

@media screen and (max-width: 768px) {
	.navbar .navbar-nav { display: none; } /* 移动端应该有汉堡菜单，这里简单隐藏，需配合 JS */
	.toggle-search { display: block; }
	
	.excerpt-pic { float: none; width: 100%; height: 200px; margin: 0 0 15px 0; }
	.excerpt-title { padding: 0 15px; }
	.excerpt-text { padding: 0 15px; height: auto; margin-bottom: 15px; }
	.excerpt-more { padding: 0 15px 15px; }
	
	#footbar ul li { width: 100%; }
}

@media screen and (max-width: 576px) {
	.card-item { width: 100%; margin-right: 0; float: none; }
}

/* ==========================================================================
   说说页面 (Shuoshuo / Status)
   ========================================================================== */
.shuoshuo {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.archives-monthlisting {
    list-style: none;
    padding: 0;
    margin: 0;
}

.archives-monthlisting li {
    display: flex;
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.archives-monthlisting li:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* 头像 */
.shuoshuo-avatar {
    flex-shrink: 0;
    margin-right: 20px;
    width: 50px;
    height: 50px;
}

.shuoshuo-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* 内容区域 */
.shuoshuo-wrapper {
    flex-grow: 1;
}

/* 作者信息 */
.shuoshuo-author-info {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.shuoshuo-author-info .author-name {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    line-height: 1.2;
}

.shuoshuo-author-info .publish-time {
    font-size: 0.8rem;
    color: #999;
    margin-top: 4px;
}

/* 正文 */
.shuoshuo-content {
    color: #444;
    font-size: 0.95rem;
    line-height: 1.6;
}

.shuoshuo-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-top: 10px;
    display: block;
}

/* 响应式适配 */
@media screen and (max-width: 768px) {
    .excerpt { display: block; padding: 15px; }
    .excerpt-pic { width: 100%; height: 180px; margin: 0 0 15px; }
    .excerpt-body { height: auto; display: block; }
    .excerpt-text { height: auto; margin-bottom: 10px; display: block; }
    
    .archives-monthlisting li { padding: 15px; }
    .shuoshuo-avatar { width: 40px; height: 40px; margin-right: 15px; }
}

/* ==========================================================================
   动画 (Animations)
   ========================================================================== */
@keyframes fadeInUp {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}
