.carousel {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    max-height: 1000px;
    margin-top: -20px !important;
    padding-top: 0 !important;
    z-index: 1;
    /* 使用 CSS mask 屬性 */
    -webkit-mask-image: url('../images/benq/mask.png');
    mask-image: url('../images/benq/mask.png');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: cover;
    mask-size: cover;
    -webkit-mask-position: center;
    mask-position: center;
}



/* 確保桌面版達到1200px寬度 */
@media (min-width: 1200px) {
    /* .carousel {
        width: 1200px;
    } */
}

.carousel-inner {
    display: flex;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0 !important;
}

.carousel-item {
    min-width: 100%;
    position: relative;
    margin-top: 0 !important;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.carousel-item img {
    width: 100%;
    height: auto;
    display: block;
    margin-top: 0 !important;
}

/* 文字說明區域 */
.carousel-caption {
    position: absolute;
    bottom: 80px;
    left: 60px;
    color: white;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    border-left: 4px solid #007bff;
}

.banner-title {
    font-size: 2.5em;
    font-weight: bold;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-subtitle {
    font-size: 1.3em;
    font-weight: 300;
    margin: 0 0 15px 0;
    color: #87CEEB;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.banner-description {
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 左右箭頭按鈕 */
.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    padding: 15px 20px;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.carousel-prev:hover, .carousel-next:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

/* 指示點 */
.carousel-indicators {
    position: absolute;
    top: 85%;
    right: 80px;
    left: auto;
    transform: translateY(-50%);
    display: flex;
    flex-direction: row;
    gap: 15px;
    z-index: 100;
    background: transparent;
    padding: 10px 20px;
    border-radius: 25px;
    pointer-events: auto;
}

.indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
    outline: none;
    pointer-events: auto;
}

.indicator.active {
    background: white;
    border-color: white;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: white;
    transform: scale(1.15);
}
/* 手機版時移除所有邊距和填充 */
@media (max-width: 768px) {
    /* body {
        margin: 0 !important;
        padding: 0 !important;
    } */
    
    .carousel {
        margin: 0 !important;
        padding: 0 !important;
        max-height: none !important;
    }
}
/* 響應式設計 */
@media (max-width: 768px) {

    
    .carousel-item {
        height: 80vh; /* 佔滿視窗高度 */
        overflow: hidden; /* 隱藏溢出部分 */
    }
    
    .carousel-item img {
        width: 100%;
        height: 80vh; /* 佔滿視窗高度 */
        object-fit: cover; /* 覆蓋整個容器，避免空白 */
        object-position: center;
        transform: none;
    }
    
    .carousel-caption {
        bottom: 40px;
        left: 20px;
        right: 20px;
        max-width: none;
        padding: 20px;
    }
    
    .banner-title {
        font-size: 1.8em;
    }
    
    .banner-subtitle {
        font-size: 1.1em;
    }
    
    .banner-description {
        font-size: 0.95em;
    }
    
    .carousel-prev, .carousel-next {
        padding: 10px 15px;
        font-size: 1.5em;
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
    
    .indicator {
        width: 14px;
        height: 14px;
    }
    
    .carousel-indicators {
        bottom: 10px;
        gap: 12px;
        padding: 8px 16px;
    }
}

@media (max-width: 480px) {
    .carousel {
        height: 80vh; /* 佔滿整個視窗高度 */
        min-height: 80vh; /* 最小高度也是全視窗 */
        overflow: hidden; /* 隱藏溢出部分 */
        margin-top: 0 !important;
    }
    
    .carousel-item {
        height: 80vh; /* 佔滿視窗高度 */
        overflow: hidden; /* 隱藏溢出部分 */
    }
    
    .carousel-item img {
        width: 100%;
        height: 80vh; /* 佔滿視窗高度 */
        object-fit: cover; /* 覆蓋整個容器，避免空白 */
        object-position: center;
        transform: none;
    }
    
    .carousel-caption {
        bottom: 20px;
        left: 15px;
        right: 15px;
        padding: 15px;
    }
    
    .banner-title {
        font-size: 1.5em;
        margin-bottom: 8px;
    }
    
    .banner-subtitle {
        font-size: 1em;
        margin-bottom: 10px;
    }
    
    .banner-description {
        font-size: 0.9em;
        line-height: 1.4;
    }
    
    .carousel-prev, .carousel-next {
        padding: 8px 12px;
        font-size: 1.3em;
    }
    
    .carousel-indicators {
        bottom: 5px;
        gap: 10px;
        padding: 6px 12px;
    }
    
    .indicator {
        width: 12px;
        height: 12px;
    }
}
  