* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html, body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #000;
    font-family: "TWK Lausanne", "Inter", sans-serif;
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Banner Container */
.banner-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    gap: 1em;
    padding: 1em;
    background-image: url('../IMG/background.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* 最終顯示的大圖層 */
.final-image-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0;
    z-index: 5;
    pointer-events: none;
}

.banner-container .col {
    position: relative;
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1em;
    transition: opacity 0.5s ease; /* 新增 */
}

/* 動畫完成後隱藏 col */
.banner-container .col.hidden {
    opacity: 0;
    pointer-events: none;
}

.col .item {
    position: relative;
    flex: 1;
    width: 100%;
    background: gray;
    overflow: hidden;
    border-radius: 8px;
}

/* 初始動畫位置 */
.c-1, .c-3, .c-5 {
    top: 100%;
}

.c-1 .item, .c-3 .item, .c-5 .item {
    top: 100%;
}

.c-2 .item, .c-4 .item {
    top: -100%;
}

/* Banner Content */
.banner-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.banner-content * {
    pointer-events: auto;
}

/* Banner Hero */
.banner-hero {
    position: absolute;
    width: 95%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    color: #fff;
}

.icon, .icon-2 {
    flex: 0.5;
    padding: 0 5em;
    font-size: 30px;
    opacity: 0.5;
}

.icon-2 {
    text-align: right;
}

.icon ion-icon, .icon-2 ion-icon {
    transform: scale(0);
}

.title {
    flex: 2;
    text-align: center;
    font-size: 40px;
    font-weight: 600;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

.title p {
    position: relative;
    top: 50px;
}

/* Footer */
.banner-content footer {
    position: absolute;
    bottom: 0;
    width: 100%;
}

/* Preview 輪播容器 */
.preview {
    position: absolute;
    bottom: 2em;
    right: 2em;
    overflow: visible;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

.preview-track {
    display: flex;
    gap: 0.5em;
}

.preview-slide {
    position: relative;
    top: 100px;
    width: 120px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    opacity: 0.6;
    object-fit: cover; /* 確保圖片正確顯示 */
}

.preview-slide:hover {
    opacity: 1;
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.5);
}

.preview-slide.active {
    border-color: #fff;
    opacity: 1;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.slide-num {
    margin: 3em 0;
    text-align: center;
    color: #fff;
    font-size: 18px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

.slide-num p {
    position: relative;
    top: 30px;
}

.current-slide {
    font-weight: bold;
}

/* 響應式設計 */
@media (max-width: 900px) {
    .slide-num {
        text-align: left;
        padding-left: 2em;
        margin-bottom: 2.5em;
    }
    
    .title {
        font-size: 30px;
    }
    
    .icon, .icon-2 {
        padding: 0 1em;
        font-size: 16px;
    }

    .preview {
        bottom: 1em;
        right: 1em;
    }

    .preview-slide {
        width: 80px;
        height: 60px;
    }

    .banner-container {
        gap: 0.5em;
        padding: 0.5em;
    }
}

@media (max-width: 600px) {
    .preview-slide {
        width: 60px;
        height: 45px;
    }

    .title {
        font-size: 24px;
    }
}


.banner-container,
.col,
.item,
.final-image-layer {
    will-change: transform, opacity;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}


.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-image[src] {
    opacity: 1;
}