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

/* 大屏幕 (1200px 及以上) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* 中等屏幕 (992px - 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .advantages-content {
        gap: 40px;
    }
    
    .news-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .news-card.featured {
        grid-row: span 1;
    }
}

/* 平板屏幕 (768px - 991px) */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 40px;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 16px 0;
    }
    
    .nav-link {
        font-size: 1.125rem;
        padding: 12px 24px;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .advantages-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .advantages-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-card.featured {
        grid-row: span 1;
    }
    
    .careers-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .slider-controls {
        padding: 0 20px;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* 手机屏幕 (576px - 767px) */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .hero-section {
        height: 80vh;
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    
    .btn {
        width: 200px;
        justify-content: center;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-card {
        padding: 30px 20px;
    }
    
    .advantage-item {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .advantage-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .advantages-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .stat-item {
        padding: 20px 15px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .news-card .news-content {
        padding: 20px;
    }
    
    .news-title {
        font-size: 1.125rem;
    }
    
    .news-card.featured .news-title {
        font-size: 1.25rem;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .job-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .job-apply {
        align-self: stretch;
        text-align: center;
    }
    
    .contact-form-container {
        padding: 30px 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .footer-bottom-top-row {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .footer-legal {
        justify-content: center;
    }
    
    .footer-beian {
        position: static;
        transform: none;
        padding-top: 16px;
        margin-top: 0;
    }
    
    .footer-beian a {
        font-size: 0.875rem;
    }
    
    .modal-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* 小手机屏幕 (最大 575px) */
@media (max-width: 575px) {
    .container {
        padding: 0 10px;
    }
    
    .nav-container {
        padding: 0 10px;
        height: 60px;
    }
    
    .nav-menu {
        top: 60px;
        height: calc(100vh - 60px);
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .logo-img {
        width: 32px;
        height: 32px;
    }
    
    .hero-section {
        height: 70vh;
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 16px;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 24px;
    }
    
    .section {
        padding: 30px 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
    
    .product-card {
        padding: 24px 16px;
    }
    
    .product-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .product-title {
        font-size: 1.25rem;
    }
    
    .advantage-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .advantage-content h3 {
        font-size: 1.125rem;
    }
    
    .advantages-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-item {
        padding: 16px 12px;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .news-image {
        height: 150px;
    }
    
    .news-card.featured .news-image {
        height: 180px;
    }
    
    .news-content {
        padding: 16px;
    }
    
    .news-title {
        font-size: 1rem;
    }
    
    .news-card.featured .news-title {
        font-size: 1.125rem;
    }
    
    .job-item {
        padding: 20px 16px;
    }
    
    .job-title {
        font-size: 1rem;
    }
    
    .job-meta {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .job-location,
    .job-type,
    .job-experience {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .contact-form-container {
        padding: 24px 16px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .footer {
        padding: 40px 0 16px;
    }
    
    .footer-content {
        gap: 24px;
    }
    
    .footer-logo {
        font-size: 1.25rem;
    }
    
    .footer-desc {
        font-size: 0.9rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .social-link {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .footer-contact p {
        font-size: 0.9rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .modal-content {
        padding: 24px 16px;
        margin: 10px;
    }
    
    .qr-code img {
        max-width: 150px;
    }
    
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

/* 超小屏幕 (最大 375px) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .section-subtitle {
        font-size: 0.85rem;
    }
    
    .product-card {
        padding: 20px 12px;
    }
    
    .product-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .product-title {
        font-size: 1.125rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .news-content {
        padding: 12px;
    }
    
    .news-title {
        font-size: 0.9rem;
    }
    
    .news-card.featured .news-title {
        font-size: 1rem;
    }
    
    .job-item {
        padding: 16px 12px;
    }
    
    .contact-form-container {
        padding: 20px 12px;
    }
    
    .footer {
        padding: 30px 0 12px;
    }
    
    .modal-content {
        padding: 20px 12px;
        margin: 5px;
    }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        height: 100vh;
        min-height: 300px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .hero-buttons {
        flex-direction: row;
        gap: 12px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .section {
        padding: 40px 0;
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-img,
    .news-image img,
    .qr-code img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .hero-section,
    .slider-controls,
    .slider-dots,
    .back-to-top,
    .modal,
    .footer {
        display: none !important;
    }
    
    .section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
    
    .section-title {
        color: black !important;
        font-size: 1.5rem !important;
    }
    
    .product-card,
    .news-card,
    .job-item {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        page-break-inside: avoid;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black !important;
    }
    
    a {
        color: black !important;
        text-decoration: underline !important;
    }
}

/* 减少动画（用户偏好） */
@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-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --text-primary: #000000;
        --text-secondary: #333333;
        --border-color: #000000;
    }
    
    .btn-primary {
        background: #0000ff;
        border: 2px solid #000000;
    }
    
    .product-card,
    .news-card,
    .job-item {
        border: 2px solid #000000;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a1a1a;
        --bg-secondary: #2d2d2d;
        --bg-light: #3a3a3a;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --text-light: #999999;
        --border-color: #404040;
    }
    
    .navbar {
        background: rgba(26, 26, 26, 0.95);
    }
    
    .navbar.scrolled {
        background: rgba(26, 26, 26, 0.98);
    }
    
    .product-card,
    .news-card,
    .job-item,
    .contact-form-container {
        background: var(--bg-secondary);
        border-color: var(--border-color);
    }
    
    .modal-content {
        background: var(--bg-secondary);
    }
}
