/*
Theme Name: 自适应博客主题
Theme URI: https://example.com/
Description: 一款现代化的WordPress自适应博客主题，支持PC端两栏布局和移动端单列布局。
Version: 1.0.0
Author: 主题开发者
Author URI: https://example.com/
Tags: responsive, two-columns, blog, adaptive
Text Domain: wp-responsive-blog
*/

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* SVG图标样式 */
.icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
    fill: currentColor;
}

.icon:hover {
    opacity: 0.8;
}

/* 菜单样式 */
.main-menu {
    display: flex;
    justify-content: center;
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-menu li {
    position: relative;
}

.main-menu li a {
    display: block;
    padding: 10px 15px;
    color: #34495e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.main-menu li a:hover {
    color: #3498db;
}

/* 二级菜单 */
.main-menu li ul {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    border-radius: 5px;
    padding: 0;
    margin: 0;
    list-style: none;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.main-menu li:hover ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-menu li ul li {
    position: relative;
}

.main-menu li ul li a {
    padding: 10px 15px;
    color: #34495e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.main-menu li ul li a:hover {
    color: #3498db;
}

/* 三级菜单 */
.main-menu li ul li ul {
    position: absolute;
    top: 0;
    left: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.main-menu li ul li:hover ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 容器布局 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 页面头部 */
.site-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-branding {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
}

.site-description {
    font-size: 1rem;
    color: #7f8c8d;
    margin-top: 5px;
}

/* 导航菜单 */
.main-navigation {
    margin-top: 15px;
}

.main-menu {
    display: flex;
    list-style: none;
    gap: 20px;
}

.main-menu li a {
    color: #34495e;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.main-menu li a:hover {
    background-color: rgba(52, 73, 94, 0.1);
}

/* Hero区域 */
.hero-section {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('images/hero-background.jpg') center/cover;
    padding: 60px 0;
    margin-bottom: 40px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.hero-button {
    display: inline-block;
    background-color: #34495e;
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.hero-button:hover {
    background-color: #2c3e50;
}

.hero-button.secondary {
    background-color: transparent;
    color: #34495e;
    border: 2px solid #34495e;
}

.hero-button.secondary:hover {
    background-color: #34495e;
    color: white;
}

/* 主要内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* 文章列表 */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.post-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.post-thumbnail {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.post-content {
    padding: 20px;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.post-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #3498db;
}

.post-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.post-excerpt {
    color: #555;
    margin-bottom: 20px;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    background-color: #f1f3f5;
    color: #495057;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.tag-link:hover {
    background-color: #e9ecef;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

/* 广告位 */
.advertisement {
    text-align: center;
    margin-bottom: 20px;
}

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

/* 标签云 */
/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a {
    display: inline-block;
    padding: 4px 10px;
    background-color: #f1f3f5;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.tag-cloud a:hover {
    background-color: #e9ecef;
    color: #3498db;
}

/* 热点文章 */
.hot-posts {
    list-style: none;
}

.hot-post-item {
    margin-bottom: 10px;
}

.hot-post-item a {
    color: #495057;
    text-decoration: none;
    transition: color 0.3s ease;
}

.hot-post-item a:hover {
    color: #3498db;
}

/* 文章详情页 */
.single-post {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.post-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.post-meta-single {
    display: flex;
    gap: 20px;
    font-size: 0.95rem;
    color: #6c757d;
}

.post-content-single {
    margin-bottom: 30px;
}

.post-content-single img {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.post-content-single p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* 广告位 */
.article-ad-top,
.article-ad-bottom {
    margin: 30px 0;
    text-align: center;
}

/* 评论区域 */
.comments-area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

/* 页面底部 */
.site-footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 40px 0;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #fff;
}

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

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-widget ul li a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .site-branding {
        flex-direction: column;
        text-align: center;
    }

    .main-menu {
        flex-direction: column;
        text-align: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .post-thumbnail {
        height: 200px;
    }

    .single-post {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .site-title {
        font-size: 1.5rem;
    }

    .post-title {
        font-size: 1.2rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 5px;
    }
}