/* 响应式设计样式 */

/* 平板设备 (1024px以下) */
@media screen and (max-width: 1024px) {
    .container {
        max-width: 960px;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

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

    .hero-buttons {
        justify-content: center;
    }

    .tech-animation {
        width: 250px;
        height: 250px;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

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

    /* 导航栏响应式 */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(10, 14, 39, 0.98);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(0, 168, 255, 0.2);
        padding: 2rem 0;
        gap: 1rem;
    }

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

    .nav-toggle {
        display: flex;
    }

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

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

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

    /* 主页横幅响应式 */
    .hero {
        min-height: 90vh;
        padding-top: 80px;
    }

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

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

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

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

    .btn {
        width: 200px;
    }

    .tech-animation {
        width: 200px;
        height: 200px;
    }

    /* 区块标题响应式 */
    .section-header h2 {
        font-size: 2rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    /* 服务区块响应式 */
    .services {
        padding: 60px 0;
    }

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

    .service-card {
        padding: 2rem;
    }

    /* 案例展示响应式 */
    .cases {
        padding: 60px 0;
    }

    .cases-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* 关于我们响应式 */
    .about {
        padding: 60px 0;
    }

    .about-text h2 {
        font-size: 1.8rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-item {
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* 联系方式响应式 */
    .contact {
        padding: 60px 0;
    }

    .contact-info h3,
    .contact-form h3 {
        font-size: 1.5rem;
    }

    .contact-form {
        padding: 2rem;
    }

    .contact-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    /* 页脚响应式 */
    .footer {
        padding: 40px 0 20px;
    }

    .footer-brand h3 {
        font-size: 1.3rem;
    }

    .link-group h4 {
        font-size: 1rem;
    }
}

/* 手机设备 (480px以下) */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    /* 导航栏 */
    .navbar .container {
        padding: 1rem 10px;
    }

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

    .brand-subtitle {
        font-size: 0.7rem;
    }

    /* 主页横幅 */
    .hero {
        padding-top: 70px;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
    }

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

    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .tech-animation {
        width: 150px;
        height: 150px;
    }

    .code-lines .line {
        height: 1px;
    }

    /* 区块标题 */
    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .section-header p {
        font-size: 0.95rem;
    }

    /* 区块间距 */
    .services,
    .cases,
    .about,
    .contact {
        padding: 40px 0;
    }

    /* 服务卡片 */
    .service-card {
        padding: 1.5rem;
    }

    .service-icon {
        width: 60px;
        height: 60px;
    }

    .service-icon div {
        width: 30px;
        height: 30px;
    }

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

    /* 案例卡片 */
    .case-content {
        padding: 1.5rem;
    }

    .case-content h3 {
        font-size: 1.2rem;
    }

    .case-image {
        height: 150px;
    }

    /* 关于我们 */
    .about-text h2 {
        font-size: 1.6rem;
    }

    .about-text > p {
        font-size: 1rem;
    }

    .feature {
        align-items: flex-start;
    }

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

    .feature-icon div {
        width: 20px;
        height: 20px;
    }

    .feature-content h4 {
        font-size: 1rem;
    }

    .feature-content p {
        font-size: 0.85rem;
    }

    /* 统计数据 */
    .stat-item {
        padding: 1rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    /* 联系方式 */
    .contact-info h3,
    .contact-form h3 {
        font-size: 1.3rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .contact-icon {
        margin: 0 auto 1rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

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

    /* 页脚 */
    .footer-content {
        gap: 1.5rem;
    }

    .footer-brand h3 {
        font-size: 1.2rem;
    }

    .footer-brand p {
        font-size: 0.9rem;
    }

    .link-group {
        margin-bottom: 1rem;
    }

    .link-group h4 {
        font-size: 0.95rem;
    }

    .link-group a {
        font-size: 0.85rem;
    }

    .footer-bottom p {
        font-size: 0.8rem;
    }
}

/* 超小屏幕设备 (320px以下) */
@media screen and (max-width: 320px) {
    .hero-title {
        font-size: 1.8rem;
    }

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

    .hero-description {
        font-size: 0.9rem;
    }

    .tech-animation {
        width: 120px;
        height: 120px;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .service-card {
        padding: 1rem;
    }

    .case-content {
        padding: 1rem;
    }

    .contact-form {
        padding: 1rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

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

    .hero .container {
        gap: 2rem;
    }

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

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

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

    .tech-animation {
        width: 180px;
        height: 180px;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .nav-toggle,
    .hero-buttons,
    .contact-form,
    .footer-bottom {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .hero,
    .services,
    .cases,
    .about,
    .contact,
    .footer {
        background: white !important;
        color: black !important;
        padding: 20px 0 !important;
    }

    .section-header h2,
    .hero-title,
    .service-card h3,
    .case-content h3,
    .about-text h2,
    .contact-info h3,
    .footer-brand h3 {
        background: none !important;
        -webkit-text-fill-color: black !important;
        color: black !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    :root {
        --text-secondary: #ffffff;
        --text-muted: #ffffff;
        --primary-color: #00ffff;
        --accent-color: #00ffff;
    }

    .btn-secondary {
        border-width: 3px;
    }

    .service-card,
    .case-card,
    .contact-item,
    .contact-form,
    .stat-item {
        border-width: 2px;
    }
}

/* 减少动画模式支持 */
@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;
    }
}

/* 深色模式优化 */
@media (prefers-color-scheme: dark) {
    /* 已经是深色主题，无需额外调整 */
}

/* 浅色模式支持（可选） */
@media (prefers-color-scheme: light) {
    :root {
        --dark-bg: #ffffff;
        --dark-secondary: #f8f9fa;
        --dark-card: #ffffff;
        --text-primary: #333333;
        --text-secondary: #666666;
        --text-muted: #999999;
    }

    .navbar {
        background: rgba(255, 255, 255, 0.95);
        border-bottom: 1px solid rgba(0, 168, 255, 0.2);
    }

    .service-card,
    .case-card,
    .contact-item,
    .contact-form,
    .stat-item {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
}