/* =============================================
   首页样式 — 仿高校学院门户网站
   ============================================= */

/* --- 全局辅助 --- */

/* Wagtail 工具栏移到左下角，避免遮挡回到顶部按钮 */
.w-userbar {
    right: auto !important;
    left: 20px !important;
}

/* --- 导航栏加宽 --- */
.navbar.bg-primary {
    padding-top: 16px;
    padding-bottom: 16px;
}

.navbar.bg-primary .navbar-brand {
    font-size: 22px;
}

.navbar.bg-primary .nav-link {
    font-size: 16px;
    padding: 10px 16px !important;
}

/* ======================
   Section: 首页轮播图
   ====================== */
.hero-carousel {
    width: 100%;
    overflow: hidden;
}

.hero-carousel .carousel-item img {
    width: 100%;
    height: calc(100vh - 80px);
    object-fit: cover;
}

.hero-carousel .carousel-caption-custom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 60px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    text-align: left;
}

.hero-carousel .carousel-caption-custom h2 {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-carousel .carousel-caption-custom p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* 指示器样式 */
.hero-carousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 0;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: transparent;
    opacity: 0.7;
    margin: 0 4px;
}

.hero-carousel .carousel-indicators button.active {
    background: #A41F35;
    border-color: #A41F35;
    opacity: 1;
}

/* 箭头样式 */
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    width: 50px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover {
    opacity: 1;
}

/* ======================
   红色装饰条
   ====================== */
.red-decorative-bar {
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, #680e1e, #A41F35, #680e1e);
    position: relative;
}

.red-decorative-bar .bar-icon {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: #A41F35;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 3px 10px rgba(164, 31, 53, 0.4);
    z-index: 10;
}

.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.section-divider .divider-icon {
    width: 36px;
    height: 36px;
    background: #A41F35;
    color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.section-title {
    text-align: center;
    padding: 45px 0 20px;
}

.section-title h2 {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.section-title h2 .title-en {
    color: #A41F35;
    font-weight: 400;
    font-size: 18px;
    letter-spacing: 2px;
}

.section-title h2 .title-icon {
    width: 28px;
    height: 28px;
    background: #A41F35;
    color: #fff;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* ======================
   Section: 综合新闻 NEWS
   ====================== */
.news-section {
    padding: 0 0 40px;
    background: #fff;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

.news-card {
    background: #fff;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.news-card .card-thumb {
    width: 100%;
    height: 230px;
    overflow: hidden;
}

.news-card .card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.news-card .card-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ddd, #eee);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

.news-card .card-body {
    padding: 18px 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card .card-tag {
    color: #A41F35;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.news-card .card-tag .tag-icon {
    width: 16px;
    height: 16px;
    background: #A41F35;
    color: #fff;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
}

.news-card .card-body h3 {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    line-height: 1.6;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card .card-intro {
    font-size: 13px;
    color: #777;
    line-height: 1.7;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.news-card .card-date {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 8px;
}

.news-card .read-more {
    color: #A41F35;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
}

.news-card:hover .read-more {
    text-decoration: underline;
}

.news-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #999;
}

.news-empty i {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

/* ======================
   Section: 多栏信息聚合区
   ====================== */
.info-section {
    background: #f0f0f0;
    padding: 30px 0 40px;
}

.info-top-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto 30px;
    padding: 0 15px;
}

.info-column {
    background: #fff;
}

.info-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 2px solid #A41F35;
}

.info-column-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-column-header h3 .col-icon {
    width: 20px;
    height: 20px;
    background: #A41F35;
    color: #fff;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.info-column-header .more-link {
    font-size: 12px;
    color: #999;
    text-decoration: none;
}

.info-column-header .more-link:hover {
    color: #A41F35;
}

.info-column-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.info-column-list li {
    border-bottom: 1px dashed #e8e8e8;
}

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

.info-column-list li a {
    display: block;
    padding: 10px 15px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.info-column-list li a:hover {
    color: #A41F35;
    background: #fafafa;
}

/* --- 下半部不对称布局 --- */
.info-bottom-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

.featured-card {
    background: #fff;
    display: flex;
    flex-direction: column;
}

.featured-card .featured-thumb {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

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

.featured-card .featured-body {
    padding: 15px;
}

.featured-card .featured-body h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
}

.featured-card .featured-body p {
    font-size: 13px;
    color: #777;
    line-height: 1.7;
    margin: 0 0 10px;
}

.featured-card .featured-body .read-more {
    color: #A41F35;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.side-list-panel {
    background: #fff;
}

/* ======================
   Section: 学术讲座区
   ====================== */
.lecture-section {
    background: linear-gradient(135deg, #1a2a4a 0%, #0d1b30 100%);
    padding: 50px 0;
    position: relative;
}

.lecture-section .section-title h2 {
    color: #fff;
}

.lecture-section .section-title h2 .title-en {
    color: rgba(255, 255, 255, 0.6);
}

.lecture-carousel {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
}

.lecture-slide {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.lecture-slide .lecture-text {
    padding: 35px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lecture-slide .lecture-text h3 {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    line-height: 1.6;
    margin: 0 0 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.lecture-slide .lecture-text h3 .lec-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: #A41F35;
    color: #fff;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    margin-top: 4px;
}

.lecture-meta {
    font-size: 13px;
    color: #555;
    line-height: 2.4;
    margin-bottom: 12px;
}

.lecture-meta i {
    color: #A41F35;
    margin-right: 4px;
    font-size: 12px;
}

.lecture-slide .lecture-text p {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
    margin: 0 0 20px;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lecture-slide .lecture-text .lecture-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #A41F35;
    color: #fff;
    padding: 10px 24px;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s;
    width: fit-content;
    margin-top: auto;
}

.lecture-slide .lecture-text .lecture-btn:hover {
    background: #8a1a2d;
    color: #fff;
}

.lecture-slide .lecture-image {
    overflow: hidden;
}

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

.lecture-img-placeholder {
    width: 100%;
    height: 100%;
    min-height: 280px;
    background: linear-gradient(135deg, #2a3a5a, #1a2a4a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 60px;
}

/* 讲座导航箭头 */
.lecture-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    border-radius: 50%;
}

.lecture-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lecture-nav.prev {
    left: calc(50% - 540px);
}

.lecture-nav.next {
    right: calc(50% - 540px);
}

/* ======================
   Section: 校训/格言横幅
   ====================== */
.motto-section {
    background: linear-gradient(135deg, #A41F35 0%, #d32f2f 100%);
    padding: 28px 0;
    text-align: center;
}

.motto-section .motto-text {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 6px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.motto-section .motto-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
}

/* ======================
   Section: 全局页脚 Footer
   ====================== */
.site-footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 40px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px 30px;
}

.footer-brand .footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-brand .footer-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: #A41F35;
    color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.footer-brand .footer-logo span {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.footer-col h4 {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: #999;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-contact p {
    font-size: 13px;
    color: #999;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-contact p i {
    color: #A41F35;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding: 15px 0;
    text-align: center;
    max-width: 1100px;
    margin: 0 auto;
}

.footer-bottom p {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.footer-social a {
    width: 32px;
    height: 32px;
    background: #333;
    color: #999;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
}

.footer-social a:hover {
    background: #A41F35;
    color: #fff;
}

/* ======================
   响应式布局
   ====================== */
@media (max-width: 992px) {
    .hero-carousel .carousel-item img {
        height: 350px;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-top-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-bottom-grid {
        grid-template-columns: 1fr;
    }

    .lecture-slide {
        grid-template-columns: 1fr;
    }

    .lecture-nav.prev {
        left: 15px;
    }

    .lecture-nav.next {
        right: 15px;
    }

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

@media (max-width: 768px) {
    .hero-carousel .carousel-item img {
        height: 220px;
    }

    .hero-carousel .carousel-caption-custom {
        padding: 20px;
    }

    .hero-carousel .carousel-caption-custom h2 {
        font-size: 18px;
    }

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

    .info-top-grid {
        grid-template-columns: 1fr;
    }

    .motto-section .motto-text {
        font-size: 16px;
        letter-spacing: 3px;
    }

    .section-title h2 {
        font-size: 18px;
    }

    .lecture-slide .lecture-text {
        padding: 20px;
    }

    .lecture-slide .lecture-text h3 {
        font-size: 15px;
    }
}

/* ======================
   回到顶部按钮
   ====================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    text-decoration: none;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background 0.3s;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #A41F35;
    color: #fff;
}