/**
 * LECMS Default模板 - 必应SEO优化样式
 * 为符合必应SEO标准而添加的样式优化
 * 
 * @author 大大的周
 * @version 1.0.0
 */

/* 隐藏的SEO元素 - 用于搜索引擎但不影响视觉效果 */
.seo-hidden {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    white-space: nowrap !important;
}

/* 面包屑导航优化 */
.breadcrumb-nav,
.navcates.place,
.single-place.place {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.breadcrumb-nav a,
.navcates.place a,
.single-place.place a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb-nav a:hover,
.navcates.place a:hover,
.single-place.place a:hover {
    text-decoration: underline;
}

/* 结构化数据相关的微数据样式 */
[itemscope] {
    /* 确保结构化数据元素正常显示 */
}

/* 文章标题层级优化 */
h1 {
    font-size: 28px;
    font-weight: bold;
    line-height: 1.3;
    margin: 20px 0;
    color: #333;
}

h2 {
    font-size: 24px;
    font-weight: bold;
    line-height: 1.4;
    margin: 18px 0;
    color: #333;
}

h3 {
    font-size: 20px;
    font-weight: bold;
    line-height: 1.4;
    margin: 16px 0;
    color: #333;
}

/* 确保语义化标签的正确显示 */
main[role="main"] {
    display: block;
}

section[role="region"] {
    display: block;
}

aside[role="complementary"] {
    display: block;
}

nav[role="navigation"] {
    display: block;
}

/* 时间标签优化 */
time[datetime] {
    color: #666;
    font-size: 14px;
}

/* 作者信息优化 */
[itemprop="author"] {
    color: #333;
    font-weight: normal;
}

/* 文章内容区域优化 */
[itemprop="articleBody"] {
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}

/* 图片alt属性优化提示 */
img:not([alt]),
img[alt=""] {
    /* 开发时提醒：确保所有图片都有alt属性 */
    border: 2px dashed #ff6b6b;
    opacity: 0.7;
}

/* 分页导航优化 */
nav[aria-label*="分页"] {
    margin: 30px 0;
    text-align: center;
}

nav[aria-label*="分页"] a {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    background: #f8f9fa;
    color: #007bff;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

nav[aria-label*="分页"] a:hover {
    background: #007bff;
    color: white;
}

/* 搜索结果优化 */
.search-null {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

/* 404页面优化 */
.box__description-title {
    font-size: 24px !important;
    font-weight: bold !important;
    margin-bottom: 10px !important;
}

/* 标签云优化 */
.post-tags a {
    display: inline-block;
    padding: 4px 8px;
    margin: 2px 4px 2px 0;
    background: #f8f9fa;
    color: #007bff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
    border: 1px solid #dee2e6;
}

.post-tags a:hover {
    background: #007bff;
    color: white;
}

/* 相关文章区域优化 */
.related-articles {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.related-articles .section-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

/* 侧边栏优化 */
aside[role="complementary"] .widget-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

/* 响应式优化 */
@media screen and (max-width: 768px) {
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    h3 {
        font-size: 18px;
    }
    
    .breadcrumb-nav,
    .navcates.place,
    .single-place.place {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    [itemprop="articleBody"] {
        font-size: 15px;
        line-height: 1.7;
    }
}

/* 打印样式优化 */
@media print {
    .seo-hidden {
        position: static !important;
        left: auto !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        clip: auto !important;
        white-space: normal !important;
    }
    
    nav[role="navigation"],
    aside[role="complementary"] {
        display: none;
    }
    
    main[role="main"] {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    h1, h2, h3 {
        color: #000;
    }
    
    time[datetime],
    [itemprop="author"] {
        color: #000;
    }
    
    .breadcrumb-nav a,
    .navcates.place a,
    .single-place.place a {
        color: #0000EE;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    h1, h2, h3 {
        color: #fff;
    }
    
    [itemprop="articleBody"] {
        color: #e0e0e0;
    }
    
    time[datetime] {
        color: #ccc;
    }
    
    .breadcrumb-nav,
    .navcates.place,
    .single-place.place {
        color: #ccc;
    }
    
    .post-tags a {
        background: #333;
        color: #007bff;
        border-color: #555;
    }
    
    .related-articles {
        border-top-color: #555;
    }
}
