/* style.css - 风格二：温暖复古与柔和色调 */

/* 定义颜色变量 */
:root {
    --color-primary-brown: #a0522d; /* 暖棕色 */
    --color-background-cream: #fbf8f0; /* 米白色 */
    --color-text-dark: #3a2e2a; /* 深棕色文字 */
}

body {
    font-family: 'Georgia', serif; /* 使用衬线字体增强复古感 */
    background-color: var(--color-background-cream); 
    color: var(--color-text-dark);
    line-height: 1.7;
}

/* 头部和导航 */
header {
    border-bottom: 1px solid #e9e5d4 !important;
}

.blog-header-logo {
    font-family: 'Times New Roman', serif;
    font-size: 2.5rem;
    font-style: italic;
    color: var(--color-primary-brown) !important;
}

a.blog-header-logo {
    text-decoration: none  !important;
    border: none  !important;
}

.nav-scroller {
    border-bottom: 2px dashed #d2c8ae !important; /* 虚线分隔，更柔和 */
}

.nav-link {
    font-weight: 400;
    color: var(--color-text-dark) !important;
    transition: color 0.3s;
}

.nav-link.active {
    /* 激活状态使用暖棕色 */
    border-bottom: 2px solid var(--color-primary-brown) !important;
    color: var(--color-primary-brown) !important;
}

/* 内容卡片 */
.card.shadow-sm {
    background-color: #ffffff;
    border: 1px solid #f0e9d6;
    border-radius: 8px; /* 略微圆角 */
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.05); /* 柔和的阴影 */
}

/* 友情链接 */
a {
    color: var(--color-primary-brown);
    text-decoration: underline;
    text-decoration-color: rgba(160, 82, 45, 0.5);
    padding: 0.5rem 0;
}

a:hover {
    color: #b0623d;
}

/* 页脚 */
footer {
    background-color: #f5f0e1 !important;
    border-top: 1px solid #d2c8ae;
    color: #6d5b4e !important;
}

footer a {
    color: var(--color-primary-brown);
}

/* 1. 默认展开状态的样式，或作为基线 */
.main-content {
    position: relative;
    overflow: visible;
    transition: max-height 0.5s ease-in-out; /* 平滑过渡效果 */
}

/* 2. 折叠状态 (默认显示 350px 高度) */
.main-content.collapsed {
    max-height: 650px; /* 设定初始高度 */
    overflow: hidden;
}

/* 3. 创建半透明渐变覆盖层，以提醒用户内容被截断 */
.main-content.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px; /* 渐变层的高度 */
    /* 模拟白色的淡出效果 */
    background: linear-gradient(to top, white 10%, rgba(255, 255, 255, 0.1) 100%); 
    pointer-events: none; /* 确保不影响内容点击 */
}

/* 4. 当内容展开时，移除渐变覆盖层 */
.main-content:not(.collapsed)::after {
    display: none;
}
