/* 字体引入：思源宋体(标题)与思源黑体(正文) */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500&family=Noto+Serif+SC:wght@300;400;500;600&display=swap');

/* 全局变量定义 */
:root {
    --color-cream: #F9F7F5;
    --color-pearl: #FAF9F6;
    --color-text-main: #2C2C2C;
    --color-text-sub: #5A5A5A;
    --color-accent: #B35437;
}

/* 基础重置与字体设置 */
body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: var(--color-pearl);
    color: var(--color-text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-serif {
    font-family: 'Noto Serif SC', serif;
}

/* 导航链接动效 */
.nav-item {
    position: relative;
    padding-bottom: 2px;
}
.nav-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--color-text-main);
    transition: width 0.3s ease-out;
}
.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

/* 图片容器与悬停放大效果 */
.img-container {
    overflow: hidden;
    position: relative;
    background-color: #f0f0f0; /* 占位色 */
}
.img-container img {
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.img-container:hover img {
    transform: scale(1.03);
}

/* 隐藏滚动条但保留滚动功能 */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 全局动画：淡入上浮 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.animate-fade-up {
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0; /* 初始不可见 */
}

/* 延迟类 */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }

/* 灯箱样式 */
#lightbox {
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.95);
    transition: opacity 0.3s ease;
}

/* 纯CSS轮播淡入淡出核心 */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 0;
}
.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}