/* ========== 共享基础 ========== */

/* 页脚根容器（主题背景、前景令牌与文字色） */
.site-footer,
.site-footer__shell {
    /* 页脚前景令牌（主题深底上的文字与分隔色，随容器作用域生效） */
    --site-footer-text: #fff;
    --site-footer-divider: rgb(255 255 255 / 28%);
    --site-footer-placeholder-border: rgb(255 255 255 / 50%);
    --site-footer-placeholder-bg: rgb(255 255 255 / 12%);

    clear: both;
    background: var(--website-primary);
    background-repeat: repeat-x;
    color: var(--site-footer-text);
}

/* 页脚 CMS 面板与窗口（实体化承载层级，作为 CMS 组件拖放落点，供编辑器放置组件） */
.site-footer__panel,
.site-footer__window,
.site-footer__content {
    display: block;
    min-width: 0;
}

/* 页脚 CMS 面板与窗口（保持默认块级，不透明化，供 CMS 对应层级放置组件） */
.site-footer__panel-identity,
.site-footer__panel-contact,
.site-footer__panel-links,
.site-footer__panel-bottom,
.site-footer__window-identity,
.site-footer__window-contact,
.site-footer__window-links,
.site-footer__window-bottom {
    display: block;
    min-width: 0;
}

/* 页脚 CMS 窗口内容层（实体块，不再透明化） */
.site-footer__window-identity > div,
.site-footer__window-identity > div > div,
.site-footer__window-contact > div,
.site-footer__window-contact > div > div,
.site-footer__window-links > div,
.site-footer__window-links > div > div,
.site-footer__window-bottom > div,
.site-footer__window-bottom > div > div {
    display: block;
    min-width: 0;
}

/* 页脚内容网格（通用容器） */
.site-footer__grid {
    display: grid;
    width: 100%;
    margin: 0;
}

/* ========== 品牌标识 ========== */

/* 品牌标识（通用展示结构） */
.site-footer__brand {
    display: flex;
    align-items: center;
    width: 240px;
    color: var(--site-footer-text);
}

/* 品牌占位标识（CMS 未输出图标时显示） */
.site-footer__brand-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 240px;
    height: 100%;
    border: 1px solid var(--site-footer-placeholder-border);
    background: var(--site-footer-placeholder-bg);
    color: var(--site-footer-text);
    font-size: 14px;
}

/* 品牌内容容器（图标左对齐） */
.site-footer__brand > * {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 100%;
}

/* 品牌图标（完整显示且左对齐） */
.site-footer__brand img,
.site-footer__window-identity img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: left center;
}

/* ========== 联系方式与友情链接 ========== */

/* 联系方式网格（通用信息结构） */
.site-footer__contact {
    /* 主信息行距（外层行间与窗内 item 下边距共用同源，随断点调整） */
    --site-footer-row-gap: 14px;
    display: grid;
    min-width: 0;
    row-gap: var(--site-footer-row-gap);
}

/* 联系方式面板（实体块，作为网格行参与双列布局） */
.site-footer__contact > .site-footer__panel-contact,
.site-footer__contact > .site-footer__panel-links {
    grid-column: 1 / -1;
    min-width: 0;
}

/* 联系方式窗口（信息项容器：移动端块级堆叠，桌面双列见断点层；行距变量就近声明供信息项继承） */
.site-footer__contact > .site-footer__panel-contact .site-footer__window-contact {
    /* 行距就近声明，item 继承解析，消除远端继承的不确定性 */
    --site-footer-row-gap: 14px;
}

/* 联系方式窗口末项（下间距归零，行距交给外层网格 row-gap；提升特异性压过共同基类行距） */
.site-footer__panel-contact .site-footer__window-contact .site-footer__contact-item.site-footer__contact-item--full {
    margin-bottom: 0;
}

/* 院长信箱与友情链接窗口内容（仍以整行参与网格） */
.site-footer__contact > .site-footer__panel-links .site-footer__window-links > div {
    grid-column: 1 / -1;
    min-width: 0;
}

/* 联系方式项目（图标与文字居中；双类名提级压过窗口内容实体块规则，窗内行距同源 margin，各断点经 --site-footer-row-gap 跟随） */
.site-footer__contact .site-footer__contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 18px;
}

/* 联系方式窗口内项目（基础层行距同源；全宽项由上方规则归零） */
.site-footer__panel-contact .site-footer__window-contact .site-footer__contact-item {
    margin-bottom: var(--site-footer-row-gap);
}

/* 跨列联系方式项目（占满信息区域，兼容 CMS 内容注入顺序） */
.site-footer__contact-item--full,
.site-footer__contact .site-footer__contact-item--full {
    grid-column: 1 / -1;
    width: 100%;
}

/* 联系方式图标（固定尺寸与白色处理） */
.site-footer__contact img {
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* 联系方式链接（允许长文本换行） */
.site-footer__contact a {
    overflow-wrap: anywhere;
}

/* 悬停与聚焦状态的联系方式链接 */
.site-footer__contact a:hover,
.site-footer__contact a:focus-visible {
    color: var(--site-footer-text);
    text-decoration: underline;
    outline: 0;
}

/* 友情链接交互（跨列项目保持原文链接样式） */
.site-footer__contact .site-footer__contact-item--full a:hover,
.site-footer__contact .site-footer__contact-item--full a:focus-visible {
    text-decoration: none;
}

/* 友情链接末项分隔线（隐藏） */
.site-footer__contact .site-footer__contact-item--full i:last-of-type {
    display: none;
}

/* 友情链接项目（恢复 flex 后全宽度可按完整链接项换行，避免手机端单行溢出） */
.site-footer__panel-links .site-footer__contact-item--full {
    flex-wrap: wrap;
    white-space: normal;
}

/* 友情链接分隔线（半透明竖线，显式盒子防内联退化与收缩为 0） */
.site-footer__contact i {
    display: inline-block;
    flex: 0 0 1px;
    width: 1px;
    height: 14px;
    margin: 0 8px;
    background: var(--site-footer-divider);
}

/* ========== 二维码 ========== */

/* 二维码容器（通用垂直排列） */
.site-footer__qr {
    display: flex;
    flex-direction: column;
}

/* 二维码图像（固定尺寸，图片自带白底背景） */
.site-footer__qr-img {
    display: block;
    width: 146px;
    height: 142px;
    object-fit: cover;
}

/* 二维码说明文字（通用文字样式，上间距与白底内边距同一分组节奏，不设下边距） */
.site-footer__qr-name {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.5;
}

/* ========== 版权区域 ========== */

/* 版权容器（顶部边框与文字颜色） */
.site-footer__bottom {
    border-top: 1px solid var(--site-footer-divider);
    color: var(--site-footer-text);
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
}

/* 版权内容（限制宽度并设置内边距） */
.site-footer__bottom .site-footer__bottom-content {
    width: 100%;
    min-height: 21px;
    margin: 0 auto;
}

/* ========== 断点布局 ========== */

/* ---- 横向双列共享（768px 及以上） ---- */
@media (min-width: 768px) {
    /* 内容网格（联系方式与二维码双列，二维码列宽由图片尺寸自适应） */
    .site-footer__grid {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    /* 联系方式网格（外层单列整行堆叠） */
    .site-footer__contact {
        grid-template-columns: minmax(0, 1fr);
    }

    /* 联系方式窗口（面板内双列主信息；容器层承载网格） */
    .site-footer__contact > .site-footer__panel-contact .site-footer__window-contact {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, max-content));
    }

    .site-footer__contact {
        font-size: 14px;
    }

    /* 联系方式项目（保持单行） */
    .site-footer__contact-item {
        white-space: nowrap;
    }

    /* 友情链接文本（完整链接项不拆分） */
    .site-footer__panel-links .site-footer__contact-item--full span {
        white-space: nowrap;
    }

    /* 二维码容器（相对内容区垂直居中） */
    .site-footer__qr {
        align-items: center;
        margin-top: 0;
        text-align: center;
    }
}

/* ---- 宽屏桌面（>=1600px） ---- */
@media (min-width: 1600px) {
    /* 内容网格（宽屏限宽、留白与列间距） */
    .site-footer__grid {
        max-width: 1400px;
        margin-inline: auto;
        gap: 36px 48px;
        padding: 32px 20px;
    }

    /* 品牌标识（宽屏尺寸与下方间距） */
    .site-footer__brand {
        height: 110px;
        min-height: 110px;
        margin-bottom: 24px;
    }

    /* 联系方式网格（宽屏行距，外层单列仅行距） */
    .site-footer__contact,
    .site-footer__contact > .site-footer__panel-contact .site-footer__window-contact > div {
        --site-footer-row-gap: 20px;
    }

    /* 联系方式窗口（宽屏列距） */
    .site-footer__contact .site-footer__window-contact {
        column-gap: 48px;
    }

    .site-footer__contact {
        font-size: 16px;
        line-height: 20px;
    }

    /* 联系方式图标（宽屏固定尺寸） */
    .site-footer__contact img {
        flex-basis: 16px;
        width: 16px;
        height: 16px;
    }

    /* 二维码名称（宽屏字号与主信息一致） */
    .site-footer__qr-name {
        font-size: 16px;
    }

    /* 版权内容（宽屏限宽与留白） */
    .site-footer__bottom .site-footer__bottom-content {
        max-width: 1400px;
        padding: 20px 20px;
    }
}

/* ---- 标准桌面（1201px-1599px） ---- */
@media (min-width: 1201px) and (max-width: 1599px) {
    /* 内容网格（标准桌面限宽、留白与列间距） */
    .site-footer__grid {
        max-width: 1170px;
        margin-inline: auto;
        gap: 18px 40px;
        padding: 28px 20px;
    }

    /* 品牌标识（标准桌面尺寸与下方间距） */
    .site-footer__brand {
        height: 100px;
        min-height: 100px;
        margin-bottom: 20px;
    }

    /* 联系方式网格（标准桌面行距，外层单列仅行距） */
    .site-footer__contact,
    .site-footer__contact > .site-footer__panel-contact .site-footer__window-contact > div {
        --site-footer-row-gap: 18px;
    }

    /* 联系方式窗口（标准桌面列距） */
    .site-footer__contact .site-footer__window-contact {
        column-gap: 40px;
    }

    .site-footer__contact {
        line-height: 18px;
    }

    /* 联系方式图标（标准桌面固定尺寸） */
    .site-footer__contact img {
        flex-basis: 14px;
        width: 14px;
        height: 14px;
    }

    /* 版权内容（标准桌面限宽与留白） */
    .site-footer__bottom .site-footer__bottom-content {
        max-width: 1170px;
        padding: 18px 20px;
    }
}

/* ---- 紧凑桌面（992px-1200px） ---- */
@media (min-width: 992px) and (max-width: 1200px) {
    /* 内容网格（紧凑桌面限宽、留白与列间距） */
    .site-footer__grid {
        max-width: 970px;
        margin-inline: auto;
        gap: 16px 32px;
        padding: 24px 20px;
    }

    /* 品牌标识（紧凑桌面尺寸与下方间距） */
    .site-footer__brand {
        height: 90px;
        min-height: 90px;
        margin-bottom: 18px;
    }

    /* 联系方式网格（紧凑桌面行距，外层单列仅行距） */
    .site-footer__contact,
    .site-footer__contact > .site-footer__panel-contact .site-footer__window-contact > div {
        --site-footer-row-gap: 16px;
    }

    /* 联系方式窗口（紧凑桌面列距） */
    .site-footer__contact .site-footer__window-contact {
        column-gap: 32px;
    }

    .site-footer__contact {
        line-height: 16px;
    }

    /* 联系方式图标（紧凑桌面固定尺寸） */
    .site-footer__contact img {
        flex-basis: 14px;
        width: 14px;
        height: 14px;
    }

    /* 版权内容（紧凑桌面限宽与留白） */
    .site-footer__bottom .site-footer__bottom-content {
        max-width: 970px;
        padding: 16px 20px;
    }
}

/* ---- 平板移动端（768px-991px） ---- */
@media (min-width: 768px) and (max-width: 991px) {
    /* 内容网格（平板端留白与列间距） */
    .site-footer__grid {
        gap: 14px 24px;
        padding: 20px 20px;
    }

    /* 品牌标识（平板端尺寸与下方间距） */
    .site-footer__brand {
        height: 80px;
        min-height: 80px;
        margin-bottom: 16px;
    }

    /* 联系方式网格（平板端行距，外层单列仅行距） */
    .site-footer__contact,
    .site-footer__contact > .site-footer__panel-contact .site-footer__window-contact > div {
        --site-footer-row-gap: 14px;
    }

    /* 联系方式窗口（平板端列距） */
    .site-footer__contact .site-footer__window-contact {
        column-gap: 24px;
    }

    .site-footer__contact {
        line-height: 14px;
    }

    /* 联系方式图标（平板端固定尺寸） */
    .site-footer__contact img {
        flex-basis: 14px;
        width: 14px;
        height: 14px;
    }

    /* 版权内容（平板端留白） */
    .site-footer__bottom .site-footer__bottom-content {
        padding: 14px 20px;
    }
}

/* ---- 手机移动端（<=767px） ---- */
@media (max-width: 767px) {
    /* 内容网格（手机端单列布局） */
    .site-footer__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 20px 20px;
    }

    /* 品牌标识（手机端尺寸与下方间距） */
    .site-footer__brand {
        height: 80px;
        min-height: 80px;
        margin-bottom: 16px;
    }

    /* 联系方式网格（手机端单列信息） */
    .site-footer__contact {
        grid-template-columns: minmax(0, 1fr);
    }

    .site-footer__contact {
        font-size: 14px;
        line-height: 14px;
    }

    /* 联系方式图标（手机端固定尺寸） */
    .site-footer__contact img {
        flex: 0 0 14px;
        width: 14px;
        height: 14px;
    }

    /* 二维码容器（手机端水平居中） */
    .site-footer__qr {
        align-items: center;
        margin-top: 24px;
        text-align: center;
    }

    /* 版权内容（手机端留白） */
    .site-footer__bottom .site-footer__bottom-content {
        padding: 14px 20px;
    }
}