/* ===== 响应式设计 ===== */

/* 平板 */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-list {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding-top: 16px;
        border-top: 1px solid var(--color-border);
        margin-top: 16px;
    }

    .nav-list.open {
        display: flex;
    }

    .nav-list li {
        border-bottom: 1px solid var(--color-border);
    }

    .nav-list a {
        display: block;
        padding: 12px 0;
        font-size: 1rem;
    }

    .nav-list a::after {
        display: none;
    }

    .hero {
        min-height: 50vh;
    }

    .hero h2 {
        font-size: 2.2rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .videos-grid {
        grid-template-columns: 1fr;
    }

    .file-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .file-icon {
        margin-right: 0;
    }

    .file-meta {
        justify-content: center;
    }

    .file-download {
        margin-left: 0;
        margin-top: 8px;
    }

    .modal-body {
        padding: 28px 20px;
    }
}

/* 手机 */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .section {
        padding: 50px 0;
    }

    .hero {
        min-height: 45vh;
    }

    .hero h2 {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .article-card {
        padding: 20px;
    }

    .article-card h3 {
        font-size: 1.15rem;
    }

    .video-info h3 {
        font-size: 1rem;
    }

    .modal {
        padding: 20px 12px;
    }

    .modal-body {
        padding: 24px 16px;
    }

    .modal-close {
        top: 12px;
        right: 12px;
    }
}

/* 大屏 */
@media (min-width: 1400px) {
    :root {
        --container-max: 1320px;
    }
}

/* 打印 */
@media print {
    .site-header,
    .site-footer,
    .modal,
    .nav-toggle,
    .file-download,
    .read-more {
        display: none !important;
    }

    .section {
        page-break-inside: avoid;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}


/* 移动端底部安全区 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .site-footer {
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }
    .modal-body {
        padding-bottom: calc(48px + env(safe-area-inset-bottom));
    }
}


/* 触摸反馈 */
@media (hover: none) {
    .article-card:active,
    .video-card:active,
    .file-card:active,
    .file-download:active,
    .submit-btn:active,
    .share-btn:active {
        transform: scale(0.97);
        opacity: 0.8;
    }
    .nav-list a:active {
        opacity: 0.6;
    }
}


/* 移动端导航动画 */
@media (max-width: 768px) {
    .nav-list {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        padding-top: 0;
    }
    .nav-list.open {
        max-height: 400px;
        padding-top: 16px;
    }
}
.nav-toggle span { transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
