/* 新增的视觉组件样式 */

/* CTA区域样式 */
.cta-section {
    background: linear-gradient(135deg, #3a7bd5, #3a6073);
    color: white;
    padding: var(--spacing-xxl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 60%;
    height: 200%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    z-index: 0;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.cta-section h2 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-md);
}

.cta-section p {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* 高对比度模式 */
body.high-contrast {
    --primary-color: #0056b3;
    --text-primary: #000000;
    --text-secondary: #333333;
    --background: #ffffff;
    --background-secondary: #f0f0f0;
    --border-color: #000000;
}

body.high-contrast .main-header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.high-contrast .hero,
body.high-contrast .cta-section,
body.high-contrast .main-footer {
    background: #0056b3;
}

body.high-contrast .info-item,
body.high-contrast .module-card,
body.high-contrast .tip-card,
body.high-contrast .assessment-content {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid #000000;
}

/* 按钮尺寸变体 */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: var(--font-size-sm);
}

.text-size-controls,
.contrast-controls {
    display: flex;
    gap: var(--spacing-sm);
}

/* 辅助功能按钮样式调整 */
#accessibilityWidget {
    opacity: 0.8;
    transition: all 0.3s ease;
}

#accessibilityWidget:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* 平板和移动设备优化 */
@media (max-width: 992px) {
    .cta-section h2 {
        font-size: var(--font-size-lg);
    }
    
    .cta-section p {
        font-size: var(--font-size-md);
    }
}

@media (max-width: 768px) {
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 80%;
    }
    
    .main-header h1 {
        font-size: var(--font-size-md);
        display: flex;
        align-items: center;
    }
    
    .main-header h1 .material-icons {
        margin-right: var(--spacing-sm);
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}

/* 移动菜单开关按钮 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
}

.mobile-menu-toggle .material-icons {
    font-size: 24px;
}

/* 为Material Icons添加空间 */
h3 .material-icons,
li .material-icons {
    vertical-align: middle;
    margin-right: 4px;
}

.btn .material-icons {
    vertical-align: middle;
    margin-left: 4px;
    font-size: 18px;
}

/* 优化动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.cta-section .btn-primary {
    animation: pulse 2s ease-in-out infinite;
}

/* 模块卡片图像容器优化 */
.module-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 50%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.module-card:hover .module-image-container::after {
    opacity: 1;
}

/* 滚动到视图时的淡入效果 */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}