/* 非物质文化遗产官方网站样式 */

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 主色调定义 */
:root {
    --chinese-red: #C41E3A;    /* 中国红 */
    --ink-black: #1A1A1A;      /* 墨黑 */
    --gold: #D4AF37;            /* 鎏金 */
    --sky-blue: #7BA7BC;        /* 天青 */
    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --dark-gray: #333333;
}

/* 字体定义 */
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink-black);
    background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Ma Shan Zheng', cursive, 'Microsoft YaHei', 'PingFang SC', sans-serif;
    font-weight: normal;
    color: var(--ink-black);
}

/* 链接样式 */
a {
    color: var(--chinese-red);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--gold);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--chinese-red);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--gold);
    color: var(--ink-black);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--chinese-red);
    color: var(--chinese-red);
}

.btn-outline:hover {
    background-color: var(--chinese-red);
    color: var(--white);
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.header {
    background-color: var(--ink-black);
    color: var(--white);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 28px;
    color: var(--gold);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--gold);
}

.nav-links a.active {
    color: var(--gold);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--gold);
}

/* 移动端菜单 */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
}

/* Banner样式 */
.banner {
    position: relative;
    height: 600px;
    overflow: hidden;
    background-color: var(--ink-black);
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.banner-slide.active {
    opacity: 1;
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    z-index: 10;
}

.banner-title {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-subtitle {
    font-size: 24px;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* 非遗项目轮播 */
.heritage-carousel {
    padding: 60px 0;
    background-color: var(--light-gray);
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
    color: var(--ink-black);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: var(--chinese-red);
    margin: 20px auto;
}

.carousel-container {
    position: relative;
    overflow: hidden;
}

.carousel-wrapper {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    flex: 0 0 33.333%;
    padding: 0 15px;
}

.carousel-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.carousel-card:hover {
    transform: translateY(-10px);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--ink-black);
}

.card-description {
    font-size: 14px;
    color: var(--dark-gray);
    margin-bottom: 15px;
}

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

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-item {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 20px;
}

.news-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--ink-black);
}

.news-date {
    font-size: 12px;
    color: var(--sky-blue);
    margin-bottom: 10px;
}

.news-excerpt {
    font-size: 14px;
    color: var(--dark-gray);
    margin-bottom: 15px;
}

/* 热门推荐 */
.featured-section {
    padding: 60px 0;
    background-color: var(--light-gray);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.featured-item {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.featured-item:hover {
    transform: translateY(-5px);
}

.featured-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.featured-content {
    padding: 15px;
}

.featured-title {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--ink-black);
}

/* 页脚 */
.footer {
    background-color: var(--ink-black);
    color: var(--white);
    padding: 60px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-column h3 {
    color: var(--gold);
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* 传统元素装饰 */
.decoration {
    position: relative;
}

.decoration::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 30px;
    background-image: url('../images/decoration.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 水墨效果 */
.ink-effect {
    position: relative;
    overflow: hidden;
}

.ink-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/ink-texture.png');
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.05;
    z-index: -1;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

@keyframes inkSpread {
    0% {
        transform: scale(0);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.ink-spread {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.1);
    transform: scale(0);
    pointer-events: none;
    animation: inkSpread 1s ease-out forwards;
}

/* 响应式设计 */
@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-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;
    }
}

@media screen and (max-width: 480px) {
    .banner {
        height: 400px;
    }

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

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

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

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