/* ============================================================
   首页专属样式
   ============================================================ */

/* ===== Banner 轮播（全屏纯图片） ===== */
.banner {
    position: relative;
    height: 100vh; min-height: 600px;
    overflow: hidden;
    background: #1a1a1a;
}
/* Banner 高度切换版本：每 10vh 一档 */
.banner.h90 { height: 90vh; min-height: 0; }
.banner.h80 { height: 80vh; min-height: 0; }
.banner.h70 { height: 70vh; min-height: 0; }
.banner.h60 { height: 60vh; min-height: 0; }
.banner.h50 { height: 50vh; min-height: 0; }
/* 手机端：改成竖版比例，配合后台上传的手机版图片（建议 4:5）
   125vw ≈ 4:5 的定高，78vh/dvh 兜住横屏与超窄屏，避免 banner 占满整屏 */
@media (max-width: 768px) {
    .banner,
    .banner.h90, .banner.h80, .banner.h70, .banner.h60, .banner.h50 {
        height: min(125vw, 78vh);
        height: min(125vw, 78dvh);
        min-height: 0;
    }
}
.banner-bg {
    position: absolute; inset: 0;
}
.banner-bg img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center center;
    display: block;
}

/* ===== 学校简介卡�?===== */
.about-brief { background: var(--bg-white); }
.brief-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.brief-image {
    aspect-ratio: 4/3; border-radius: 16px; overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.6); gap: 12px; position: relative;
}
.brief-image i { font-size: 56px; }
.brief-image span { font-size: 16px; }
.brief-badge {
    position: absolute; top: 20px; left: 20px;
    background: var(--accent); color: #fff; padding: 8px 18px;
    border-radius: 8px; font-weight: 700; font-size: 14px;
}
.brief-text h3 { font-size: 28px; font-weight: 900; margin-bottom: 20px; line-height: 1.4; }
.brief-text p { font-size: 17px; color: var(--text-secondary); line-height: 1.9; margin-bottom: 16px; }

/* ===== 四系入口 ===== */
.dept-entry { background: #fafafa; }
.dept-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(18px, 1.6vw, 32px);
}
.dept-card {
    background: #fff; border: none; border-radius: 0;
    overflow: hidden; position: relative;
    transition: var(--transition); text-align: left;
}
.dept-card::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 100%; height: 3px; background: #821A23;
    transform: scaleX(0); transition: transform 0.3s ease;
    transform-origin: center;
}
.dept-card:hover::after { transform: scaleX(1); }
.dept-card:hover { transform: translateY(-4px); }
.dept-card-header {
    height: 140px; display: flex; align-items: center; justify-content: center;
    position: relative;
}
.dept-card-header i { font-size: 44px; color: #821A23; opacity: 0.4; position: relative; z-index: 2; }
.dept-card-header .bg { position: absolute; inset: 0; background: #f8f8f8; }
.dept-card-body { padding: 20px; }
.dept-card-body h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; letter-spacing: 0.1em; }
.dept-card-body p { font-size: 14px; color: #999; line-height: 1.6; }
.dept-card-body .link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--primary); font-weight: 400; font-size: 13px;
    margin-top: 16px; transition: var(--transition);
}
.dept-card-body .link:hover { gap: 10px; }

/* ===== 新闻列表 ===== */
.home-news { background: #fff; }

.news-columns {
    display: flex; gap: 48px; align-items: stretch;
}
.news-col {
    flex: 1; min-width: 0;
    background: transparent; border-radius: 0;
    border: none; overflow: visible;
}
.news-col-header {
    display: flex; align-items: baseline; justify-content: space-between;
    padding-bottom: 16px; margin-bottom: 24px;
    border-bottom: 2px solid #821A23;
}
.news-col-header h2 {
    font-size: 24px; font-weight: 700; color: #333;
    letter-spacing: 0.1em; padding-left: 16px; margin: 0;
    position: relative;
}
.news-col-header h2::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 4px; height: 20px; background: #821A23; border-radius: 2px;
    display: block;
}

/* 左栏：置顶新闻 - 大图带遮罩 */
.news-featured { margin-bottom: 24px; position: relative; border-radius: 4px; overflow: hidden; }
.news-featured-img {
    height: 280px; border-radius: 4px; overflow: hidden;
    background: #f5f5f5;
    display: block; text-decoration: none; position: relative;
}
.news-featured-img img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.news-featured-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 24px; color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
}
.news-featured-overlay h3 { font-size: 18px; font-weight: 700; margin: 0; }
.news-featured-overlay .date { font-size: 13px; opacity: 0.8; margin-top: 8px; }

/* 左栏：新闻列表 - 虚线分隔 */
.news-list { padding: 0; }
.news-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px dashed #ddd;
    text-decoration: none; color: #333;
    transition: all 0.3s ease;
    position: relative;
}
.news-item::after {
    content: ''; position: absolute; left: 0; bottom: -1px;
    width: 0; height: 2px; background: #821A23;
    transition: width 0.5s ease;
}
.news-item:hover::after { width: 100%; }
.news-item:hover { color: #821A23; font-weight: 600; }
.news-item-date { display: none; }
.news-item-title {
    flex: 1; font-size: 16px; font-weight: 400;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    padding-right: 16px;
}
.news-item-time {
    font-size: 13px; color: #A3A3A3; flex-shrink: 0;
    padding-left: 12px; border-left: 1px solid #ddd;
}

/* 右栏：通知列表 - 日期徽章 */
.notice-list { padding: 0; }
.notice-item {
    display: flex; align-items: flex-start; gap: 16px;
    padding: 14px 0; border-bottom: 1px dashed #ddd;
    text-decoration: none; color: #333;
    transition: all 0.3s ease;
    position: relative;
}
.notice-item:last-child { border-bottom: none; }
.notice-item:hover h3 { color: #821A23; font-weight: 600; }
.notice-dot { display: none; }
.notice-date-badge {
    width: 80px; flex-shrink: 0; text-align: center;
    position: relative; z-index: 1;
}
.notice-date-badge .day {
    font-size: 28px; font-weight: 700; color: #821A23;
    line-height: 1;
}
.notice-date-badge .year-month {
    font-size: 13px; color: #821A23; margin-top: 4px;
}
.notice-content { flex: 1; min-width: 0; }
.notice-content h3 {
    font-size: 16px; font-weight: 400; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.notice-content p {
    font-size: 13px; color: #999; margin-top: 8px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notice-title { display: none; }
.notice-date { display: none; }

/* ===== 招生快讯 ===== */
.enroll-cta {
    background: linear-gradient(135deg, #821A23, #a1131e);
    padding: 40px 0; text-align: center; color: #fff;
}
.enroll-cta h2 {
    font-size: 36px; font-weight: 900; margin-bottom: 12px;
}
.enroll-cta p { font-size: 16px; opacity: 0.9; margin-bottom: 32px; }
.enroll-cta .btn-apply {
    display: inline-flex; align-items: center; gap: 8px;
    background: #F6D68A; color: #821A23;
    padding: 14px 40px; border-radius: 10px;
    font-weight: 700; font-size: 17px;
    transition: var(--transition);
}
.enroll-cta .btn-apply:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.2); }

/* ===== 校园图片 ===== */
.home-gallery-section { background: var(--bg-white); }
.gallery-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    grid-template-rows: repeat(2, clamp(170px, 15vw, 300px));
    gap: 12px;
}
.gallery-item {
    border-radius: 0;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #f5f5f5;
    min-height: 200px;
}
.gallery-main { grid-row: 1 / 3; }
/* 图片按原比例完整装入格子，空出来的地方用同一张图的模糊放大型垫底
   （格子的尺寸和排布不变，只是不再用 cover 硬裁） */
.gallery-item::before {
    content: '';
    position: absolute; inset: 0;
    background-image: inherit;
    background-position: center;
    background-size: cover;
    filter: blur(18px) brightness(0.86);
    transform: scale(1.1);
}
.gallery-item img {
    position: relative; z-index: 1;
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 55%);
    display: flex; align-items: flex-end;
    padding: 16px 20px;
    z-index: 2;
    opacity: 0; transition: opacity 0.3s ease;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span { color: #fff; font-size: 14px; font-weight: 500; }
.gallery-placeholder {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: rgba(255,255,255,0.5); gap: 10px;
}
.gallery-placeholder i { font-size: clamp(26px, 2.2vw, 44px); }
.gallery-placeholder span { font-size: 14px; }
@media (max-width: 960px) {
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 200px 200px 200px;
    }
    /* 主图占左上一格跨两行（和桌面端一致）；跨两列表格会变成细长横条，
       图片按完整比例显示时只剩中间一小块 */
    .gallery-main { grid-column: 1 / 2; grid-row: 1 / 3; }
}
@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        /* 单列时格子跟着屏宽变高，图片按完整比例显示才不会缩成一条 */
        grid-template-rows: repeat(5, clamp(180px, 52vw, 300px));
    }
    .gallery-main { grid-column: auto; grid-row: auto; }
}

/* ===== 友情链接 ===== */
.friendly-links { background: var(--bg); padding: 32px 0; }
.friendly-links h3 {
    text-align: center; font-size: 16px; font-weight: 600;
    color: var(--text-light); margin-bottom: 20px;
}
.link-tags {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
}
.link-tags a {
    padding: 8px 20px; background: var(--bg-white); border: 1px solid var(--border);
    border-radius: 8px; font-size: 14px; color: var(--text-secondary);
    transition: var(--transition);
}
.link-tags a:hover { color: var(--primary); border-color: var(--primary); }

/* ===== Banner 轮播导航 ===== */
.banner-carousel {
    position: absolute; inset: 0;
    z-index: 10; pointer-events: none;
}
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    pointer-events: auto;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    width: 48px; height: 48px; border-radius: 50%;
    font-size: 18px; cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
}
.carousel-prev { left: 24px; }
.carousel-next { right: 24px; }
.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-50%) scale(1.1);
}
.carousel-dots {
    position: absolute;
    bottom: 24px; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 10px;
    pointer-events: auto;
}
.carousel-dot {
    width: 8px; height: 8px; border-radius: 4px;
    background: rgba(255,255,255,0.35);
    cursor: pointer; transition: all 0.3s ease;
    border: none;
}
.carousel-dot.active {
    width: 26px; background: #E8B53E; opacity: 1;
}
.carousel-dot:hover {
    background: rgba(255,255,255,0.7);
}
@media (max-width: 900px) {
    .news-columns { flex-direction: column; }
}
@media (max-width: 768px) {
    .carousel-prev, .carousel-next {
        width: 36px; height: 36px; font-size: 14px;
    }
    .carousel-prev { left: 12px; }
    .carousel-next { right: 12px; }
    .carousel-dots { bottom: 16px; }
    .carousel-dot { width: 6px; height: 6px; }
}

/* ===== 视频展示 ===== */
.video-showcase {
    background: var(--bg-white);
}
.video-wrapper {
    max-width: 100%; margin: 0 auto;
    border-radius: 8px; overflow: hidden;
    background: #000;
}
.video-player {
    position: relative; width: 100%;
    aspect-ratio: 16 / 9; overflow: hidden;
}
.video-player video {
    width: 100%; height: 100%;
    display: block; object-fit: cover;
}
.video-play-overlay {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.3s ease;
    z-index: 2;
}
.video-play-overlay:hover {
    background: rgba(0, 0, 0, 0.45);
}
.video-play-overlay.hidden {
    opacity: 0; pointer-events: none;
}
.play-btn {
    width: 80px; height: 80px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.6);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
}
.play-btn i {
    font-size: 28px; color: #fff; margin-left: 4px;
}
.video-play-overlay:hover .play-btn {
    background: var(--primary, #c0392b);
    border-color: var(--primary, #c0392b);
    transform: scale(1.1);
}
.play-title {
    color: #fff; font-size: 16px; font-weight: 500;
    margin-top: 18px; letter-spacing: 0.02em;
}

/* ===== 首页响应式 ===== */
@media (max-width: 960px) {
    .brief-grid { grid-template-columns: 1fr; }
    .dept-grid { grid-template-columns: 1fr 1fr; }
    .news-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .dept-grid { grid-template-columns: 1fr; }
}