/* 响应式设计样式 */

/* 移动端设备 */
@media screen and (max-width: 768px) {
    /* 头部导航 */
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--ink-black);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-links li {
        margin: 10px 0;
    }

    .menu-toggle {
        display: block;
    }

    /* Banner */
    .banner {
        height: 400px;
    }

    .banner-title {
        font-size: 36px;
    }

    .banner-subtitle {
        font-size: 18px;
    }

    /* 轮播 */
    .carousel-item {
        flex: 0 0 100%;
    }

    /* 最新动态 */
    .news-grid {
        grid-template-columns: 1fr;
    }

    /* 热门推荐 */
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 页脚 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* 轮播控制按钮 */
    .carousel-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}

/* 小屏设备 */
@media screen and (max-width: 480px) {
    /* Banner */
    .banner {
        height: 300px;
    }

    .banner-title {
        font-size: 28px;
    }

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

    /* 热门推荐 */
    .featured-grid {
        grid-template-columns: 1fr;
    }

    /* 标题 */
    .section-title {
        font-size: 28px;
    }

    /* 按钮 */
    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    /* 容器 */
    .container {
        padding: 0 15px;
    }

    /* 卡片内容 */
    .card-content,
    .news-content,
    .featured-content {
        padding: 15px;
    }

    /* 卡片标题 */
    .card-title,
    .news-title,
    .featured-title {
        font-size: 18px;
    }

    /* 卡片描述 */
    .card-description,
    .news-excerpt {
        font-size: 14px;
    }
}

/* 平板设备 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    /* 轮播 */
    .carousel-item {
        flex: 0 0 50%;
    }

    /* 最新动态 */
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 热门推荐 */
    .featured-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 页脚 */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 大屏设备 */
@media screen and (min-width: 1025px) {
    /* 容器 */
    .container {
        max-width: 1200px;
    }

    /* 轮播 */
    .carousel-item {
        flex: 0 0 33.333%;
    }

    /* 最新动态 */
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 热门推荐 */
    .featured-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* 页脚 */
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 横屏设备 */
@media screen and (orientation: landscape) and (max-height: 500px) {
    /* Banner */
    .banner {
        height: 300px;
    }

    .banner-title {
        font-size: 28px;
    }

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

    /* 非遗项目轮播 */
    .heritage-carousel {
        padding: 40px 0;
    }

    /* 最新动态 */
    .news-section {
        padding: 40px 0;
    }

    /* 热门推荐 */
    .featured-section {
        padding: 40px 0;
    }
}

/* 打印样式 */
@media print {
    /* 隐藏不需要打印的元素 */
    .header,
    .footer,
    .menu-toggle,
    .carousel-btn {
        display: none;
    }

    /* 调整打印样式 */
    body {
        font-size: 12pt;
        color: #000;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    /* 移除背景色和阴影 */
    .banner,
    .heritage-carousel,
    .featured-section {
        background-color: #fff;
        box-shadow: none;
    }

    /* 调整图片 */
    img {
        max-width: 100%;
        height: auto;
    }
}