/* SEO性能优化CSS
 * 乌鲁木齐市一贯职业技能培训学校
 */

/* 页面加载优化 */
html {
    scroll-behavior: smooth;
}

/* 图片懒加载支持 */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* 关键资源预加载提示 */
.preload-hint {
    display: none;
}

/* 结构化数据样式 */
.structured-data {
    display: none;
}

/* 微格式支持 */
.h-card {
    /* vCard微格式 */
}

.h-entry {
    /* 文章微格式 */
}

.p-name {
    /* 名称属性 */
}

.p-summary {
    /* 摘要属性 */
}

.dt-published {
    /* 发布时间 */
}

/* 面包屑导航优化 */
.breadcrumb {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

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

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

.breadcrumb span {
    margin: 0 5px;
    color: #999;
}

/* 分页SEO优化 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    gap: 10px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #DC143C;
    color: white;
    border-color: #DC143C;
}

.pagination .current {
    background: #DC143C;
    color: white;
    border-color: #DC143C;
}

.pagination .disabled {
    color: #999;
    cursor: not-allowed;
}

/* 内容结构优化 */
.article-header h1 {
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #333;
}

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

.article-meta .author::before {
    content: "👤 ";
}

.article-meta .date::before {
    content: "📅 ";
}

.article-meta .category::before {
    content: "📂 ";
}

.article-meta .views::before {
    content: "👀 ";
}

/* 相关文章推荐 */
.related-articles {
    margin-top: 40px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.related-articles h3 {
    color: #DC143C;
    margin-bottom: 15px;
    font-size: 18px;
}

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

.related-list li {
    margin-bottom: 10px;
    padding-left: 15px;
    position: relative;
}

.related-list li::before {
    content: "▶";
    position: absolute;
    left: 0;
    color: #DC143C;
}

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

.related-list a:hover {
    color: #DC143C;
}

/* FAQ结构化数据样式 */
.faq-item {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    background: #f8f9fa;
    padding: 15px 20px;
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    position: relative;
}

.faq-question::after {
    content: "+";
    position: absolute;
    right: 20px;
    font-size: 20px;
    transition: transform 0.3s;
}

.faq-question.active::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 20px;
    display: none;
    line-height: 1.6;
}

.faq-answer.active {
    display: block;
}

/* 社交分享按钮 */
.social-share {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.social-share h4 {
    margin-bottom: 15px;
    color: #333;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: transform 0.3s;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.weibo {
    background: #e6162d;
}

.share-btn.wechat {
    background: #00c43d;
}

.share-btn.qq {
    background: #12b7f5;
}

.share-btn.weixin {
    background: #09bb07;
}

/* 返回顶部按钮优化 */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #DC143C;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
    transition: all 0.3s;
    z-index: 1000;
    display: none;
}

#back-to-top:hover {
    background: #B22222;
    transform: translateY(-3px);
}

/* 加载动画优化 */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 文本选择优化 */
::selection {
    background: #DC143C;
    color: white;
}

::-moz-selection {
    background: #DC143C;
    color: white;
}

/* 链接优化 */
a[href^="tel:"] {
    color: #DC143C;
    text-decoration: none;
}

a[href^="mailto:"] {
    color: #DC143C;
    text-decoration: none;
}

a[href^="tel:"]:hover,
a[href^="mailto:"]:hover {
    text-decoration: underline;
}

/* 外部链接标识 */
a[href^="http"]:not([href*="xjma.com.cn"])::after {
    content: " ↗";
    font-size: 12px;
    color: #999;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .article-header h1 {
        font-size: 24px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .share-buttons {
        gap: 5px;
    }
    
    .share-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* 打印样式优化 */
@media print {
    .navbar,
    .sidebar,
    .footer,
    .social-share,
    #back-to-top {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        grid-template-columns: 1fr !important;
    }
    
    .content-area {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 12px;
        color: #666;
    }
    
    a[href^="/"]:after {
        content: " (https://www.xjma.com.cn" attr(href) ")";
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .btn,
    .dashboard-card,
    .news-section {
        border: 2px solid #000;
    }
    
    .nav-menu a:hover {
        background: #000;
        color: #fff;
    }
}

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

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #e0e0e0;
        --card-bg: #2d2d2d;
    }
    
    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }
    
    .content-area,
    .sidebar,
    .dashboard-card {
        background: var(--card-bg);
        color: var(--text-color);
    }
}

/* 无障碍访问优化 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #DC143C;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 3px;
    z-index: 9999;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* 焦点指示器增强 */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 3px solid #DC143C;
    outline-offset: 2px;
}

/* 内容优先级指示 */
.priority-high {
    border-left: 4px solid #DC143C;
    padding-left: 15px;
}

.priority-medium {
    border-left: 4px solid #FFA500;
    padding-left: 15px;
}

.priority-low {
    border-left: 4px solid #28A745;
    padding-left: 15px;
} 