/* 响应式布局 */

/* 大屏幕平板 (<= 1024px) */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .news-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .api-cards {
        grid-template-columns: 1fr;
    }
}

/* 平板 (<= 768px) */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .header-content {
        flex-wrap: wrap;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        box-shadow: var(--shadow-md);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 4px;
    }

    .main-nav a {
        padding: 12px 16px;
    }

    .header-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .banner-title {
        font-size: 32px;
    }

    .banner-subtitle {
        font-size: 18px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title h2 {
        font-size: 28px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-card {
        padding: 24px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-item h3 {
        font-size: 36px;
    }

    .news-list {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .content-card {
        padding: 24px;
    }

    .list-item {
        flex-direction: column;
    }

    .list-item-image {
        width: 100%;
        height: 180px;
        margin-left: 0;
        margin-top: 16px;
    }
}

/* 手机 (<= 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .logo-text {
        font-size: 14px;
    }

    .banner-section {
        padding: 60px 0;
    }

    .banner-title {
        font-size: 26px;
    }

    .banner-subtitle {
        font-size: 16px;
    }

    .banner-actions {
        flex-direction: column;
        gap: 12px;
    }

    .banner-actions .btn {
        width: 100%;
    }

    .section {
        padding: 40px 0;
    }

    .section-title h2 {
        font-size: 24px;
    }

    .section-title p {
        font-size: 16px;
    }

    .feature-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }

    .feature-card h3 {
        font-size: 18px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .stat-item h3 {
        font-size: 32px;
    }

    .cta-content h2 {
        font-size: 24px;
    }

    .cta-actions {
        flex-direction: column;
    }

    .cta-actions .btn {
        width: 100%;
    }

    .page-header {
        padding: 40px 0;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .detail-header h1 {
        font-size: 22px;
    }

    .detail-content {
        padding: 20px;
    }

    .contact-form {
        padding: 0;
    }

    .btn-lg {
        padding: 12px 24px;
        font-size: 15px;
    }
}

/* 打印样式 */
@media print {
    .portal-header,
    .portal-footer,
    .banner-section,
    .cta-section,
    .btn {
        display: none !important;
    }

    .portal-main {
        margin-top: 0;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .content-card {
        box-shadow: none;
        border: 1px solid #ddd;
        padding: 20pt;
    }
}
