/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #1f2937;
    background-color: #ffffff;
}

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

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

button,
input,
select,
textarea,
img,
.section-box,
.card,
.counter-item,
.stat-item,
.alert,
.login-box,
.install-box,
.pagination a,
.pagination span {
    border-radius: 3px;
}

/* 顶部栏 */
.top-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 15px 0;
}

.top-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 70px;
    width: auto;
}

.site-name {
    font-size: 22px;
    font-weight: bold;
    color: #94070a;
    letter-spacing: 1px;
}

.top-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.header-search {
    display: flex;
    border: 1px solid #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.header-search input {
    border: none;
    padding: 6px 10px;
    font-size: 13px;
    outline: none;
    width: 180px;
}

.header-search button {
    border: none;
    background-color: #94070a;
    color: #ffffff;
    padding: 0 12px;
    cursor: pointer;
}

.datetime {
    font-size: 16px;
    color: #94070a;
    font-weight: bold;
}

.contact-icons {
    display: flex;
    gap: 20px;
}

.contact-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #4b5563;
}

.contact-item .icon {
    width: 24px;
    height: 24px;
    background-color: #94070a;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 3px;
}

.contact-item .tooltip {
    display: none;
    position: absolute;
    top: 30px;
    right: 0;
    background-color: #7a0609;
    color: #ffffff;
    padding: 6px 12px;
    white-space: nowrap;
    z-index: 1000;
    font-size: 12px;
    border: 1px solid #94070a;
}

.contact-item:hover .tooltip {
    display: block;
}

/* 主导航 */
.main-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, #94070a 0%, #7a0609 100%);
    border-bottom: 3px solid #5c0406;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.main-nav .container {
    display: flex;
    gap: 6px;
    padding-top: 4px;
    padding-bottom: 4px;
}

.main-nav a {
    position: relative;
    color: #ffffff;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.main-nav a:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.main-nav a.active {
    background-color: rgba(255, 255, 255, 0.15);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 24px;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 2px;
    transition: transform 0.25s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* 轮播图 */
.slider {
    position: relative;
    width: 100%;
    height: 420px;
    overflow: hidden;
    background-color: #f3f4f6;
}

.slider-inner {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(122, 6, 9, 0.95) 0%, rgba(148, 7, 10, 0.8) 100%);
    color: #ffffff;
    padding: 15px 20px;
    font-size: 18px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(148, 7, 10, 0.75);
    color: #ffffff;
    border: none;
    width: 44px;
    height: 60px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    border-radius: 0;
}

.slider-btn:hover {
    background-color: rgba(122, 6, 9, 0.95);
}

.slider-btn.prev {
    left: 0;
}

.slider-btn.next {
    right: 0;
}

.slider-dots {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dots .dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255,255,255,0.6);
    cursor: pointer;
    border-radius: 50%;
}

.slider-dots .dot.active {
    background-color: #ffffff;
}

/* 内容区 */
.content-section {
    padding: 40px 0;
    background-color: #ffffff;
}

.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.section-box {
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.section-box:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 14px 20px;
    border-bottom: 1px solid #f3e2e3;
    border-radius: 12px 12px 0 0;
    position: relative;
}

.section-header::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 20px;
    background: linear-gradient(180deg, #94070a 0%, #c45a5d 100%);
    border-radius: 3px;
}

.section-header h3 {
    font-size: 18px;
    font-weight: bold;
    color: #1f2937;
    padding-left: 14px;
    margin: 0;
}

.section-header .more {
    font-size: 13px;
    color: #94070a;
    background-color: #fff1f2;
    border: 1px solid #f5d5d6;
    padding: 4px 12px;
    border-radius: 20px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.section-header .more:hover {
    background-color: #94070a;
    color: #ffffff;
    border-color: #94070a;
}

.section-body {
    padding: 15px 18px;
}

.news-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.news-list li:last-child {
    border-bottom: none;
}

.news-list a {
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80%;
}

.news-list a:hover {
    color: #94070a;
}

.news-list .date {
    color: #9ca3af;
    font-size: 13px;
}

/* 数字校园 */
.digital-campus {
    padding: 70px 0 80px;
    background: linear-gradient(180deg, #ffffff 0%, #fff8f8 50%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.digital-campus::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(148, 7, 10, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.digital-campus::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(148, 7, 10, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.digital-campus .section-title {
    text-align: center;
    font-size: 32px;
    color: #1f2937;
    margin-bottom: 12px;
    font-weight: bold;
    letter-spacing: 1px;
}

.digital-campus .section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, #94070a 0%, #d9787b 100%);
    border-radius: 2px;
    margin: 14px auto 0;
}

.counters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
    position: relative;
    z-index: 1;
}

.counter-item {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 28px 24px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 7, 10, 0.08);
}

.counter-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #94070a 0%, #c45a5d 100%);
    opacity: 0.85;
    transition: height 0.3s ease;
}

.counter-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(148, 7, 10, 0.12);
    border-color: rgba(148, 7, 10, 0.15);
}

.counter-item:hover::before {
    height: 6px;
}

.counter-body {
    display: flex;
    align-items: center;
    gap: 18px;
}

.counter-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    border-radius: 18px;
    font-size: 26px;
    color: #94070a;
    transition: background 0.3s ease, color 0.3s ease, border-radius 0.3s ease;
}

.counter-item:hover .counter-icon {
    background: linear-gradient(135deg, #94070a 0%, #7a0609 100%);
    color: #ffffff;
    border-radius: 50%;
}

.counter-info {
    flex: 1;
    min-width: 0;
}

.counter-value {
    font-size: 34px;
    color: #94070a;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 6px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: -0.5px;
}

.counter-label {
    font-size: 15px;
    color: #6b7280;
    font-weight: 500;
}

/* 页脚 */
.footer {
    background: linear-gradient(180deg, #7a0609 0%, #5c0406 100%);
    color: #ffffff;
}

.footer-top {
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding: 30px 0;
    background: rgba(255,255,255,0.03);
}

.footer-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo img {
    height: 60px;
    width: auto;
}

.footer-nav {
    display: flex;
    gap: 25px;
}

.footer-nav a {
    color: #ffffff;
    font-size: 14px;
}

.footer-nav a:hover {
    text-decoration: underline;
}

.footer-bottom {
    padding: 25px 0;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-info p {
    font-size: 13px;
    line-height: 2;
    color: rgba(255,255,255,0.9);
}

.footer-qrcodes {
    display: flex;
    gap: 20px;
}

.qr-item {
    text-align: center;
}

.qr-item img {
    width: 90px;
    height: 90px;
    background-color: #ffffff;
    padding: 4px;
    border: 1px solid rgba(255,255,255,0.3);
}

.qr-item p {
    font-size: 12px;
    margin-top: 6px;
    color: #ffffff;
}

/* 列表页与详情页 */
.page-banner {
    background: linear-gradient(135deg, #94070a 0%, rgba(122, 6, 9, 0.92) 100%);
    color: #ffffff;
    padding: 45px 0;
    text-align: center;
}

.page-banner h1 {
    font-size: 30px;
    letter-spacing: 1px;
}

.page-content {
    padding: 40px 0;
    min-height: 400px;
}

.breadcrumb {
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
    color: #6b7280;
}

.breadcrumb a {
    color: #94070a;
}

.article-list li {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
}

.article-list a {
    color: #1f2937;
    font-size: 15px;
}

.article-list a:hover {
    color: #94070a;
}

.article-list .date {
    color: #9ca3af;
}

.article-detail h1 {
    font-size: 26px;
    color: #94070a;
    margin-bottom: 15px;
}

.article-meta {
    color: #6b7280;
    font-size: 13px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.article-content {
    font-size: 15px;
    line-height: 1.8;
    color: #374151;
}

.article-content p {
    margin-bottom: 15px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.pagination a:hover,
.pagination span.current {
    background-color: #94070a;
    color: #ffffff;
    border-color: #94070a;
}

/* 响应式 */
@media (max-width: 1200px) {
    .container {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .top-header .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .main-nav .container {
        flex-wrap: wrap;
        gap: 4px;
        padding: 6px 10px;
    }

    .main-nav a {
        flex: 1 1 auto;
        min-width: 80px;
        text-align: center;
        padding: 8px 12px;
        font-size: 14px;
        border-radius: 6px;
    }

    .section-grid {
        grid-template-columns: 1fr;
    }

    .counters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .slider {
        height: 240px;
    }

    .footer-top .container,
    .footer-bottom .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

/* 首页新闻/公告列表封面 */
.news-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.news-item:last-child {
    border-bottom: none;
}

.news-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    overflow: hidden;
    border-radius: 3px;
    border: 1px solid #e5e7eb;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.news-info a {
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    max-width: 100%;
}

.news-info a:hover {
    color: #94070a;
}

.news-info .date {
    color: #9ca3af;
    font-size: 13px;
}

.news-item.no-cover .news-info {
    justify-content: center;
}

/* 列表页文章项 */
.article-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px solid #e5e7eb;
}

.article-item:last-child {
    border-bottom: none;
}

.article-thumb {
    flex-shrink: 0;
    width: 160px;
    height: 110px;
    overflow: hidden;
    border-radius: 3px;
    border: 1px solid #e5e7eb;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-thumb:hover img {
    transform: scale(1.05);
}

.article-summary {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-summary a {
    color: #1f2937;
    font-size: 16px;
    font-weight: bold;
}

.article-summary a:hover {
    color: #94070a;
}

.article-summary p {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-summary .date {
    color: #9ca3af;
    font-size: 13px;
}

.article-item.no-cover .article-summary {
    justify-content: center;
}

/* 文章详情封面 */
.article-cover {
    margin-bottom: 25px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.article-cover img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

/* 首页推荐内容 */
.recommended-section {
    padding-bottom: 0;
}

.recommended-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.recommended-item {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s;
}

.recommended-item:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.recommended-thumb {
    display: block;
    width: 100%;
    height: 130px;
    overflow: hidden;
    border-radius: 3px;
    margin-bottom: 12px;
}

.recommended-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.recommended-thumb:hover img {
    transform: scale(1.05);
}

.recommended-info a {
    display: block;
    color: #374151;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 6px;
}

.recommended-info a:hover {
    color: #94070a;
}

.recommended-info .date {
    color: #9ca3af;
    font-size: 13px;
}

/* 响应式：列表页封面 */
@media (max-width: 768px) {
    .article-item {
        flex-direction: column;
        gap: 12px;
    }

    .article-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .news-thumb {
        width: 64px;
        height: 48px;
    }

    .recommended-grid {
        grid-template-columns: 1fr;
    }
}

/* 错误页面 */
.error-page {
    padding: 100px 0;
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
}

.error-content h1 {
    font-size: 120px;
    color: #94070a;
    line-height: 1;
    margin-bottom: 20px;
}

.error-content p {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 30px;
}

/* 友情链接 */
.friend-links {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 15px 0;
}

.friend-links .container {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.friend-links-label {
    color: #374151;
    font-weight: bold;
    white-space: nowrap;
    line-height: 1.8;
}

.friend-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.friend-links-list a {
    color: #6b7280;
    line-height: 1.8;
}

.friend-links-list a:hover {
    color: #94070a;
}

/* 单页面 */
.page-detail {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 40px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.page-detail .page-body {
    line-height: 1.8;
}

.page-detail .page-body p {
    margin-bottom: 15px;
}

.page-detail .page-body img {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
    margin: 15px 0;
}

.container-full .page-detail {
    max-width: 100%;
}

@media (max-width: 768px) {
    .error-content h1 {
        font-size: 80px;
    }

    .friend-links .container {
        flex-direction: column;
        gap: 10px;
    }

    .page-detail {
        padding: 20px;
    }

    .counters-grid {
        grid-template-columns: 1fr;
    }

    .counter-body {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }

    .counter-value {
        font-size: 28px;
    }
}

/* 校园服务快捷入口 */
.campus-services {
    padding: 65px 0 75px;
    background: linear-gradient(180deg, #fff8f8 0%, #ffffff 100%);
    border-top: 1px solid #f3d3d4;
}

.section-header-center {
    text-align: center;
    margin-bottom: 45px;
}

.section-header-center .section-title {
    margin-bottom: 12px;
}

.section-subtitle {
    color: #6b7280;
    font-size: 16px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 38px 22px;
    background: #ffffff;
    border: 1px solid #f0e0e0;
    border-radius: 10px;
    color: #374151;
    transition: all 0.25s;
    text-align: center;
    text-decoration: none;
}

.service-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    border-radius: 50%;
    margin-bottom: 4px;
}

.service-icon i {
    font-size: 30px;
    color: #94070a;
    transition: color 0.2s;
}

.service-item h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.service-item p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

.service-item:hover {
    border-color: #94070a;
    background: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(148, 7, 10, 0.12);
}

.service-item:hover .service-icon {
    background: #94070a;
}

.service-item:hover .service-icon i {
    color: #ffffff;
}

@media (max-width: 768px) {
    .service-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .service-item {
        padding: 25px 15px;
    }

    .service-icon {
        width: 56px;
        height: 56px;
    }

    .service-icon i {
        font-size: 24px;
    }

    .service-item h3 {
        font-size: 16px;
    }

    .service-item p {
        display: none;
    }
}
