/* 响应式设计 */

/* 平板设备 */
@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .about-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .news-content {
        display: flex !important;
        flex-direction: row !important;
        gap: 40px;
        align-items: flex-start;
    }
    
    .news-image {
        flex: 0 0 350px;
        max-width: 350px;
    }
    
    .news-image img {
        height: 350px;
    }
    
    .content-layout {
        flex-direction: column;
        gap: 30px;
    }
    
    .sidebar {
        width: 100%;
    }
}

/* 手机设备 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-box {
        width: 100%;
        justify-content: center;
    }
    
    .search-input {
        width: 250px;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .nav-menu li {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.2);
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .banner-section {
        height: 300px;
    }
    
    .banner-content h1 {
        font-size: 28px;
    }
    
    .company-slogan h2 {
        font-size: 24px;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .copyright {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .news-item-large {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        margin-bottom: 25px;
        height: auto;
        max-width: 100%;
    }

    .news-item-large .news-image {
        width: 100%;
    }

    .news-item-large .news-image img {
        height: 180px;
    }
    
    .news-content {
        flex-direction: column !important;
        gap: 20px;
        padding: 20px 15px;
        width: 100%;
    }
    
    .news-image {
        display: none !important;
    }
    
    .news-image img {
        display: none !important;
    }
    
    .latest-news .news-image {
        display: none !important;
    }
    
    .latest-news .news-image img {
        display: none !important;
    }
    
    .news-list h2 {
        font-size: 24px;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .news-item {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .news-info h3 {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .news-info p {
        font-size: 12px;
        line-height: 1.5;
    }
    
    .news-date .day {
        font-size: 20px;
        padding: 8px;
    }
    
    .news-date .month {
        font-size: 11px;
    }
    
    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 8px;
        margin: 30px 0;
        padding: 20px 0;
    }
    
    .page-btn {
        min-width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .page-btn.prev,
    .page-btn.next {
        padding: 6px 12px;
    }
    
    .page-btn.prev .page-text,
    .page-btn.next .page-text {
        display: none;
    }
    
    .qr-codes {
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
    }
    
    .back-to-top a {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 16px;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .language-switch {
        text-align: center;
    }
    
    .search-input {
        width: 200px;
    }
    
    .banner-section {
        height: 250px;
    }
    
    .banner-content h1 {
        font-size: 20px;
    }
    
    .company-slogan {
        padding: 40px 0;
    }
    
    .company-slogan h2 {
        font-size: 18px;
    }
    
    .hot-products,
    .new-products {
        padding: 40px 0;
    }
    
    .section-header h2 {
        font-size: 20px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .about-section {
        padding: 40px 0;
    }
    
    .about-text h2 {
        font-size: 24px;
    }
    
    .latest-news {
        padding: 40px 0;
    }
    
    .news-list h2 {
        font-size: 24px;
    }
    
    .page-content {
        padding: 40px 0;
    }
    
    .content-header h2 {
        font-size: 22px;
    }
    
    .footer-content {
        padding: 30px 0;
    }
    
    .nav-dot {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

/* 超小屏设备 */
@media (max-width: 320px) {
    .search-input {
        width: 150px;
    }
    
    .banner-content h1 {
        font-size: 16px;
    }
    
    .company-slogan h2 {
        font-size: 16px;
    }
    
    .section-header h2 {
        font-size: 18px;
    }
    
    .about-text h2 {
        font-size: 20px;
    }
    
    .news-list h2 {
        font-size: 20px;
    }
    
    .content-header h2 {
        font-size: 20px;
    }
}

/* 打印样式 */
@media print {
    .language-switch,
    .main-nav,
    .banner-nav,
    .back-to-top,
    .footer-links,
    .footer-content,
    .footer-bottom {
        display: none;
    }
    
    .banner-section {
        height: auto;
    }
    
    .banner-slide img {
        height: 200px;
    }
    
    body {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
}


/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 3px 0;
    transition: 0.3s;
    transform-origin: center;
}

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

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

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

/* 移动端导航菜单 */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: #1e5aa8;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding-top: 80px;
        transition: left 0.3s ease;
        z-index: 1000;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.2);
        width: 100%;
    }
    
    .nav-menu a {
        padding: 20px 30px;
        font-size: 18px;
        width: 100%;
        text-align: left;
    }
    
    .main-nav .container {
        position: relative;
    }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    .floating-btn {
        width: 60px;
        height: 60px;
        font-size: 18px;
    }
    
    .nav-menu a {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    .product-card {
        transition: none;
    }
    
    .product-card:active {
        transform: scale(0.98);
    }
}

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

/* 横屏模式优化 */
@media (orientation: landscape) and (max-height: 500px) {
    .banner-section {
        height: 400px;
    }
    
    .banner-content h1 {
        font-size: 32px;
    }
    
    .floating-buttons {
        top: 60%;
    }
}

/* 超大屏幕优化 */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .banner-content h1 {
        font-size: 56px;
    }
    
    .section-header h2 {
        font-size: 42px;
    }
}

/* 可访问性优化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .banner-slide {
        transition: none;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .language-switch {
        background: #2a2a2a;
    }
    
    .lang-link {
        background: #333;
        color: #ccc;
        border-color: #555;
    }
    
    .lang-link.active {
        background: #1e5aa8;
        color: #fff;
    }
}

