/**
 * 微肽生物 - 响应式样式 v2.0
 * 全新设计系统的移动端适配
 */

/* ============================================
   Tablet (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--space-6);
    }
    
    /* Hero */
    .hero-slide {
        height: 500px;
    }
    
    .hero-title {
        font-size: var(--text-4xl);
    }
    
    .hero-subtitle {
        font-size: var(--text-lg);
    }
    
    /* 关于我们 */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }
    
    .about-content {
        padding-right: 0;
    }
    
    /* 产品详情 */
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    /* 新闻详情 */
    .news-detail-layout {
        grid-template-columns: 1fr;
    }
    
    /* 内容布局（侧边栏）*/
    .content-layout {
        grid-template-columns: 220px 1fr;
        gap: var(--space-8);
    }
    
    /* 页脚 */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-10);
    }
}

/* ============================================
   Mobile (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* 基础排版 */
    h1, .h1 {
        font-size: var(--text-4xl);
    }
    
    h2, .h2 {
        font-size: var(--text-3xl);
    }
    
    h3, .h3 {
        font-size: var(--text-2xl);
    }
    
    /* 段落 */
    .section {
        padding: var(--space-12) 0;
    }
    
    .section-header {
        margin-bottom: var(--space-8);
    }
    
    .section-title {
        font-size: var(--text-3xl);
    }
    
    .section-desc {
        font-size: var(--text-base);
    }
    
    /* Hero */
    .hero-slide {
        height: 450px;
    }
    
    .hero-bg {
        padding: 0 var(--space-6);
    }
    
    .hero-title {
        font-size: var(--text-3xl);
        margin-bottom: var(--space-4);
    }
    
    .hero-subtitle {
        font-size: var(--text-base);
        margin-bottom: var(--space-6);
    }
    
    .hero-actions {
        flex-direction: column;
        gap: var(--space-3);
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .hero-arrow {
        width: 40px;
        height: 40px;
    }
    
    .hero-prev {
        left: var(--space-3);
    }
    
    .hero-next {
        right: var(--space-3);
    }
    
    /* 产品网格 */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }
    
    .product-info {
        padding: var(--space-3);
    }
    
    .product-name {
        font-size: var(--text-base);
    }
    
    /* 关于我们 */
    .about-stats {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-4);
    }
    
    .stat-number {
        font-size: var(--text-2xl);
    }
    
    /* 新闻网格 */
    .news-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    /* CTA */
    .cta-section {
        padding: var(--space-12) 0;
    }
    
    .cta-title {
        font-size: var(--text-3xl);
    }
    
    .cta-desc {
        font-size: var(--text-base);
    }
    
    .cta-actions {
        flex-direction: column;
        gap: var(--space-3);
    }
    
    .cta-actions .btn {
        width: 100%;
    }
    
    /* 页脚 */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }
    
    /* 内容布局（侧边栏隐藏或置顶）*/
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        margin-bottom: var(--space-6);
    }
}

/* ============================================
   Small Mobile (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-4);
    }
    
    /* Hero */
    .hero-slide {
        height: 400px;
    }
    
    .hero-title {
        font-size: var(--text-2xl);
    }
    
    .hero-subtitle {
        font-size: var(--text-sm);
    }
    
    /* 产品网格 - 单列 */
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    /* 关于我们数据 */
    .about-stats {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-3);
    }
    
    .stat-item {
        padding: var(--space-3);
    }
    
    .stat-number {
        font-size: var(--text-xl);
    }
    
    /* 按钮 */
    .btn {
        padding: var(--space-3) var(--space-5);
        font-size: var(--text-sm);
    }
    
    .btn-lg {
        padding: var(--space-4) var(--space-6);
        font-size: var(--text-base);
    }
    
    /* 表单 */
    .form-control {
        padding: var(--space-3);
        font-size: var(--text-sm);
    }
    
    /* 卡片 */
    .card-body {
        padding: var(--space-4);
    }
}

/* ============================================
   触摸优化（所有移动设备）
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* 增大触摸目标 */
    .btn,
    .nav-link,
    .lang-current,
    .lang-dropdown a,
    .footer-links a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    
    .nav-link {
        padding: var(--space-4) var(--space-5);
    }
    
    /* 防止误触 */
    .hero-arrow {
        width: 48px;
        height: 48px;
    }
    
    /* 表单元素 */
    input, textarea, select, button {
        font-size: 16px !important; /* 防止iOS自动缩放 */
    }
}

/* ============================================
   横屏模式优化
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-slide {
        height: 350px;
    }
    
    .hero-title {
        font-size: var(--text-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--text-base);
        margin-bottom: var(--space-4);
    }
}

/* ============================================
   打印样式
   ============================================ */
@media print {
    .top-bar,
    .main-header,
    .hero-slider,
    .cta-section,
    .main-footer,
    .back-to-top,
    .chatbot-float {
        display: none !important;
    }
    
    body {
        color: black;
        background: white;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .container {
        max-width: 100%;
    }
}
