/* ========================================
   华天协同OA系统官网 - 响应式样式
   ======================================== */

/* ── 移动端导航 ── */
.nav-placeholder {
    display: none;
}

.nav-toggle {
    display: none;
}

@media (max-width: 768px) {
    .nav-placeholder {
        display: block;
    }
    
    .header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    body {
        padding-top: 60px;
    }
    
    .header .nav,
    .header .header-right {
        display: none !important;
    }
    
    .header .header-content {
        justify-content: space-between;
    }
    
    .nav-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        font-size: 22px;
        color: #1a365d;
        cursor: pointer;
    }
    
    .mobile-nav {
        position: fixed;
        top: 0;
        right: -85%;
        width: 85%;
        height: 100vh;
        background: #fff;
        z-index: 2000;
        transition: right 0.3s ease;
        overflow-y: auto;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    }
    
    .mobile-nav.active {
        right: 0;
    }
    
    .mobile-nav-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        background: #1a365d;
        color: #fff;
        font-size: 16px;
        font-weight: bold;
    }
    
    .mobile-nav-close {
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 20px;
    }
    
    .mobile-nav-content {
        padding: 15px 0;
    }
    
    .mobile-nav-link {
        display: block;
        padding: 12px 20px;
        color: #333;
        font-size: 14px;
        text-decoration: none;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .mobile-nav-link:hover,
    .mobile-nav-link:active {
        background: #f7f9fc;
        color: #0078d4;
    }
    
    .mobile-nav-link.sub {
        padding-left: 40px;
        font-size: 13px;
        color: #555;
    }
    
    .mobile-nav-link.sub2 {
        padding-left: 60px;
        font-size: 12px;
        color: #777;
    }
    
    .mobile-nav-group,
    .mobile-nav-sub-group {
        border-bottom: 1px solid #eee;
    }
    
    .mobile-nav-group-title {
        padding: 12px 20px;
        font-size: 15px;
        font-weight: bold;
        color: #1a365d;
        background: #f7f9fc;
    }
    
    .mobile-nav-sub-title {
        padding: 10px 20px 10px 30px;
        font-size: 13px;
        font-weight: bold;
        color: #0078d4;
        background: #fafcff;
    }
}

/* 超大屏幕 */
@media (max-width: 1400px) {
    :root {
        --container-width: 1100px;
    }

    .hero-title {
        font-size: 42px;
    }

    .section-title h2 {
        font-size: 32px;
    }
}

/* 笔记本电脑 */
@media (max-width: 1200px) {
    :root {
        --container-width: 960px;
    }

    .nav-list {
        gap: 30px;
    }

    .hero-content {
        max-width: 500px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-image {
        max-width: 400px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .partners-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-number {
        font-size: 40px;
    }

    .about-content {
        gap: 40px;
    }
}

/* 平板设备 */
@media (max-width: 992px) {
    :root {
        --container-width: 720px;
    }

    .nav-list {
        gap: 20px;
    }

    .hero {
        padding: 60px 0;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 40px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        max-width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 30px;
    }

    .solutions-grid {
        grid-template-columns: 1fr;
    }

    .solution-card {
        flex-direction: column;
    }

    .solution-image {
        width: 100%;
        height: 150px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: repeat(4, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .service-process {
        flex-wrap: wrap;
        gap: 30px;
    }

    .service-process::before {
        display: none;
    }

    .process-step {
        flex: 0 0 calc(50% - 15px);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .page-title {
        font-size: 36px;
    }
}

/* 大手机 */
@media (max-width: 768px) {
    :root {
        --container-width: 540px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title h2 {
        font-size: 28px;
    }

    .section-title p {
        font-size: 16px;
    }

    .products-grid,
    .features-grid,
    .news-grid,
    .cases-grid {
        grid-template-columns: 1fr;
    }

    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .cta-section h2 {
        font-size: 28px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-bottom a {
        margin: 0 10px;
    }

    .page-header {
        padding: 30px 0;
        min-height: 300px;
    }

    .page-title {
        font-size: 28px;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

/* 小手机 */
@media (max-width: 576px) {
    :root {
        --container-width: 100%;
        padding: 0 15px;
    }

    .container {
        padding: 0 15px;
    }

    .logo {
        font-size: 20px;
    }

    .logo img {
        height: 30px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .btn {
        width: 100%;
        padding: 12px 25px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stat-number {
        font-size: 36px;
    }

    .product-card,
    .feature-item,
    .news-content {
        padding: 25px 20px;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .about-stat .number {
        font-size: 28px;
    }

    .partners-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .partner-item {
        height: 80px;
        font-size: 18px;
    }

    .contact-form {
        padding: 25px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer {
        padding: 40px 0 20px;
    }

    .page-title {
        font-size: 28px;
    }

    .page-subtitle {
        font-size: 16px;
    }

    .breadcrumb {
        font-size: 12px;
    }

    .cta-section {
        padding: 50px 0;
    }

    .cta-section h2 {
        font-size: 24px;
    }

    .cta-section p {
        font-size: 16px;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
}

/* 横向手机 */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 40px 0;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-image {
        display: none;
    }
}

/* 高清屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* 减少动画 (无障碍) */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    /* 可根据需要添加暗色模式样式 */
}

/* 打印样式 */
@media print {
    .header,
    .footer,
    .back-to-top,
    .hero-buttons,
    .cta-section {
        display: none !important;
    }

    .hero {
        background: none !important;
        color: #000 !important;
        padding: 20px 0;
        margin-top: 0;
    }

    .section {
        padding: 30px 0;
    }

    a {
        text-decoration: underline;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .nav-link:hover::after,
    .nav-item.active .nav-link::after {
        width: 0;
    }

    .dropdown {
        display: none !important;
    }

    .nav-item.active .dropdown {
        display: block !important;
    }

    .btn:hover {
        transform: none;
    }

    .product-card:hover,
    .news-card:hover,
    .case-card:hover {
        transform: none;
    }
}
