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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
}

/* ==================== 导航栏 ==================== */
.navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    padding: 0 40px;
    gap: 30px;
}

.navbar-left {
    display: flex;
    align-items: center;
}

.navbar-title-link {
    text-decoration: none;
    color: inherit;
}

.navbar-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin: 0;
    cursor: pointer;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.navbar-title:hover {
    color: #0066cc;
}

.navbar-subtitle {
    font-size: 12px;
    color: #666;
    margin: 0;
    white-space: nowrap;
    margin-left: 10px;
}

.navbar-menu {
    display: flex;
    gap: 30px;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.navbar-menu a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navbar-menu a:hover {
    color: #0066cc;
}

/* ==================== 主容器 ==================== */
.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px;
    gap: 30px;
}

/* 左侧栏 - 75% */
.main-content {
    flex: 0 0 75%;
}

/* 右侧栏 - 25% */
.sidebar {
    flex: 0 0 25%;
}

/* ==================== 项目卡片 ==================== */
.project-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    gap: 20px;
    transition: box-shadow 0.3s ease;
}

.project-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-card-image {
    flex: 0 0 35%;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
}

.project-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ff4444;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.project-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-title {
    font-size: 18px;
    font-weight: bold;
    color: #000;
    margin-bottom: 10px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.project-title:hover {
    color: #ff4444;
}

.project-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.project-meta span {
    margin-right: 20px;
}

.read-more-btn {
    align-self: flex-end;
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.read-more-btn:hover {
    background-color: #0052a3;
}

/* ==================== 侧边栏卡片 ==================== */
.sidebar-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-card-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0066cc;
}

.sidebar-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-item-image {
    flex: 0 0 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
}

.sidebar-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-item-content {
    flex: 1;
}

.sidebar-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.sidebar-item-title:hover {
    color: #0066cc;
}

.sidebar-item-meta {
    font-size: 11px;
    color: #999;
}

.sidebar-list-item {
    font-size: 13px;
    color: #333;
    margin-bottom: 10px;
    padding-left: 15px;
    position: relative;
    cursor: pointer;
    transition: color 0.3s ease;
}

.sidebar-list-item:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #0066cc;
}

.sidebar-list-item:hover {
    color: #0066cc;
}

/* ==================== 文章页面样式 ==================== */
.back-button {
    display: inline-block;
    margin-bottom: 20px;
    padding: 8px 16px;
    background-color: #f5f5f5;
    color: #0066cc;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: #e0e0e0;
}

.article-header {
    margin-bottom: 30px;
}

.article-title {
    font-size: 28px;
    font-weight: bold;
    color: #000;
    margin-bottom: 15px;
    line-height: 1.4;
}

.article-meta {
    font-size: 14px;
    color: #999;
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-content {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
}

.article-content h2 {
    font-size: 22px;
    font-weight: bold;
    color: #000;
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #0066cc;
}

.article-content h3 {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 25px 0 12px 0;
}

.article-content p {
    margin-bottom: 15px;
    text-align: justify;
    color: #555;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 20px 0;
    display: block;
}

.article-content ul,
.article-content ol {
    margin: 15px 0 15px 30px;
}

.article-content li {
    margin-bottom: 10px;
    color: #555;
}

.article-content blockquote {
    border-left: 4px solid #0066cc;
    padding-left: 15px;
    margin: 20px 0;
    color: #666;
    font-style: italic;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
}

.article-content strong {
    color: #000;
    font-weight: bold;
}

/* ==================== 表格样式 ==================== */
.article-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.article-table tr {
    border-bottom: 1px solid #ddd;
}

.article-table td {
    border: 1px solid #ddd;
    padding: 10px;
}

.article-table tr:first-child {
    background-color: #f5f5f5;
}

.article-table .table-total {
    background-color: #f0f0f0;
}

.article-table .table-profit {
    background-color: #e8f5e9;
}

/* ==================== 页脚 ==================== */
.footer {
    background-color: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    padding: 40px;
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 40px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    text-decoration: none;
    color: #0066cc;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ff4444;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }

    .main-content {
        flex: 0 0 100%;
    }

    .sidebar {
        flex: 0 0 100%;
    }

    .navbar-wrapper {
        flex-direction: column;
        gap: 15px;
        padding: 15px 40px;
    }

    .navbar-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .navbar-wrapper {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
    }

    .navbar-title {
        font-size: 22px;
    }

    .article-title {
        font-size: 22px;
    }

    .article-content {
        padding: 20px;
    }

    .container {
        padding: 20px;
    }

    .project-card {
        flex-direction: row;
        gap: 15px;
    }

    .project-card-image {
        flex: 0 0 120px;
        min-width: 120px;
    }

    .project-card-image img {
        height: 120px;
    }

    .project-card-content {
        flex: 1;
    }

    .project-title {
        font-size: 16px;
    }

    .project-description {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .project-meta {
        font-size: 11px;
    }

    .read-more-btn {
        font-size: 12px;
        padding: 6px 16px;
    }

    .article-meta {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .navbar-wrapper {
        padding: 10px 15px;
        flex-direction: column;
        gap: 8px;
    }

    .navbar-title {
        font-size: 18px;
    }

    .navbar-menu {
        gap: 12px;
        font-size: 13px;
    }

    .navbar-subtitle {
        font-size: 11px;
        margin-left: 5px;
    }

    .container {
        padding: 15px;
    }

    .article-title {
        font-size: 18px;
    }

    .article-content {
        padding: 15px;
    }

    .article-content h2 {
        font-size: 18px;
    }
    .project-description{
        display: none;
    }
    .article-content h3 {
        font-size: 16px;
    }
}
