/* ========================================
   文单通官网 - 响应式适配样式
   手机端优先，渐进增强
   ======================================== */

/* === 手机端 (max-width: 767px) === */
@media screen and (max-width: 767px) {

    /* 导航栏 */
    .nav-container {
        padding: var(--space-md);
    }

    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--white);
        padding: var(--space-lg);
        flex-direction: column;
        gap: var(--space-md);
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--gray-200);
    }

    .nav-links.nav-open {
        display: flex;
    }

    .nav-cta-btn {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle-open span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }

    .nav-toggle-open span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle-open span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px);
    }

    /* Hero区域 */
    .hero-section {
        min-height: auto;
        padding: calc(var(--nav-height) + var(--space-2xl)) var(--space-md) var(--space-3xl);
    }

    .hero-title .brand {
        font-size: var(--font-3xl);
    }

    .hero-title .title-main {
        font-size: var(--font-xl);
    }

    .hero-subtitle {
        font-size: var(--font-md);
    }

    .hero-desc {
        font-size: var(--font-sm);
    }

    .hero-cta {
        flex-direction: column;
        gap: var(--space-md);
    }

    .hero-cta .btn-lg {
        padding: var(--space-md) var(--space-xl);
        font-size: var(--font-md);
    }

    .hero-trust {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .hero-wave {
        height: 60px;
    }

    /* 区块间距 */
    .section-padding {
        padding: var(--space-2xl) 0;
    }

    .section-title {
        font-size: var(--font-2xl);
    }

    .section-desc {
        font-size: var(--font-md);
    }

    .container {
        padding: 0 var(--space-md);
    }

    /* 痛点网格 */
    .pain-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .pain-card {
        padding: var(--space-lg);
    }

    /* 解决方案流程 */
    .solution-flow {
        flex-direction: column;
        gap: var(--space-md);
    }

    .flow-arrow {
        transform: rotate(90deg);
    }

    .flow-step {
        width: 100%;
        max-width: none;
        padding: var(--space-lg);
    }

    .step-icon {
        width: 40px;
        height: 40px;
    }

    .step-title {
        font-size: var(--font-lg);
    }

    .step-desc {
        font-size: var(--font-sm);
        display: block;
    }

    /* 核心功能网格 */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .feature-card {
        padding: var(--space-lg);
    }

    /* 行业场景网格 */
    .industries-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .industry-card {
        padding: var(--space-lg);
    }

    /* 价值指标网格 */
    .value-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .value-card {
        padding: var(--space-lg);
    }

    .value-number .number {
        font-size: var(--font-3xl);
    }

    .value-number .unit {
        font-size: var(--font-xl);
    }

    /* 价格网格 */
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .pricing-card {
        padding: var(--space-lg);
    }

    .pricing-price .amount {
        font-size: var(--font-3xl);
    }

    .recommended-badge {
        font-size: var(--font-xs);
        padding: var(--space-xs) var(--space-sm);
    }

    /* 联系模块 */
    .contact-content {
        flex-direction: column;
        gap: var(--space-lg);
    }

    .contact-card {
        min-width: auto;
        width: 100%;
    }

    .contact-card-wechat {
        min-width: auto;
    }

    .contact-qrcode {
        width: 140px;
        height: 140px;
    }

    .contact-desc {
        font-size: var(--font-sm);
    }

    /* 悬浮按钮 */
    .float-contact {
        right: var(--space-md);
        bottom: var(--space-lg);
    }

    .float-btn {
        width: 48px;
        height: 48px;
    }

    .float-btn svg {
        width: 20px;
        height: 20px;
    }

    .float-label {
        display: none;
    }

    .float-label {
        display: none;
    }
}

/* === 小屏手机 (max-width: 360px) === */
@media screen and (max-width: 360px) {

    .hero-title .brand {
        font-size: var(--font-2xl);
    }

    .hero-title .title-main {
        font-size: var(--font-lg);
    }

    .section-title {
        font-size: var(--font-xl);
    }

    .value-grid {
        grid-template-columns: 1fr;
    }

    .value-number .number {
        font-size: var(--font-2xl);
    }

    .pricing-price .amount {
        font-size: var(--font-2xl);
    }
}

/* === 平板 (768px - 1023px) === */
@media screen and (min-width: 768px) and (max-width: 1023px) {

    /* 导航栏 */
    .nav-links {
        gap: var(--space-md);
    }

    .nav-links a {
        font-size: var(--font-sm);
    }

    /* Hero区域 */
    .hero-title .brand {
        font-size: var(--font-4xl);
    }

    .hero-title .title-main {
        font-size: var(--font-2xl);
    }

    /* 痛点网格 */
    .pain-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 解决方案流程 - 平板也使用紧凑布局 */
    .solution-flow {
        gap: var(--space-sm);
    }

    .flow-step {
        padding: var(--space-md);
        min-width: 0;
    }

    .step-title {
        font-size: var(--font-sm);
    }

    .step-desc {
        font-size: var(--font-xs);
        display: block;
    }

    /* 核心功能网格 */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 行业场景网格 */
    .industries-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 价值指标网格 */
    .value-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 价格网格 */
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}

/* === PC端 (min-width: 1024px) === */
@media screen and (min-width: 1024px) {

    /* 功能网格 - 4列 */
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* 行业场景 - 3列 */
    .industries-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 价值指标 - 4列 */
    .value-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* === 大屏PC (min-width: 1280px) === */
@media screen and (min-width: 1280px) {
    .container {
        padding: 0 var(--space-xl);
    }

    .hero-title .brand {
        font-size: var(--font-5xl);
    }

    .hero-title .title-main {
        font-size: var(--font-3xl);
    }
}

/* === 打印样式 === */
@media print {
    .nav-bar,
    .float-contact,
    .hero-wave {
        display: none;
    }

    .section-padding {
        padding: var(--space-lg) 0;
    }

    .hero-section {
        min-height: auto;
        padding: var(--space-lg);
    }
}

/* === 辅助功能 === */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === 高对比度模式 === */
@media (prefers-contrast: high) {
    :root {
        --primary-blue: #1D4ED8;
        --gray-500: #374151;
        --gray-600: #1F2937;
    }

    .pain-card,
    .feature-card,
    .industry-card,
    .value-card,
    .pricing-card,
    .contact-card {
        border: 2px solid var(--gray-800);
    }
}