/* ========================================
   Maqa Blog - CSS2.1 兼容 IE8 样式
   ======================================== */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    color: #337ab7;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 布局容器 */
#container {
    width: 960px;
    margin: 0 auto;
    background-color: #fff;
    min-height: 100%;
}

/* 头部 */
#header {
    background-color: #337ab7;
    color: #fff;
    padding: 30px 20px;
    text-align: center;
}

#site-title {
    font-size: 32px;
    margin-bottom: 10px;
}

#site-title a {
    color: #fff;
    text-decoration: none;
}

#site-desc {
    font-size: 14px;
    opacity: 0.8;
}

/* 导航 */
#nav {
    background-color: #2c3e50;
    border-bottom: 3px solid #337ab7;
}

#nav-list {
    list-style: none;
    overflow: hidden;
}

#nav-list li {
    float: left;
}

#nav-list a {
    display: block;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
}

#nav-list a:hover,
#nav-list a.current {
    background-color: #337ab7;
}

/* 主内容区 */
#main {
    overflow: hidden;
    padding: 20px;
}

#content {
    float: left;
    width: 680px;
}

/* 侧边栏 */
#sidebar {
    float: right;
    width: 240px;
}

/* 文章列表 */
.post-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.post-item:last-child {
    border-bottom: none;
}

.post-title {
    font-size: 20px;
    margin-bottom: 10px;
}

.post-title a {
    color: #333;
}

.post-title a:hover {
    color: #337ab7;
}

.post-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.post-excerpt {
    color: #666;
    line-height: 1.8;
}

.post-cover {
    display: block;
    margin-bottom: 10px;
}

.post-cover img {
    max-width: 100%;
    _width: 100%;
    height: auto;
    border-radius: 4px;
}

/* 侧边栏小工具 */
.widget {
    background-color: #f9f9f9;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.widget-title {
    font-size: 16px;
    border-bottom: 2px solid #337ab7;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.widget-list {
    list-style: none;
}

.widget-list li {
    padding: 6px 0;
    border-bottom: 1px dashed #ddd;
}

.widget-list li:last-child {
    border-bottom: none;
}

/* 标签云 */
#tags-cloud {
    overflow: hidden;
}

.tag {
    display: inline-block;
    padding: 4px 8px;
    margin: 3px;
    background-color: #e0e0e0;
    border-radius: 3px;
    font-size: 12px;
}

.tag:hover {
    background-color: #337ab7;
    color: #fff;
}

/* 加载中 */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* 错误提示 */
.error {
    color: #d9534f;
    text-align: center;
    padding: 40px;
}

/* 分页 */
.pagination {
    text-align: center;
    padding: 20px;
    clear: both;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.pagination a {
    color: #337ab7;
}

.pagination a:hover {
    background-color: #f5f5f5;
}

.pagination .current {
    background-color: #337ab7;
    color: #fff;
    border-color: #337ab7;
}

/* 页脚 */
#footer {
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 20px;
}

#footer a {
    color: #fff;
    text-decoration: underline;
}

/* 响应式 */
@media (max-width: 960px) {
    #container {
        width: 100%;
    }
    
    #content,
    #sidebar {
        float: none;
        width: 100%;
    }
    
    #sidebar {
        margin-top: 20px;
    }
}

/* IE8 兼容 - 使用标准 clearfix */
.clearfix:before,
.clearfix:after {
    content: "";
    display: table;
}

.clearfix:after {
    clear: both;
}

.clearfix {
    zoom: 1;
}

/* 修复 IE8 不支持 HTML5 标签 */
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section {
    display: block;
}

/* 修复 IE8 不支持 min-height */
#container {
    min-height: 600px;
}

/* 修复 IE8 不支持 opacity */
.loading {
    opacity: 1;
}
