/* ===============================================
   响应式设计 - 平板和手机适配
   =============================================== */

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .header h1 {
        font-size: 28px;
    }

    .header .subtitle {
        font-size: 16px;
    }

    /* 轮播图 */
    .banner {
        height: 350px;
    }

    .banner-prev,
    .banner-next {
        width: 40px;
        height: 40px;
        font-size: 30px;
    }

    /* 左右分栏 */
    .content-row {
        flex-direction: column;
        gap: 20px;
    }

    .col-left,
    .col-right {
        flex: 1;
    }

    /* 课题组总览 */
    .overview-card {
        padding: 30px;
        margin-bottom: 30px;
    }

    .overview-content {
        flex-direction: column;
        gap: 25px;
    }

    .overview-image {
        width: 100%;
        max-width: 400px;
    }

    .professor-info {
        flex-direction: column;
        align-items: center;
    }

    .photo-placeholder {
        width: 180px;
        height: 225px;
    }

    .research-areas {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .links-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    /* 返回顶部按钮 */
    .go-top {
        bottom: 30px;
        right: 30px;
        width: 45px;
        height: 45px;
        line-height: 45px;
        font-size: 12px;
    }
}

/* 手机设备 (最大宽度 768px) */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 0 10px;
    }

    /* 头部样式 */
    .header {
        padding: 25px 0;
    }

    .header .container {
        position: relative;
    }

    .header h1 {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .header .subtitle {
        font-size: 14px;
    }

    /* 语言切换 - 移动端 */
    .header-content {
        flex-wrap: wrap;
    }

    .lang-switch {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #f0f0f0;
    }

    .lang-btn {
        font-size: 13px;
        padding: 5px 10px;
    }

    /* 轮播图 */
    .banner {
        height: 250px;
    }

    .banner-prev,
    .banner-next {
        width: 35px;
        height: 35px;
        font-size: 24px;
    }

    .banner-prev {
        left: 10px;
    }

    .banner-next {
        right: 10px;
    }

    .banner-dots .dot {
        width: 10px;
        height: 10px;
    }

    .banner-dots .dot.active {
        width: 24px;
    }

    .banner-caption {
        font-size: 15px;
        margin-left: 90px;
    }

    /* 导航栏 - 移动端菜单 */
    .navbar .container {
        position: relative;
    }

    .mobile-menu-toggle {
        display: block;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #888;
        background-color: #fff;
        border: 1px solid #ddd;
        border-radius: 6px;
        padding: 10px 14px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1),
                    inset 0 1px 0 rgba(255,255,255,0.8),
                    inset 0 -1px 0 rgba(0,0,0,0.05);
        transition: all 0.3s ease;
    }

    .mobile-menu-toggle:hover {
        background-color: #f8f8f8;
        box-shadow: 0 3px 6px rgba(0,0,0,0.12),
                    inset 0 1px 0 rgba(255,255,255,0.8),
                    inset 0 -1px 0 rgba(0,0,0,0.05);
    }

    .mobile-menu-toggle.active {
        color: #1a5490;
        background-color: #e8f0f8;
        border-color: #1a5490;
        box-shadow: 0 2px 4px rgba(26,84,144,0.2),
                    inset 0 1px 2px rgba(26,84,144,0.1);
    }

    .nav-menu {
        display: flex;
        flex-direction: column;
        width: 100%;
        background-color: white;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease;
    }

    .nav-menu.active {
        max-height: 500px;
        opacity: 1;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-menu a {
        padding: 12px 20px;
    }

    /* 主内容区 */
    .main-content {
        padding: 20px 0;
    }

    .page-header {
        padding: 20px 15px;
        margin-bottom: 20px;
    }

    .page-header h1 {
        font-size: 22px;
        padding-left: 12px;
    }

    .content-page {
        padding: 20px 15px;
    }

    /* 左右分栏 */
    .content-row {
        flex-direction: column;
    }

    /* 课题组总览 */
    .overview-card {
        padding: 20px;
        margin-bottom: 20px;
    }

    .overview-content {
        flex-direction: column;
        gap: 20px;
    }

    .overview-text h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .overview-text p {
        font-size: 14px;
    }

    .overview-image {
        width: 100%;
    }

    /* 文章区块 */
    .article-section {
        padding: 15px;
    }

    /* 新闻列表 */
    .news-list-item {
        padding: 12px 0;
    }

    .date-box {
        width: 50px;
        margin-right: 15px;
    }

    .date-box .day {
        font-size: 20px;
    }

    .date-box .month {
        font-size: 11px;
    }

    .news-info h3 {
        font-size: 15px;
    }

    .news-info p {
        font-size: 13px;
    }

    /* 快速链接 */
    .quick-links {
        padding: 15px;
    }

    .quick-link-item {
        padding: 15px;
    }

    .quick-link-icon {
        font-size: 32px;
    }

    .quick-link-item h3 {
        font-size: 15px;
    }

    /* 代表性论文预览 */
    .publication-preview-item {
        padding: 10px 0;
    }

    .publication-preview-title {
        font-size: 13px;
    }

    /* 教授卡片 */
    .professor-card {
        padding: 20px 15px;
    }

    .professor-info {
        gap: 20px;
    }

    .photo-placeholder {
        width: 150px;
        height: 188px;
    }

    .professor-details h2 {
        font-size: 20px;
    }

    .professor-details .title,
    .professor-details .lab {
        font-size: 14px;
    }

    .professor-details .description {
        font-size: 14px;
    }

    /* 区块样式 */
    .section-block {
        padding: 20px 15px;
        margin-bottom: 20px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .section-header h2 {
        font-size: 18px;
    }

    /* 研究方向 */
    .research-areas {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .research-card {
        padding: 20px;
    }

    .research-card h3 {
        font-size: 16px;
    }

    /* 新闻列表 */
    .news-item {
        padding: 15px;
    }

    .news-item h3 {
        font-size: 16px;
    }

    /* 论文列表 */
    .publications-page-layout {
        flex-direction: column;
    }

    .publications-sidebar {
        position: static;
        flex: none;
        width: 100%;
        max-height: none;
        margin-bottom: 20px;
    }

    .sidebar-sticky {
        padding: 15px;
    }

    .publications-toc {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .toc-item {
        flex: 0 0 auto;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .toc-item:hover,
    .toc-item.active {
        border-left: none;
        border-bottom-color: #1a5490;
    }

    .year-group {
        padding: 20px 15px;
    }

    .year-group h3 {
        font-size: 18px;
    }

    .year-group h4 {
        font-size: 16px;
    }

    .paper-item {
        padding: 12px;
        margin-bottom: 12px;
    }

    .paper-title {
        font-size: 15px;
    }

    .paper-image {
        height: 125px;
        margin-top: 8px;
    }

    /* 组员列表 */
    .members-grid {
        grid-template-columns: 1fr;
    }

    .member-card {
        padding: 15px;
    }

    /* 活动列表 */
    .activity-item {
        padding: 20px 15px;
    }

    .activity-item h3 {
        font-size: 16px;
    }

    /* 招聘信息 */
    .requirement-section {
        padding: 20px 15px;
    }

    .requirement-section h3 {
        font-size: 18px;
    }

    /* 联系信息 */
    .contact-info {
        padding: 20px 15px;
    }

    .contact-item {
        flex-direction: column;
        gap: 5px;
    }

    .contact-label {
        min-width: auto;
        font-size: 15px;
    }

    .contact-value {
        font-size: 14px;
    }

    /* 友情链接 */
    .links-section {
        padding: 20px 15px;
    }

    .links-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .links-grid a {
        padding: 10px 15px;
    }

    /* 页脚 */
    .footer {
        padding: 20px 0;
        font-size: 12px;
    }

    .footer-links {
        flex-direction: column;
        gap: 8px;
    }

    .footer-links a {
        margin: 0;
    }

    .footer-copyright p {
        font-size: 12px;
    }

    /* 返回顶部按钮 */
    .go-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 11px;
    }
}

/* 小屏幕手机 (最大宽度 480px) */
@media (max-width: 480px) {
    .header h1 {
        font-size: 20px;
    }

    .header .subtitle {
        font-size: 13px;
    }

    /* 语言切换 - 小屏幕 */
    .lang-btn {
        font-size: 12px;
        padding: 4px 8px;
    }

    /* 轮播图 */
    .banner {
        height: 200px;
    }

    .banner-prev,
    .banner-next {
        width: 30px;
        height: 30px;
        font-size: 20px;
    }

    .banner-caption {
        font-size: 14px;
        margin-left: 80px;
    }

    .photo-placeholder {
        width: 120px;
        height: 150px;
    }

    .professor-details h2 {
        font-size: 18px;
    }

    .section-header h2 {
        font-size: 16px;
    }

    .intro-text {
        padding: 15px;
    }

    .research-card,
    .news-item,
    .activity-item {
        padding: 15px;
    }

    /* 课题组总览 */
    .overview-card {
        padding: 15px;
        margin-bottom: 20px;
    }

    .overview-text h2 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .overview-text p {
        font-size: 13px;
        margin-bottom: 12px;
    }

    /* 新闻列表 */
    .date-box {
        width: 45px;
        margin-right: 12px;
    }

    .date-box .day {
        font-size: 18px;
    }

    .news-info h3 {
        font-size: 14px;
    }

    .news-info p {
        font-size: 12px;
    }
}

/* 小手机 (< 480px) */
@media (max-width: 480px) {
    .student-avatar {
        width: 80px;
        height: 80px;
    }

    .student-name {
        font-size: 16px;
    }

    .student-grade {
        font-size: 14px;
    }
}

/* 打印样式 */
@media print {
    .top-bar,
    .navbar,
    .mobile-menu-toggle,
    .footer {
        display: none;
    }

    .main-content {
        padding: 0;
    }

    .professor-card,
    .section-block,
    .content-page {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}
