/**
 * 益雅诗康 - 文章页面公共样式
 * 文件：article-common.css
 * 说明：所有文章页面的通用布局和样式
 * 注意：container样式继承自public.css，max-width: 1280px
 */

/* 文章Banner */
.article-banner {
    background: linear-gradient(135deg, #1a73e8 0%, #0d5bbf 100%);
    padding: 100px 20px 60px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.article-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>') repeat;
    background-size: 100px 100px;
    opacity: 0.3;
}

.article-banner .container {
    position: relative;
    z-index: 1;
}

.article-banner h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 600;
	color: var(--light-gray);
}

.article-banner p {
    font-size: 0.95rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

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

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '/';
    color: #999;
    font-size: 0.8rem;
}

.breadcrumb-list a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-list a:hover {
    color: #1a73e8;
}

.breadcrumb-list li:last-child {
    color: #333;
    font-weight: 500;
}

/* 文章主体区域 - 使用container保持与首页一致 */
.article-main {
    padding: 40px 0;
    background: #fff;
}

/* 文章内容布局 - 左侧文章，右侧侧边栏 */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

/* 文章容器 */
.article-container {
    min-height: calc(100vh - 300px);
}

/* 侧边栏 */
.article-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-widget h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1a73e8;
}

.sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.sidebar-widget a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.sidebar-widget a:hover {
    color: #1a73e8;
}

/* 文章头部 */
.article-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.article-header h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
    font-weight: 600;
}

.article-meta {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

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

.article-meta .category {
    background: #f0f7ff;
    color: #1a73e8;
    padding: 3px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
}

/* 文章内容 */
.article-content {
    line-height: 1.8;
    color: #444;
    font-size: 1rem;
}

.article-content p {
    margin-bottom: 20px;
    text-indent: 2em;
}

.article-content h2 {
    font-size: 1.4rem;
    color: #333;
    margin: 35px 0 15px;
    padding-left: 15px;
    border-left: 4px solid #1a73e8;
    font-weight: 600;
}

.article-content h3 {
    font-size: 1.2rem;
    color: #444;
    margin: 25px 0 12px;
    font-weight: 600;
}

.article-content h4 {
    font-size: 1.1rem;
    color: #555;
    margin: 20px 0 10px;
    font-weight: 600;
}

.article-content ul,
.article-content ol {
    margin: 15px 0 20px;
    padding-left: 2em;
}

.article-content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.article-content ul li {
    list-style-type: disc;
}

.article-content ol li {
    list-style-type: decimal;
}

/* 提示框 */
.article-content .tip-box {
    background: #f0f7ff;
    border-left: 4px solid #1a73e8;
    padding: 15px 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
}

.article-content .tip-box strong {
    color: #1a73e8;
    display: block;
    margin-bottom: 8px;
}

/* 警告框 */
.article-content .warning-box {
    background: #fff8e6;
    border-left: 4px solid #f5a623;
    padding: 15px 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
}

.article-content .warning-box strong {
    color: #f5a623;
    display: block;
    margin-bottom: 8px;
}

/* 成功框 */
.article-content .success-box {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 15px 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
}

.article-content .success-box strong {
    color: #4caf50;
    display: block;
    margin-bottom: 8px;
}

/* 文章图片 */
.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.article-content figure {
    margin: 25px 0;
    text-align: center;
}

.article-content figure figcaption {
    color: #666;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* 引用块 */
.article-content blockquote {
    background: #f9f9f9;
    border-left: 4px solid #ccc;
    padding: 15px 20px;
    margin: 20px 0;
    font-style: italic;
    color: #555;
}

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

.article-content th,
.article-content td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.article-content th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.article-content tr:nth-child(even) {
    background: #fafafa;
}

/* 文章底部 */
.article-footer {
    margin: 50px 0 0;
    padding: 25px 0;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #1a73e8;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: #0d5bbf;
    text-decoration: underline;
}

/* 文章标签 */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 30px;
}

.article-tags a {
    display: inline-block;
    padding: 5px 15px;
    background: #f5f5f5;
    color: #666;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.article-tags a:hover {
    background: #1a73e8;
    color: #fff;
}

/* 相关文章推荐 */
.related-articles {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.related-articles h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 20px;
}

.related-articles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.related-article-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: all 0.3s;
}

.related-article-item:hover {
    background: #f0f7ff;
    transform: translateY(-2px);
}

.related-article-item h4 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 8px;
}

.related-article-item p {
    font-size: 0.85rem;
    color: #666;
    text-indent: 0;
    margin-bottom: 0;
}

/* 响应式设计 */
@media screen and (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    .article-banner {
        padding: 100px 15px 40px;
    }

    .article-banner h1 {
        font-size: 1.6rem;
    }

    .article-breadcrumb {
        padding: 10px 0;
    }

    .breadcrumb-list {
        font-size: 0.85rem;
    }

    .article-main {
        padding: 20px 0;
    }

    .article-header h1 {
        font-size: 1.5rem;
    }

    .article-content h2 {
        font-size: 1.2rem;
    }

    .article-content h3 {
        font-size: 1.1rem;
    }

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

    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-content table {
        display: block;
        overflow-x: auto;
    }
}

/* 打印样式 */
@media print {
    .article-container {
        max-width: 100%;
        padding: 0;
    }

    .article-footer,
    .related-articles {
        display: none;
    }

    .article-content img {
        box-shadow: none;
    }
}
