/* ============================================================
   幻燈片樣式（方案 1：容器高度 = 圖片高度，零裁切零留白）
   ============================================================ */

/* 外層容器：全寬、貼左、高度由 JS 動態設定 */
#fullscreen-slideshow {
    position: relative;
    
    /* ★ 關鍵：利用 calc 計算，精準破開父容器的 92% 寬度限制 */
    width: calc(100% + 8.696%) !important;
    margin-left: -4.348% !important;
    margin-right: -4.348% !important;

    background: transparent;
    min-height: 200px;
    overflow: hidden;

    margin-top: 20px !important;
    margin-bottom: 30px !important;
    box-sizing: border-box !important;
    display: block !important;

    transition: height 0.5s ease;
}

/* 內層：填滿容器 */
#fullscreen-slideshow .slideshow-inner {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* 每一張 slide：絕對定位疊在一起，用 opacity 淡入淡出 */
.slide {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none;
}

.slide.active {
    opacity: 1 !important;
    pointer-events: auto;
}

/* ★ 關鍵：contain 不裁切，容器高度由 JS 對齊圖片 */
.slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    opacity: 0.95 !important;   
}

/* 左右箭頭 */
.prev,
.next {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10 !important;
    background: rgba(0, 0, 0, 0.4) !important;
    color: #fff !important;
    border: none !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 18px !important;
    transition: background 0.3s !important;
}

.prev { left: 20px !important; }
.next { right: 20px !important; }

.prev:hover,
.next:hover {
    background: rgba(0, 0, 0, 0.7) !important;
}

/* 指示器圓點 */
.dots-container {
    position: absolute !important;
    bottom: 18px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    gap: 12px !important;
    z-index: 10 !important;
}

.dot {
    width: 14px !important;
    height: 14px !important;
    background: rgba(255, 255, 255, 0.5) !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: background 0.3s, transform 0.2s !important;
}

.dot.active-dot {
    background: #ffffff !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.2) !important;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    transform: scale(1.1) !important;
}

/* 響應式：小螢幕圓點縮小 */
@media (max-width: 768px) {
    .dot {
        width: 10px !important;
        height: 10px !important;
    }
    .dots-container {
        bottom: 10px !important;
        gap: 8px !important;
    }
    .prev, .next {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }
}

/* 移除內容區域 padding 對幻燈片的影響 */
.page-content-inner {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ============================================================
   手機 / 平板：隱藏 Banner 幻燈片
   ============================================================ */
@media screen and (max-width: 1024px) {
    #fullscreen-slideshow {
        display: none !important;
    }
}