/* 通用样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

section {
    padding: 20px;
}

/* 第一部分 */
#section1 {
    display: flex;
    align-items: center;
    background-color: #87CEEB;
    height: 15vh;
    padding: 0 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-container img {
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
}

.slogan-container {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
    margin-left: 20px;
}

.slogan-container p {
    display: inline-block;
    padding-left: 100%;
    animation: scrollText 10s linear infinite;
}

@keyframes scrollText {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* 第二部分 */
#section2 {
    height: 60vh;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel {
    display: flex;
    width: 90%;
    max-width: 1200px;
    gap: 20px;
}

.carousel-images, .carousel-videos {
    position: relative;
    width: 50%;
    overflow: hidden;
}

.carousel-inner, .video-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-item, .video-item {
    min-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; /* 文字统一显示在下方 */
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    height: 400px; /* 统一高度 */
    overflow: hidden; /* 裁剪溢出部分 */
}

.carousel-item img {
    width: 100%;
    height: 80%; /* 图片占容器高度的 80% */
    object-fit: contain; /* 按比例缩放图片，确保完整显示 */
    border-radius: 10px;
    object-fit: cover; /* 按比例缩放并裁剪 */
    border: 1px solid rgb(216, 208, 208); /* 添加 1px 灰色边框 */
}

.carousel-item p, .video-title {
    margin-top: 10px;
    font-size: 18px;
    text-align: center;
}

video {
    width: 100%;
    height: 80%; /* 视频占容器高度的 80% */
    object-fit: cover; /* 按比例缩放视频 */
    border-radius: 10px;
    background-color: #000; /* 视频加载前的黑色背景 */
    border: 1px solid rgb(216, 208, 208); /* 添加 1px 灰色边框 */
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 18px;
    z-index: 10;
}

.carousel-button.prev {
    left: 10px;
}

.carousel-button.next {
    right: 10px;
}

.carousel-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 第三部分 */
#section3 {
    height: 50vh;
    background-color: #e0e0e0;
    padding: 20px;
    text-align: center;
}

#section3 h2 {
    margin-bottom: 20px;
}

#section3 p {
    font-size: 18px;
    line-height: 1.6;
    text-indent: 2em; /* 首行缩进 2 个字符 */
    margin-bottom: 1em; /* 段落之间的间距 */
    text-align: left;
}

/* 第四部分 */
footer {
    height: 8vh;
    background-color: #333;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px;
}

footer p {
    margin: 0;
    font-size: 16px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .carousel {
        flex-direction: column;
        gap: 10px;
    }

    .carousel-images, .carousel-videos {
        width: 100%;
    }

    #section2 {
        height: auto;
        padding: 20px 0;
    }

    #section3 {
        height: auto;
        padding: 20px;
    }

    footer {
        height: auto;
        padding: 10px;
    }
}