/**
 * 启智教育培训主题 (Edu Master) 全设备响应式适配核心样式表
 * 完美支持：桌面PC (1200px+)、笔记本 (1024px-1199px)、平板 iPad (768px-1023px)、大屏手机 (480px-767px)、小屏手机 (320px-479px) 及 微信内置浏览器
 */

/* ==========================================================================
   1. 基础自适应与防溢出保障 (Base Fluidity)
   ========================================================================== */
html, body {
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}
.edu-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   2. 移动端抽屉导航与遮罩 (Mobile Drawer Menu)
   ========================================================================== */
.edu-mobile-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 290px;
    max-width: 85vw;
    height: 100%;
    background: #ffffff;
    z-index: 1001;
    box-shadow: 4px 0 25px rgba(0,0,0,0.18);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.edu-mobile-drawer.active { left: 0; }
.edu-mobile-drawer-header {
    padding: 18px 20px;
    background: #0f2744;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.edu-mobile-drawer-title { font-size: 16px; font-weight: 700; }
.edu-mobile-close {
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.edu-mobile-drawer-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.edu-mobile-menu-list li {
    border-bottom: 1px solid #f1f5f9;
}
.edu-mobile-menu-list li a {
    display: block;
    padding: 13px 0;
    font-weight: 600;
    color: #1e293b;
    font-size: 15px;
    transition: color 0.2s;
}
.edu-mobile-menu-list li.current-menu-item a,
.edu-mobile-menu-list li a:hover {
    color: #ea580c;
}
.edu-mobile-drawer-contact { margin-top: 25px; display: flex; flex-direction: column; gap: 10px; }
.edu-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.6);
    backdrop-filter: blur(3px);
    z-index: 1000;
    display: none;
}
.edu-mobile-overlay.active { display: block; }

/* ==========================================================================
   3. 笔记本与小屏桌面断点 (1024px - 1199px)
   ========================================================================== */
@media (max-width: 1199px) and (min-width: 1024px) {
    .edu-container { max-width: 980px; padding: 0 15px; }
    .edu-nav-desktop .edu-nav-menu { gap: 18px; }
    .edu-hero-title { font-size: 32px; }
    .edu-courses-grid, .edu-cases-grid { gap: 20px; }
    .edu-stat-number { font-size: 30px; }
}

/* ==========================================================================
   4. 平板设备断点 (768px - 1023px) - iPad & Pad Landscape/Portrait
   ========================================================================== */
@media (max-width: 1023px) {
    /* 导航栏切换为移动端汉堡包触发器 */
    .edu-nav-desktop { display: none !important; }
    .edu-mobile-toggle { display: flex !important; }
    .edu-header-inner { height: 68px; }

    /* 首屏居中布局适配 */
    .edu-hero-section { padding: 65px 0 75px; }
    .edu-hero-title { font-size: 36px; line-height: 1.35; }
    .edu-hero-desc { font-size: 16px; margin-bottom: 28px; }
    .edu-hero-pillars-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        margin-bottom: 32px;
    }

    /* 4 大数据看板改为 2x2 宫格 */
    .edu-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .edu-stat-item {
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 15px;
    }
    .edu-stat-item:nth-child(3),
    .edu-stat-item:nth-child(4) {
        border-bottom: none;
        padding-bottom: 0;
    }

    /* 网格组件由 3 列/4 列折叠为 2 列 */
    .edu-courses-grid,
    .edu-cases-grid,
    .edu-news-grid,
    .edu-honors-grid,
    .edu-teachers-grid,
    .edu-gallery-grid,
    .edu-honors-cert-grid,
    .edu-contact-top-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }

    /* 详情页侧边栏自适应单列 */
    .edu-course-detail-layout,
    .edu-single-layout,
    .edu-contact-main-grid,
    .edu-about-intro-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .edu-course-hero-inner {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    /* 页脚四列折叠为两列 */
    .edu-footer-inner {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px !important;
    }
}

/* ==========================================================================
   5. 手机端通用断点 (<= 767px) - Mobile Phones & WeChat
   ========================================================================== */
@media (max-width: 767px) {
    /* 隐藏顶部微信息栏，精简导航 */
    .edu-topbar { display: none !important; }
    .edu-header-inner { height: 58px; }
    .edu-logo-text { font-size: 18px; }
    .edu-logo-img { max-height: 38px; }
    
    /* 导航右侧按钮在手机端精简 */
    .edu-header-action .edu-btn-primary {
        padding: 7px 14px;
        font-size: 12px;
    }

    /* 首屏居中优化 */
    .edu-hero-section { padding: 45px 0 55px; }
    .edu-hero-badge { font-size: 12px; padding: 6px 14px; margin-bottom: 16px; }
    .edu-hero-title { font-size: 26px; line-height: 1.35; margin-bottom: 16px; }
    .edu-hero-desc { font-size: 14px; line-height: 1.7; margin-bottom: 24px; }
    .edu-hero-pillars-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 28px;
    }
    .edu-pillar-card { padding: 12px 14px; }
    .edu-pillar-icon { width: 36px; height: 36px; font-size: 22px; }
    .edu-pillar-info h4 { font-size: 14px; }
    .edu-pillar-info p { font-size: 11px; }
    .edu-hero-actions { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 24px; }
    .edu-btn-hero-primary { width: 100%; text-align: center; padding: 14px 20px; font-size: 15px; }
    .edu-btn-hero-phone { justify-content: center; font-size: 14px; width: 100%; text-align: center; }
    .edu-hero-trust-bar {
        flex-direction: column;
        gap: 8px;
        padding: 10px 16px;
        text-align: center;
    }
    .edu-trust-text { text-align: center; }

    /* 4 大数据看板 */
    .edu-stats-section { margin-top: 0; padding: 15px 0; }
    .edu-stats-grid {
        grid-template-columns: 1fr 1fr !important;
        padding: 18px 12px;
        gap: 15px 10px;
    }
    .edu-stat-item { padding: 5px; border-bottom: none; }
    .edu-stat-icon { font-size: 24px; }
    .edu-stat-num-wrap { font-size: 24px; }
    .edu-stat-unit { font-size: 15px; }
    .edu-stat-label { font-size: 12px; }
    .edu-stat-desc { display: none; } /* 手机端隐藏过长说明文字，保持整洁 */

    /* 区块通用间距收敛 */
    .edu-section { padding: 45px 0; }
    .edu-section-header { margin-bottom: 30px; }
    .edu-section-title { font-size: 22px; }
    .edu-section-subtitle { font-size: 13px; }

    /* 课程/案例/新闻列表全面单列流式展现 */
    .edu-courses-grid,
    .edu-cases-grid,
    .edu-news-grid,
    .edu-honors-grid,
    .edu-teachers-grid,
    .edu-gallery-grid,
    .edu-honors-cert-grid,
    .edu-contact-top-grid {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }

    .edu-course-thumb-wrap { height: 180px; }
    .edu-course-body { padding: 18px; }
    .edu-course-title { font-size: 16px; }

    /* FAQ 手风琴 */
    .edu-faq-question { padding: 14px 16px; }
    .edu-faq-q-icon { width: 24px; height: 24px; font-size: 12px; margin-right: 10px; }
    .edu-faq-question h3 { font-size: 14px; }
    .edu-faq-answer { padding: 0 16px 16px 50px; font-size: 13px; }
    .edu-faq-search-box { flex-direction: column; }
    .edu-faq-search-btn { height: 42px; width: 100%; margin-top: 6px; }

    /* 关于我们发展历程时间轴 (Timeline) 移动端自适应 */
    .edu-timeline::before { left: 24px; }
    .edu-timeline-item {
        flex-direction: column;
        gap: 6px;
        padding-left: 45px;
        margin-bottom: 22px;
    }
    .edu-timeline-year { text-align: left; width: auto; font-size: 16px; }
    .edu-timeline-content { padding: 14px 16px; }
    .edu-timeline-title { font-size: 15px; }

    /* 课程与案例落地单页 */
    .edu-course-hero { padding: 40px 0; }
    .edu-course-hero-title { font-size: 22px; }
    .edu-course-hero-card { padding: 20px; }
    .edu-detail-box { padding: 20px 16px; }
    .edu-detail-box-title { font-size: 17px; }
    .edu-case-step-card { padding: 18px 16px; }
    .edu-case-step-header h3 { font-size: 15px; }

    /* 媒体报道列表 */
    .edu-media-report-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }
    .edu-media-action { width: 100%; }
    .edu-media-action .edu-btn-xs { width: 100%; text-align: center; display: block; }

    /* 底部 CTA 与 Footer */
    .edu-cta-banner-section { padding: 40px 0; }
    .edu-cta-inner { flex-direction: column; text-align: center; gap: 20px; }
    .edu-cta-text h2 { font-size: 20px; }
    .edu-cta-action { flex-direction: column; width: 100%; gap: 12px; }
    .edu-cta-action button { width: 100%; }
    .edu-footer { padding-top: 45px; }
    .edu-footer-inner { grid-template-columns: 1fr !important; gap: 28px; }
    .edu-footer-bottom-inner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    /* 弹窗在手机端的全屏/近全屏体验 */
    .edu-modal-dialog {
        padding: 24px 16px;
        max-width: 95vw;
        max-height: 90vh;
        overflow-y: auto;
    }
    .edu-modal-title { font-size: 17px; }
    .edu-form-row { grid-template-columns: 1fr !important; }

    /* 手机端侧边悬浮挂件微调 */
    .edu-float-widget { right: 8px; bottom: 70px; }
    .edu-float-btn { width: 40px; height: 40px; }
    .edu-float-popover { display: none !important; }

    /* 页面底部防遮挡边距 (为吸底栏预留) */
    body { padding-bottom: 60px; }

    /* 手机端吸底快速转化栏 (Mobile Bottom Bar) */
    .edu-mobile-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
        display: flex;
        align-items: center;
        z-index: 999;
        box-shadow: 0 -3px 12px rgba(0,0,0,0.08);
    }
    .edu-mobile-bar-btn {
        flex: 1;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        font-weight: 600;
        color: #475569;
        border-right: 1px solid #f1f5f9;
        text-decoration: none;
        background: none;
        border-top: none;
        border-bottom: none;
        border-left: none;
        cursor: pointer;
    }
    .edu-mobile-bar-btn:last-child { border-right: none; }
    .edu-mobile-bar-btn .edu-bar-icon { font-size: 15px; margin-bottom: 2px; }
    .edu-mobile-bar-phone { color: #0f2744; }
    .edu-mobile-bar-cta {
        flex: 1.6;
        background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
        color: #ffffff;
        font-weight: 700;
    }
}

/* ==========================================================================
   6. 超小屏幕手机适配 (<= 380px) - iPhone SE & Mini Devices
   ========================================================================== */
@media (max-width: 380px) {
    .edu-hero-title { font-size: 21px; }
    .edu-section-title { font-size: 19px; }
    .edu-stats-grid { grid-template-columns: 1fr !important; }
    .edu-filter-bar { gap: 6px; }
    .edu-filter-item { padding: 6px 14px; font-size: 12px; }
    .edu-mobile-drawer { width: 250px; }
}

/* PC 端默认隐藏手机吸底栏 */
@media (min-width: 768px) {
    .edu-mobile-bottom-bar { display: none !important; }
}
