/* ==========================================================================
   skin/css/hero.css
   首页 Hero 区块样式 — 按参考设计稿精确还原。
   独立于 home-template.css，不依赖 Tailwind 工具类编译。
   ========================================================================== */

/* ---------- Hero 容器 ---------- */
#hero {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
    background: #0f172a; /* 图片加载前的深色占位 */
}

@media (min-width: 768px) {
    #hero {
        height: 80vh;
    }
}

/* ---------- 媒体层：图片铺满 ---------- */
#hero .hero-media {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

#hero img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

/* ---------- 渐变遮罩 ----------
   顶部几乎透明（建筑清晰可见），
   向下渐变加深（保证底部文字可读性） */
#hero .hero-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 23, 42, 0.15) 0%,
        rgba(15, 23, 42, 0.35) 50%,
        rgba(15, 23, 42, 0.72) 100%
    );
}

/* ---------- 内容容器 ---------- */
#hero > div:last-child {
    position: relative;
    z-index: 10;
    max-width: 56rem;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
}

@media (min-width: 768px) {
    #hero > div:last-child {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* ---------- 共建标签 ---------- */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    margin-bottom: 2rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 2px;
}

.hero-badge svg {
    flex-shrink: 0;
    opacity: 0.9;
}

/* ---------- 主标题 ---------- */
.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 4.2rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 5rem;
    }
}

/* ---------- 红色装饰线 ---------- */
.hero-divider {
    width: 3.5rem;
    height: 3px;
    background: #c8102e;
    border-radius: 2px;
    margin: 0 auto 1.2rem;
}

/* ---------- 副标题 ---------- */
.hero-subtitle {
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 300;
    letter-spacing: 0.28em;
    margin-bottom: 2.5rem;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 1.05rem;
    }
}

/* ---------- 按钮组 ---------- */
.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
}

@media (min-width: 640px) {
    .hero-actions {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
}

/* 按钮基础样式 */
.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.28s ease;
    text-decoration: none;
    white-space: nowrap;
}

.hero-btn svg {
    flex-shrink: 0;
    transition: transform 0.22s ease;
}

.hero-btn:hover {
    color: #ffffff;
}

.hero-btn:hover svg {
    transform: translateX(3px);
}

/* ========== Services 容器（与全站对齐、首末贴边） ========== */
.services-wrap {
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
}

/* Services 卡片：接近正方形 + hover 样式 */
.services-grid > a {
    aspect-ratio: 1 / 1;
    padding: 28px 12px !important;
}

.services-grid > a:hover {
    background: #f8fafc !important;
    transform: none !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

/* 图标容器：浅色主色调背景 */
.services-grid > a > div:first-child {
    background: color-mix(in oklab, var(--color-primary, #194376) 10%, transparent) !important;
}

/* hover 时图标变实心主色 */
.services-grid > a:hover > div:first-child {
    background: var(--color-primary, #194376) !important;
    color: #ffffff !important;
}

/* 实心按钮（深蓝底色） */
.hero-btn-primary {
    background: #194376;
    color: #ffffff;
    border: 1px solid #194376;
}

.hero-btn-primary:hover {
    background: #15365e;
    border-color: #15365e;
    box-shadow: 0 4px 16px rgba(25, 67, 118, 0.35);
}

/* 描边按钮（透明底+白边框） */
.hero-btn-outline {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.55);
}

.hero-btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.8);
}

/* ========== About 研究院简介 ========== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: flex-start;
    }
}

/* --- 左侧文字区 --- */
.about-left {
    padding-right: 0.5rem;
}

.about-title-wrap {
    margin-bottom: 1.25rem;
}

.about-heading {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .about-heading {
        font-size: 2rem;
    }
}

.about-title-line {
    width: 3rem;
    height: 3px;
    background: #c8102e;
    border-radius: 1px;
}

/* About 正文（包裹 class=text，含数据库原始 p 标签） */
.about-left .text {
    color: #444;
    font-size: 0.95rem;
    line-height: 2;
}

.about-left .text p {
    text-indent: 2em;
    line-height: 2.1;
    margin-bottom: 0.9rem;
}

.about-left .text p:last-child {
    margin-bottom: 1.5rem;
}

/* ========== 研究动态网格（art4）：一行3个 ========== */
.research-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

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

@media (min-width: 769px) and (max-width: 1024px) {
    .research-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 查看全部成果按钮 */
.research-more {
    text-align: center;
    margin-top: 0.5rem;
}

.research-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 2rem;
    background: #194376;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.25s ease;
}

.research-more-btn:hover {
    background: #15365e;
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(25, 67, 118, 0.3);
}

.research-more-btn svg {
    transition: transform 0.25s ease;
}

.research-more-btn:hover svg {
    transform: translateX(3px);
}

/* 统计卡片 */
.about-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.5rem;
    background: #f7f8fa;
    border: 1px solid #e8eaed;
    border-radius: 6px;
    margin-bottom: 1.75rem;
}

.about-stat-icon {
    width: 44px;
    height: 44px;
    background: #194376;
    color: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.about-stat-body {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}

.about-stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
}

.about-stat-label {
    font-size: 0.85rem;
    color: #777;
}

/* 了解更多按钮 */
.about-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1.65rem;
    background: #194376;
    color: #ffffff !important;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.25s ease;
}

.about-btn:hover {
    background: #15365e;
    color: #ffffff !important;
    box-shadow: 0 3px 12px rgba(25, 67, 118, 0.3);
    transform: translateY(-1px);
}

.about-btn svg {
    transition: transform 0.25s ease;
}

.about-btn:hover svg {
    transform: translateX(3px);
}

/* --- 右侧图片区 --- */
.about-right {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.about-img-wrap {
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #e8eaed;
}

.about-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

/* ========== 新闻动态 ========== */
/* 标题栏：左侧标题+红线，右侧更多链接 */
.news-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.news-title-wrap {
    flex-shrink: 0;
}

.news-heading {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .news-heading {
        font-size: 2rem;
    }
}

.news-title-line {
    width: 3rem;
    height: 3px;
    background: #c8102e;
    border-radius: 1px;
}

/* 更多新闻链接 */
.news-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #194376 !important;
    font-size: 0.88rem;
    text-decoration: none;
    padding-bottom: 2px;
    transition: all 0.25s ease;
}

.news-more-link:hover {
    color: #c8102e !important;
}

.news-more-link svg {
    transition: transform 0.25s ease;
}

.news-more-link:hover svg {
    transform: translateX(3px);
}

/* 新闻列表 */
.news-list {
    border: 1px solid #e8eaed;
    border-radius: 6px;
    overflow: hidden;
}

/* 单条新闻 */
.news-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.15rem 1.5rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f0f1f3;
    transition: background 0.2s ease;
}

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

.news-item:hover {
    background: #fafbfc;
}

/* 左侧内容区 */
.news-item-body {
    flex: 1;
    min-width: 0;
}

.news-item-top {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.35rem;
}

/* 分类标签 */
.news-tag {
    display: inline-block;
    padding: 2px 9px;
    background: #eef2ff;
    color: #194376;
    font-size: 0.72rem;
    font-weight: 500;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 标题 */
.news-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.news-item:hover .news-item-title {
    color: #194376;
}

/* 描述 */
.news-item-desc {
    font-size: 0.82rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 0;
}

/* 右侧日期 */
.news-item-date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #999;
    font-size: 0.82rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.news-item-date svg {
    opacity: 0.7;
}

/* ========== 合作伙伴 ========== */
.partner-section {
    margin-bottom: 2.5rem;
}

.partner-section:last-child {
    margin-bottom: 0;
}

/* 分类标题行：图标 + 文字 + 底部分隔线 */
.partner-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    padding-bottom: 0.6rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #e8eaed;
}

.partner-section-title svg {
    color: #194376;
}

/* 一行6个网格 */
.partner-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

@media (max-width: 1024px) {
    .partner-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 560px) {
    .partner-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* 单个合作伙伴卡片 */
.partner-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 1.25rem 0.75rem;
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
}

.partner-card:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    color: inherit !important;
}

/* 彩色方块图标（首字） */
.partner-icon {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #fff;
}
.partner-icon img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* 名称文字 */
.partner-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #444;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

