* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.banner {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.banner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner h1 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    white-space: pre-wrap; /* 保留空格 */
}

.banner h1 span {
    opacity: 0;
    display: inline-block;
    transition: opacity 0.3s ease;
}

section {
    padding: 4rem 2rem;
}

.story-content, .project-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* 将最小宽度从 250px 减小到 200px */
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1; /* 添加这行，使所有项目保持正方形 */
}

.gallery-item img {
    width: 100%;
    height: 100%; /* 改为 100% */
    object-fit: cover; /* 添加这行，确保图片填满容器并保持比例 */
    transition: transform 0.3s ease;
}

.item-description {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem; /* 减小内边距 */
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.item-description h3 {
    font-size: 0.9rem; /* 减小标题字体大小 */
    margin-bottom: 0.3rem; /* 减小标题下方间距 */
}

.item-description p {
    font-size: 0.8rem; /* 减小描述文字字体大小 */
    line-height: 1.2; /* 减小行高 */
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .item-description {
    transform: translateY(0);
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: #FF9F55;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -17px;
    background-color: white;
    border: 4px solid #FF9F55;
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.right::after {
    left: -16px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: white;
    position: relative;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.timeline-content img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 15px;
}

.timeline-content h3 {
    margin-bottom: 10px;
    color: #FF9F55;
}

.timeline-content p {
    margin-bottom: 0;
}

.contact-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 500px;
}

input, textarea, button {
    padding: 0.5rem;
    font-size: 1rem;
}

button {
    background-color: #333;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #555;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem;
}

.story-content {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.story-content.show {
    opacity: 1;
    transform: translateY(0);
}

.story-image {
    flex: 0 0 400px;  /* 固定宽度 */
    margin-right: 2rem;
}

.story-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.story-text {
    flex: 1;
}

.story-text h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

.story-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.story-content.show .story-text h2,
.story-content.show .story-text p {
    opacity: 1;
    transform: translateY(0);
}

/* 为每个段落添加延迟 */
.story-text p:nth-child(2) { transition-delay: 0.3s; }
.story-text p:nth-child(3) { transition-delay: 0.4s; }
.story-text p:nth-child(4) { transition-delay: 0.5s; }
.story-text p:nth-child(5) { transition-delay: 0.6s; }

/* 对于小屏幕设备的响应式布局 */
@media (max-width: 900px) {  /* 增加断点宽度，以适应更大的图片 */
    .story-content {
        flex-direction: column;
    }

    .story-content img {
        max-width: 100%;
        margin-bottom: 1rem;
    }
}

/* 在文件末尾添加以下样式 */
.story-text ul {
    list-style-type: none;
    padding-left: 1rem;
    margin-top: 1rem;
}

.story-text li {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 0.5rem;
    position: relative;
}

.story-text li::before {
    content: "•";
    color: #FF9F55;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.story-text strong {
    color: #FF9F55;
}

#main-nav {
    position: absolute;
    width: 100%;
    background-color: #fff; /* 或者您喜欢的颜色 */
    transition: position 0.3s ease;
}

#main-nav.fixed {
    position: fixed;
    top: 0;
    z-index: 1000;
}