/* 无障碍样式 - 为残疾人用户提供更好的浏览体验 */

/* 高对比度主题 */
body.high-contrast {
    --primary-color: #2e7de9;
    --secondary-color: #4a9eff;
    --accent-color: #ff6d00;
    --text-color: #000;
    --text-light: #fff;
    --bg-light: #fff;
    --bg-dark: #000;
    --success-color: #2e7de9;
}

/* 高对比度模式的特定样式 */
body.high-contrast .main-header,
body.high-contrast .services-section,
body.high-contrast .partners-section {
    background-color: #fff;
}

body.high-contrast .hero-section {
    background: #4a9eff;
}

body.high-contrast .main-footer {
    background-color: #e6f0ff;
    color: #000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

body.high-contrast .footer-info h3, 
body.high-contrast .footer-links h3, 
body.high-contrast .footer-subscribe h3 {
    color: #2e7de9;
}

body.high-contrast .footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.high-contrast .service-card {
    background-color: #f5f5f5;
    border: 2px solid #000;
}

body.high-contrast .main-nav a,
body.high-contrast .footer-links a {
    color: #2e7de9;
    font-weight: bold;
}

body.high-contrast .main-nav a:hover,
body.high-contrast .main-nav a.active,
body.high-contrast .footer-links a:hover {
    text-decoration: underline;
    border-bottom: none;
}

body.high-contrast .btn {
    border: 2px solid #000;
}

/* 字体大小调整 */
body.font-large {
    font-size: 18px;
}

body.font-larger {
    font-size: 20px;
}

body.font-largest {
    font-size: 22px;
}

/* 字体大小调整对应的元素尺寸 */
body.font-large .container,
body.font-larger .container,
body.font-largest .container {
    max-width: 1300px;
}

/* 焦点样式 */
:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* 跳过导航链接 */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-color);
    color: var(--text-light);
    padding: 8px;
    z-index: 999;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* 屏幕阅读器专用样式 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 无障碍导航改进 */
.main-nav a {
    padding: 8px 12px; /* 增加点击区域 */
}

/* 表单无障碍性 */
input:focus, 
textarea:focus, 
select:focus,
button:focus {
    box-shadow: 0 0 0 2px var(--accent-color);
    border-color: var(--accent-color);
}

/* 表单标签和控件 */
label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

input, 
select, 
textarea {
    font-size: 1rem;
    padding: 10px;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
}

/* ARIA 角色样式 */
[role="alert"],
[aria-live="assertive"] {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

[role="status"],
[aria-live="polite"] {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

/* 辅助技术友好的链接和按钮 */
a[aria-current="page"] {
    font-weight: bold;
    text-decoration: underline;
}

button[aria-expanded="true"] {
    background-color: var(--accent-color);
    color: var(--text-light);
}

/* 移动设备无障碍优化 */
@media (max-width: 768px) {
    /* 增加触摸目标尺寸 */
    .main-nav a,
    .btn,
    .accessibility-controls button {
        padding: 12px 16px;
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 确保表单控件足够大 */
    input, 
    select, 
    textarea,
    button {
        font-size: 16px; /* 防止iOS缩放 */
        min-height: 44px;
    }
} 