* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 5vh;
   

}
#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -1; /* 将视频置于内容下方 */
}
/* 为header设置样式 */
header {
    position: fixed; /* 固定在顶部 */
    top: 0;
    left: 0;
    width: 100%; /* 宽度占满视口 */
    background-color: white; /* 白色背景 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* 添加阴影效果 */
    z-index: 1000; /* 确保header在页面其他内容之上 */
    text-align: center;
}
header h1{
    font-size: 3rem;
    font-family: "cardo", sans-serif;
}

/* 设置内部导航链接的样式 */
nav a {
    display: block; /* 或者使用inline-block，根据需要调整 */
    padding: 10px 15px; /* 添加适当的内边距 */
    color: black; /* 文字颜色为黑色 */
    text-decoration: none; /* 去掉下划线 */
}

/* 为了避免header遮挡页面内容，给body添加顶部内边距 */
body {
    padding-top: 60px; /* header的高度，确保内容不会被遮挡 */
}

a {
    text-decoration: none; /* 取消下划线 */
    color: black; /* 设置或保留文字颜色 */
}
.top-container, .bottom-container {
    display: grid;
    gap: 1rem;
    text-align: center;
    
}

.top-container {
    grid-template-columns: repeat(3, 1fr);
}

.bottom-container {
    grid-template-columns: repeat(4, 1fr);
    margin-top: 1rem;

}

.top-container img, .bottom-container img {
    width: 100%;
    height: auto;
    display: block;
}

#restaurant, #game, #retail_installation, #product_video, 
#infographic_featurette_video, #digital_signage, #collaborative_project {
    position: relative;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1rem;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px); /* 模糊半径可以根据需要调整 */
}

#restaurant:hover .overlay, #game:hover .overlay, 
#retail_installation:hover .overlay, #product_video:hover .overlay, 
#infographic_featurette_video:hover .overlay, #digital_signage:hover .overlay, 
#collaborative_project:hover .overlay {
    opacity: 0;
}

.overlay h2, .overlay a {
    margin: 0.5rem;
}
footer {
    text-align: center;
    background-color: #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    height: 4rem;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    font-family: "cardo", sans-serif;
    padding: 2rem;
}
@media (max-width: 768px) {
    /* 调整网格布局为单列显示 */
    .top-container, .bottom-container {
        grid-template-columns: 1fr;
        height: auto;
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    a {
        text-decoration: none; /* 取消下划线 */
        color: black; /* 设置或保留文字颜色 */
    }
    /* 在小屏幕上取消遮罩效果，并将内容放置在图片下方 */
    .overlay {
        background: transparent;
        backdrop-filter: none;
        position: static;
        color: black; /* 或适合小屏幕阅读的颜色 */
    }

    /* 在小屏幕上调整图片下的文本样式 */
    .overlay h2, .overlay a {
        margin: 0.5rem 0; /* 调整间距 */
        text-align: center;
    }

    /* 可以考虑在小屏幕上减小标题字体大小 */
    header h1 {
        font-size: 2rem; /* 调整为更小的字体大小 */
    }

    /* 如果footer在小屏幕上太大，也可以进行调整 */
    footer {
        height: auto;
        padding: 1rem;
    }
}
