/* responsive.css - 响应式设计 */
/* 在style.css基础上添加响应式支持 */

/* 大屏幕（1200px以上） */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* 平板（768px - 1199px） */
@media (max-width: 1199px) and (min-width: 768px) {
    #banner {
        height: 400px;
    }
    
    .news-grid,
    .member-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .publication-list {
        padding: 0 20px;
    }
}

/* 手机和平板竖屏（768px以下） */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    #header {
        padding: 10px 0;
    }
    
    #header .container {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    #logo img {
        height: 50px;
    }
    
    #labname img {
        height: 40px;
    }
    
    .header-tools {
        width: 100%;
        justify-content: space-between;
        margin-top: 10px;
    }
    
    .search-box input {
        width: 120px;
        font-size: 12px;
    }
    
    .search-box input:focus {
        width: 150px;
    }
    
    .lang-btn {
        padding: 3px 8px;
        font-size: 12px;
    }
    
    .hamburger {
        display: flex !important;
    }
    
    #nav .container {
        position: relative;
    }
    
    .nav-list {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: var(--text-dark);
        flex-direction: column;
        padding: 80px 0 30px;
        transition: left 0.3s ease;
        z-index: 1001;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    }
    
    .nav-list.active {
        left: 0;
    }
    
    .nav-item a {
        padding: 15px 30px;
        font-size: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    #banner {
        height: 250px;
        border-radius: 0;
    }
    
    .banner-title {
        font-size: 20px;
    }
    
    .banner-desc {
        font-size: 14px;
    }
    
    .banner-overlay {
        padding: 20px;
    }
    
    .content-header h1 {
        font-size: 28px;
    }
    
    .news-grid,
    .member-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .card-text {
        font-size: 14px;
    }
    
    .member-card .member-photo {
        width: 120px;
        height: 120px;
    }
    
    .member-card .member-name {
        font-size: 18px;
    }
    
    .publication-year h2 {
        font-size: 22px;
    }
    
    .publication-item .pub-title {
        font-size: 15px;
    }
    
    .tabs-bar {
        gap: 8px;
        margin-bottom: 20px;
        padding-bottom: 8px;
        justify-content: center;
    }
    
    .tab-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .equipment-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    /* 移动端增大研究方向与最新动态间距 */
    #content {
        padding-bottom: 30px;
    }
    
    #latestNews {
        padding: 30px 0 60px;
    }
    
    .footer-info {
        width: 100%;
    }
    
    #researchGrid {
        grid-template-columns: 1fr;
    }
}

/* 超小屏幕（480px以下） */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    #banner {
        height: 200px;
    }
    
    .banner-title {
        font-size: 18px;
    }
    
    .content-header h1 {
        font-size: 24px;
    }
    
    .tabs-bar {
        gap: 6px;
    }
    
    .tab-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .research-grid {
        grid-template-columns: 1fr;
    }
}

/* 打印样式 */
@media print {
    #header,
    #nav,
    #footer,
    .search-box,
    .lang-switch,
    .hamburger {
        display: none !important;
    }
    
    #content {
        padding: 20px 0;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* 横屏模式（手机） */
@media (max-height: 500px) and (orientation: landscape) {
    #banner {
        height: 200px;
    }
    
    .nav-list {
        padding: 60px 0 20px;
    }
    
    .nav-item a {
        padding: 10px 30px;
    }
}

/* 高分辨率屏幕 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    #logo img,
    #labname img {
        image-rendering: -webkit-optimize-contrast;
    }
}
/* 减少动画（无障碍） */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}