/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 (保持不变) */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
    margin: 2px 0;
}

.navbar ul {
    list-style-type: none;
    display: flex;
}

.navbar ul li {
    margin-left: 20px;
}

.navbar ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

/* 英雄区域 (保持不变) */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(to bottom, rgba(178, 248, 207, 0.178), rgba(247, 215, 179, 0.411)), url('../images/hero-background.jpg') no-repeat center center/cover;
}

.hero h1 {
    font-size: 8rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    text-shadow: 
        0 0 5px rgba(0, 0, 0, 0.952), 
        0 0 10px rgba(43, 255, 0, 0.685);
}

/* 功能模块样式 (完全重写) */
.features {
    padding: 4rem 0;
    background-color: #fff;
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* 移除原来的默认样式，使用新的定位结构 */
.feature-item {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    overflow: hidden; /* 确保内容不溢出圆角 */
    aspect-ratio: 4 / 3; /* 设置图片容器的宽高比，例如 4:3 */
    position: relative;
}

/* 图片容器 */
.image-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 图片样式 */
.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保证图片填满容器且不变形 */
    transition: transform 0.3s ease;
    display: block;
}

/* 悬浮遮罩层 (黑色半透明) */
.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0); /* 默认透明 */
    transition: background-color 0.3s ease;
    z-index: 1;
}

/* 文字样式 (绝对定位在图片上) */
.overlay-text {
    position: absolute;
    bottom: 20px; /* 距离底部 20px */
    left: 50%;
    transform: translateX(-50%); /* 水平居中 */
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7); /* 默认半透明白色 */
    z-index: 2; /* 确保在遮罩之上 */
    transition: color 0.3s ease, transform 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
    background-color: rgba(0, 0, 0, 0.2); /* 轻微背景增加可读性 */
    padding: 8px 20px;
    border-radius: 30px;
}

/* 鼠标悬停效果 */
.feature-item:hover::before {
    background-color: rgba(0, 0, 0, 0.6); /* 悬停时变为半透明黑色 */
}

.feature-item:hover .overlay-text {
    color: #fff; /* 悬停时文字变为纯白色 (高亮) */
    transform: translateX(-50%) scale(1.05); /* 稍微放大一点 */
}

/* 页脚 (保持不变) */
.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem 0;
}

.footer p {
    margin: 5px 0;
}
.footer a {
    color: #ffffff;           /* 默认灰色 */
    text-decoration: none; /* 去掉下划线（可选） */
    transition: color 0.2s ease;
}

.footer a:hover {
    color: #444;           /* 鼠标悬停时稍深一点，保持低调 */
}

.footer a:visited {
    color: #777;           /* 访问过后依然是柔和的灰色，不刺眼 */
}