/* ============================================================
   九华山佛教协会 - 站点自定义样式
   基于 UIkit 框架，承载设计系统（颜色/字体/布局/组件）
   设计规范见 design/DESIGN.md
   ============================================================ */

/* ===== 设计 Token ===== */
:root {
    /* 颜色 - 佛教传统配色 */
    --primary: #514940;            /* 深藏红花色 - 主色 */
    --primary-container: #d4af37;  /* 金色容器 */
    --inverse-primary: #514940;    /* 高亮金 */
    --background: #E2E3E3;         /* 线香米白 - 背景 */
    --surface: #fff8ef;
    --surface-container-low: #E2E3E3;
    --surface-container: #f5edde;
    --surface-container-high: #efe7d9;
    --surface-container-highest: #E2E3E3;
    --surface-variant: #e9e2d3;
    --on-surface: #1e1b13;         /* 正文文字 */
    --on-surface-variant: #4d4635; /* 次级文字 */
    --outline: #7f7663;
    --outline-variant: #514940;    /* 描边色 */
    --secondary: #b52619;          /* 殿堂红 - 强调 */
    --secondary-container: #ff5c47;
    --on-primary: #ffffff;
    --inverse-surface: #343026;    /* 深色覆盖层 */
    --nav-brown: #514940;          /* 导航棕 */
    --temple-red: #b52619;

    /* 字体栈（不依赖 Google Fonts，使用系统字体） */
    --font-sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Helvetica, Arial, sans-serif;
    --font-serif: Georgia, "Songti SC", "STSong", "SimSun", "Times New Roman", serif;
    --font-kai: "STKaiti", "KaiTi", "楷体", Georgia, "Songti SC", serif;

    /* 圆角 */
    --radius-sm: 0.125rem;
    --radius: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-full: 9999px;

    /* 间距 */
    --container-max: 1200px;
    --margin-mobile: 16px;
    --margin-desktop: 64px;
    --section-gap: 80px;
    --gutter: 24px;
}

/* ===== 基础重置 ===== */
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--on-surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* 安全网：任何超宽内容不产生页面级横向滚动条 */
}

main { flex: 1 0 auto; }

a { text-decoration: none; color: inherit; }
a:hover { text-decoration: none; }

/* ===== 容器 ===== */
.site-container {
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--margin-mobile);
    padding-right: var(--margin-mobile);
}
@media (min-width: 960px) {
    .site-container {
        padding-left: var(--margin-desktop);
        padding-right: var(--margin-desktop);
    }
}

/* ===== 字体样式类 ===== */
.font-headline-lg { font-family: '微软雅黑'; font-size: 32px; font-weight: 600; line-height: 40px; margin:0px; }
.font-headline-md { font-family: '微软雅黑'; font-size: 24px; font-weight: 600; line-height: 32px; margin:0px;}
.font-display-lg  { font-family: var(--font-serif); font-size: 48px; font-weight: 700; line-height: 56px; letter-spacing: -0.02em; }
.font-body-lg     { font-family: var(--font-sans);  font-size: 18px; font-weight: 400; line-height: 28px; }
.font-body-md     { font-family: var(--font-sans);  font-size: 16px; font-weight: 400; line-height: 24px; }
.font-label-md    { font-family: var(--font-sans);  font-size: 14px; font-weight: 600; line-height: 20px; letter-spacing: 0.05em; }
.font-caption     { font-family: var(--font-sans);  font-size: 12px; font-weight: 400; line-height: 16px; }
.font-mono        { font-family: "SF Mono", "Menlo", "Consolas", monospace; }
.calligraphy-text { font-family: var(--font-kai); font-weight: 400; letter-spacing: 0.08em; }

/* ===== 颜色工具类 ===== */
.text-primary               { color: var(--primary); }
.text-secondary             { color: var(--secondary); }
.text-on-surface            { color: var(--on-surface); }
.text-on-surface-variant    { color: var(--on-surface-variant); }
.text-white                 { color: #ffffff; }
.bg-primary                 { background-color: var(--primary); }
.bg-surface-container-low   { background-color: var(--surface-container-low); }
.bg-surface-container-highest { background-color: var(--surface-container-highest); }
.bg-white                   { background-color: #ffffff; }

/* ============================================================
   HEADER 头部
   ============================================================ */

/* 顶部品牌栏 - 水墨纹理背景 */
.header-pattern {
    background-color: var(--background);
    /*background-image:
        linear-gradient(rgba(255, 248, 239, 0.92), rgba(255, 248, 239, 0.92)),
        url('../images/header-bg.png');*/
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
}
.topbar-brand {
    align-items: center;
    gap: 24px;
}
.logo-img {
    flex-shrink: 0;
    line-height: 0;
}
.logotxt {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.logotxt-cn {
    font-size: 40px;
    font-weight: 700;
    color: var(--primary);
    font-family: "微软雅黑";
    letter-spacing: 3px;
    line-height: 1.2;
}
.logotxt-en {
    font-size: 16px;
    color: var(--on-surface-variant);
    letter-spacing: 5.2px;
    margin-top: 6px;
    padding-left:20px;
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
}

.topbar-inner {
    height: 200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}

/* 顶部日期与搜索区 */
.topbar-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.topbar-datetime {
    font-size: 16px;
    color: var(--on-surface-variant);
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
}
.search-box {
    position: relative;
}
.search-box input {
    width: 288px;
    height: 40px;
    padding: 0 40px 0 16px;
    border: none;
    border-radius: var(--radius-full);
    background: #ffffff;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    outline: none;
}
.search-box input:focus {
    box-shadow: 0 0 0 2px var(--primary);
}
.search-box .search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    pointer-events: none;
    display: flex;
    align-items: center;
}

/* ===== 棕色导航栏 ===== */
.nav-bar {
    background-color: var(--nav-brown);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-item {
    padding: 12px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background-color 0.2s ease;
    position: relative;
}
.nav-item:hover { background-color: rgba(0, 0, 0, 0.1); }
.nav-item .nav-zh {
    color: #ffffff;
    font-weight: 600;
    font-size: 20px;
}
.nav-item .nav-en {
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
}
.nav-divider {
    width: 1px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.2);
    align-self: center;
}
/* 当前导航高亮 - 顶部金色细线 */
.nav-item.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background-color: var(--inverse-primary);
}

/* ===== 移动端导航（<960px）===== */
.mobile-nav { display: none; }
.nav-toggle { display: none; }

@media (max-width: 959px) {
    /* 隐藏桌面导航，显示移动端导航 */
    .nav-bar { display: none; }
    .mobile-nav { display: block; }

    /* 菜单按钮：置于顶部品牌栏右侧 */
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        background: none;
        border: none;
        color: var(--primary);
        cursor: pointer;
        padding: 4px;
        line-height: 0;
    }

    /* 下拉菜单：默认收起，添加 .open 展开 */
    .mobile-nav-menu {
        display: none;
        flex-direction: column;
        padding: 0 var(--margin-mobile) 12px;
        background-color: var(--surface-container-low);
        border-bottom: 1px solid var(--outline-variant);
    }
    .mobile-nav-menu.open { display: flex; }
    .mobile-nav-search { padding: 8px 0 12px; }
    .mobile-nav-search .search-box input { width: 100%; }

    /* 克隆自桌面 .nav-list 的菜单项改为垂直排列，文字用通知公告主色 */
    .mobile-nav-list { display: flex; flex-direction: column; }
    .mobile-nav-list .nav-item {
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 8px;
        border-bottom: 1px solid rgba(208, 197, 175, 0.3);
    }
    .mobile-nav-list .nav-item:last-child { border-bottom: none; }
    .mobile-nav-list .nav-divider { display: none; }
    .mobile-nav-list .nav-item .nav-zh {
        color: var(--primary);
        font-size: 16px;
    }
    .mobile-nav-list .nav-item .nav-en {
        color: var(--primary);
        opacity: 0.7;
        font-size: 11px;
    }
    .mobile-nav-list .nav-item.active::before { display: none; }
    .mobile-nav-list .nav-item.active { background-color: rgba(115, 92, 0, 0.08); }

    /* 顶部品牌栏缩放 */
    .topbar-inner {
        height: auto;
        min-height: 96px;
        padding: 12px 0;
    }
    /* 修复 600px logo 导致的横向溢出：flex 子项默认 min-width:auto 不可收缩，
       放开收缩限制后图片才能被 max-width 约束在容器内 */
    .topbar-brand, .logotxt { min-width: 0; }
    .logotxt-cn img { max-width: 100%; height: auto; }
    .topbar-brand { gap: 12px; }
    .topbar-brand .logo-img img {
        width: 64px;
        height: 96px;
    }
    .logotxt-cn { font-size: 22px; letter-spacing: 1px; }
    .logotxt-en { font-size: 10px; letter-spacing: 1px; margin-top: 4px; }
    /* 搜索框与日期已移入菜单，顶部隐藏 */
    .topbar-meta { display: none; }

    /* 首页大标题移动端缩小，避免 40px 字号在窄屏上占比过大 */
    .headnews { font-size: 22px; line-height: 1.4; }
    .headnews .more img { width: 24px; }

    /* 友情链接（合作单位）移动端隐藏 */
    .friendlink { display: none; }
}

/* ============================================================
   通用区块
   ============================================================ */
.section {
    padding-top: 28px;
    /*padding-bottom: 48px;*/
}

.headnews {
    text-align:center;
    margin-bottom:30px;
    font-size:40px;
    color:#000000;
    font-weight:600;
    /* 最多显示 2 行，超出省略 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.headnews .more{
    margin-left: 4px;
}
.headnews .more img{
    width:36px;
    margin-top:-5px;
}

/* 区块标题行 */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    margin-bottom: 30px;
    border-bottom: 1px solid #757475;
}
.section-head.has-bar {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
}
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary);
}
.section-title .title-bar {
    display: inline-block;
    width: 4px;
    height: 28px;
    background-color: var(--primary);
    border-radius: var(--radius-sm);
}
.section-title .title-bar-sm {
    display: inline-block;
    width: 4px;
    height: 24px;
    background-color: var(--primary);
    border-radius: var(--radius-sm);
}
.more-link {
    display: flex;
    align-items: center;
    color: var(--on-surface-variant);
    transition: color 0.2s ease;
}
.more-link:hover { color: var(--primary); }
.more-link .uk-icon { margin-left: 4px; }

/* ============================================================
   通知公告区
   ============================================================ */
.notice-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}
@media (min-width: 960px) {
    .notice-grid { grid-template-columns: 8fr 4fr; }
}

/* 公告列表 */
.notice-list { display: flex; flex-direction: column; gap: 8px; }
.notice-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(208, 197, 175, 0.3);
    padding-bottom: 16px;
}
.notice-item:last-child { border-bottom: none; padding-bottom: 8px; }
.notice-item .notice-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.notice-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background-color: var(--secondary);
    flex-shrink: 0;
}
.notice-title {
    color: var(--on-surface);
    font-size: 18px;
    line-height: 28px;
    transition: color 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin:0px;
    padding-top:10px;
}
.group:hover .notice-title { color: var(--primary); }
.notice-date {
    color: var(--on-surface-variant);
    font-family: "Arial";
    font-size: 14px;
    flex-shrink: 0;
    margin-left: 16px;
}

/* 右侧图片卡片 */
.image-cards { display: flex; flex-direction: column; gap: 16px; }
.image-card {
    position: relative;
    height: 105px;
    border-radius: var(--radius);
    overflow: hidden;
}
.image-card .card-fill {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-card .card-label {
    color: #ffffff;
    font-family: "微软雅黑";
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.2em;
}
.image-card .card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}
.image-card:hover .card-overlay { background-color: rgba(0, 0, 0, 0.4); }
.image-card .card-overlay .card-label { text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }

/* 卡片左右并排（办事大厅 / 教职人员查询） */
.image-card-row {
    display: flex;
    flex-direction: row;
    gap: 16px;
}
.image-card-row .image-card {
    flex: 1 1 0;
    min-width: 0;
}
.image-card-row .card-label {
    font-size: 18px;
    letter-spacing: 0.15em;
    text-align: center;
    padding: 0 6px;
}

/* ============================================================
   佛协资讯区
   ============================================================ */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: stretch;
}
@media (min-width: 1024px) {
    .news-grid { grid-template-columns: 2fr 1fr; }
}

/* 左侧轮播图：移动端按图片原始比例（4:3）自适应高度，不拉伸不裁切 */
.news-carousel {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
@media (min-width: 1024px) {
    .news-carousel { height: 500px; aspect-ratio: auto; }
}


.news-carousel .carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}
.news-carousel .carousel-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.news-carousel .carousel-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}
.news-carousel:hover .carousel-bg { transform: scale(1.05); }
.news-carousel .carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(52, 48, 38, 0.8), transparent 60%);
}
.news-carousel .carousel-caption {
    position: absolute;
    bottom: 24px;
    left: 24px;
    right: 24px;
}
.news-carousel .carousel-caption h3 {
    color: #ffffff;
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* 左右切换按钮 */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: background 0.3s ease, opacity 0.3s ease;
}
.news-carousel:hover .carousel-arrow { opacity: 1; }
.carousel-arrow:hover { background: rgba(0, 0, 0, 0.55); }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

/* 轮播点 */
.carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 20;
}
.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    padding: 0;
}
.carousel-dot.active   { background-color: #ffffff; width: 24px; }
.carousel-dot.inactive { background-color: rgba(255, 255, 255, 0.5); }

/* 右侧新闻列表 */
.news-list {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.news-item {
    display: flex;
    align-items: center;
    padding-top: 15px;
    border-bottom: 1px solid rgba(208, 197, 175, 0.3);
    transition: background-color 0.2s ease;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background-color: var(--surface-container-low); }
.news-item .date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}
.date-box-num {
    color: var(--primary-container);
    font-weight: 700;
    font-size: 28px;
    line-height: 1;
}
.news-item .date-month {
    color: var(--on-surface-variant);
    font-size: 12px;
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
    margin-top: 4px;
}
.news-item .news-sep {
    width: 1px;
    height: 48px;
    background-color: rgba(208, 197, 175, 0.5);
}
.news-item .news-title {
    font-family: var(--font-sans);
    font-size: 18px;
    line-height: 28px;
    color: var(--on-surface);
    flex: 1;
    transition: color 0.2s ease;
    /* 单行显示，超出省略（overflow:hidden 同时使 flex 子项可正常收缩） */
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
.group:hover .news-title { color: var(--primary); }

/* ============================================================
   三栏资源区
   ============================================================ */
.resources-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}
@media (min-width: 960px) {
    .resources-grid { grid-template-columns: repeat(3, 1fr); }
}

.newsclass-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}
@media (min-width: 960px) {
    .newsclass-grid { grid-template-columns: repeat(2, 1fr); }
}

.resource-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.resource-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(115, 92, 0, 0.2);
    padding-bottom: 12px;
}
.resource-head .section-title { gap: 8px; }
.resource-img-wrap {
    overflow: hidden;
    border-radius: var(--radius);
}
.resource-img {
    width: 100%;
    height: 192px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}
.group:hover .resource-img { transform: scale(1.05); }
.resource-title {
    font-family: "微软雅黑";
    font-size: 20px;
    font-weight: 400;
    color: var(--on-surface);
    margin-top: 16px;
    line-height: 1.6;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.group:hover .resource-title { color: "微软雅黑"; }

.resource-sub-list { display: flex; flex-direction: column; gap: 16px; }
.resource-sub-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}
.resource-sub-item.bordered {
    border-top: 1px solid rgba(208, 197, 175, 0.3);
    padding-top: 12px;
}
.resource-sub-text {
    color: "微软雅黑";
    font-size: 14px;
    flex: 1;
    display: flex;
    align-items: flex-start;
    transition: color 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.resource-sub-text .sub-bullet {
    display: inline-block;
    color: var(--primary);
    margin: 6px 8px 0 0;
    font-size: 12px;
    flex-shrink: 0;
}
.group:hover .resource-sub-text { color: var(--primary); }
.resource-sub-date {
    font-size: 12px;
    color: rgba(127, 118, 99, 0.7);
    font-family: "Arial";
    white-space: nowrap;
    padding-top: 4px;
}

/* ============================================================
   九华圣境（寺院网格）
   ============================================================ */
.scenic-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
@media (min-width: 960px) {
    .scenic-grid { grid-template-columns: repeat(4, 1fr); }
}
.scenic-card { cursor: pointer; }
.scenic-img-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
}
.scenic-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}
.group:hover .scenic-img { transform: scale(1.05); }
.scenic-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(52, 48, 38, 0.6), transparent 60%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 12px;
}
.scenic-img-overlay .overlay-label {
    color: #ffffff;
    font-size: 18px;
    font-family: var(--font-serif);
    font-weight: 600;
    letter-spacing: 0.2em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.scenic-label {
    text-align: center;
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
    color: var(--on-surface);
    transition: color 0.3s ease;
}
.group:hover .scenic-label { color: var(--primary); }

/* ============================================================
   专题回顾
   ============================================================ */
.topics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}
@media (min-width: 960px) {
    .topics-grid { grid-template-columns: repeat(3, 1fr); }
}
.topic-card {
    position: relative;
    height: 192px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: block;
}
.topic-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.topic-card:hover img { transform: scale(1.05); }
.topic-card .topic-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(52, 48, 38, 0.8), transparent 60%);
}
.topic-card .topic-caption {
    position: absolute;
    bottom: 1px;
    left: 16px;
    right: 16px;
}
.topic-card .topic-caption h3 {
    color: #ffffff;
    font-family: '微软雅黑';
    font-size: 18px;
    font-weight: 400;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   页脚
   ============================================================ */
.footer {
    background-color: var(--surface-container-low);
    padding-bottom: 48px;
    border-top: 1px solid rgba(208, 197, 175, 0.3);
}

/* 友情链接 logo 网格 */
.friendlink{
    margin-top:10px;
    background-color: var(--surface-container-low);
}
.partners-link {
    text-align:center;
    margin-bottom: 28px;
}
.partners-link a{
    margin:0px 20px;
}
.partners-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 48px;
}
@media (min-width: 960px) {
    .partners-grid { grid-template-columns: repeat(6, 1fr); }
}
.partner-logo {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    height: 80px;
    overflow: hidden;
}
.partner-logo:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: var(--primary-container);
}
/* 图片填充整个容器并允许拉伸变形（不保持宽高比） */
.partner-logo img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
}

/* 页脚信息区 */
.footer-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 32px;
}
@media (min-width: 960px) {
    /* 左右两列布局：左侧 2/3，右侧 1/3 */
    .footer-info-grid { grid-template-columns: 8fr 1fr; align-items: center; }
    /* 合并后的信息区：桌面端分为三行，每行内横向排列并居中 */
    .footer-info-list.footer-info-merged {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
    }
    .footer-info-list.footer-info-merged .footer-info-row {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 6px 22px;
    }
}
.footer-info-list { display: flex; flex-direction: column; gap: 8px; align-items: center; }
/* 信息分组行：移动端竖向排列并居中，桌面端由媒体查询改为横向 */
.footer-info-list .footer-info-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.footer-info-list p {
    color: var(--on-surface-variant);
    font-size: 14px;
    margin:0px;
    text-align: center;
}
.footer-info-list .inline-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--on-surface-variant);
}
.footer-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.footer-qr .qr-box {
    width: 96px;
    /*background: #ffffff;*/
    padding: 4px;
    border: 1px solid rgba(208, 197, 175, 0.3);
    border-radius: var(--radius-sm);
}
.footer-qr .qr-inner {
    width: 100%;
    height: 88px;
    background-color: var(--surface-container-highest);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(115, 92, 0, 0.3);
}
/* 二维码下方说明文字，居中显示 */
.footer-qr > div:not(.qr-box) {
    text-align: center;
    margin-top: 8px;
    color: var(--on-surface-variant);
    font-size: 12px;
    line-height: 1.4;
}

/* ============================================================
   工具类
   ============================================================ */
.hidden { display: none; }
.text-center { text-align: center; }
.overflow-hidden { overflow: hidden; }
.drop-shadow { text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }

/* ============================================================
   文章详情页（article.php）
   ============================================================ */

/* 带底部分隔线的 section 变体 */
.section-bordered {
    padding-bottom: 48px;
    /*border-bottom: 1px solid var(--outline-variant);*/
}

/* 详情卡片容器 */
.detail-content {
    background-color: #f5f5f5;
    /*border: 1px solid var(--outline-variant);*/
    border-radius: var(--radius-lg);
    padding: 32px 20px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}
@media (min-width: 960px) {
    .detail-content { padding: 48px 56px; }
}

/* 详情内层：标题+日期+正文+附件，限宽居中以提升阅读体验 */
.detail-inner {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* 文章标题 */
.detail-name {
    font-family: var(--font-sans);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--on-surface);
    text-align: center;
    margin: 0 0 16px;
}
@media (min-width: 960px) {
    .detail-name { font-size: 28px; }
}

/* 发布日期 */
.detail-date {
    display: block;
    font-size: 13px;
    color: var(--on-surface-variant);
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--outline-variant);
}

/* 正文区 */
.article-content {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.8;
    color: var(--on-surface);
    word-break: break-word;
}
.article-content p {
    margin: 0 0 15px;
}
.article-content img {
    max-width: 100%;
    height: auto;
}

/* 附件区（无附件时不占位） */
.article-files {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed var(--outline-variant);
}
.article-files:empty {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* 上一篇 / 下一篇 链接行 */
.link-line {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--outline-variant);
}
.link-line div{
    display: block;
    padding: 12px 16px;
    background-color: var(--surface-container-low);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-md);
    color: var(--on-surface);
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
    text-align: left;   /* 上一篇默认左对齐 */
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.link-line div:hover {
    background-color: var(--surface-container);
    border-color: var(--primary);
    color: var(--primary);
}
/* 下一篇（末项）文本居右对齐 */
.link-line div:last-child {
    text-align: right;
}
/* 桌面端：上一篇与下一篇左右排列，下一篇按钮推到最右侧 */
@media (min-width: 960px) {
    .link-line { flex-direction: row; gap: 16px; }
    .link-line div:last-child { margin-left: auto; }
}

/* 单行省略工具类 */
.over_one_line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   地藏文化 - 栏目页（culture.php）
   ============================================================ */

/* 页面 Banner */
.page-banner {
    position: relative;
    height: 260px;
    overflow: hidden;
}
@media (min-width: 960px) {
    .page-banner { height: 320px; }
}
.page-banner-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
}
.page-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(52, 48, 38, 0.5), rgba(52, 48, 38, 0.72));
}
.page-banner-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}
.page-banner-deco {
    display: block;
    width: 64px;
    height: 3px;
    background-color: var(--inverse-primary);
    margin-bottom: 22px;
    border-radius: 2px;
}
.page-banner-title {
    font-family: "微软雅黑";
    font-size: 42px;
    font-weight: 400;
    color: #FFFFFF;
    letter-spacing: 0.2em;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
@media (min-width: 960px) {
    .page-banner-title { font-size: 56px; }
}
.page-banner-sub {
    margin-top: 14px;
    font-size: 13px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
}

/* 面包屑 */
.breadcrumb-bar {
    background-color: var(--surface-container-low);
    border-bottom: 1px solid var(--outline-variant);
}
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 14px;
    padding-bottom: 14px;
    font-size: 14px;
    color: var(--on-surface-variant);
}
.crumb-link { color: var(--on-surface-variant); transition: color 0.2s ease; }
.crumb-link:hover { color: var(--primary); }
.crumb-sep { color: var(--outline-variant); }
.crumb-current { color: var(--primary); font-weight: 600; }

/* 栏目布局 */
.channel-section { padding-top: 40px; padding-bottom: 56px; }
.channel-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
}
@media (min-width: 960px) {
    .channel-layout { grid-template-columns: 280px 1fr; gap: 40px; }
}

/* 左侧栏目分类 */
.channel-sidebar {
    background-color: #E2E3E3;
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}
.channel-sidebar-head {
    background: linear-gradient(135deg, var(--nav-brown), #5e2712);
    padding: 24px 20px;
    text-align: center;
    color: #ffffff;
}
.channel-sidebar-title {
    font-family: "微软雅黑";
    font-size: 32px;
    color: #FFFFFF;
    font-weight: 400;
    letter-spacing: 0.15em;
    margin: 0;
}
.channel-sidebar-sub {
    margin-top: 6px;
    font-size: 12px;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.75);
}
.channel-nav { list-style: none; margin: 0; padding: 8px 0; }
.channel-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-left: 3px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.channel-nav-bar {
    width: 4px;
    height: 4px;
    border-radius: var(--radius-full);
    background-color: var(--primary-container);
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}
.channel-nav-text {
    flex: 1;
    font-size: 16px;
    color: var(--on-surface);
    transition: color 0.2s ease;
}
.channel-nav-arrow {
    width: 12px;
    height: auto;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.channel-nav-item:hover { background-color: var(--surface-container-low); }
.channel-nav-item:hover .channel-nav-text { color: var(--primary); }
.channel-nav-item:hover .channel-nav-arrow { opacity: 0.8; transform: translateX(2px); }
.channel-nav-item.active {
    background-color: #E2E3E3;
    border-left-color: var(--primary);
}
.channel-nav-item.active .channel-nav-text { color: var(--primary); font-weight: 600; }
.channel-nav-item.active .channel-nav-bar { background-color: var(--primary); }

/* 左侧装饰卡 */
.channel-sidebar-card {
    position: relative;
    margin: 16px;
    border-radius: var(--radius);
    overflow: hidden;
}
.channel-sidebar-img { width: 100%; height: 140px; object-fit: cover; display: block; }
.channel-sidebar-card-body {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(52, 48, 38, 0.2), rgba(52, 48, 38, 0.62));
    color: #ffffff;
    text-align: center;
}
.channel-sidebar-card-title {
    font-family: var(--font-kai);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.2em;
    margin: 0;
}
.channel-sidebar-card-text {
    margin-top: 6px;
    font-size: 13px;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.92);
}

/* 右侧文章列表 */
.channel-content { min-width: 0; }
.channel-content-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 14px;
    margin-bottom: 8px;
}
.channel-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    color: var(--on-surface-variant);
    margin-left: auto;
}
.channel-content-title {
    font-family: "微软雅黑";
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
}
.channel-content-title .title-bar {
    display: inline-block;
    width: 4px;
    height: 24px;
    background-color: var(--primary);
    border-radius: var(--radius-sm);
    margin-right: 12px;
}
.channel-content-desc {
    margin: 10px 0 0;
    padding-left: 16px;
    font-size: 14px;
    color: var(--on-surface-variant);
    line-height: 1.6;
}

.article-list { display: flex; flex-direction: column; }
.article-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 4px;
    border-bottom: 1px dashed var(--outline-variant);
    transition: background-color 0.2s ease;
}
.article-item:last-child { border-bottom: none; }
.article-item:hover { background-color: var(--surface-container-low); }
.article-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background-color: var(--primary-container);
    flex-shrink: 0;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.article-item:hover .article-dot { background-color: var(--primary); transform: scale(1.3); }
.article-title {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--on-surface);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}
.article-item:hover .article-title { color: var(--primary); }
.article-date {
    flex-shrink: 0;
    font-size: 13px;
    color: var(--on-surface-variant);
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
}
.page-btn {
    min-width: 16px;
    height: 26px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-sm);
    /*background-color: #ffffff;*/
    color: var(--on-surface-variant);
    font-size: 14px;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.page-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background-color: var(--surface-container-low);
}
.page-btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    font-weight: 600;
}
.page-btn.disabled {
    color: var(--outline-variant);
    cursor: not-allowed;
    pointer-events: none;
    background-color: var(--surface-container-low);
}
.page-ellipsis {
    display: inline-flex;
    align-items: center;
    color: var(--on-surface-variant);
    padding: 0 4px;
}

/* 移动端：栏目分类横向滚动 */
@media (max-width: 959px) {
    .channel-nav { display: flex; overflow-x: auto; padding: 8px 12px; gap: 4px; }
    .channel-nav li { flex-shrink: 0; }
    .channel-nav-item {
        padding: 10px 16px;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: var(--radius);
    }
    .channel-nav-item.active { border-left: none; border-bottom-color: var(--primary); }
    .channel-nav-bar { display: none; }
    .channel-nav-arrow { display: none; }
    .channel-sidebar-card { display: none; }
    .page-banner-title { font-size: 34px; letter-spacing: 0.14em; color: #ffffff; }
    .page-banner-sub { font-size: 11px; letter-spacing: 0.2em; }
}
