/* 移动端优化样式 */

/* 基础移动端设置 */
@media (max-width: 768px) {
    /* 全局调整 */
    body {
        font-size: 16px;
        line-height: 1.5;
        padding-top: 70px;
    }
    
    /* 容器调整 */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* 导航栏移动端优化 */
    .navbar {
        padding: 10px 0;
    }
    
    .navbar-brand img {
        height: 35px;
    }
    
    .navbar-nav .nav-link {
        font-size: 16px;
        padding: 12px 15px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Hero section 移动端优化 */
    .hero-section {
        padding: 80px 0 100px 0;
        min-height: 60vh;
    }
    
    .hero-title {
        font-size: 1.8rem !important;
        line-height: 1.2;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 25px;
        line-height: 1.4;
    }
    
    .hero-btn {
        font-size: 1rem;
        padding: 12px 30px;
        width: auto;
        display: inline-block;
    }
    
    /* About section 移动端优化 */
    .about-section {
        padding: 40px 0;
    }
    
    .about-section h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .about-section .lead {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    
    .about-section img {
        max-width: 100%;
        margin-top: 20px;
    }
    
    /* 产品卡片移动端优化 */
    .product-card {
        margin-bottom: 20px;
        padding: 15px;
    }
    
    .product-card img {
        height: 180px;
        margin-bottom: 15px;
    }
    
    .product-card h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .product-card p {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
    
    /* 章节间距调整 */
    .section-padding {
        padding: 50px 0;
    }
    
    /* 标题调整 */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    /* 按钮优化 */
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* 图片优化 */
    .img-fluid {
        max-width: 100%;
        height: auto;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 576px) {
    .hero-title {
        font-size: 1.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.9rem !important;
    }
    
    .about-section h2 {
        font-size: 1.5rem;
    }
    
    .about-section .lead {
        font-size: 1rem;
    }
    
    .product-card {
        padding: 12px;
    }
    
    .product-card img {
        height: 150px;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.3rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.85rem !important;
    }
    
    .hero-btn {
        font-size: 0.9rem;
        padding: 10px 25px;
    }
    
    .product-card img {
        height: 120px;
    }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    /* 增加触摸目标大小 */
    .nav-link, .btn, .product-card {
        min-height: 44px;
    }
    
    /* 移除hover效果，改为active效果 */
    .product-card:hover {
        transform: none;
    }
    
    .product-card:active {
        transform: scale(0.98);
    }
    
    .btn:hover {
        transform: none;
    }
    
    .btn:active {
        transform: scale(0.95);
    }
}

/* 横屏优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 60px 0 80px 0;
        min-height: 50vh;
    }
    
    .hero-title {
        font-size: 1.6rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.9rem !important;
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-bg {
        background-image: url('../images/hero-bg.jpg');
    }
}

/* 性能优化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .navbar {
        background-color: #1a1a1a;
        border-bottom: 1px solid #333;
    }
    
    .navbar-nav .nav-link {
        color: #fff;
    }
    
    .navbar-nav .nav-link:hover {
        color: var(--primary-color);
    }
    
    .product-card {
        background-color: #2a2a2a;
        color: #fff;
    }
    
    .product-card h3 {
        color: #fff !important;
    }
    
    .product-card p {
        color: #ccc;
    }
}

/* 可访问性优化 */
@media (prefers-contrast: high) {
    .hero-btn {
        border: 2px solid #fff;
    }
    
    .product-card {
        border: 2px solid #333;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .hero-btn,
    .footer {
        display: none !important;
    }
    
    .hero-section {
        background: none !important;
        color: #000 !important;
    }
    
    .product-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
} 