/* 响应式设计 */

/* 平板设备 */
@media (max-width: 992px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: 42px;
    }
    
    .hero-content p {
        font-size: 18px;
    }
    
    .section-header h2 {
        font-size: 32px;
    }
    
    .more-link {
        position: static;
        display: block;
        text-align: center;
        margin-top: 20px;
        transform: none;
    }
    
    .news-grid,
    .research-grid,
    .achievements-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .search-form {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-group {
        flex: none;
    }
}

/* 手机设备 */
@media (max-width: 768px) {
    /* 导航菜单 */
    .nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        transition: left 0.3s;
        z-index: 999;
    }
    
    .nav.active {
        left: 0;
    }
    
    .nav ul {
        flex-direction: column;
        gap: 0;
        padding: 30px 0;
    }
    
    .nav li {
        border-bottom: 1px solid #eee;
    }
    
    .nav a {
        display: block;
        padding: 15px 30px;
        border-radius: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* 主横幅 */
    .hero {
        padding: 120px 0 80px;
    }
    
    .hero-content h1 {
        font-size: 36px;
        margin-bottom: 15px;
    }
    
    .hero-content p {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn {
        padding: 12px 25px;
    }
    
    /* 章节 */
    .section {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    /* 网格布局 */
    .news-grid,
    .research-grid,
    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }
    
    /* 卡片内容 */
    .news-content,
    .research-content,
    .achievement-content {
        padding: 20px;
    }
    
    .news-content h3,
    .research-content h3,
    .achievement-content h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    /* 团队成员 */
    .team-item {
        padding: 25px 15px;
    }
    
    .team-photo {
        width: 100px;
        height: 100px;
        margin-bottom: 15px;
    }
    
    .default-avatar {
        font-size: 40px;
    }
    
    .team-info h3 {
        font-size: 18px;
    }
    
    /* 页面标题 */
    .page-title {
        padding: 60px 0;
    }
    
    .page-title h1 {
        font-size: 28px;
    }
    
    /* 分页 */
    .pagination {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .pagination a,
    .pagination span {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    /* 面包屑 */
    .breadcrumb {
        padding: 15px 0;
    }
    
    .breadcrumb ul {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    /* 搜索框 */
    .search-box {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    /* 表格响应式 */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-responsive table {
        min-width: 600px;
    }
    
    /* 模态框 */
    .modal {
        padding: 20px;
    }
    
    .modal-content {
        margin: 0;
        border-radius: 8px;
    }
    
    /* 表单 */
    .form-row {
        flex-direction: column;
    }
    
    .form-col {
        margin-bottom: 20px;
    }
    
    /* 按钮组 */
    .btn-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-group .btn {
        margin-bottom: 10px;
        margin-right: 0;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    /* 头部 */
    .header-content {
        padding: 10px 0;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    /* 主横幅 */
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-content p {
        font-size: 14px;
    }
    
    /* 章节 */
    .section {
        padding: 40px 0;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
    
    /* 实验室简介 */
    .about-content {
        font-size: 16px;
    }
    
    /* 卡片 */
    .news-image,
    .research-image,
    .achievement-image {
        height: 160px;
    }
    
    .news-content,
    .research-content,
    .achievement-content {
        padding: 15px;
    }
    
    /* 团队 */
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .team-item {
        padding: 20px 15px;
    }
    
    .team-photo {
        width: 80px;
        height: 80px;
    }
    
    .default-avatar {
        font-size: 32px;
    }
    
    /* 页脚 */
    .footer {
        padding: 40px 0 15px;
    }
    
    .footer-content {
        gap: 20px;
        text-align: left;
    }
    
    .footer-info h3 {
        font-size: 20px;
    }
    
    /* 页面标题 */
    .page-title {
        padding: 40px 0;
    }
    
    .page-title h1 {
        font-size: 24px;
    }
    
    /* 搜索框 */
    .search-box {
        padding: 15px;
    }
    
    /* 卡片间距 */
    .card-header,
    .card-body,
    .card-footer {
        padding: 15px;
    }
}

/* 超宽屏 */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-content h1 {
        font-size: 56px;
    }
    
    .hero-content p {
        font-size: 22px;
    }
    
    .section-header h2 {
        font-size: 42px;
    }
    
    .news-grid,
    .achievements-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .research-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .team-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 打印样式 */
@media print {
    .header,
    .footer,
    .mobile-menu-toggle,
    .hero-actions,
    .more-link,
    .pagination,
    .search-box {
        display: none;
    }
    
    .hero {
        background: none;
        color: #333;
        padding: 20px 0;
    }
    
    .section {
        padding: 20px 0;
        background: none;
    }
    
    .card,
    .news-item,
    .research-item,
    .achievement-item,
    .team-item {
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 20px;
        break-inside: avoid;
    }
    
    a {
        color: #333;
        text-decoration: underline;
    }
    
    .btn {
        display: none;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        border-color: #000;
    }
    
    .btn-secondary {
        color: #000;
        border-color: #000;
    }
    
    .nav a:hover,
    .nav a.active {
        background: #000;
        color: #fff;
    }
    
    .hero {
        background: #000;
    }
    
    .card,
    .news-item,
    .research-item,
    .achievement-item,
    .team-item {
        border: 2px solid #000;
    }
}

/* 动画减少模式 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .spinner {
        animation: none;
        border: 4px solid #3498db;
    }
}