/**
 * UI 重设计优化
 * 目标：统一整体风格、提升信息密度、增强视觉美感
 */

/* ============================================
   学习路径区域重设计（悬停展开卡片）
   ============================================ */

.learning-path,
.path-section {
    padding: 50px 0 40px;
    background: #ffffff;
    display: flex;
    align-items: center;
}

.learning-path .container,
.path-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.learning-path .section-header,
.path-section .section-header {
    text-align: center;
    margin-bottom: 36px;
}

.learning-path .section-title,
.path-section .section-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--text, #1a1a2e);
    margin-bottom: 12px;
}

.learning-path .section-subtitle,
.path-section .section-subtitle {
    font-size: 16px;
    color: var(--text-muted, #636e72);
}

/* 学习路径网格 - 3列布局（5阶段+1全部课程=6个磁贴，2×3） */
.path-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: start;
}

/* 学习路径卡片 */
.path-step {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 20px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    min-height: 120px;
}

.path-step:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(243, 162, 51, 0.18);
    border-color: rgba(243, 162, 51, 0.2);
}

/* 顶部色条 */
.path-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #27ae60 0%, #229954 100%);
    transition: height 0.35s ease;
}

.path-step:nth-child(2)::before {
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
}

.path-step:nth-child(3)::before {
    background: linear-gradient(90deg, #f1c40f 0%, #f39c12 100%);
}

.path-step:nth-child(4)::before {
    background: linear-gradient(90deg, #e67e22 0%, #d35400 100%);
}

.path-step:nth-child(5)::before {
    background: linear-gradient(90deg, #e63946 0%, #d62828 100%);
}

.path-step:hover::before {
    height: 6px;
}

/* 徽章 */
.path-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 12px;
}

.path-step:nth-child(2) .path-badge {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.path-step:nth-child(3) .path-badge {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
}

.path-step:nth-child(4) .path-badge {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

.path-step:nth-child(5) .path-badge {
    background: linear-gradient(135deg, #e63946 0%, #d62828 100%);
}

/* 标题和简介 */
.step-content h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text, #1a1a2e);
    margin-bottom: 8px;
}

.step-content p {
    font-size: 14px;
    color: var(--text-muted, #636e72);
    line-height: 1.5;
}

/* 详细内容（默认隐藏，悬停展开） */
.level-detail-popup {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0;
}

.path-step:hover .level-detail-popup {
    max-height: 220px;
    opacity: 1;
    margin-top: 16px;
}

.popup-desc {
    font-size: 13px;
    color: var(--text-muted, #636e72);
    line-height: 1.6;
    margin-bottom: 12px;
}

.popup-features {
    list-style: none;
    padding: 0;
    margin: 0 0 14px 0;
}

.popup-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text, #2d3436);
    line-height: 1.4;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: rgba(243, 162, 51, 0.1);
    color: #f3a233;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.popup-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #e63946;
    text-decoration: none;
    transition: all 0.2s ease;
}

.popup-link:hover {
    gap: 10px;
    color: #f3a233;
}

/* 桌面端强制所有卡片保持统一高度，悬停时展开 */
@media (min-width: 1025px) {
    .path-step {
        min-height: 170px;
    }
}

/* ============================================
   联系方式区域重设计
   ============================================ */

/* 页脚整体布局 */
.footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    color: white;
    padding: 60px 0 30px;
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
}

.footer-brand {
    flex: 2;
    min-width: 240px;
    max-width: 320px;
}

.footer-section {
    flex: 1;
    min-width: 120px;
}

.footer-brand .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 16px;
}

.footer-brand .logo-text {
    font-size: 22px;
    font-weight: 700;
    color: white;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
}

.footer-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: white;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-section ul li a:hover {
    color: #f3a233;
    padding-left: 4px;
}

/* 联系方式 */
.footer-contact {
    flex: 1;
}

.footer-contact h4 {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 24px;
}

.contact-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.contact-text {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.contact-text strong {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 2px;
}

.contact-text a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-text a:hover {
    color: #f3a233;
}

/* 微信二维码悬停弹出 */
.wechat-item {
    position: relative;
}

.wechat-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    width: 100%;
}

.wechat-trigger .qr-hint {
    font-size: 11px;
    color: #f3a233;
    margin-left: auto;
    padding: 2px 8px;
    background: rgba(243, 162, 51, 0.12);
    border-radius: 12px;
}

.qr-popup {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    background: white;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    pointer-events: none;
    width: 140px;
}

.qr-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 24px;
    border: 8px solid transparent;
    border-top-color: white;
}

.qr-popup img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 6px;
    display: block;
}

.qr-tip {
    font-size: 12px;
    color: #555;
    font-weight: 500;
    text-align: center;
}

.wechat-trigger:hover .qr-popup,
.wechat-item:hover .qr-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* 页脚底部 */
.footer-bottom {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}

.footer-bottom .company-name {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.footer-bottom .icp a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

.footer-bottom .icp a:hover {
    color: #f3a233;
}

/* ============================================
   课程体系区域（新增第二屏）
   ============================================ */

.course-system {
    padding: 50px 0 40px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
}

.course-system .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.course-system .section-header {
    text-align: center;
    margin-bottom: 36px;
}

/* section-label 使用全局样式，保证与 learning-path 一致 */

.course-system .section-title {
    font-size: 34px;
    font-weight: 800;
    color: var(--text, #1a1a2e);
    margin-bottom: 10px;
}

.course-system .section-subtitle {
    font-size: 15px;
    color: var(--text-muted, #636e72);
}

/* 课程体系网格 */
.course-system-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* 课程体系卡片 */
.course-system-card {
    background: white;
    border-radius: 18px;
    padding: 24px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.course-system-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.course-system-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f3a233 0%, #e63946 100%);
}

.course-system-card:nth-child(2)::before {
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
}

.course-system-card:nth-child(3)::before {
    background: linear-gradient(90deg, #27ae60 0%, #229954 100%);
}

.course-system-card:nth-child(4)::before {
    background: linear-gradient(90deg, #9b59b6 0%, #8e44ad 100%);
}

/* 课程体系图标 */
.course-system-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 0;
    background: linear-gradient(135deg, rgba(243, 162, 51, 0.1) 0%, rgba(230, 57, 70, 0.1) 100%);
}

.course-system-card:nth-child(2) .course-system-icon {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(41, 128, 185, 0.1) 100%);
}

.course-system-card:nth-child(3) .course-system-icon {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, rgba(34, 153, 84, 0.1) 100%);
}

.course-system-card:nth-child(4) .course-system-icon {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.1) 0%, rgba(142, 68, 173, 0.1) 100%);
}

/* 课程体系标题 */
.course-system-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.course-system-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text, #1a1a2e);
    margin-bottom: 0;
}

.course-system-card .card-subtitle {
    font-size: 12px;
    color: var(--text-muted, #636e72);
    margin-bottom: 10px;
    line-height: 1.5;
}

/* 课程标签列表 */
.course-tags {
    list-style: none;
    padding: 0;
    margin: 0;
}

.course-tags li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text, #2d3436);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.course-tags li:last-child {
    border-bottom: none;
}

.course-tags li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f3a233 0%, #e63946 100%);
    flex-shrink: 0;
}

.course-system-card:nth-child(2) .course-tags li::before {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.course-system-card:nth-child(3) .course-tags li::before {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

.course-system-card:nth-child(4) .course-tags li::before {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

/* 查看更多链接 */
.course-system-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    color: #e63946;
    text-decoration: none;
    transition: all 0.2s ease;
}

.course-system-link:hover {
    gap: 10px;
    color: #f3a233;
}

/* ============================================
   响应式设计
   ============================================ */

@media (max-width: 1200px) {
    .path-steps {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .course-system-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .footer-content {
        flex-wrap: wrap;
        gap: 32px;
    }
    
    .footer-brand,
    .footer-section {
        flex: 1 1 calc(33.333% - 22px);
        min-width: 160px;
        max-width: none;
    }
    
    .footer-contact {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .contact-info {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .path-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .path-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* 移动端板块标题字号统一为 28px（Hero h1 为 34px，保持层次） */
    .learning-path .section-title,
    .path-section .section-title,
    .course-system .section-title {
        font-size: 28px;
    }
    
    .course-system-grid,
    .feature-grid,
    .info-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .course-system,
    .features,
    .germany-info,
    .learning-path {
        padding: 36px 0;
    }
    
    .course-system .section-header,
    .features .section-header,
    .germany-info .section-header,
    .learning-path .section-header {
        margin-bottom: 24px;
    }
    
    .course-system-card {
        padding: 14px 12px;
    }
    
    .course-system-icon {
        width: 32px;
        height: 32px;
        font-size: 18px;
        margin-bottom: 0;
    }
    
    .course-system-card h3 {
        font-size: 14px;
    }
    
    .course-system-card .card-subtitle {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 11px;
    }
    
    .course-tags {
        display: none;
    }
    
    .course-system-link {
        margin-top: 6px;
        font-size: 11px;
    }
    
    .feature-item {
        padding: 18px 14px;
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .feature-item h3 {
        font-size: 15px;
        margin-bottom: 4px;
    }
    
    .feature-item p {
        font-size: 12px;
        line-height: 1.5;
    }
    
    .info-card {
        padding: 18px 12px;
    }
    
    .info-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .info-card h3 {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .info-card p {
        font-size: 11px;
        margin-bottom: 8px;
    }
    
    .info-card .link-arrow {
        font-size: 12px;
    }
    
    .path-step {
        padding: 14px 12px;
        min-height: 92px;
    }
    
    /* 全部课程磁贴 - 移动端尺寸与阶段磁贴完全一致 */
    .path-step-all-courses {
        padding: 14px 12px;
        min-height: 92px;
    }

    /* 覆盖全局 .path-badge-all 的高特异性尺寸（用 .path-steps 父选择器提升优先级） */
    .path-steps .path-badge-all {
        width: 36px;
        height: 36px;
        font-size: 13px;
        margin-bottom: 8px;
    }

    /* 覆盖 .path-step-all-courses .step-content h4/p 的高特异性尺寸 */
    .path-steps .path-step-all-courses .step-content h4 {
        font-size: 13px;
        margin-bottom: 2px;
    }

    .path-steps .path-step-all-courses .step-content p {
        font-size: 11px;
    }
    
    .path-badge {
        width: 36px;
        height: 36px;
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .step-content h4 {
        font-size: 13px;
        margin-bottom: 2px;
    }
    
    .step-content p {
        font-size: 11px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 0;
    }
    
    .footer-brand,
    .footer-section {
        display: none;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .qr-popup {
        right: -10px;
    }
}

@media (max-width: 480px) {
    .learning-path .container,
    .course-system .container,
    .footer .container {
        padding: 0 16px;
    }

    /* 超小屏板块标题降至 22px（Hero h1 为 24px） */
    .learning-path .section-title,
    .path-section .section-title,
    .course-system .section-title {
        font-size: 22px;
    }
    
    /* 保持 2×2 磁贴布局 */
    .course-system-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .course-system-card .card-subtitle {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 11px;
    }
}

/* 触摸设备：点击展开学习路径详情 */
@media (hover: none) {
    .path-step.active .level-detail-popup {
        max-height: 220px;
        opacity: 1;
        margin-top: 16px;
    }
}

/* ============================================
   歌德证书备考特色区域
   ============================================ */

.goethe-exam-section {
    padding: 50px 0 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.goethe-exam-section .section-header {
    text-align: center;
    margin-bottom: 36px;
}

.goethe-exam-section .section-title {
    font-size: 34px;
    font-weight: 800;
    color: var(--text, #1a1a2e);
    margin-bottom: 10px;
}

.goethe-exam-section .section-subtitle {
    font-size: 15px;
    color: var(--text-muted, #636e72);
}

.goethe-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.goethe-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    border: 1.5px solid transparent;
}

.goethe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.goethe-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.goethe-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text, #1a1a2e);
    margin-bottom: 10px;
}

.goethe-card p {
    font-size: 13px;
    color: var(--text-muted, #636e72);
    line-height: 1.6;
    margin-bottom: 12px;
}

.goethe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.goethe-tags .tag {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(243, 162, 51, 0.1) 0%, rgba(230, 57, 70, 0.1) 100%);
    color: #e63946;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
}

.goethe-highlight {
    background: linear-gradient(135deg, #f3a233 0%, #e63946 100%);
    color: #fff;
    border: none;
}

.goethe-highlight .goethe-icon {
    filter: brightness(0) invert(1);
}

.goethe-highlight h3 {
    color: #fff;
}

.goethe-highlight p {
    color: rgba(255, 255, 255, 0.9);
}

.goethe-highlight .btn-primary {
    background: #fff;
    color: #e63946;
    border: none;
    margin-top: 10px;
}

.goethe-highlight .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* 响应式：歌德证书区块 */
@media (max-width: 1200px) {
    .goethe-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .goethe-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .goethe-card {
        padding: 20px 16px;
    }

    .goethe-exam-section .section-title {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .goethe-exam-section {
        padding: 40px 0 32px;
    }

    .goethe-exam-section .section-title {
        font-size: 22px;
    }
}

/* ============================================
   首屏按钮 - 桌面端/移动端切换
   ============================================ */

/* 桌面端隐藏页脚中的小程序和网站行（品牌区已有），地址保留 */
.footer-contact .contact-extra {
    display: none;
}

/* ============================================
   学习路径 - 全部课程磁贴（与阶段磁贴尺寸一致）
   ============================================ */

.path-step-all-courses {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-decoration: none;
    color: #1a1a2e;
    vertical-align: top;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.path-step-all-courses:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
    border-color: #bdbdbd;
}

.path-step-all-courses::before {
    display: none;
}

.path-badge-all {
    background: #1a1a2e;
    backdrop-filter: none;
    width: 40px;
    height: 40px;
    font-size: 15px;
    margin-bottom: 12px;
    color: #ffffff;
}

.path-step-all-courses .step-content h4 {
    color: #1a1a2e;
    font-size: 18px;
    margin-bottom: 4px;
}

.path-step-all-courses .step-content p {
    color: #636e72;
    font-size: 14px;
}
