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

/* 导入字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&family=Noto+Serif+SC:wght@400;600;700&display=swap');

/* 基础样式 */
body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #2C1E1E;
    background-color: #F9F5EB;
    scroll-behavior: smooth;
}

/* 导航栏滚动效果 */
#navbar.scrolled {
    background-color: rgba(44, 30, 30, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 滚动显示动画 */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* 按钮样式 */
.btn-primary {
    background-color: #8B0000;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary:hover {
    background-color: #6d0000;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-secondary {
    background-color: #DAA520;
    color: #2C1E1E;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: #c6921e;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 2px solid white;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 图片悬停效果 */
.img-hover {
    overflow: hidden;
}

.img-hover img {
    transition: transform 0.7s ease;
}

.img-hover:hover img {
    transform: scale(1.1);
}

/* 标题样式 */
.section-title {
    font-family: 'Noto Serif SC', serif;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: #8B0000;
}

/* 分隔线样式 */
.divider {
    height: 4px;
    background: linear-gradient(to right, #8B0000, #DAA520);
    border-radius: 2px;
    margin: 2rem 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    /* 导航栏调整 */
    #navbar nav {
        padding: 1rem;
    }
    
    /* 英雄区域调整 */
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* 布局调整 */
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    /* 按钮调整 */
    .btn-primary, .btn-secondary, .btn-outline {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    /* 英雄区域调整 */
    .hero h1 {
        font-size: 2rem;
    }
    
    /* 按钮组调整 */
    .btn-group {
        flex-direction: column;
        gap: 1rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #8B0000;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6d0000;
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #2C1E1E;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading.fade {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #333;
    border-top: 3px solid #DAA520;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 表单样式 */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #8B0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    font-size: 1rem;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: #8B0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #8B0000;
    color: white;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.tag-secondary {
    background-color: #DAA520;
    color: #2C1E1E;
}

/* 徽章样式 */
.badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #DAA520;
    color: #2C1E1E;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 评分样式 */
.rating {
    display: flex;
    color: #DAA520;
}

.rating .fa-star {
    margin-right: 2px;
}

.rating .fa-star-half-o {
    margin-right: 2px;
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: #8B0000;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    color: #999;
}

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 淡入效果 */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* 平滑过渡效果 */
.smooth-transition {
    transition: all 0.5s ease;
}

/* 图片懒加载 */
.lazy-img {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lazy-img.loaded {
    opacity: 1;
}

/* 页头样式 */
.page-header {
    background-color: #2C1E1E;
    color: white;
    padding: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/header-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    z-index: 0;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

/* 特色区块样式 */
.feature-block {
    position: relative;
    padding: 2rem;
    border-radius: 0.75rem;
    background-color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.feature-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.feature-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: #8B0000;
    border-radius: 0.75rem 0 0 0.75rem;
}

/* 时间线样式 */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background-color: #8B0000;
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -2.5rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: #DAA520;
    border: 2px solid white;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

/* 计数动画 */
.count-up {
    font-size: 3rem;
    font-weight: 700;
    color: #8B0000;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-item::before {
        left: -2rem;
    }
    
    .count-up {
        font-size: 2rem;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    body {
        background-color: #fff;
        color: #000;
    }
    
    .btn-primary {
        background-color: #000;
        color: #fff;
    }
    
    .btn-secondary {
        background-color: #000;
        color: #fff;
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    body {
        scroll-behavior: auto;
    }
}