/*
Theme Name: 信息中心学生团队主站
Theme URI: https://nicstu.icu
Author: NICSTU
Author URI: https://nicstu.icu
Description: 信息中心学生团队主站WordPress主题
Version: 5.5
 * ================================================================
 * 版本说明 Version Map:
 *   v1.0 ~ v1.64  : 校园服务平台 (小睿校园)
 *   v2.0 ~ v5.x   : 信息中心学生团队主站
 * ================================================================
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: campus-service
*/

/* ==================== 引入 MiSans 字体 ==================== */
@import url('https://font.sec.miui.com/font/css?family=MiSans:400,600&display=swap');

/* ==================== 基础重置 ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    -webkit-text-size-adjust: 100%;
}
body {
    font-family: 'MiSans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Noto Sans SC', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #666;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    -webkit-tap-highlight-color: transparent;
}
/* 全局去掉所有元素点击高亮 */
a, button, input, textarea, select, [role="button"], .category-item, .org-blue-card, .org-dept-card, .org-sub-card, .notice-item, .anchor-btn, .scroll-arrow, .about-slider-prev, .about-slider-next, .about-dot, .btn-more {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ==================== 首页大图 ==================== */
.hero-section {
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* ==================== 标语区域 ==================== */
.slogan-section {
    padding: 50px 0;
    text-align: center;
}
.slogan-icon {
    margin-bottom: 15px;
}
.slogan-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}
.slogan-html {
    font-size: 16px;
    line-height: 1.8;
}
.slogan-html p { margin-bottom: 5px; }

/* ==================== 分类区域 ==================== */
.category-section { position: relative; }
.category-title-wrapper {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
}
.title-decoration {
    display: inline-block;
    width: 4px;
    height: 20px;
    margin-right: 8px;
    border-radius: 2px;
    vertical-align: middle;
    flex-shrink: 0;
}
.category-title {
    display: flex;
    align-items: center;
    font-weight: 600;
}
.category-subtitle {
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 0 8px;
    }
    .category-item {
        padding: 10px 2px 18px;
        justify-content: flex-start;
        gap: 2px;
        min-height: 0;
        height: auto;
        overflow: visible;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        position: relative;
    }
    /* 图标区域：尺寸由 index.php 内联样式控制（后台变量 $icon_size * 0.55） */
    .category-icon {
        margin: 0 auto 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        /* width/height 不设置 — 由 index.php 内联样式控制 */
    }
    .category-icon img {
        max-width: 100%;
        height: auto;
        width: auto;
        display: block;
        margin: 0 auto;
        /* max-height 不设置 — 由 index.php 内联样式控制 */
    }
    /* 名称 */
    .category-name {
        font-size: 11px;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-top: 2px;
        padding-bottom: 2px;
        line-height: 1.2;
    }
    /* 箭头：absolute 定位在 item 底部外面 */
    .category-arrow {
        position: absolute;
        bottom: 0px;
        left: 50%;
        width: 7px;
        height: 7px;
        margin: 0;
        border: none;
        border-right: 1.5px solid #002fa7;
        border-bottom: 1.5px solid #002fa7;
        transform: translateX(-50%) rotate(45deg);
    }
    /* 默认动画：箭头上下跳动 + 图标上浮 */
    .category-item .category-arrow {
        animation: arrowBounce 1.2s ease-in-out infinite;
    }
    .category-item .category-icon {
        transform: translateY(-3px);
    }
    .category-item .category-name::after {
        transform: scaleX(1);
    }
}
/* 桌面端分类图标基础 */
.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* 从顶部开始，所有项结构一致 */
    border: none;
    border-radius: 8px;
    padding: 16px 8px 28px; /* 底部增大给箭头留空间 */
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    text-align: center;
    background: transparent;
    gap: 2px;
    position: relative; /* 箭头 absolute 定位基准 */
}
/* 默认动画：不用 hover 触发，直接播放 */
.category-item .category-icon {
    transform: translateY(-4px);
}
.category-item .category-arrow {
    animation: arrowBounce 1.2s ease-in-out infinite;
}
.category-item .category-name::after {
    transform: scaleX(0);
}
.category-item:hover .category-name::after {
    transform: scaleX(1);
}
/* hover 改颜色 */
.category-item:hover .category-name { color: #002fa7; }

/* 箭头：absolute 定位在 item 底部外面，不占内部空间 */
.category-arrow {
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 14px;
    height: 14px;
    margin: 0;
    border: none;
    border-right: 2.5px solid #002fa7;
    border-bottom: 2.5px solid #002fa7;
    /* rotate45 + translateX(-50%) 居中 */
    transform: translateX(-50%) rotate(45deg);
    transform-origin: center;
}
@keyframes arrowBounce {
    0%, 100% { bottom: -4px; }
    50%      { bottom: -10px; }
}

.category-name {
    position: relative;
    display: inline-block;
    padding-bottom: 4px;
    text-align: center;
    word-break: keep-all;
    transition: all 0.3s;
}
.category-name::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: #002fa7;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px;
    overflow: hidden;
    transition: all 0.3s;
    /* max-height 不限制 — 桌面端高度由 index.php 内联样式控制（默认125px） */
}
.category-icon img {
    max-width: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* max-height 不限制 — 桌面端高度由 index.php 内联样式控制 */
}

.icon-anchor-html {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.5;
    color: #666;
    text-align: center;
    max-width: 100%;
}

/* 锚点HTML区域 */
.category-anchor-html { text-align: center; margin: 10px 0 20px; }
/* 跳动小箭头 */
.scroll-arrow {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(0,47,167,0.08); color: #002fa7;
    text-decoration: none; transition: all 0.3s ease;
    animation: bounce-arrow 2s ease-in-out infinite;
}
.scroll-arrow:hover {
    background: #002fa7; color: #fff; transform: scale(1.1);
}
.scroll-arrow span { font-size: 20px; line-height: 1; }
@keyframes bounce-arrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}
/* 锚点链接按钮样式 */
.category-anchor-html .anchor-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 20px; border-radius: 20px;
    background: rgba(0,47,167,0.06); color: #002fa7;
    text-decoration: none; font-size: 14px; font-weight: 500;
    transition: all 0.3s ease; border: 1px solid rgba(0,47,167,0.12);
}
.category-anchor-html .anchor-btn:hover {
    background: #002fa7; color: #fff; border-color: #002fa7;
}

/* ==================== 通知公告+技术支持 ==================== */
.info-section {
    padding: 120px 0;
    background: #f0f2f5;
    background-image: linear-gradient(180deg, #f5f6f8 0%, #e8ecf0 100%);
    position: relative;
}
.info-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0,0,0,0.06);
}
.info-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0,0,0,0.06);
}
.info-section .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}
/* 确保后台gap设置生效 - 用CSS变量 */
.info-section .container {
    gap: var(--info-gap, 80px);
}
.notice-section, .support-section { position: relative; }
/* ===== 全站统一标题样式 ===== */
.section-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 30px;
}
.section-header .title-decoration {
    width: 5px;
    height: 24px;
    background-color: #002fa7;
    border-radius: 2px;
    flex-shrink: 0;
}
.section-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: #444;
    line-height: 1.3;
    margin: 0;
}
.notice-list { display: flex; flex-direction: column; }
.notice-item {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
    gap: 8px;
}
.notice-item:last-child { border-bottom: none; }
.notice-item:hover { color: #002fa7; }
.notice-item:hover .notice-title { color: #002fa7; }
.notice-title { font-size: 16px; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; line-height: 1.5; }
.notice-divider { display: block; width: 100%; height: 1px; background: rgba(0,0,0,0.06); }
.notice-meta-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: #888; }
.notice-clock { display: flex; align-items: center; gap: 4px; }
.notice-comments-num { display: flex; align-items: center; gap: 4px; }
.notice-empty, .support-empty { color: #999; font-size: 14px; padding: 20px 0; }
.notice-more { text-align: right; margin-top: 20px; }
.btn-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}
.btn-more:hover { color: #002fa7; }
.btn-more span { font-size: 16px; }
.support-content { font-size: 16px; line-height: 2; color: #444; }
.support-content p { margin-bottom: 12px; }
.support-content strong { color: #222; font-weight: 600; }
.support-content a { color: #002fa7; text-decoration: none; }
.support-content a:hover { text-decoration: underline; }
.qrcode-box { display: none; }
.qrcode-box img { width: 120px; height: 120px; border-radius: 8px; margin: 0 auto 10px; }
.qrcode-box .qrcode-text { display: block; font-size: 13px; color: #666; line-height: 1.5; }

/* ==================== 关于我们轮播 ==================== */
.about-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #fff;
}
.about-slider-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}
.about-slide {
    position: relative;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.about-slide img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.banner-link { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.about-slider-prev, .about-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,0.2);
    border: none;
    color: #fff;
    width: 50px;
    height: 80px;
    font-size: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}
.about-slider-prev:hover, .about-slider-next:hover { background: rgba(0,0,0,0.4); }
.about-slider-prev { left: 0; }
.about-slider-next { right: 0; }
.about-slider-dots { position: absolute; bottom: -35px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; gap: 10px; }
.about-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(0,0,0,0.25); cursor: pointer; transition: background 0.3s, transform 0.3s; }
.about-dot.active { background: #1a3a8c; transform: scale(1.2); }

/* ==================== 页脚 ==================== */
.footer-section {
    position: relative;
}
@media (min-width: 769px) {
    .footer-section { background-attachment: fixed; }
}
.footer-copyright-bar { padding: 18px 0; text-align: center; }
.footer-content { line-height: 1.6; }

/* ==================== 文章页 ==================== */
.article-section { position: relative; }
.article-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 50px 60px;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
.article-header { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid rgba(0,0,0,0.08); }
.article-title-wrap { display: flex; align-items: center; margin-bottom: 15px; }
.article-title-wrap .title-decoration { margin-right: 10px; }
.article-header h1 { font-size: 24px; font-weight: 600; line-height: 1.4; }
.article-meta { font-size: 13px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #888; }
.meta-sep { color: #ccc; }
.article-meta a { color: inherit; text-decoration: none; }
.article-meta a:hover { text-decoration: underline; }
.article-body { font-size: 15px; line-height: 1.8; color: #444; }
.article-body p { margin-bottom: 16px; }
.article-body img { max-width: 100%; height: auto; border-radius: 4px; }
.article-body a { color: #002fa7; text-decoration: none; }
.article-body a:hover { text-decoration: underline; }

/* ==================== 响应式 ==================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .info-section .container { gap: 40px; padding: 0 15px; }
    .slogan-section { padding: 40px 0; }
    .article-wrapper { padding: 40px 45px; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .info-section .container { grid-template-columns: 1fr !important; gap: 40px; }
    .slogan-section { padding: 35px 0; }
    .slogan-icon img { width: 45px; height: 45px; }
    .slogan-html { font-size: 14px; }
    .section-header h2 { font-size: 20px; }
    .section-header .title-decoration { height: 22px; width: 4px; }
    .about-slider-prev, .about-slider-next { width: 36px; height: 60px; font-size: 28px; }
    .article-wrapper { padding: 30px 25px; margin: 20px auto; }
    .support-content { font-size: 14px; line-height: 1.8; }
    .support-content img { max-width: 100%; height: auto; border-radius: 4px; }
    /* 平板端分类图标 */
    .category-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0 8px; }
    .category-item { padding: 16px 6px 24px; justify-content: flex-start; gap: 3px; position: relative; }
    /* 图标尺寸由 index.php 内联样式控制（后台变量 $icon_size * 0.65） */
    .category-icon { margin: 0 auto 6px; overflow: hidden; }
    .category-icon img { width: auto; height: auto; }
    .category-name { font-size: 13px; margin-top: 2px; padding-bottom: 2px; }
    .category-arrow { width: 9px; height: 9px; border-width: 1.5px; bottom: 2px; }
    /* 平板端动画：默认播放 */
    .category-item .category-arrow { animation: arrowBounce 1.2s ease-in-out infinite; }
    .category-item .category-icon { transform: translateY(-3px); }
    .category-item .category-name::after { transform: scaleX(1); }
}

@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .slogan-section { padding: 25px 0; }
    .slogan-icon img { width: 36px; height: 36px; }
    .slogan-html { font-size: 13px; }
    .info-section { padding: 30px 0; }
    .info-section .container { grid-template-columns: 1fr !important; gap: 35px; padding: 0 10px; }
    .section-header { margin-bottom: 20px; }
    .section-header h2 { font-size: 18px; }
    .section-header .title-decoration { height: 18px; width: 4px; }
    .notice-title { font-size: 14px; }
    .notice-item { padding: 12px 0; }
    .support-content { font-size: 13px !important; line-height: 1.7 !important; }
    .support-content * { max-width: 100%; }
    .support-content h1, .support-content h2, .support-content h3, .support-content h4 { font-size: 15px !important; margin-bottom: 8px !important; }
    .support-content p { margin-bottom: 6px !important; }
    .support-content img { max-width: 100% !important; height: auto !important; }
    .about-slider { height: 420px; }
    .about-slider-prev, .about-slider-next { width: 30px; height: 50px; font-size: 22px; }
    .about-slider-dots { bottom: 12px; gap: 6px; }
    .about-dot { width: 8px; height: 8px; }
    .footer-copyright-bar { padding: 14px 0; }
    .article-wrapper { padding: 25px 15px; margin: 15px auto; max-width: 100%; border-radius: 0; }
    .article-header h1 { font-size: 18px; }
}

/* ==================== 后台管理样式 ==================== */
.campus-form-table { width: 100%; max-width: 1000px; background: #fff; border-collapse: collapse; margin-top: 10px; }
.campus-form-table th, .campus-form-table td { padding: 15px; vertical-align: top; border-bottom: 1px solid #f0f0f0; }
.campus-form-table th { width: 250px; text-align: left; font-weight: 500; color: #555; }
.campus-form-table input[type="color"] { width: 60px; height: 30px; padding: 0; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; vertical-align: middle; }
.campus-form-table input[type="text"].small-text { width: 100px; min-width: 100px; }
.campus-form-table input[type="text"].regular-text { width: 200px; }
.campus-form-table .description { color: #999; font-size: 12px; margin-top: 5px; font-style: normal; }
.banner-preview { border: 1px dashed #ccc; bord }
.campus-form-table .description { color: #999; font-size: 12px; margin-top: 5px; font-style: normal; }