/**
 * 李氏家族网站 - 中式传统风格
 */

:root {
    /* 色彩搭配 */
    --chinese-primary: #8B4513; /* 深褐色/赭石色 - 主色 */
    --chinese-secondary: #CD5C5C; /* 中国红 - 辅助色 */
    --chinese-light: #F5F5DC; /* 米色 - 背景色 */
    --chinese-dark: #333333; /* 墨黑色 - 文字色 */
    --chinese-accent: #A0522D; /* 棕色 - 强调色 */
    --chinese-gold: #DAA520; /* 金色 - 点缀色 */
}

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

body {
    font-family: 'Microsoft YaHei', 'SimHei', sans-serif;
    background-color: var(--chinese-light);
    color: var(--chinese-dark);
    line-height: 1.6;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%238b4513' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

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

/* 标题字体 */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Serif SC', 'SimSun', serif;
    color: var(--chinese-primary);
    font-weight: 700;
}

/* 正文字体 */
p, span, div {
    font-family: 'Microsoft YaHei', 'SimHei', sans-serif;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, var(--chinese-primary), var(--chinese-accent));
    box-shadow: 0 2px 10px rgba(139, 69, 19, 0.3);
    border-bottom: 2px solid var(--chinese-secondary);
    position: relative;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: url("data:image/svg+xml,%3Csvg width='100' height='4' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 2 Q 25 0, 50 2 Q 75 4, 100 2' stroke='%23CD5C5C' stroke-width='2' fill='none'/%3E%3C/svg%3E") repeat-x;
    background-size: 100px 4px;
}

.navbar-brand {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 10px;
}



.nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-family: 'Noto Serif SC', serif;
    position: relative;
    transition: all 0.3s;
    padding: 15px 20px !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--chinese-secondary);
    transition: all 0.3s;
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
}

.nav-link.active {
    color: white !important;
    font-weight: bold;
}

.nav-link.active::after {
    width: 80%;
}

/* 页面头部 */
.page-header {
    background: linear-gradient(135deg, var(--chinese-primary), var(--chinese-accent));
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--chinese-secondary);
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 10 Q 25 5, 40 10 Q 55 15, 70 10 Q 85 5, 90 10' stroke='%23ffffff' stroke-width='1' fill='none' opacity='0.1'/%3E%3Cpath d='M10 30 Q 25 25, 40 30 Q 55 35, 70 30 Q 85 25, 90 30' stroke='%23ffffff' stroke-width='1' fill='none' opacity='0.1'/%3E%3Cpath d='M10 50 Q 25 45, 40 50 Q 55 55, 70 50 Q 85 45, 90 50' stroke='%23ffffff' stroke-width='1' fill='none' opacity='0.1'/%3E%3Cpath d='M10 70 Q 25 65, 40 70 Q 55 75, 70 70 Q 85 65, 90 70' stroke='%23ffffff' stroke-width='1' fill='none' opacity='0.1'/%3E%3Cpath d='M10 90 Q 25 85, 40 90 Q 55 95, 70 90 Q 85 85, 90 90' stroke='%23ffffff' stroke-width='1' fill='none' opacity='0.1'/%3E%3C/svg%3E");
}

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

.page-header h1 {
    font-family: 'Noto Serif SC', serif;
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 轮播图 */
.carousel {
    position: relative;
    margin-bottom: 40px;
}

.carousel::before, .carousel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    background: url("data:image/svg+xml,%3Csvg width='40' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 10 Q 20 5, 30 10 Q 20 15, 10 10' stroke='%238B4513' stroke-width='1' fill='none' opacity='0.3'/%3E%3Cpath d='M10 50 Q 20 45, 30 50 Q 20 55, 10 50' stroke='%238B4513' stroke-width='1' fill='none' opacity='0.3'/%3E%3Cpath d='M10 90 Q 20 85, 30 90 Q 20 95, 10 90' stroke='%238B4513' stroke-width='1' fill='none' opacity='0.3'/%3E%3Cpath d='M10 130 Q 20 125, 30 130 Q 20 135, 10 130' stroke='%238B4513' stroke-width='1' fill='none' opacity='0.3'/%3E%3Cpath d='M10 170 Q 20 165, 30 170 Q 20 175, 10 170' stroke='%238B4513' stroke-width='1' fill='none' opacity='0.3'/%3E%3C/svg%3E");
}

.carousel::before {
    left: 0;
}

.carousel::after {
    right: 0;
    transform: rotateY(180deg);
}

.carousel-inner {
    border: 8px solid rgba(139, 69, 19, 0.1);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.carousel-item {
    height: 500px;
    overflow: hidden;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(20%) contrast(105%);
    transition: all 8s ease;
}

.carousel-item:hover img {
    transform: scale(1.05);
}

.carousel-caption {
    background: rgba(0,0,0,0.6);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--chinese-secondary);
    bottom: 60px;
    left: 15%;
    right: 15%;
    backdrop-filter: blur(5px);
}

.carousel-caption h5 {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.5rem;
    color: var(--chinese-secondary);
    margin-bottom: 15px;
}

.carousel-caption p {
    color: white;
    font-size: 1rem;
}

/* 章节标题 */
.section-title {
    color: var(--chinese-primary);
    font-family: 'Noto Serif SC', serif;
    font-weight: bold;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--chinese-secondary), transparent);
}

.section-title::before {
    content: '❖';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    margin-top: 5px;
    color: var(--chinese-secondary);
    font-size: 16px;
}

/* 卡片样式 */
.card {
    background: white;
    border: 1px solid rgba(139, 69, 19, 0.2);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--chinese-primary), var(--chinese-secondary));
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: var(--chinese-primary);
}

.card-title {
    font-family: 'Noto Serif SC', serif;
    color: var(--chinese-primary);
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(139, 69, 19, 0.1);
}

.card-text {
    color: var(--chinese-dark);
    line-height: 1.7;
}

/* 按钮样式 */
.btn {
    font-family: 'Noto Serif SC', serif;
    transition: all 0.3s;
    border-radius: 4px;
}

.btn-primary {
    background: var(--chinese-primary);
    border: 1px solid var(--chinese-accent);
    color: white;
}

.btn-primary:hover {
    background: var(--chinese-accent);
    border-color: var(--chinese-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

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

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

/* 快速链接 */
.quick-link {
    background: white;
    border: 1px solid rgba(139, 69, 19, 0.2);
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 30px;
    transition: all 0.3s;
    position: relative;
}

.quick-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--chinese-secondary);
}

.quick-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: var(--chinese-primary);
    background: rgba(139, 69, 19, 0.05);
}

.quick-link i {
    font-size: 2.5rem;
    color: var(--chinese-primary);
    margin-bottom: 15px;
    transition: all 0.3s;
}

.quick-link:hover i {
    color: var(--chinese-secondary);
    transform: scale(1.1);
}

.quick-link h4 {
    font-family: 'Noto Serif SC', serif;
    color: var(--chinese-primary);
    margin-bottom: 10px;
}

.quick-link p {
    color: var(--chinese-dark);
    margin-bottom: 20px;
}

/* 公告项 */
.announcement-item {
    background: white;
    border-left: 4px solid var(--chinese-primary);
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 0 8px 8px 0;
    transition: all 0.3s;
    position: relative;
}

.announcement-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -4px;
    width: 4px;
    height: 0;
    background: var(--chinese-secondary);
    transition: all 0.3s;
}

.announcement-item:hover::before {
    height: 100%;
}

.announcement-item:hover {
    background: rgba(139, 69, 19, 0.05);
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.announcement-item h6 {
    font-family: 'Noto Serif SC', serif;
    color: var(--chinese-primary);
    font-weight: bold;
    margin-bottom: 8px;
}

.announcement-item small {
    color: #666;
}

/* 家训区域 */
.motto-section {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.05), rgba(205, 92, 92, 0.05));
    padding: 50px 0;
    margin: 50px 0;
    position: relative;
    border: 1px solid rgba(139, 69, 19, 0.1);
}

.motto-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 100 Q 50 50, 100 100 Q 150 150, 200 100' stroke='%238B4513' stroke-width='1' fill='none' opacity='0.05'/%3E%3Cpath d='M100 0 Q 150 50, 100 100 Q 50 150, 100 200' stroke='%238B4513' stroke-width='1' fill='none' opacity='0.05'/%3E%3C/svg%3E");
}

.motto-section .card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(139, 69, 19, 0.3);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.motto-section blockquote {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--chinese-dark);
    border-left: 3px solid var(--chinese-secondary);
    padding-left: 20px;
    margin: 20px 0;
}

/* 家族谱系 */
.member-card {
    background: white;
    border: 1px solid rgba(139, 69, 19, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    transition: all 0.3s;
    position: relative;
}

.member-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--chinese-primary);
}

.member-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--chinese-primary);
}

.member-card h6 {
    font-family: 'Noto Serif SC', serif;
    color: var(--chinese-primary);
    font-weight: bold;
    margin-bottom: 10px;
}

.member-card small {
    color: #666;
}

/* 页脚 */
.footer {
    background: var(--chinese-primary);
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
    position: relative;
    border-top: 3px solid var(--chinese-secondary);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: url("data:image/svg+xml,%3Csvg width='100' height='10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 5 Q 25 0, 50 5 Q 75 10, 100 5' stroke='%23CD5C5C' stroke-width='2' fill='none'/%3E%3C/svg%3E") repeat-x;
    background-size: 100px 10px;
}

.footer h5 {
    font-family: 'Noto Serif SC', serif;
    color: var(--chinese-secondary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer p, .footer li {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.footer a:hover {
    color: var(--chinese-secondary);
    padding-left: 5px;
}

.footer hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

.footer .copyright {
    text-align: center;
    padding-top: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* 传统纹样装饰 */
.decorative-border {
    position: relative;
}

.decorative-border::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg width='80' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 10 Q 20 5, 40 10 Q 60 15, 80 10' stroke='%238B4513' stroke-width='1' fill='none'/%3E%3C/svg%3E");
}

/* 印章效果 */
.seal {
    display: inline-block;
    width: 80px;
    height: 80px;
    background: var(--chinese-secondary);
    color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Serif SC', serif;
    font-size: 14px;
    font-weight: bold;
    transform: rotate(-5deg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    position: relative;
}

.seal::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-brand::before {
        width: 32px;
        height: 32px;
        line-height: 32px;
        font-size: 10px;
    }
    
    .nav-link {
        padding: 10px 15px !important;
    }
    
    .page-header {
        padding: 40px 0;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .carousel-item {
        height: 300px;
    }
    
    .carousel-caption {
        bottom: 30px;
        padding: 20px;
    }
    
    .carousel-caption h5 {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .quick-link {
        padding: 20px 15px;
    }
    
    .quick-link i {
        font-size: 2rem;
    }
    
    .footer {
        padding: 30px 0 15px;
    }
}

@media (max-width: 576px) {
    .carousel-item {
        height: 200px;
    }
    
    .carousel-caption {
        bottom: 20px;
        padding: 15px;
    }
    
    .carousel-caption h5 {
        font-size: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .quick-link h4 {
        font-size: 1.1rem;
    }
}

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

.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

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

.ink-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0 Q 50 100, 100 200 Q 150 100, 200 0' stroke='%23000000' stroke-width='1' fill='none' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* 传统边框 */
.traditional-border {
    border: 1px solid rgba(139, 69, 19, 0.3);
    padding: 20px;
    position: relative;
}

.traditional-border::before,
.traditional-border::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
}

.traditional-border::before {
    top: -1px;
    left: -1px;
    border-top: 2px solid var(--chinese-secondary);
    border-left: 2px solid var(--chinese-secondary);
}

.traditional-border::after {
    bottom: -1px;
    right: -1px;
    border-bottom: 2px solid var(--chinese-secondary);
    border-right: 2px solid var(--chinese-secondary);
}

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

::-webkit-scrollbar-track {
    background: var(--chinese-light);
}

::-webkit-scrollbar-thumb {
    background: var(--chinese-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--chinese-accent);
}

/* 选择文字样式 */
::selection {
    background: var(--chinese-primary);
    color: white;
}

::-moz-selection {
    background: var(--chinese-primary);
    color: white;
}

/* 古典文字样式 */
.classical-text {
    font-family: 'Noto Serif SC', 'SimSun', serif;
    font-size: 1.1rem;
    line-height: 2;
    color: var(--chinese-dark);
    text-align: justify;
    text-indent: 2em;
    margin-bottom: 1.5rem;
}

.classical-text-large {
    font-family: 'Noto Serif SC', 'SimSun', serif;
    font-size: 1.25rem;
    line-height: 2;
    color: var(--chinese-dark);
    text-align: justify;
    text-indent: 2em;
    margin-bottom: 2rem;
}

/* 无首行缩进 */
.no-indent {
    text-indent: 0 !important;
}

.no-indent p {
    text-indent: 0 !important;
    margin-bottom: 1rem !important;
}

.classical-text h4 {
    font-size: 1.3rem;
    color: var(--chinese-primary);
    margin: 1.5rem 0 1rem;
    text-align: center;
    text-indent: 0;
    font-weight: bold;
}

.classical-text p {
    margin-bottom: 1rem;
}

/* 古典卡片样式 */
.classical-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.15);
    border: 1px solid rgba(139, 69, 19, 0.2);
    position: relative;
    overflow: hidden;
}

.classical-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--chinese-primary), var(--chinese-secondary), var(--chinese-primary));
}

.classical-card::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 80px;
    height: 80px;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 10 Q 40 0, 70 10 Q 80 40, 70 70 Q 40 80, 10 70 Q 0 40, 10 10' stroke='%238B4513' stroke-width='1' stroke-opacity='0.1' fill='none'/%3E%3C/svg%3E");
    opacity: 0.3;
    pointer-events: none;
}