/* ============================================
   mobile.css - 移动端全面适配样式
   覆盖所有 HTML 页面的内联样式 + 共享样式
   断点: 1024px / 768px / 480px / 375px
   ============================================ */

/* ===== 1024px 平板 ===== */
@media (max-width: 1024px) {
    /* 课程详情 hero 双列变单列 */
    .course-detail-hero .container,
    .course-hero-inner {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    /* 专家 hero 头像+信息双列变单列 */
    .expert-hero .container {
        grid-template-columns: 1fr !important;
        text-align: center !important;
    }
    .expert-hero .expert-hero-avatar,
    .expert-hero-avatar {
        margin: 0 auto !important;
    }

    /* 合作模式4列变2列 */
    .cards-grid.cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* 合作流程5列变2列 */
    .process-timeline {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .process-step::after,
    .process-step:not(:last-child)::after {
        display: none !important;
    }

    /* funeng service-split */
    .service-split {
        grid-template-columns: 1fr !important;
    }
    .service-split.reverse .service-media {
        order: 0 !important;
    }
}

/* ===== 768px 手机/小平板 ===== */
@media (max-width: 768px) {
    /* ----- 全局排版 ----- */
    body {
        font-size: 15px !important;
    }

    .container,
    .container-narrow {
        padding: 0 16px !important;
    }

    /* ----- 顶部导航增强 ----- */
    .header {
        height: 56px !important;
    }
    .header-inner {
        padding: 0 16px !important;
    }
    .logo {
        font-size: 16px !important;
        gap: 6px !important;
    }
    .logo-icon {
        width: 30px !important;
        height: 30px !important;
        font-size: 15px !important;
    }
    .logo span {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* 导航改为全屏抽屉 */
    .main-nav {
        top: 56px !important;
        max-height: calc(100vh - 56px) !important;
        padding: 12px !important;
    }
    .nav-link {
        padding: 12px 10px !important;
        font-size: 15px !important;
    }
    .dropdown {
        padding-left: 16px !important;
    }
    .dropdown-link {
        padding: 8px 10px !important;
        font-size: 13px !important;
    }

    .header-right {
        gap: 8px !important;
    }
    .header-right .btn-sm {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }

    /* ----- Section间距缩减 ----- */
    .section {
        padding: 40px 0 !important;
    }
    .section-header {
        margin-bottom: 28px !important;
    }
    .section-label {
        font-size: 12px !important;
        padding: 4px 12px !important;
        margin-bottom: 10px !important;
    }
    .section-title {
        font-size: 22px !important;
        margin-bottom: 10px !important;
    }
    .section-desc {
        font-size: 14px !important;
        line-height: 1.7 !important;
    }

    /* ----- Hero区域 ----- */
    .hero {
        padding: 90px 0 50px !important;
        min-height: auto !important;
    }
    .hero-title {
        font-size: 26px !important;
    }
    .hero-subtitle {
        font-size: 16px !important;
        margin-bottom: 14px !important;
    }
    .hero-desc {
        font-size: 14px !important;
        line-height: 1.7 !important;
        margin-bottom: 24px !important;
    }
    .hero-badge {
        font-size: 12px !important;
        padding: 6px 14px !important;
        margin-bottom: 16px !important;
    }
    .hero-actions {
        gap: 10px !important;
        margin-bottom: 32px !important;
    }
    .hero-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .hero-stat {
        padding: 14px !important;
    }
    .hero-stat-number {
        font-size: 22px !important;
    }
    .hero-stat-label {
        font-size: 12px !important;
    }

    /* ----- Sub-hero / 子页头 ----- */
    .sub-hero {
        padding: 90px 0 40px !important;
    }
    .sub-hero-title {
        font-size: 24px !important;
    }
    .sub-hero-subtitle {
        font-size: 14px !important;
    }
    .hero-lead {
        font-size: 15px !important;
        line-height: 1.75 !important;
        margin-top: 14px !important;
    }
    .breadcrumb {
        font-size: 12px !important;
        margin-bottom: 12px !important;
        flex-wrap: wrap !important;
    }

    /* ----- 课程详情Hero ----- */
    .course-detail-hero {
        padding: 80px 0 40px !important;
    }
    .course-detail-hero h1 {
        font-size: 24px !important;
        line-height: 1.3 !important;
        margin-bottom: 10px !important;
    }
    .course-detail-hero .hero-subtitle {
        font-size: 15px !important;
    }
    .course-detail-hero .hero-desc {
        font-size: 13px !important;
        margin-bottom: 20px !important;
    }
    .course-detail-hero .hero-actions {
        gap: 10px !important;
    }
    .course-detail-hero .course-meta {
        padding: 16px !important;
    }
    .course-detail-hero .course-meta-item {
        padding: 8px 0 !important;
        font-size: 13px !important;
    }
    .course-detail-hero .course-price {
        font-size: 22px !important;
    }

    /* course-hero (共用) */
    .course-hero {
        padding: 80px 0 40px !important;
    }
    .course-hero-title {
        font-size: 24px !important;
        margin-bottom: 10px !important;
    }
    .course-hero-desc {
        font-size: 14px !important;
        margin-bottom: 20px !important;
    }
    .course-hero-stats {
        gap: 16px !important;
        margin-bottom: 20px !important;
    }
    .course-hero-stat-number {
        font-size: 22px !important;
    }
    .course-hero-stat-label {
        font-size: 12px !important;
    }
    .course-hero-image {
        height: 160px !important;
        font-size: 50px !important;
    }

    /* ----- 专家详情Hero ----- */
    .expert-hero {
        padding: 80px 0 40px !important;
    }
    .expert-hero h1 {
        font-size: 24px !important;
        margin-bottom: 6px !important;
    }
    .expert-hero .hero-titles {
        font-size: 13px !important;
        margin-bottom: 12px !important;
    }
    .expert-hero .hero-tags {
        gap: 6px !important;
    }
    .expert-hero .hero-tags span {
        font-size: 12px !important;
        padding: 4px 10px !important;
    }
    .expert-hero .hero-actions {
        gap: 8px !important;
        flex-wrap: wrap !important;
    }
    .expert-hero .btn-light,
    .expert-hero .btn-outline {
        padding: 8px 16px !important;
        font-size: 13px !important;
    }
    .expert-hero-avatar {
        width: 90px !important;
        height: 90px !important;
        font-size: 36px !important;
    }

    /* stats-bar */
    .stats-bar {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 16px !important;
        margin-top: -20px !important;
    }
    .stats-item .stats-num {
        font-size: 22px !important;
    }
    .stats-item .stats-label {
        font-size: 12px !important;
    }

    /* skill-grid */
    .skill-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .skill-card {
        padding: 14px !important;
    }

    /* cert-grid */
    .cert-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    /* ----- 业务/卡片网格全部单列 ----- */
    .business-grid,
    .cards-grid,
    .cards-grid.cols-4,
    .article-grid,
    .knowledge-grid,
    .backing-grid,
    .product-grid,
    .philosophy-grid,
    .stats-grid,
    .process-grid,
    .process-timeline,
    .principle-grid,
    .honor-grid,
    .related-courses,
    .price-grid,
    .service-split,
    .course-section .cards-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    /* philosophy-grid 特殊: 可以2列 */
    .philosophy-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* stats-grid: 3列也可以 */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }

    /* 卡片内容缩减 */
    .business-card,
    .card-link,
    .product-card,
    .backing-card,
    .knowledge-card,
    .course-card,
    .principle-card,
    .honor-card,
    .process-card,
    .process-step,
    .related-course-card {
        padding: 16px !important;
    }
    .business-icon,
    .product-icon,
    .backing-icon,
    .course-card-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
        margin-bottom: 12px !important;
    }
    .business-title,
    .product-title,
    .backing-title,
    .knowledge-title,
    .card-title,
    .course-card-title {
        font-size: 16px !important;
    }
    .business-desc,
    .product-desc,
    .backing-desc,
    .card-desc,
    .course-card-desc,
    .knowledge-desc {
        font-size: 13px !important;
        line-height: 1.6 !important;
    }

    /* product-header */
    .product-header {
        gap: 10px !important;
        margin-bottom: 12px !important;
    }
    .product-stats {
        gap: 16px !important;
    }
    .product-stat-number {
        font-size: 18px !important;
    }

    /* stat-number */
    .stat-number {
        font-size: 26px !important;
    }

    /* ----- 文章/正文区域 ----- */
    .article-page {
        padding: 30px 0 50px !important;
    }
    .article-header {
        margin-bottom: 30px !important;
    }
    .article-header h1 {
        font-size: 22px !important;
        line-height: 1.35 !important;
    }
    .article-body,
    .article-body {
        font-size: 14px !important;
    }
    .article-body h2 {
        font-size: 18px !important;
        margin: 28px 0 14px !important;
        padding-bottom: 8px !important;
    }
    .article-body h3 {
        font-size: 16px !important;
        margin: 20px 0 10px !important;
    }
    .article-body p {
        font-size: 14px !important;
        line-height: 1.8 !important;
        margin-bottom: 12px !important;
    }
    .article-body ul,
    .article-body ol {
        margin: 0 0 14px 18px !important;
    }
    .article-body li {
        font-size: 14px !important;
        line-height: 1.8 !important;
    }

    /* expert-section */
    .expert-section {
        margin: 24px 0 !important;
    }
    .expert-section h2 {
        font-size: 20px !important;
        margin-bottom: 14px !important;
    }
    .expert-section h3 {
        font-size: 16px !important;
        margin: 16px 0 8px !important;
    }
    .expert-section p {
        font-size: 14px !important;
        line-height: 1.8 !important;
    }

    /* ----- 表格横向滚动 ----- */
    .info-table,
    .case-table,
    .comparison-table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        max-width: 100% !important;
        font-size: 13px !important;
    }
    .info-table thead,
    .info-table tbody,
    .case-table thead,
    .case-table tbody,
    .comparison-table thead,
    .comparison-table tbody,
    .info-table tr,
    .case-table tr,
    .comparison-table tr {
        display: table !important;
        width: 100% !important;
    }
    .info-table th,
    .info-table td,
    .case-table th,
    .case-table td,
    .comparison-table th,
    .comparison-table td {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }
    .info-table th {
        width: auto !important;
        min-width: 90px !important;
    }

    /* ----- FAQ区域 ----- */
    .faq-question {
        padding: 14px 16px !important;
        font-size: 14px !important;
    }
    .faq-answer-inner {
        padding: 0 16px 14px !important;
        font-size: 13px !important;
        line-height: 1.7 !important;
    }
    .faq-item.active .faq-answer {
        max-height: 600px !important;
    }

    /* article-faq */
    .article-faq-item {
        padding: 14px !important;
    }
    .article-faq-q {
        font-size: 14px !important;
        gap: 8px !important;
    }
    .article-faq-q .q-tag {
        width: 20px !important;
        height: 20px !important;
        font-size: 11px !important;
    }
    .article-faq-a {
        font-size: 13px !important;
        line-height: 1.75 !important;
        padding-left: 28px !important;
    }

    /* key-takeaways */
    .key-takeaways {
        padding: 14px 16px !important;
        margin: 8px 0 24px !important;
    }
    .key-takeaways h3 {
        font-size: 16px !important;
    }
    .key-takeaways li {
        font-size: 13px !important;
        line-height: 1.75 !important;
    }

    /* ----- CTA区域 ----- */
    .cta-section {
        padding: 40px 0 !important;
    }
    .cta-title {
        font-size: 22px !important;
        margin-bottom: 16px !important;
    }
    .cta-actions {
        gap: 10px !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .cta-actions .btn {
        width: 100% !important;
    }

    /* coop-contact / contact-cta / contact-box */
    .coop-contact,
    .contact-cta,
    .contact-box {
        padding: 20px 16px !important;
    }
    .coop-contact p,
    .contact-cta p,
    .contact-box .cb-text {
        font-size: 14px !important;
        line-height: 1.75 !important;
    }
    .coop-btns,
    .contact-cta .cc-btns {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .coop-btns .btn,
    .cc-btns .btn {
        width: 100% !important;
    }
    .contact-cta .cc-phone {
        font-size: 20px !important;
    }

    /* cta-banner */
    .cta-banner {
        padding: 24px 16px !important;
        margin: 24px 0 !important;
    }
    .cta-banner h3 {
        font-size: 20px !important;
    }

    /* ----- 页脚 ----- */
    .footer {
        padding: 40px 0 0 !important;
    }
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        margin-bottom: 24px !important;
    }
    .footer-brand {
        font-size: 17px !important;
        margin-bottom: 12px !important;
    }
    .footer-desc {
        font-size: 13px !important;
        line-height: 1.7 !important;
    }
    .footer-phone {
        font-size: 18px !important;
    }
    .footer-bottom {
        flex-direction: column !important;
        gap: 10px !important;
        text-align: center !important;
        padding: 18px 0 !important;
        font-size: 12px !important;
    }
    .footer-bottom a {
        margin: 0 8px !important;
    }

    /* ----- 浮动按钮 ----- */
    .float-buttons {
        right: 12px !important;
        bottom: 70px !important;
        gap: 10px !important;
    }
    .float-btn {
        width: 44px !important;
        height: 44px !important;
        font-size: 18px !important;
    }

    /* ----- 表单 ----- */
    .form-section {
        padding: 30px 16px !important;
    }
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
    .form-input,
    .form-select,
    .form-textarea {
        padding: 10px 14px !important;
        font-size: 14px !important;
    }

    /* ----- timeline-list ----- */
    .timeline-list {
        margin: 16px 0 !important;
    }
    .timeline-list li {
        padding-bottom: 16px !important;
    }
    .timeline-list .t-period,
    .timeline-list .t-year {
        font-size: 14px !important;
    }

    /* ----- expert-list (about页) ----- */
    .expert-item {
        gap: 10px !important;
        padding: 12px 0 !important;
    }
    .expert-avatar {
        width: 44px !important;
        height: 44px !important;
        font-size: 16px !important;
    }
    .expert-meta h3 {
        font-size: 15px !important;
    }
    .expert-meta p {
        font-size: 13px !important;
    }

    /* ----- course-toc / module-list ----- */
    .course-toc {
        padding: 14px !important;
        margin: 20px 0 !important;
    }
    .course-toc h3 {
        font-size: 16px !important;
    }
    .course-toc ol {
        font-size: 13px !important;
        line-height: 1.8 !important;
    }
    .module-item {
        padding: 14px !important;
    }
    .module-item h4 {
        font-size: 15px !important;
    }
    .module-item p {
        font-size: 13px !important;
    }

    /* ----- pdf-preview / download-box ----- */
    .pdf-preview {
        height: 50vh !important;
        min-height: 300px !important;
    }
    .pdf-toolbar {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 10px 14px !important;
    }
    .pdf-toolbar-title {
        font-size: 13px !important;
    }
    .download-box {
        padding: 14px !important;
        flex-direction: column !important;
        text-align: center !important;
    }
    .download-box-icon {
        font-size: 28px !important;
    }

    /* ----- article-cover ----- */
    .article-cover {
        height: 140px !important;
        font-size: 40px !important;
        margin-bottom: 18px !important;
    }

    /* ----- section-subtitle ----- */
    .section-subtitle {
        font-size: 14px !important;
        line-height: 1.7 !important;
    }

    /* ----- 按钮通用 ----- */
    .btn {
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
    .btn-lg {
        padding: 12px 24px !important;
        font-size: 15px !important;
    }

    /* ----- course-section ----- */
    .course-section {
        padding: 36px 0 !important;
    }
    .course-section-title {
        font-size: 20px !important;
        margin-bottom: 18px !important;
    }

    /* ----- faq-wrap / faq-category-title ----- */
    .faq-wrap,
    .faq-list {
        max-width: 100% !important;
    }
    .faq-category-title {
        font-size: 18px !important;
        margin: 28px 0 14px !important;
    }
    .article-faq-title {
        font-size: 20px !important;
    }

    /* ----- 面包屑增强 ----- */
    .breadcrumb {
        gap: 4px !important;
    }

    /* ----- doc-meta ----- */
    .doc-meta {
        gap: 8px 16px !important;
        margin: 14px 0 18px !important;
    }
    .doc-meta-item {
        font-size: 13px !important;
    }

    /* ----- article-item (专家详情内的文章列表) ----- */
    .article-item {
        padding: 12px 0 !important;
        flex-wrap: wrap !important;
    }
    .article-item a {
        font-size: 14px !important;
    }
}

/* ===== 480px 小屏手机 ===== */
@media (max-width: 480px) {
    /* 全局更小 */
    .container {
        padding: 0 12px !important;
    }

    /* hero 标题 */
    .hero-title {
        font-size: 22px !important;
    }
    .hero-subtitle {
        font-size: 14px !important;
    }

    /* hero-actions 全宽按钮 */
    .hero-actions {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .hero-actions .btn {
        width: 100% !important;
    }

    /* hero-stats 单列 */
    .hero-stats {
        grid-template-columns: 1fr !important;
    }

    /* section title 更小 */
    .section-title {
        font-size: 19px !important;
    }
    .sub-hero-title,
    .course-detail-hero h1,
    .course-hero-title,
    .expert-hero h1 {
        font-size: 20px !important;
    }

    /* article-header */
    .article-header h1 {
        font-size: 19px !important;
    }
    .article-body h2 {
        font-size: 17px !important;
    }

    /* philosophy 单列 */
    .philosophy-grid {
        grid-template-columns: 1fr !important;
    }

    /* stats-grid 单列 */
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 14px !important;
    }
    .stat-number {
        font-size: 22px !important;
    }

    /* stats-bar 单列 */
    .stats-bar {
        grid-template-columns: 1fr 1fr !important;
    }

    /* expert-avatar 更小 */
    .expert-hero-avatar {
        width: 80px !important;
        height: 80px !important;
        font-size: 32px !important;
    }

    /* 卡片内边距更小 */
    .business-card,
    .card-link,
    .product-card,
    .backing-card,
    .knowledge-card,
    .course-card {
        padding: 14px !important;
    }

    /* float按钮更小 */
    .float-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
    }
    .float-buttons {
        right: 10px !important;
        bottom: 60px !important;
    }

    /* logo span 可能需要隐藏部分文字 */
    .logo span {
        font-size: 14px !important;
    }

    /* article-cover 更小 */
    .article-cover {
        height: 100px !important;
        font-size: 32px !important;
    }

    /* cta-title */
    .cta-title {
        font-size: 19px !important;
    }

    /* article-body */
    .article-body p {
        font-size: 13px !important;
        line-height: 1.75 !important;
    }
}

/* ===== 375px 超小屏 ===== */
@media (max-width: 375px) {
    .logo span {
        display: none !important;
    }
    .logo-icon {
        margin: 0 auto !important;
    }

    .section-title {
        font-size: 17px !important;
    }

    .hero-title {
        font-size: 20px !important;
    }

    .hero-stat {
        padding: 10px !important;
    }
    .hero-stat-number {
        font-size: 18px !important;
    }

    .btn {
        padding: 8px 16px !important;
        font-size: 13px !important;
    }

    .card-title,
    .business-title,
    .product-title {
        font-size: 15px !important;
    }
}

/* ===== 横屏适配 ===== */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 300px !important;
        padding: 80px 0 40px !important;
    }
    .sub-hero {
        padding: 80px 0 30px !important;
    }
}

/* ===== 触摸优化 ===== */
@media (hover: none) and (pointer: coarse) {
    /* 触摸设备取消hover效果 */
    .nav-item:hover .dropdown {
        opacity: 0;
        visibility: hidden;
    }
    .nav-item.active .dropdown,
    .nav-item.expanded .dropdown {
        opacity: 1;
        visibility: visible;
    }
    .business-card:hover,
    .card-link:hover,
    .product-card:hover,
    .knowledge-card:hover,
    .course-card:hover,
    .article-card:hover,
    .philosophy-item:hover,
    .backing-card:hover,
    .process-card:hover,
    .related-course-card:hover {
        transform: none !important;
        box-shadow: var(--shadow-sm) !important;
    }
    .btn:hover {
        transform: none !important;
    }
}

/* ===== 打印样式(移动端分享时友好) ===== */
@media print {
    .header,
    .float-buttons,
    .menu-toggle,
    .main-nav {
        display: none !important;
    }
    .hero,
    .sub-hero,
    .course-detail-hero,
    .expert-hero {
        padding: 20px 0 !important;
        background: #fff !important;
        color: #000 !important;
    }
}
