/*******************************
 * 响应式样式文件
 * Responsive Styles
 *******************************/

/* 大屏幕优化 */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .section-title {
        font-size: 42px;
    }
    
    .slide-title {
        font-size: 56px;
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 中等屏幕 */
@media screen and (max-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .slide-title {
        font-size: 42px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 平板设备 */
@media screen and (max-width: 992px) {
    .container {
        max-width: 960px;
        padding: 0 15px;
    }
    
    .nav-menu {
        gap: 20px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .slide-title {
        font-size: 36px;
    }
    
    .slide-description {
        font-size: 18px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .cases-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .cta-title {
        font-size: 36px;
    }
    
    .cta-description {
        font-size: 18px;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 20px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* 手机设备 */
@media screen and (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    /* 移动端导航 */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        padding: 30px 20px;
        gap: 0;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid #eee;
    }
    
    .nav-link {
        display: block;
        padding: 15px 0;
        font-size: 16px;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* 下拉菜单移动端样式 */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f8f9fa;
        margin-top: 10px;
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-menu a {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    /* Banner轮播移动端优化 */
    .hero-section {
        height: 70vh;
        min-height: 500px;
    }
    
    .slide-title {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .slide-description {
        font-size: 16px;
        margin-bottom: 25px;
    }
    
    .slide-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .slider-controls {
        bottom: 20px;
    }
    
    .slider-prev,
    .slider-next {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    /* 产品预览移动端 */
    .products-preview {
        padding: 60px 0;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-card {
        padding: 30px 20px;
    }
    
    .product-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    /* 优势区域移动端 */
    .advantages {
        padding: 60px 0;
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .advantage-item {
        padding: 20px;
    }
    
    .advantage-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    /* 案例区域移动端 */
    .cases {
        padding: 60px 0;
    }
    
    .case-card {
        padding: 30px 20px;
    }
    
    .case-logo {
        width: 100px;
        height: 50px;
    }
    
    /* 新闻区域移动端 */
    .news {
        padding: 60px 0;
    }
    
    .news-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .news-date {
        display: flex;
        align-items: center;
        gap: 10px;
        justify-content: center;
    }
    
    /* CTA区域移动端 */
    .contact-cta {
        padding: 60px 0;
    }
    
    .cta-title {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .cta-description {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    /* 页脚移动端 */
    .footer {
        padding: 40px 0 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-brand {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-bottom-links {
        justify-content: center;
    }
    
    /* 模态框移动端 */
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .consult-form {
        padding: 20px;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    /* 返回顶部按钮移动端 */
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 16px;
        bottom: 20px;
        right: 20px;
    }
    
    /* 通用移动端优化 */
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-description {
        font-size: 16px;
    }
    
    .btn {
        padding: 10px 25px;
        font-size: 14px;
    }
}

/* 小屏手机 */
@media screen and (max-width: 576px) {
    .container {
        padding: 0 10px;
    }
    
    .brand-text {
        font-size: 16px;
    }
    
    .logo {
        height: 30px;
    }
    
    .slide-title {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .cta-title {
        font-size: 24px;
    }
    
    .product-card,
    .case-card,
    .news-card {
        padding: 20px 15px;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .contact-item {
        font-size: 16px;
    }
    
    .footer-content {
        padding: 0 5px;
    }
    
    .modal-content {
        width: 98%;
    }
}

/* 横屏模式 */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        height: 100vh;
    }
    
    .slide-title {
        font-size: 24px;
    }
    
    .slide-description {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .slide-buttons {
        flex-direction: row;
        gap: 10px;
    }
    
    .btn {
        padding: 8px 20px;
        font-size: 12px;
    }
    
    .slider-controls {
        bottom: 10px;
    }
    
    .nav-menu {
        top: 60px;
        height: calc(100vh - 60px);
    }
}

/* 高分辨率屏幕优化 */
@media screen and (-webkit-min-device-pixel-ratio: 2), 
       screen and (min-resolution: 192dpi) {
    .logo,
    .footer-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .product-icon,
    .advantage-icon {
        box-shadow: 0 8px 25px rgba(30, 136, 229, 0.4);
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .header {
        background: rgba(26, 26, 26, 0.95);
    }
    
    .nav-link {
        color: #e0e0e0;
    }
    
    .section-title {
        color: #ffffff;
    }
    
    .product-card,
    .case-card,
    .news-card {
        background: #2d2d2d;
        color: #e0e0e0;
    }
    
    .product-name,
    .case-title,
    .news-title,
    .advantage-title {
        color: #ffffff;
    }
    
    .product-summary,
    .case-result,
    .news-summary,
    .advantage-desc {
        color: #b0b0b0;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* 打印样式 */
@media print {
    .header,
    .footer,
    .back-to-top,
    .slider-controls,
    .modal {
        display: none !important;
    }
    
    .hero-section {
        height: auto;
        page-break-after: always;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
}

/* 产品详情切换 */
.product-detail {
  display: none;
}
.product-detail.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}