/* 全局样式 */
:root {
    --primary-color: rgb(17, 87, 64);  /* 主题深绿色 */
    --primary-light: rgba(17, 87, 64, 0.1);  /* 浅色背景用 */
    --primary-hover: rgb(22, 107, 79);  /* 悬停状态稍亮 */
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --border-color: rgba(17, 87, 64, 0.2);
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    color: var(--text-color);
    padding-top: 70px; /* 调整为单行导航栏的高度 */
}

/* 导航栏样式 */
.navbar {
    background-color: var(--primary-color) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 10px 0;
    height: 70px;
}

.whu-logo {
    height: 40px;
    width: auto;
    margin-right: 15px;
}

.logo-text {
    display: flex;
    align-items: center;
}

.logo-text span {
    color: white;
    font-size: 20px;
    font-weight: bold;
    white-space: nowrap;
}

.nav-link {
    color: white !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
    background-color: var(--primary-hover);
    border-radius: 4px;
}

/* 轮播图样式 */
.carousel {
    margin-top: -70px; /* 调整为导航栏的高度 */
}

.carousel-item {
    height: 500px;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
}

.carousel-indicators button {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50%;
    margin: 0 5px !important;
    background-color: var(--primary-color) !important;
    opacity: 0.5;
}

.carousel-indicators button.active {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--primary-color);
    border-radius: 50%;
    padding: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .navbar {
        height: 60px;
    }

    .whu-logo {
        height: 30px;
    }

    .logo-text span {
        font-size: 16px;
    }

    .carousel {
        margin-top: -60px;
    }

    .carousel-item {
        height: 300px;
    }
}

/* 特色资源样式 */
.featured-resources {
    padding: 40px 0;
}

.section-title {
    color: var(--primary-color);
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.resource-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.resource-item {
    text-decoration: none;
    color: var(--text-color);
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.resource-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.resource-content {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(145deg, white, var(--primary-light));
}

.resource-info {
    flex-grow: 1;
    margin-right: 20px;
    width: calc(100% - 80px); /* 调整为图标的宽度 */
}

.resource-content h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin: 0 0 8px 0;
}

.resource-desc-wrapper {
    width: 300px;
}

.resource-desc {
    color: #666;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.resource-custom-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.resource-item:hover .resource-custom-icon {
    transform: scale(1.1);
}

/* 为每个图标设置特定颜色 */
.resource-item:nth-child(1) .resource-custom-icon {
    color: #0077be; /* 海洋蓝 */
}

.resource-item:nth-child(2) .resource-custom-icon {
    color: #e74c3c; /* 医疗红 */
}

.resource-item:nth-child(3) .resource-custom-icon {
    color: #2c3e50; /* 法律深蓝 */
}

.resource-item:nth-child(4) .resource-custom-icon {
    color: #27ae60; /* 生态绿 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    .section-title {
        font-size: 24px;
    }

    .resource-content {
        padding: 15px;
    }

    .resource-info {
        margin-right: 15px;
        width: calc(100% - 60px);
    }

    .resource-desc-wrapper {
        width: 200px;
    }

    .resource-content h3 {
        font-size: 16px;
    }

    .resource-desc {
        font-size: 12px;
    }

    .resource-custom-icon {
        width: 36px;
        height: 36px;
    }
}

/* 页脚样式 */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.copyright {
    margin-bottom: 0;
}

.contact-info p {
    margin: 5px 0;
}

.contact-info a {
    color: white;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* 移动端页脚样式 */
@media (max-width: 768px) {
    .footer {
        padding: 30px 0;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .copyright {
        margin-bottom: 20px;
    }

    .contact-info p {
        margin-bottom: 8px;
    }
}

.feature-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
}

.feature-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
    opacity: 0.5;
}

.feature-card p {
    color: #666;
    margin-bottom: 0;
    line-height: 1.6;
    font-size: 1rem;
}

.feature-card:hover p {
    color: #333;
}

/* 添加图标样式 */
.feature-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.feature-card:hover i {
    transform: scale(1.1);
}

/* 移动端响应式优化 */
@media (max-width: 768px) {
    /* 导航栏调整 */
    .navbar {
        padding: 5px 0;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    .navbar-toggler {
        padding: 4px 8px;
    }

    .nav-link {
        padding: 8px 12px !important;
        text-align: center;
    }

    /* 轮播图调整 */
    .carousel-item {
        height: 300px;
    }

    .carousel-caption h2 {
        font-size: 1.5rem;
    }

    .carousel-caption p {
        font-size: 1rem;
        display: none;
    }

    /* 特色资源卡片调整 */
    .feature-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .feature-card h3 {
        font-size: 1.2rem;
    }

    .feature-card p {
        font-size: 0.9rem;
    }

    .feature-card i {
        font-size: 1.5rem;
    }

    /* 页脚调整 */
    .footer {
        padding: 1.5rem 0;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .copyright {
        margin-bottom: 1rem;
    }

    .contact-info p {
        margin-bottom: 0.5rem;
    }
}

/* 平板设备响应式优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .feature-card {
        padding: 1.75rem;
    }

    .feature-card h3 {
        font-size: 1.3rem;
    }

    .carousel-item {
        height: 400px;
    }
} 