/* 首页样式 */

/* 轮播图区域 */
.hero-section {
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
}

.carousel-image {
    height: 500px;
    object-fit: cover;
    filter: brightness(0.85);
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0) 100%);
}

.carousel-caption {
    position: absolute !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
    color: #fff !important;
    text-align: left !important;
    padding-left: 2.5rem !important;
    white-space: normal;
    word-break: break-word;
}

.caption-content {
    max-width: 700px;
}

.caption-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.caption-content h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
}

.caption-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
    max-width: 600px;
}

/* 动画效果 */
.animate-slide-up {
    animation: slideUp 1s ease-out;
    opacity: 0;
    animation-fill-mode: forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 轮播图控件样式 */
.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
}

.carousel-indicators button.active {
    background-color: rgba(255, 255, 255, 0.9);
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 24px;
    height: 24px;
    background-size: 100%;
}

/* 标题装饰线 */
.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    margin-top: 1rem;
}

/* 实验室简介区域 */
.lab-intro {
    position: relative;
}

.lab-intro .intro-description {
    line-height: 1.3 !important;
}

.lab-intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    z-index: -1;
}

.intro-content {
    max-width: 800px;
    text-align: left;
    margin-left: auto;
    margin-right: auto;
}

.intro-description {
    text-indent: 2rem;
}

/* 负责老师简介样式 */
.director-profile {
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.director-profile:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.1) !important;
}

.director-photo-wrapper {
    position: relative;
}

.director-photo {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: none;
    border-radius: 50%;
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease;
}

.director-profile:hover .director-photo {
    transform: scale(1.05);
}

.director-info h4 {
    font-size: 1.4rem;
    color: #212529;
}

.director-desc {
    font-size: 0.95rem;
    line-height: 1.6;
}

.director-desc p {
    margin-bottom: 0.5rem;
    text-indent: 2rem;
}

.director-contact a {
    color: #0d6efd;
    transition: color 0.3s ease;
}

.director-contact a:hover {
    color: #0a58ca;
}

/* 特色卡片 - 添加可点击样式 */
.feature-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.1) !important;
}

.feature-link {
    display: block;
    color: inherit !important;
}

.feature-link:hover {
    color: inherit !important;
    text-decoration: none !important;
}

.feature-link h4 {
    color: #212529 !important;
    /* 黑色标题 */
}

.feature-link:hover h4 {
    color: #212529 !important;
    /* 悬停时保持黑色 */
}

.clickable-card {
    cursor: pointer;
    position: relative;
}

.clickable-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.15) !important;
}

.clickable-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.03), rgba(0, 123, 255, 0.01));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.clickable-card:hover::before {
    opacity: 1;
}

.read-more-indicator {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.2rem;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.clickable-card:hover .read-more-indicator {
    opacity: 1;
    transform: translateX(0);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    transition: transform 0.3s ease;
}

.feature-card:hover .icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.clickable-card:hover .icon-wrapper {
    transform: scale(1.15) rotate(8deg);
}

/* 新闻卡片 */
.news-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.1) !important;
}

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.08);
}

.news-title a {
    color: #212529 !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
}

/* 研究方向卡片样式*/
.research-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.research-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.1) !important;
}

/* 正方形的图片容器：使用 padding-top 维持 1:1 比例，响应式宽度 */
.research-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    /* 高度 = 宽度，形成正方形 */
    overflow: hidden;
}

/* 使用绝对定位使图片覆盖正方形容器，保持裁切（原图直接加载） */
.research-image .research-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.research-card:hover .research-image .research-img {
    transform: scale(1.08);
}

/* 研究方向富文本描述：整体居中，列表作为块居中但内部左对齐以保留序号可读性 */
.research-description {
    text-align: center;
    /* 段落/标题等居中 */
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

/* 让内部块级元素居中 */
.research-description>* {
    margin-left: auto;
    margin-right: auto;
}

/* 使列表整体居中显示，但列表项内部保持左对齐（保留序号排列） */
.research-description ol,
.research-description ul {
    display: inline-block;
    text-align: left;
    /* 列表内部左对齐以保持序号与内容对齐 */
    padding-left: 1.2rem;
    margin: 0.5rem 0;
}

/* 若希望序号更靠内侧，可启用下面一行（可选） */
/* .research-description ol { list-style-position: inside; } */

/* 表格和图片也居中 */
.research-description table,
.research-description img,
.research-description iframe {
    margin-left: auto;
    margin-right: auto;
    display: block;
    max-width: 100%;
}

/* 小屏优化：确保列表不会超出容器并可换行 */
@media (max-width: 576px) {

    .research-description ol,
    .research-description ul {
        display: block;
        text-align: left;
        padding-left: 1rem;
    }
}

/* 响应式设计 - 平板设备 */
@media (max-width: 768px) {
    .carousel-image {
        height: 350px;
    }

    .caption-content h2 {
        font-size: 1.8rem !important;
    }

    .caption-content h3 {
        font-size: 1.2rem !important;
    }

    .caption-content p {
        font-size: 1rem !important;
    }

    .feature-card {
        padding: 2rem !important;
    }

    .icon-wrapper {
        width: 60px;
        height: 60px;
    }
}

/* 响应式设计 - 手机设备 */
@media (max-width: 576px) {
    .carousel-image {
        height: 280px;
    }

    .hero-section {
        padding: 2rem 0 !important;
    }

    .caption-content {
        max-width: 95%;
    }

    .caption-content h2 {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .caption-content h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .caption-content p {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
    }
}

/* 额外的视觉增强 */
.feature-card,
.news-card,
.research-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 加载动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 按钮悬停效果增强 */
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 新闻徽章样式增强 */
.badge {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}