/* 首页样式 - 湖南能源装备研究院（依 Figma 设计稿 1920 版） */

/* ========== Banner + 新闻区 ========== */
.hero-section {
    padding-top: 44px;
}

.hero-layout {
    display: flex;
    gap: 38px;
}

/* 左侧轮播 */
.banner-slider {
    position: relative;
    width: 810px;
    flex-shrink: 0;
    overflow: hidden;
    touch-action: pan-y;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}

.banner-slider:active {
    cursor: grabbing;
}

.banner-slider img {
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

.banner-slider-wrapper {
    position: absolute;
    inset: 0;
    display: flex;
    transition: transform 0.5s ease;
    z-index: 1;
}

.banner-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

/* 覆盖整张轮播的可点击层：点击图片即跳转，拖动仍可切换 */
.banner-slide-link {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
    cursor: pointer;
}

.banner-slide-link:active {
    cursor: grabbing;
}

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

.banner-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 66px;
    z-index: 2;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 21px;
    box-sizing: border-box;
}

.banner-caption-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.banner-counter {
    color: #fff;
    font-size: 18px;
    line-height: 24px;
    margin-left: 20px;
    flex-shrink: 0;
}

.banner-counter em {
    font-style: normal;
    color: #E21F1F;
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    z-index: 2;
}

.banner-arrow:hover {
    opacity: 0.8;
}

.banner-arrow img {
    width: 100%;
    height: 100%;
    display: block;
}

.banner-prev {
    left: 16px;
}

.banner-next {
    right: 16px;
}

.banner-next img {
    transform: rotate(180deg);
}

/* 右侧新闻 */
.hero-news {
    flex: 1;
    min-width: 0;
}

.hero-news .section-tabs {
    background: var(--bg-light-blue);
    padding-right: 16px;
}

.hero-news-featured {
    display: flex;
    gap: 37px;
    margin-top: 36px;
}

.hero-news-featured-img {
    width: 250px;
    height: 162px;
    flex-shrink: 0;
    display: block;
    overflow: hidden;
}

.hero-news-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}

.hero-news-featured-img:hover img {
    transform: scale(1.05);
}

.hero-news-featured-text {
    flex: 1;
    min-width: 0;
}

.hero-news-featured-title {
    display: block;
    color: var(--text-main);
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-news-featured-title:hover {
    color: var(--primary-blue);
}

.hero-news-featured-desc {
    color: var(--text-sub);
    font-size: 16px;
    line-height: 26px;
    margin-top: 11px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-news-featured-date {
    color: var(--gold);
    font-family: Arial, sans-serif;
    font-size: 18px;
    line-height: 22px;
    margin-top: 9px;
}

.hero-news-list {
    margin-top: 24px;
}

.hero-news-list li {
    line-height: 58px;
}

.hero-news-list a {
    display: flex;
    align-items: center;
    color: var(--text-main);
    font-size: 18px;
}

.hero-news-list a::before {
    content: '';
    width: 5px;
    height: 5px;
    background: #c1c1c1;
    flex-shrink: 0;
    margin-right: 15px;
}

.hero-news-list a:hover {
    color: var(--primary-blue);
}

.hero-news-list .title {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-news-list .date {
    color: var(--gold);
    font-family: Arial, sans-serif;
    font-size: 18px;
    margin-left: 20px;
    flex-shrink: 0;
}

/* ========== 科研进展 / 通知公告 ========== */
.research-section {
    position: relative;
    isolation: isolate;
    margin-top: 54px;
    background: var(--bg-lighter-blue);
    padding: 38px 0 55px;
}

.research-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../hnu-images/home/section-bg.png') center / cover no-repeat;
    opacity: 0.12;
    z-index: -1;
    pointer-events: none;
}

.research-layout {
    display: flex;
    gap: 74px;
}

.research-progress {
    flex: 1;
    min-width: 0;
}

.research-notice {
    width: 549px;
    flex-shrink: 0;
}

/* 科研进展卡片 */
.research-cards {
    display: flex;
    gap: 47px;
    margin-top: 45px;
}

.research-card {
    display: flex;
    gap: 23px;
    flex: 1;
    min-width: 0;
}

.research-card-img {
    width: 221px;
    height: 151px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.research-card-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.research-card-title {
    color: var(--text-main);
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.research-card:hover .research-card-title {
    color: var(--primary-blue);
}

.research-card-date {
    color: var(--gold);
    font-family: Arial, sans-serif;
    font-size: 18px;
    line-height: 22px;
    margin-top: auto;
    padding-top: 10px;
}

/* 科研进展列表（两列卡片） */
.research-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-content: start;
    gap: 20px 47px;
    margin-top: 27px;
}

.research-item {
    display: flex;
    align-items: center;
    height: 70px;
    background: #fff;
    padding: 0 20px 0 25px;
    box-sizing: border-box;
}

.research-item .title {
    flex: 1;
    min-width: 0;
    color: var(--text-main);
    font-size: 18px;
    line-height: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.research-item .date {
    color: var(--gold);
    font-family: Arial, sans-serif;
    font-size: 18px;
    line-height: 24px;
    margin-left: 15px;
    flex-shrink: 0;
}

.research-item:hover {
    background: var(--primary-blue);
}

.research-item:hover .title {
    color: #fff;
}

/* 通知公告列表 */
.notice-list {
    margin-top: 45px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.notice-item {
    display: flex;
    align-items: center;
    height: 70px;
    background: #fff;
}

.notice-date-box {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    background: var(--gold);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #fff;
    font-family: Arial, sans-serif;
}

.notice-day {
    font-size: 26px;
    line-height: 26px;
}

.notice-ym {
    font-size: 16px;
    line-height: 24px;
}

.notice-title {
    flex: 1;
    min-width: 0;
    padding: 0 25px;
    color: var(--text-main);
    font-size: 18px;
    line-height: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notice-item:hover {
    background: var(--primary-blue);
}

.notice-item:hover .notice-date-box {
    background: #08519a;
}

.notice-item:hover .notice-title {
    color: #fff;
}

/* ========== 合作交流 / 党群动态 ========== */
.coop-section {
    padding: 49px 0 0;
}

.coop-layout {
    display: flex;
    gap: 64px;
}

.coop-main {
    flex: 1;
    min-width: 0;
}

.coop-party {
    width: 549px;
    flex-shrink: 0;
}

/* 合作交流内容 */
.coop-content {
    display: flex;
    gap: 27px;
    margin-top: 36px;
}

.coop-card {
    width: 377px;
    flex-shrink: 0;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.coop-card-img {
    width: 100%;
    height: 234px;
    object-fit: cover;
    display: block;
}

.coop-card-body {
    padding: 26px 22px 20px;
}

.coop-card-title {
    display: block;
    color: var(--text-main);
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.coop-card-title:hover {
    color: var(--primary-blue);
}

.coop-card-desc {
    color: var(--text-sub);
    font-size: 16px;
    line-height: 24px;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.coop-card-date {
    color: var(--gold-dark);
    font-family: Arial, sans-serif;
    font-size: 18px;
    line-height: 22px;
    margin-top: 13px;
}

/* 合作交流日期行 */
.coop-rows {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.coop-row {
    display: flex;
    align-items: center;
    height: 61px;
    background: var(--bg-card);
}

.coop-row-date {
    width: 110px;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../hnu-images/home/coop-row-date-bg.png') 0 0 / 100% 100% no-repeat;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 18px;
    line-height: 24px;
    padding-right: 18px;
    padding-left: 5px;
}

.coop-row-title {
    flex: 1;
    min-width: 0;
    padding: 0 20px 0 33px;
    color: var(--text-main);
    font-size: 18px;
    line-height: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coop-row:hover {
    background: var(--primary-blue);
}

.coop-row:hover .coop-row-date {
    background: url('../hnu-images/home/coop-row-date-bg-active.png') 0 0 / 100% 100% no-repeat;
}

.coop-row:hover .coop-row-title {
    color: #fff;
}

/* 党群动态 */
.party-featured {
    display: flex;
    gap: 24px;
    margin-top: 36px;
}

.party-featured-img {
    width: 176px;
    height: 115px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.party-featured-text {
    flex: 1;
    min-width: 0;
}

.party-featured-title {
    display: block;
    color: #000;
    font-size: 18px;
    line-height: 30px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.party-featured-title:hover {
    color: var(--primary-blue);
}

.party-featured-date {
    color: var(--gold);
    font-family: Arial, sans-serif;
    font-size: 18px;
    line-height: 22px;
    margin-top: 12px;
}

.party-list {
    margin-top: 27px;
}

.party-list li {
    border-top: 1px solid #e8e8e8;
    line-height: 58px;
}

.party-list li:last-child {
    border-bottom: 1px solid #e8e8e8;
}

.party-list a {
    display: flex;
    align-items: center;
    color: #000;
    font-size: 18px;
}

.party-list a::before {
    content: '';
    width: 5px;
    height: 5px;
    background: #c1c1c1;
    flex-shrink: 0;
    margin-right: 19px;
}

.party-list a:hover {
    color: var(--primary-blue);
}

.party-list .title {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.party-list .date {
    color: var(--gold);
    font-family: Arial, sans-serif;
    font-size: 18px;
    margin-left: 20px;
    flex-shrink: 0;
}

/* 专题专栏：横幅式列表 */
.party-banners {
    margin-top: 36px;
    display: flex;
    flex-direction: column;
    gap: 21px;
}

.party-banner {
    position: relative;
    display: flex;
    align-items: center;
    height: 125px;
    padding: 0 38px;
    overflow: hidden;
    background: var(--bg-card) center / cover no-repeat;
}

/* 整条横幅可点击：链接铺满整块，点击图片/空白处都能跳转 */
.party-banner-link {
    flex: 1;
    align-self: stretch;
    display: flex;
    align-items: center;
    color: inherit;
}

.party-banner-title {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: 30px;
    font-weight: 700;
    line-height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.party-banner.theme-blue {
    background-image: url('../hnu-images/home/zt-bg-1.svg');
}

.party-banner.theme-blue .party-banner-title {
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 30, 90, 0.35);
}

.party-banner.theme-sky {
    background-image: url('../hnu-images/home/zt-bg-2.svg');
}

.party-banner.theme-sky .party-banner-title {
    color: #d22323;
}

.party-banner.theme-sand {
    background-image: url('../hnu-images/home/zt-bg-3.svg');
}

.party-banner.theme-sand .party-banner-title {
    color: #c22b1c;
}

.party-banner:hover .party-banner-title {
    opacity: .85;
}

/* 自定义背景图（取内容的封面图）：白字 + 阴影保证可读 */
.party-banner.has-image .party-banner-title {
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}

/* ========== 快速链接 ========== */
.quick-section {
    padding: 37px 0 52px;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 50px;
    margin-top: 31px;
}

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 134px;
    background: #fff;
    border: 1px solid #bfd6ed;
    box-sizing: border-box;
    gap: 14px;
    color: var(--primary-blue);
    font-size: 16px;
    line-height: 24px;
}

.quick-link-icon {
    height: 40px;
    width: 40px;
    object-fit: contain;
    display: block;
}

.quick-link:hover {
    background: var(--primary-blue);
    color: #fff;
}

.quick-link:hover .quick-link-icon {
    filter: brightness(0) invert(1);
}

/* ========== 列表内容不足时的兜底高度 ========== */
/* PC 端各区域为左右分栏，任一列列表条数不足都会导致整块高度塌陷， */
/* 这里按设计稿条数给出最小高度，保证数据较少时版式依旧完整； */
/* 移动端/单列布局不适用，故限定在 1201px 以上生效 */
@media (min-width: 1201px) {
    /* Banner 无自身高度，靠右侧新闻撑开，条数少时会被压缩 */
    .banner-slider {
        min-height: 568px;
    }

    /* 头条新闻列表：设计稿 5 条 × 58px 行高 */
    .hero-news-list {
        min-height: 290px;
    }

    /* 科研进展列表：设计稿 3 行 × 70px + 2 × 20px 间距 */
    .research-list {
        min-height: 250px;
    }

    /* 通知公告列表：设计稿 5 条 × 70px + 4 × 20px 间距 */
    .notice-list {
        min-height: 430px;
    }

    /* 合作交流日期行：设计稿 5 条 × 61px + 4 × 28px 间距 */
    .coop-rows {
        min-height: 417px;
    }

    /* 党群动态列表：设计稿 5 条 × 58px 行高 */
    .party-list {
        min-height: 290px;
    }

    /* 专题专栏横幅：设计稿 3 条 × 125px + 2 × 21px 间距 */
    .party-banners {
        min-height: 417px;
    }
}
