/**
 * RSFutureHero02 Carousel Styles
 *
 * v1.1.3 - 加強選擇器優先級
 *
 * @package RSFutureHero02_Carousel
 * @version 1.1.3
 */

/* ==========================================================================
   CSS 重設與隔離 - 使用更高優先級選擇器
   ========================================================================== */

body .rsfuturehero02-carousel-wrapper,
body .rsfuturehero02-carousel-wrapper *,
body .rsfuturehero02-carousel-wrapper *::before,
body .rsfuturehero02-carousel-wrapper *::after {
    box-sizing: border-box !important;
}

body .rsfuturehero02-carousel-wrapper a,
body .rsfuturehero02-carousel-wrapper a:hover,
body .rsfuturehero02-carousel-wrapper a:focus,
body .rsfuturehero02-carousel-wrapper a:active,
body .rsfuturehero02-carousel-wrapper a:visited {
    text-decoration: none !important;
    color: inherit !important;
    outline: none !important;
    box-shadow: none !important;
}

body .rsfuturehero02-carousel-wrapper img {
    max-width: none !important;
    border: none !important;
    display: block !important;
    box-shadow: none !important;
}

body .rsfuturehero02-carousel-wrapper button {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
}

body .rsfuturehero02-carousel-wrapper h3,
body .rsfuturehero02-carousel-wrapper p {
    margin: 0 !important;
    padding: 0 !important;
}

body .rsfuturehero02-carousel-wrapper ul,
body .rsfuturehero02-carousel-wrapper li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ==========================================================================
   強制覆蓋 Splide 預設樣式
   ========================================================================== */

body .rsfuturehero02-carousel-wrapper .splide,
body .rsfuturehero02-carousel-wrapper .splide__track,
body .rsfuturehero02-carousel-wrapper .splide__list,
body .rsfuturehero02-carousel-wrapper .splide__slide {
    visibility: visible !important;
}

/* ==========================================================================
   容器 - 桌機版
   ========================================================================== */

body .rsfuturehero02-carousel-wrapper {
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
    position: relative !important;
    overflow: visible !important;
}

/* ==========================================================================
   Tab 導航 - 桌機版
   ========================================================================== */

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-tabs {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    gap: 50px !important;
    flex-wrap: wrap !important;
}

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-tab {
    display: flex !important;
    padding: 4px 20px !important;
    justify-content: center !important;
    align-items: center !important;
    background: transparent !important;
    cursor: pointer !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #505050 !important;
    text-align: center !important;
    font-feature-settings: 'case' on !important;
    font-family: "Noto Sans TC", sans-serif !important;
    font-size: 18px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 160% !important;
    letter-spacing: 1.8px !important;
    transition: background-color 0.3s ease, color 0.3s ease !important;
    text-decoration: none !important;
}

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-tab.is-active,
body .rsfuturehero02-carousel-wrapper .rsfuturehero02-tab:hover {
    background: #70695F !important;
    color: #FFFFFF !important;
}

/* ==========================================================================
   輪播容器 - 桌機版 Overflow 效果
   ========================================================================== */

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-carousel {
    margin-top: 48px !important;
    position: relative !important;
    overflow: visible !important;
}

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-carousel .splide__track {
    overflow: visible !important;
}

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-carousel .splide__list {
    display: flex !important;
    align-items: center !important;
}

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-carousel .splide__slide {
    display: flex !important;
    justify-content: center !important;
    transition: opacity 0.3s ease !important;
    opacity: 0.5 !important;
    flex-shrink: 0 !important;
}

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-carousel .splide__slide.is-active {
    opacity: 1 !important;
}

/* ==========================================================================
   卡片樣式 - 桌機版
   ========================================================================== */

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-card {
    width: 819px !important;
    max-width: 819px !important;
    display: inline-flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    gap: 10px !important;
    text-decoration: none !important;
}

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-card-inner {
    align-self: stretch !important;
    display: inline-flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 64px !important;
}

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-card-image-wrapper {
    position: relative !important;
    width: 460px !important;
    max-width: 460px !important;
    flex-shrink: 0 !important;
}

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-card-image {
    width: 100% !important;
    aspect-ratio: 460 / 295 !important;
    object-fit: cover !important;
}

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-card-content {
    flex: 1 !important;
    max-width: 256px !important;
    display: inline-flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    gap: 56px !important;
}

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-card-text {
    align-self: stretch !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    gap: 20px !important;
}

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-card-title {
    align-self: stretch !important;
    color: #3F3F46 !important;
    font-size: 30px !important;
    font-weight: 600 !important;
    font-family: "Noto Serif TC", serif !important;
    line-height: 32px !important;
    letter-spacing: 4.2px !important;
    text-decoration: none !important;
    text-align: left !important;
}

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-card-description {
    align-self: stretch !important;
    color: #525252 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    font-family: "Noto Sans", sans-serif !important;
    line-height: 24px !important;
    letter-spacing: 0.05em !important;
    text-decoration: none !important;
    text-align: left !important;
}

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-card-viewmore {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
}

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-card-viewmore img {
    width: 80px !important;
    height: auto !important;
}

/* ==========================================================================
   自訂箭頭 - 桌機版
   ========================================================================== */

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-arrows {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 10 !important;
}

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-arrow {
    width: 60px !important;
    height: 60px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute !important;
    z-index: 10 !important;
    pointer-events: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    outline: none !important;
    box-shadow: none !important;
}

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-arrow img {
    width: 60px !important;
    height: 60px !important;
    object-fit: contain !important;
}

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-arrow--prev {
    left: max(20px, calc(50% - 409.5px - 80px - 60px)) !important;
    right: auto !important;
}

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-arrow--next {
    right: max(20px, calc(50% - 409.5px - 80px - 60px)) !important;
    left: auto !important;
}

/* ==========================================================================
   隱藏 Splide 原生箭頭和分頁
   ========================================================================== */

body .rsfuturehero02-carousel-wrapper .rsfuturehero02-carousel .splide__arrows,
body .rsfuturehero02-carousel-wrapper .rsfuturehero02-carousel .splide__arrow,
body .rsfuturehero02-carousel-wrapper .rsfuturehero02-carousel .splide__pagination {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ==========================================================================
   手機版樣式 (≤767px)
   ========================================================================== */

@media screen and (max-width: 767px) {
    /* 手機版容器 */
    body .rsfuturehero02-carousel-wrapper {
        overflow: hidden !important;
    }

    /* Tab */
    body .rsfuturehero02-carousel-wrapper .rsfuturehero02-tabs {
        gap: 10px !important;
    }

    /* 輪播容器 */
    body .rsfuturehero02-carousel-wrapper .rsfuturehero02-carousel {
        margin-top: 32px !important;
        overflow: hidden !important;
    }

    body .rsfuturehero02-carousel-wrapper .rsfuturehero02-carousel .splide__track {
        overflow: hidden !important;
    }

    /* 手機版只顯示 active slide */
    body .rsfuturehero02-carousel-wrapper .rsfuturehero02-carousel .splide__slide {
        opacity: 0 !important;
    }

    body .rsfuturehero02-carousel-wrapper .rsfuturehero02-carousel .splide__slide.is-active {
        opacity: 1 !important;
    }

    /* 卡片 */
    body .rsfuturehero02-carousel-wrapper .rsfuturehero02-card {
        width: 100% !important;
        max-width: none !important;
        padding: 0 20px !important;
        display: inline-flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 10px !important;
    }

    body .rsfuturehero02-carousel-wrapper .rsfuturehero02-card-inner {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: flex-start !important;
        gap: 18px !important;
    }

    body .rsfuturehero02-carousel-wrapper .rsfuturehero02-card-image-wrapper {
        width: 100% !important;
        max-width: none !important;
        position: relative !important;
    }

    body .rsfuturehero02-carousel-wrapper .rsfuturehero02-card-image {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 353 / 226.38 !important;
        object-fit: cover !important;
    }

    body .rsfuturehero02-carousel-wrapper .rsfuturehero02-card-content {
        flex: none !important;
        width: 100% !important;
        max-width: none !important;
        align-self: stretch !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 20px !important;
    }

    body .rsfuturehero02-carousel-wrapper .rsfuturehero02-card-text {
        align-self: stretch !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    body .rsfuturehero02-carousel-wrapper .rsfuturehero02-card-title {
        align-self: stretch !important;
        text-align: center !important;
        color: #333333 !important;
        font-size: 20px !important;
        font-weight: 600 !important;
        font-family: "Noto Serif TC", serif !important;
        line-height: 30px !important;
        letter-spacing: 2px !important;
    }

    body .rsfuturehero02-carousel-wrapper .rsfuturehero02-card-description {
        align-self: stretch !important;
        text-align: center !important;
        color: #505050 !important;
        font-size: 14px !important;
        font-weight: 400 !important;
        font-family: "Noto Sans", sans-serif !important;
        line-height: 22.4px !important;
        letter-spacing: 1.4px !important;
    }

    /* 手機版箭頭位置 */
    body .rsfuturehero02-carousel-wrapper .rsfuturehero02-arrows {
        position: absolute !important;
        top: 0 !important;
        left: 20px !important;
        right: 20px !important;
        width: auto !important;
        height: calc((100vw - 40px) * 0.6413) !important;
        pointer-events: none !important;
        z-index: 20 !important;
    }

    body .rsfuturehero02-carousel-wrapper .rsfuturehero02-arrow {
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    body .rsfuturehero02-carousel-wrapper .rsfuturehero02-arrow--prev {
        left: 0 !important;
        right: auto !important;
    }

    body .rsfuturehero02-carousel-wrapper .rsfuturehero02-arrow--next {
        right: 0 !important;
        left: auto !important;
    }
}

/* ==========================================================================
   觸控裝置優化
   ========================================================================== */

@media (hover: none) and (pointer: coarse) {
    body .rsfuturehero02-carousel-wrapper .rsfuturehero02-carousel .splide__track {
        -webkit-overflow-scrolling: touch !important;
    }
}
