/*
Theme Name: WordPress Code Theme
Description: 基于 CodeStar Framework 构建的企业级 WordPress B2B主题，集成了询盘系统、用户管理、视频管理、AI分析等强大功能。采用现代化响应式设计，支持多语言，专为中小企业和B2B网站打造，提供开箱即用的企业级解决方案。
Author: 觅站WordPress开发
Version: 1.2
Text Domain: wordpress-code
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Author URI: https://WordPress-code.com
Theme URI: https://WordPress-code.com
*/

/* 主题基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

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

/* 头部样式 */
.site-header {
    background-color: #24292e;
    color: white;
    padding: 1rem 0;
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.site-description {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0.5rem 0 0 0;
}

/* 导航样式 */
.main-navigation {
    margin-top: 1rem;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.main-navigation a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 主要内容区域 */
.site-main {
    padding: 2rem 0;
}

.content-area {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* 文章样式 */
.post {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.post-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.post-title {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: #df3536;
}

.post-title a {
    color: inherit;
    text-decoration: none;
}

.post-title a:hover {
    text-decoration: underline;
}

.post-meta {
    font-size: 0.9rem;
    color: #666;
}

.post-content {
    padding: 1.5rem;
}

/* 侧边栏样式 */
.sidebar {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
}

.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.2rem;
    margin: 0 0 1rem 0;
    color: #333;
    border-bottom: 2px solid #df3536;
    padding-bottom: 0.5rem;
}

/* 页脚样式 */
.site-footer {
    background-color: #24292e;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

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

.footer-widget h3 {
    margin: 0 0 1rem 0;
    color: #df3536;
}

.footer-widget p,
.footer-widget li {
    margin: 0.5rem 0;
}

.footer-widget a {
    color: white;
    text-decoration: none;
}

.footer-widget a:hover {
    text-decoration: underline;
}

.site-info {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #444;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content-area {
        grid-template-columns: 1fr;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .container {
        padding: 0 10px;
    }
}

/* 轮播图样式 */
.carousel-section {
    margin-bottom: 2rem;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.carousel-item {
    position: relative;
    display: none;
}

.carousel-item:first-child {
    display: block;
}

.carousel-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 2rem;
}

.carousel-caption h3 {
    margin: 0;
    font-size: 1.5rem;
}

/* 关于我们样式 */
.about-section {
    position: relative;
    margin: 2rem 0;
    padding: 3rem 0;
    overflow: hidden;
}

.about-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 1;
}

.about-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.about-text h2 {
    color: #df3536;
    margin-bottom: 1rem;
}

.about-description {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
}

/* 服务项目样式 */
.services-section {
    margin: 3rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-icon {
    margin-bottom: 1rem;
}

.service-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.service-item h3 {
    color: #df3536;
    margin-bottom: 1rem;
}

/* 搜索表单样式 */
.search-form {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-field {
    flex: 1;
    border: none;
    padding: 0.75rem 1rem;
    outline: none;
}

.search-submit {
    background: #df3536;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-submit:hover {
    background: #c02d2e;
}

/* 面包屑导航样式 */
.breadcrumb-wrapper {
    background: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #666;
}

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

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

/* 分页样式 */
.pagination {
    text-align: center;
    margin: 2rem 0;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: all 0.3s;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: #df3536;
    color: white;
    border-color: #df3536;
}

/* 阅读进度条 */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(223, 53, 54, 0.2);
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    background: #df3536;
    width: 0%;
    transition: width 0.3s;
}

/* 工具提示样式 */
.tooltip {
    position: absolute;
    background: #333;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    z-index: 1000;
    pointer-events: none;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: #333;
}

/* 工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #df3536;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #c02d2e;
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* 错误页面样式 */
.error-404 {
    text-align: center;
    padding: 3rem 0;
}

.error-404 .page-title {
    font-size: 3rem;
    color: #df3536;
    margin-bottom: 1rem;
}

.error-actions {
    margin: 2rem 0;
}

.error-actions .btn {
    margin: 0 0.5rem;
}

.search-form-wrapper {
    margin: 2rem 0;
}

.recent-posts,
.popular-categories {
    margin: 2rem 0;
    text-align: left;
}

.recent-posts ul,
.popular-categories ul {
    list-style: none;
    padding: 0;
}

.recent-posts li,
.popular-categories li {
    margin: 0.5rem 0;
}

.recent-posts a,
.popular-categories a {
    color: #df3536;
    text-decoration: none;
}

.recent-posts a:hover,
.popular-categories a:hover {
    text-decoration: underline;
}

.count {
    color: #999;
    font-size: 0.9rem;
}

/* 评论样式 */
.comments-area {
    margin-top: 3rem;
}

.comments-title {
    color: #df3536;
    border-bottom: 2px solid #df3536;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.comment-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: bold;
    color: #df3536;
}

.comment-content {
    line-height: 1.6;
}

.comment-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.comment-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

.char-counter {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.char-counter.warning {
    color: #df3536;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .content-area {
        grid-template-columns: 1fr;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .carousel-item img {
        height: 250px;
    }
}
