* {
    padding:0;
    margin:0;
}
body {
    background-color: white;
    background-image: url("images/3.png"); /* 你的背景图片 */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}
header {
    background-color:rgba(255, 255, 255, 1);
    height:65px;
    width:100%;
    position:fixed;    
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
  
    font-size: 23px;
}

h1 {
    color: black;
    position: absolute;
    margin: 0;
    font-size: 20px;
    left: 50px;
    top: 0;
    line-height: 70px;
    display: flex; 
    align-items: center; 
    width: auto; 
    font-weight: 500;
  
    font-size: 22px;
}

h1::after {
    content: "AI for Creative Innovation Design Joint Lab"; /* 默认显示英文 */
}

h1:hover::after {
    content: attr(data-text); /* 悬停时替换成 data-text 里的中文 */
}
/* 添加 logo 样式 */
h1::before {
    content: "";
    background-image: url("images/logo.png");
    background-size: contain; /* 让 logo 适应 */
    background-repeat: no-repeat;
    width: 55px; /* 适当调整 logo 大小 */
    height: 55px;
    display: inline-block;
    position: relative; /* 改为 relative，避免被覆盖 */
    z-index: 100;
    margin-right: 10px; /* 让 logo 和文字之间有间距 */
}
header ul {
    position:absolute;
    right:2vw;
    top:0;
    line-height:70px;
    font-weight: 500;
    font-size:20px;
    
}
header li {
    display:inline;
    margin-right:1.5vw;    
}
header a {
    position: relative;
    color:#808080;
    text-decoration: none;
    display: inline-block; 
    Line-height: 40px;
    padding: 0 10px; 
    box-sizing: border-box; 
    
}
header a::after {
    content: '';
    position: absolute;
    top: 0;
    left: -5px; /* 左移 5px */
    right: -5px; 
    bottom: 0;
    background-color: black;
    border-radius: 18px;
    opacity: 0;           
    transition: opacity 0.3s ease; 
    z-index: -1; 
              
    /* width: 100%;
    height: 100%; */
}

header a:hover::after {
    opacity: 1;  
    padding: 4px 4px;
}

header a:hover {
    /* text-decoration: underline; */
    color: white;         
}

.title-section {
    width: 100%; /* 让标题区域占满整个页面 */
    text-align: center; /* 居中 */
    display: flex;
    /* justify-content: center; 让标题保持居中 */
    /* align-items: center; */
    margin-top: 100px; /* 让标题不会紧贴顶部 */
    margin-bottom: -50px; /* 保持与框体的间距 */
}

/* 让标题本身居中显示 */
.grid-title {
    font-size: 28px; 
    font-weight: bold; 
    color: black; 
    width: 100%;
    font-family: "Palatino Linotype", "Palatino", serif;
}

/* 布局容器 */
.grid-container {
    
    
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2列布局 */
    gap: 70px; /* 框之间的间距 */
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    max-width: 1300px; /* 设置容器最大宽度 */
    margin: 100px auto; /* 调整 `margin-top` 让容器向下移动 */
    padding: 30px; /* 添加内边距，使阴影看起来更自然 */
    /* background: white; 让阴影更明显，确保背景不是透明 */
    border-radius: 15px; /* 让容器有圆角，看起来更柔和 */
    

   
}

/* 每个框的样式 */
.grid-item {
    width: 100%;
    aspect-ratio: 5 / 2; /* 让框保持方形 */
    background-color: #f0f0f0; /* 背景颜色 */
    
    border-radius: 10px; /* 圆角 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden; /* 确保内容不会溢出 */
    position: relative;
    transition: transform 0.3s ease-in-out; /* 添加悬停动画 */
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.9);
}

/* 框内的链接 */
.grid-item a {
    text-decoration: none; /* 去掉超链接默认的下划线 */
    color: black;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* 图片样式，确保在框内显示 */
.grid-item img {
    width: 100%; /* 图片宽度100%，适应框的宽度 */
    height: 100%; /* 高度100%，填满框 */
    object-fit: cover; /* 确保图片填充整个框，不变形 */
    border-radius: 8px; /* 让图片有点圆角 */
}

/* 文字样式 */
.grid-item p {
    position: absolute; /* 让文字浮动在框的中间 */
    bottom: 100px;
    font-weight: bold;
    color: black;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 25px;
    font-family: "Palatino Linotype", "Palatino", serif;
}

/* 悬停效果 */
.grid-item:hover {
    transform: scale(1.05); /* 鼠标悬停时稍微放大 */
}



input::placeholder {
    color:#DDDDDD;
}
input:focus {
    outline: none; /* 移除焦點效果 */
    border-color:#E0E9A3; /* 焦點時的邊框顏色 */
} */
footer {
    background-color:#000000;
    color:#B7B7B7;
    height:60px;
    display:flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
}
.menu {
    display:none;
}

@media (max-width: 600px) {
    .grid-container {
        grid-template-columns: repeat(1, 1fr); /* 小屏幕时改成 1 列布局 */
    }
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    /* 隐藏默认菜单 */
    header ul {
        display: none;
        position: absolute;
        top: 90px; /* 让菜单紧贴 menu 按钮 */
        left: 0;
        width: 100%; /* 让菜单占满整个屏幕宽度 */
        background-color: rgba(0, 0, 0, 0.8); /* 背景颜色，可调 */
        text-align: center; /* 让文本居中 */
        padding: 10px 0;
    }

    /* 显示菜单按钮 */
    .menu {
        display: block;
        background-color: black;
        color: white;
        font-size: 20px;  /* 调整字体大小 */
        font-weight: bold; /* 让字体更清晰 */
        position: absolute;
        top: 20px;
        left: 20px;
        border: none;
        cursor: pointer;
        padding: 5px 10px;
        border-radius: 10px;
        z-index: 1000;
    }

    /* 设置菜单列表为竖排 */
    header ul li {
        display: block; /* 让菜单变成竖排 */
        margin: 5px 0; /* 增加行距 */
    }

    /* 调整菜单链接样式 */
    header ul li a {
        display: block;
        color: white;
        text-decoration: none;
        font-size: 18px;
        padding: 10px 0;
        /* transition: background 0.3s; */
    }

    h1 {
        font-size: 18px;  /* 调整字体大小，使其在小屏幕上更紧凑 */
        text-align: left; /* 让 h1 居中 */
        width: auto;  /* 让 h1 占满屏幕宽度 */
        left: 100px;
        /* transform: translateX(-50%); 居中对齐 */
        top: 25px;  /* 调整位置，使其更靠近顶部 */
        line-height: normal;  /* 让行高变得更适合小屏幕 */
    }
}