/* 学易之路、参禅悟道、易学基础等内容页面统一样式 */

/* 整体容器优化 - 与书生著作风格保持一致 */
.content-pages-container {
    background: #ede7d9;
    padding: 30px 0 28px; /* 收紧与页脚衔接，避免底缘大块宣纸空白 */
    min-height: 800px;
}

/* 页面主容器背景 */
/* 注意：不能用 .w_100.over_f 误伤 .logo/.nav/.copy(页脚) 的背景图 */
.w_100.over_f:not(.logo):not(.nav):not(.copy) {
    background: #ede7d9;
}

/* k-content 内容区域优化 */
.k-content {
    position: relative;
    padding-bottom: 40px;
}

/* 内容区域容器 */
.div_03_in {
    padding-top: 30px;
    padding-bottom: 50px;
}

/* 顶部标签导航优化 - 大气的设计 */
.k-tab {
    display: flex;
    display: -webkit-flex;
    gap: 10px;
    margin: 0 0 20px;
    box-shadow: 0 4px 12px rgba(129, 96, 63, 0.15);
    padding: 0;
}

.k-tab a {
    flex: 1;
    min-width: 0;
    padding: 16px 8px;
    color: #603811;
    background: linear-gradient(135deg, #e8dcc8 0%, #d4c4a8 100%);
    font-size: 17px; /* sync with .yi-nav li; fit-ktab may shrink */
    font-weight: 500;
    text-align: center;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    letter-spacing: 0;
    white-space: nowrap;
    box-sizing: border-box;
    font-family: "Noto Sans SC", "Source Han Sans SC", sans-serif;
}

.k-tab a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.k-tab a:hover::before {
    left: 100%;
}

.k-tab a:hover {
    background: linear-gradient(135deg, #be8853 0%, #a67543 100%);
    color: #fff;
    border-color: #81603f;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(129, 96, 63, 0.3);
}

.k-tab a.active {
    background: linear-gradient(135deg, #81603f 0%, #603811 100%);
    color: #fff;
    border-color: #603811;
    box-shadow: 0 6px 16px rgba(96, 56, 17, 0.4);
    transform: scale(1.02);
}

/* 面包屑导航优化 */
.mbx {
    margin-top: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid #d4c4a8;
    padding: 12px 18px;
    background: #f8f5ed; /* 修改为非白色 */
    border-radius: 6px 6px 0 0;
}

.mbx a {
    display: inline-block;
    color: #be8853;
    font-weight: 500;
    transition: color 0.3s;
}

.mbx a:hover {
    color: #603811;
    text-decoration: underline;
}

/* Banner区域优化 */
.content-banner {
    position: relative;
    height: 420px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.content-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1;
}

.content-banner-title {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
}

.content-banner-title h1 {
    font-size: 48px;
    font-weight: bold;
    letter-spacing: 6px;
    margin-bottom: 18px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    font-family: "LXGW WenKai", "Noto Serif SC", serif;
}

.content-banner-title p {
    font-size: 18px;
    letter-spacing: 3px;
    opacity: 0.95;
    font-family: "LXGW WenKai", "Noto Serif SC", serif;
}

/* 左侧导航栏优化 */
.yi-nav {
    float: left;
    width: 200px;
    background: #f8f5ed; /* 修改为非白色 */
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(129, 96, 63, 0.1);
    overflow: hidden;
    padding: 0;
    margin: 0;
    list-style: none;
}

.yi-nav li {
    border-bottom: 1px solid #e4d4be;
    font-size: 17px;
    color: #be8853;
    cursor: pointer;
    padding: 18px 64px 18px 24px;
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.5;
    margin: 0;
}

.yi-nav li:first-child {
    border-top: none;
}

.yi-nav li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #be8853;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.yi-nav li:hover,
.yi-nav li.active {
    background: linear-gradient(90deg, #f9f6f0 0%, #fff 100%);
    color: #603811;
    border-color: #be8853;
    font-weight: 600;
}

.yi-nav li:hover::before,
.yi-nav li.active::before {
    transform: scaleY(1);
}

/* 导航栏文字样式 */
.yi-nav li a {
    font-size: 17px;
    font-weight: 500;
    color: inherit;
    letter-spacing: 2px;
    font-family: "Noto Sans SC", "Source Han Sans SC", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
}

/* 文章列表容器 */
.yi-box {
    overflow: hidden;
    margin-bottom: 80px;
}

/* 无侧边栏的列表容器（书生案例、学员心得等） */
.k-list-box:not(.yi-box) {
    overflow: hidden;
    margin-bottom: 60px;
}

.k-list-box:not(.yi-box) .item {
    overflow: hidden;
    padding: 20px;
    background: #f8f5ed; /* 修改为非纯白 */
    margin-top: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    border-radius: 12px;
    border: 2px solid #e8dcc8;
    box-shadow: 0 6px 20px rgba(129, 96, 63, 0.12);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.k-list-box:not(.yi-box) .item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #be8853, #81603f, #be8853);
    opacity: 0;
    transition: opacity 0.4s;
}

.k-list-box:not(.yi-box) .item:hover::before {
    opacity: 1;
}

.k-list-box:not(.yi-box) .item:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 16px 40px rgba(129, 96, 63, 0.2);
    border-color: #be8853;
}

.k-list-box:not(.yi-box) img {
    flex-shrink: 0;
    width: 120px;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    border: 2px solid #e8dcc8;
}

.k-list-box:not(.yi-box) .item:hover img {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(129, 96, 63, 0.25);
    border-color: #be8853;
}

.k-list-box:not(.yi-box) .k-info {
    flex: 1;
    min-width: 0;
}

.k-list-box:not(.yi-box) .k-info .name {
    font-size: 20px;
    font-weight: bold;
    color: #603811;
    margin-bottom: 12px;
    line-height: 1.4;
    font-family: "Noto Sans SC", "Source Han Sans SC", sans-serif;
    transition: color 0.3s;
}

.k-list-box:not(.yi-box) .item:hover .k-info .name {
    color: #be8853;
}

.k-list-box:not(.yi-box) .k-info .info {
    font-size: 14px;
    line-height: 26px;
    color: #666;
    text-indent: 2em;
    text-align: justify;
    word-break: break-word;
    margin-top: 12px;
}

.k-list-box:not(.yi-box) .k-info .info a {
    color: inherit;
    transition: color 0.3s;
}

.yi-box .item-box {
    width: 860px;
    float: right;
}

/* 文章卡片样式 - 与书生著作保持一致 */
.yi-box .item {
    overflow: hidden;
    padding: 20px;
    background: #f8f5ed; /* 修改为非纯白 */
    margin-top: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    border-radius: 12px;
    border: 2px solid #e8dcc8;
    box-shadow: 0 6px 20px rgba(129, 96, 63, 0.12);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.yi-box .item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #be8853, #81603f, #be8853);
    opacity: 0;
    transition: opacity 0.4s;
}

.yi-box .item:hover::before {
    opacity: 1;
}

.yi-box .item:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 16px 40px rgba(129, 96, 63, 0.2);
    border-color: #be8853;
}

/* 文章缩略图 */
.yi-box img {
    flex-shrink: 0;
    width: 140px;
    height: auto;
    max-height: 180px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    border: 2px solid #e8dcc8;
    transform-origin: left center;
}

.yi-box .item:hover img {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(129, 96, 63, 0.25);
    border-color: #be8853;
}

/* 文章信息区域 */
.yi-box .k-info {
    flex: 1;
    min-width: 0;
}

/* 文章标题 */
.yi-box .k-info .name {
    font-size: 20px;
    font-weight: bold;
    color: #603811;
    margin-bottom: 12px;
    line-height: 1.4;
    font-family: "Noto Sans SC", "Source Han Sans SC", sans-serif;
    transition: color 0.3s;
}

.yi-box .item:hover .k-info .name {
    color: #be8853;
}

.yi-box .k-info .name a {
    color: inherit;
    transition: color 0.3s;
}

/* 文章摘要 */
.yi-box .k-info .info {
    font-size: 14px;
    line-height: 24px;
    color: #666;
    text-align: justify;
    word-break: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 文章元信息（时间、分类等） */
.yi-box .k-info .meta {
    margin-top: 12px;
    font-size: 12px;
    color: #999;
    display: flex;
    gap: 15px;
    align-items: center;
}

.yi-box .k-info .meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.yi-box .k-info .meta span::before {
    content: '•';
    color: #be8853;
}

/* 分页组件 - 全站统一样式 */
.k-page {
    text-align: center;
    margin-top: 24px;
    margin-bottom: 20px;
    padding: 8px 0;
}

.k-page a {
    display: inline-block;
    min-width: 32px;
    height: 32px;
    margin: 0 4px;
    padding: 0 11px;
    box-sizing: border-box;
    line-height: 30px;
    border: 1px solid #d7d1c5;
    color: #5c4a38;
    font-size: 13px;
    font-weight: 500;
    border-radius: 3px;
    background: #f8f5ed;
    text-decoration: none;
    box-shadow: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.k-page a:hover,
.k-page a.active {
    background: #5c4a38 !important;
    color: #fff !important;
    border-color: #5c4a38 !important;
    box-shadow: none;
    transform: none;
}

/* 响应式优化 */
@media screen and (max-width: 1200px) {
    .yi-nav {
        width: 180px;
    }

    .yi-box .item-box {
        width: calc(100% - 200px);
    }

    .yi-box img {
        width: 120px;
        max-height: 150px;
    }

    .yi-box .k-info .name {
        font-size: 18px;
    }
}

@media screen and (max-width: 768px) {
    .content-banner {
        height: 280px;
    }

    .content-banner-title h1 {
        font-size: 32px;
        letter-spacing: 4px;
    }

    /* 顶部标签导航响应式 */
    .k-tab {
        flex-wrap: wrap;
        gap: 8px;
    }

    .k-tab a {
        flex-basis: calc(50% - 4px);
        padding: 16px 18px;
        font-size: 15px;
    }

    .yi-nav {
        float: none;
        width: 100%;
        margin-bottom: 20px;
    }

    .yi-box .item-box {
        width: 100%;
        float: none;
    }

    .yi-box .item {
        flex-direction: column;
        align-items: flex-start;
    }

    .yi-box img {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.yi-box .item {
    animation: fadeInUp 0.5s ease-out;
}

.yi-box .item:nth-child(1) { animation-delay: 0.05s; }
.yi-box .item:nth-child(2) { animation-delay: 0.1s; }
.yi-box .item:nth-child(3) { animation-delay: 0.15s; }
.yi-box .item:nth-child(4) { animation-delay: 0.2s; }
.yi-box .item:nth-child(5) { animation-delay: 0.25s; }

/* 书法风格装饰元素 */
.content-decoration {
    position: relative;
}

.content-decoration::before,
.content-decoration::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M10,10 L25,10 L25,25 M75,10 L90,10 L90,25 M10,75 L10,90 L25,90 M75,90 L90,90 L90,75" fill="none" stroke="%23be8853" stroke-width="2"/></svg>');
    background-size: contain;
    opacity: 0.3;
}

.content-decoration::before {
    top: -8px;
    left: -8px;
}

.content-decoration::after {
    bottom: -8px;
    right: -8px;
    transform: rotate(180deg);
}

/* 平滑的内容切换动画 */
.k-list-box {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 优化section切换动画 */
.item-box section {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 排盘页面顶部标签优化 */
.top_tab {
    margin-bottom: 15px;
}

.top_tab ul {
    display: flex;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(129, 96, 63, 0.15);
    padding: 0;
    margin: 0;
    list-style: none;
}

.top_tab ul li {
    flex: 1;
}

.top_tab ul li a {
    display: block;
    padding: 14px 18px;
    color: #603811;
    background: linear-gradient(135deg, #e8dcc8 0%, #d4c4a8 100%);
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    letter-spacing: 1.5px;
    font-family: "Noto Sans SC", "Source Han Sans SC", sans-serif;
}

.top_tab ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.top_tab ul li a:hover::before {
    left: 100%;
}

.top_tab ul li a:hover {
    background: linear-gradient(135deg, #be8853 0%, #a67543 100%);
    color: #fff;
    border-color: #81603f;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(129, 96, 63, 0.3);
}

/* 面包屑导航 - 排盘页面专用 */
.crumb {
    margin-bottom: 20px;
    font-size: 13px;
    color: #666;
    border-bottom: 2px solid #d4c4a8;
    padding: 10px 16px;
    background: #ede7d9; /* 修改为统一底色 */
    border-radius: 6px 6px 0 0;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap; /* 强制不换行 */
    white-space: nowrap; /* 防止文本换行 */
    overflow: hidden; /* 防止溢出 */
}

.crumb a {
    color: #be8853;
    font-weight: 500;
    transition: color 0.3s;
    display: inline-block;
}

.crumb a:hover {
    color: #603811;
    text-decoration: underline;
}

.crumb span {
    color: #603811;
    font-weight: 600;
}
