/* ==========================================================================
   NKS Theme - Responsive Stylesheet
   多设备响应式适配
   ========================================================================== */

/* ============================================================
   大屏笔记本 (1280px 以下)
   ============================================================ */
@media (max-width: 1280px) {
    :root {
        --nks-container-width: 1140px;
    }
    
    .hero-slider {
        height: 500px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .partners-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ============================================================
   平板横屏 (1024px 以下)
   ============================================================ */
@media (max-width: 1024px) {
    :root {
        --nks-container-width: 960px;
    }
    
    .hero-slider {
        height: 450px;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-desc {
        font-size: 1.1rem;
    }
    
    /* 隐藏主导航，显示移动端菜单按钮 */
    .main-navigation {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* 特色服务 */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 产品 */
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* 统计 */
    .stats-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2.25rem;
    }

    /* 自定义产品 */
    .custom-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 选项卡 */
    .custom-tabs-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 套餐 */
    .pricing-featured {
        transform: none;
    }
    
    /* 页脚 */
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .footer-about {
        grid-column: 1 / -1;
    }
    
    /* 合作伙伴 */
    .partners-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* 服务流程 */
    .service-flow-grid {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .flow-step {
        flex: 0 0 33.33%;
        margin-bottom: 1.5rem;
    }
    
    .flow-arrow {
        display: none;
    }
    
    /* 侧栏 */
    .content-layout.has-sidebar .sidebar {
        width: 280px;
    }
    
    /* 咨询表单 */
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   平板竖屏 (768px 以下)
   ============================================================ */
@media (max-width: 768px) {
    :root {
        --nks-container-width: 100%;
    }
    
    .section-padding {
        padding: 2.5rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.65rem; }
    h3 { font-size: 1.3rem; }
    
    /* 顶部栏 */
    .top-bar-left {
        display: none;
    }
    
    .top-bar-inner {
        justify-content: flex-end;
    }
    
    /* 头部 */
    .header-inner {
        height: 60px;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .header-search-btn,
    .color-switch-btn {
        width: 36px;
        height: 36px;
    }
    
    .header-cta {
        display: none;
    }
    
    /* 英雄轮播 */
    .hero-slider {
        height: 400px;
    }
    
    .hero-title {
        font-size: 1.85rem;
    }
    
    .hero-desc {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-controls {
        bottom: 1rem;
    }
    
    /* 统计 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* 产品 */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 案例 */
    .cases-grid {
        grid-template-columns: 1fr;
    }
    
    .case-card {
        flex-direction: column;
    }
    
    .case-image {
        width: 100%;
        min-width: 100%;
        height: 200px;
    }
    
    /* 关于我们 */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .about-image {
        order: -1;
    }
    
    /* 套餐 */
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    /* 客户评价 */
    .testimonials-controls {
        gap: 0.75rem;
    }
    
    .testimonial-prev,
    .testimonial-next {
        width: 36px;
        height: 36px;
    }

    /* 自定义产品 */
    .custom-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 活动推广 */
    .event-box {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem;
    }

    .event-content {
        text-align: center;
    }

    .event-btn {
        align-self: center;
    }

    /* 联系表单区 */
    .contact-section-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* CTA 横幅 */
    .cta-banner-section {
        padding: 2rem 1.25rem;
    }
    
    .cta-banner-title {
        font-size: 1.4rem;
    }
    
    .cta-banner-desc {
        font-size: 0.9rem;
    }

    /* 选项卡 */
    .custom-tab-nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .custom-tab-inner {
        padding: 1.25rem;
    }

    /* 悬浮客服面板 */
    .floating-service-panel {
        bottom: 70px;
        right: 1rem;
        width: 200px;
    }
    
    .floating-service-toggle {
        width: 48px;
        height: 48px;
    }
    
    /* 服务流程 */
    .flow-step {
        flex: 0 0 50%;
    }
    
    /* 内容布局 */
    .content-layout {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .content-layout.has-sidebar .sidebar {
        width: 100%;
    }
    
    /* 侧栏随动在移动端禁用 */
    .sidebar-inner {
        position: static;
    }
    
    /* 文章列表 */
    .posts-list {
        grid-template-columns: 1fr;
    }
    
    /* 单篇文章 */
    .single-post, .single-page {
        padding: 1.25rem;
    }
    
    .entry-title {
        font-size: 1.4rem;
    }
    
    .entry-meta {
        gap: 0.75rem;
        font-size: 0.8rem;
    }
    
    /* 作者信息 */
    .author-box {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        align-items: center;
    }
    
    /* 上下篇 */
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-next {
        text-align: left;
    }
    
    /* 咨询表单 */
    .nks-contact-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    /* CTA */
    .cta-section {
        padding: 2.5rem 0;
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
    
    /* 页脚 */
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }
    
    /* 合作伙伴 */
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* 404 */
    .error-404-number {
        font-size: 5rem;
    }
    
    .error-404-title {
        font-size: 1.5rem;
    }
    
    .error-404-actions {
        flex-direction: column;
    }
    
    /* 返回顶部 & 悬浮客服 */
    #back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
    
    .floating-service {
        bottom: 1rem;
        left: 1rem;
    }
}

/* ============================================================
   手机 (480px 以下)
   ============================================================ */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    h1 { font-size: 1.65rem; }
    h2 { font-size: 1.4rem; }
    
    /* 英雄轮播 */
    .hero-slider {
        height: 350px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-desc {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }
    
    .hero-controls {
        bottom: 0.75rem;
    }
    
    .hero-dots {
        gap: 0.375rem;
    }
    
    .hero-dot {
        width: 8px;
        height: 8px;
    }
    
    .hero-dot.active {
        width: 24px;
    }
    
    /* 统计 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-suffix {
        font-size: 1.25rem;
    }

    /* 自定义产品 */
    .custom-products-grid {
        grid-template-columns: 1fr;
    }

    /* 活动推广 */
    .event-title {
        font-size: 1.2rem;
    }

    .event-desc {
        font-size: 0.85rem;
    }

    /* CTA 横幅 */
    .cta-banner-title {
        font-size: 1.2rem;
    }
    
    .cta-banner-btn {
        padding: 0.5rem 1.25rem;
        font-size: 0.85rem;
    }

    /* 悬浮客服面板 */
    .floating-service-panel {
        width: 180px;
    }
    
    .floating-service-item {
        padding: 0.5rem;
    }
    
    /* 特色服务 */
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    /* 产品 */
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    /* 服务流程 */
    .flow-step {
        flex: 0 0 100%;
    }
    
    /* 合作伙伴 */
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* 单篇文章 */
    .single-post, .single-page {
        padding: 1rem;
    }
    
    .entry-title {
        font-size: 1.25rem;
    }
    
    .entry-thumbnail {
        border-radius: var(--nks-radius);
    }
    
    /* 404 */
    .error-404-number {
        font-size: 4rem;
    }
    
    /* 咨询表单 */
    .contact-form-wrap {
        padding: 1.25rem;
    }
    
    /* 面包屑 */
    .breadcrumb {
        font-size: 0.8rem;
    }
    
    .breadcrumb .separator {
        margin: 0 0.25rem;
    }
}

/* ============================================================
   高分辨率屏幕优化
   ============================================================ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ============================================================
   打印样式
   ============================================================ */
@media print {
    .top-bar,
    .site-header,
    .breadcrumb,
    .mobile-menu,
    .mobile-menu-overlay,
    .search-overlay,
    .floating-contact,
    .floating-service,
    #back-to-top,
    .hero-controls,
    .cta-section,
    .partners-section,
    .site-footer,
    .sidebar,
    .comment-form,
    .post-navigation,
    .load-more-wrap,
    .pagination {
        display: none !important;
    }
    
    .content-layout {
        display: block;
    }
    
    .single-post, .single-page {
        box-shadow: none;
        padding: 0;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    a::after {
        content: " (" attr(href) ")";
        font-size: 0.85em;
    }
}

/* ============================================================
   暗色模式支持（可选）
   ============================================================ */
@media (prefers-color-scheme: dark) {
    /* 
     * 注：默认不启用暗色模式，如需启用取消下方注释
     * :root {
     *     --nks-text: #f3f4f6;
     *     --nks-text-light: #9ca3af;
     *     --nks-bg: #1f2937;
     *     --nks-bg-alt: #111827;
     *     --nks-border: #374151;
     *     --nks-border-light: #1f2937;
     * }
     * 
     * .site-header,
     * .feature-card,
     * .product-card,
     * .case-card,
     * .pricing-card,
     * .testimonial-card,
     * .single-post,
     * .single-page,
     * .content-card {
     *     background: var(--nks-bg);
     * }
     */
}

/* ============================================================
   减少动画（无障碍）
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   编辑器样式占位
   ============================================================ */
.mce-content-body {
    max-width: 100%;
}
