/**
 * 响应式样式
 * 珠海市浠索智能科技有限公司
 * www.xisuoai.com
 */

/* ==================== Tablet (max-width: 1024px) ==================== */
@media (max-width: 1024px) {
    :root {
        --container-padding: 1.25rem;
    }
    
    /* Header */
    .header-contact {
        gap: var(--spacing-md);
    }
    
    .nav-menu {
        gap: var(--spacing-md);
    }
    
    .nav-menu li a {
        padding: 0.5rem;
        font-size: var(--text-sm);
    }
    
    /* Hero */
    .hero-section {
        height: 60vh;
        min-height: 400px;
    }
    
    .hero-slide-content h1 {
        font-size: var(--text-4xl);
    }
    
    .hero-slide-content p {
        font-size: var(--text-lg);
    }
    
    /* Grids */
    .features-grid,
    .products-grid,
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* About */
    .about-section .about-grid {
        gap: var(--spacing-xl);
    }
    
    /* Contact */
    .contact-grid {
        gap: var(--spacing-xl);
    }
}

/* ==================== Mobile Landscape (max-width: 768px) ==================== */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --text-5xl: 2.25rem;
        --text-4xl: 1.875rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.25rem;
    }
    
    /* Header */
    .header-top {
        display: none;
    }
    
    .site-header {
        padding: 0;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .logo img {
        height: 38px;
    }
    
    .logo-text strong {
        font-size: var(--text-lg);
    }
    
    /* Hero */
    .hero-section {
        margin-top: 70px;
        height: 55vh;
        min-height: 350px;
    }
    
    .hero-slide-content {
        padding: 0 var(--spacing-lg);
        align-items: center;
        text-align: center;
    }
    
    .hero-slide-content h1 {
        font-size: var(--text-3xl);
    }
    
    .hero-slide-content p {
        font-size: var(--text-base);
    }
    
    .hero-slider-arrows {
        display: none;
    }
    
    /* Page Banner */
    .page-banner {
        margin-top: 70px;
        height: 200px;
    }
    
    .page-banner h1 {
        font-size: var(--text-2xl);
    }
    
    /* Sections */
    .section {
        padding: var(--spacing-2xl) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-xl);
    }
    
    .section-header h2 {
        font-size: var(--text-2xl);
    }
    
    /* Grids */
    .features-grid,
    .products-grid,
    .news-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        text-align: center;
    }
    
    .stat-number {
        font-size: var(--text-2xl);
    }
    
    /* About */
    .about-section .about-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .about-image {
        order: -1;
    }
    
    .about-image::before {
        display: none;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .footer-about {
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-links,
    .footer-services {
        text-align: center;
    }
    
    .footer-contact li {
        justify-content: center;
    }
    
    /* CTA */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-content h2 {
        font-size: var(--text-2xl);
    }
    
    /* Floating elements */
    .floating-contact {
        bottom: 80px;
        right: 15px;
    }
    
    .float-btn {
        width: 45px;
        height: 45px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    /* Article */
    .article-content {
        padding: var(--spacing-lg) 0;
    }
    
    .article-title {
        font-size: var(--text-2xl);
    }
    
    .article-meta {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Comments */
    .comment-item {
        flex-direction: column;
    }
    
    .comment-avatar {
        width: 40px;
        height: 40px;
    }
    
    /* Pagination */
    .pagination li a,
    .pagination li span {
        min-width: 36px;
        height: 36px;
        font-size: var(--text-xs);
    }
}

/* ==================== Mobile Portrait (max-width: 480px) ==================== */
@media (max-width: 480px) {
    :root {
        --container-padding: 0.75rem;
        --text-4xl: 1.5rem;
        --text-3xl: 1.25rem;
        --text-2xl: 1.125rem;
    }
    
    /* Header */
    .main-nav {
        padding: 0.5rem 0;
    }
    
    .logo img {
        height: 32px;
    }
    
    .logo-text small {
        display: none;
    }
    
    /* Hero */
    .hero-section {
        height: 50vh;
        min-height: 300px;
    }
    
    .hero-slide-content h1 {
        font-size: var(--text-2xl);
    }
    
    .hero-slide-content p {
        font-size: var(--text-sm);
    }
    
    .hero-slide-content .btn {
        padding: 0.625rem 1.25rem;
        font-size: var(--text-sm);
    }
    
    .hero-slider-nav .dot {
        width: 8px;
        height: 8px;
    }
    
    /* Page Banner */
    .page-banner {
        height: 160px;
    }
    
    .page-banner h1 {
        font-size: var(--text-xl);
    }
    
    .breadcrumb {
        font-size: var(--text-xs);
    }
    
    /* Cards */
    .feature-card,
    .product-content,
    .news-content {
        padding: var(--spacing-md);
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
    }
    
    .product-image,
    .news-image {
        height: 160px;
    }
    
    /* Stats */
    .stats-section {
        padding: var(--spacing-lg) 0;
    }
    
    .stat-number {
        font-size: var(--text-xl);
    }
    
    .stat-label {
        font-size: var(--text-sm);
    }
    
    /* Buttons */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: var(--text-sm);
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: var(--text-base);
    }
    
    /* Footer */
    .footer-main {
        padding: var(--spacing-xl) 0;
    }
    
    .footer-logo img {
        height: 32px;
    }
    
    .footer-col h4 {
        font-size: var(--text-sm);
    }
    
    .footer-col ul li {
        font-size: var(--text-sm);
    }
    
    .copyright {
        font-size: var(--text-xs);
    }
    
    /* Contact */
    .contact-info,
    .contact-form-wrapper {
        padding: var(--spacing-md);
    }
    
    .contact-list .icon {
        width: 36px;
        height: 36px;
    }
    
    /* Forms */
    .form-control {
        padding: 0.625rem 0.875rem;
        font-size: var(--text-sm);
    }
    
    textarea.form-control {
        min-height: 100px;
    }
}

/* ==================== Print Styles ==================== */
@media print {
    .site-header,
    .site-footer,
    .back-to-top,
    .floating-contact,
    .hero-slider-nav,
    .hero-slider-arrows {
        display: none !important;
    }
    
    .hero-section {
        margin-top: 0;
        height: auto;
        min-height: auto;
    }
    
    .hero-slide {
        position: relative;
        opacity: 1;
        visibility: visible;
    }
    
    .hero-slide-bg::before {
        display: none;
    }
    
    .page-banner {
        margin-top: 0;
        height: auto;
        padding: 2rem;
        background: none;
        color: inherit;
    }
    
    .page-banner h1 {
        color: inherit;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        color: inherit;
        text-decoration: underline;
    }
    
    .btn {
        display: none;
    }
}

/* ==================== High Contrast / Accessibility ==================== */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000cc;
        --gray-600: #333333;
        --gray-500: #444444;
    }
}

/* ==================== Reduced Motion ==================== */
@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;
    }
}

/* ==================== Dark Mode (Optional) ==================== */
@media (prefers-color-scheme: dark) {
    /* 
    * 暗色模式样式预留
    * 如需启用,取消以下注释并调整颜色
    */
    /*
    :root {
        --white: #0f172a;
        --gray-50: #1e293b;
        --gray-100: #334155;
        --gray-800: #e2e8f0;
        --gray-900: #f1f5f9;
    }
    */
}
