/* 响应式设计 - 移动端优先 */

/* 平板设备 (768px 及以下) */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* 导航栏响应式 */
    .navbar .container {
        padding: 0.8rem 15px;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s ease;
        gap: 1.5rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    /* 首页横幅响应式 */
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 0;
        min-height: 70vh;
    }

    .hero-content {
        padding: 1rem;
        order: 2;
    }

    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        justify-content: center;
        gap: 0.8rem;
    }

    .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }

    .hero-image {
        order: 1;
        max-width: 300px;
        margin: 0 auto;
    }

    /* 核心业务响应式 */
    .core-services {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .service-card {
        padding: 2rem 1.5rem;
    }

    .service-icon {
        font-size: 2.5rem;
    }

    /* 服务优势响应式 */
    .advantages {
        padding: 3rem 0;
    }

    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .advantage-item {
        padding: 1.5rem 1rem;
    }

    .advantage-icon {
        font-size: 2rem;
    }

    .advantage-item h4 {
        font-size: 1.1rem;
    }

    /* 页脚响应式 */
    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* 小屏手机 (480px 及以下) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 200px;
        text-align: center;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .service-card {
        padding: 1.5rem 1rem;
    }

    .service-card h3 {
        font-size: 1.3rem;
    }

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

    .nav-brand {
        font-size: 1.3rem;
    }

    .brand-text {
        display: none;
    }
}

/* 大屏设备 (1200px 及以上) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }

    .hero-title {
        font-size: 4rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .section-title {
        font-size: 3rem;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .advantages-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 超大屏设备 (1600px 及以上) */
@media (min-width: 1600px) {
    .container {
        max-width: 1600px;
    }

    .hero {
        min-height: 90vh;
    }

    .hero-title {
        font-size: 4.5rem;
    }

    .core-services,
    .advantages {
        padding: 6rem 0;
    }
}

/* 横屏模式优化 */
@media (orientation: landscape) and (max-height: 600px) {
    .hero {
        min-height: 100vh;
        padding: 1rem 0;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .hamburger,
    .hero-buttons,
    .footer {
        display: none;
    }

    .hero {
        margin-top: 0;
        background: none;
        color: #333;
    }

    .service-card,
    .advantage-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .section-title {
        font-size: 18pt;
        margin-bottom: 1rem;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .hero {
        background: #000;
        color: #fff;
    }

    .service-card {
        border: 2px solid #333;
    }

    .btn-primary {
        background: #000;
        border-color: #000;
    }

    .btn-secondary {
        border-color: #000;
        color: #000;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }

    .navbar {
        background: rgba(26, 26, 26, 0.95);
    }

    .nav-link {
        color: #e0e0e0;
    }

    .service-card {
        background: #2d2d2d;
        color: #e0e0e0;
    }

    .core-services {
        background: #1f1f1f;
    }

    .section-title {
        color: #e0e0e0;
    }
}