/* ================================================
   Business Slider Widget — business-slider.css
   ================================================ */

.bs-section {
    position: relative;
    /* pin 時需要讓 section 本身有高度撐住畫面（手機版 media query 會覆蓋） */
    min-height: 100vh;
}

@media (max-width: 1024px) {
    .bs-section {
        min-height: unset;
    }
}

/* ── 區塊標題 ── */
.bs-heading-wrap {
    padding: calc(78px + 40px) 5% 40px; /* 78px = sticky 選單高度 */
}

.bs-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    line-height: 1.1;
}

.bs-heading .f-eng {
    display: block;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.bs-heading .f-jp {
    display: block;
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

/* ── pin 容器：GSAP pin 作用在這裡 ── */
.bs-pin-container {
    position: relative;
    width: 100%;
}

/* ── 裁切視窗，高度撐滿 slider 內容 ── */
.bs-slider-wrap {
    width: 100%;
    overflow: hidden;
}

/* ── Slider：寬度 = 100% × item 數，GSAP 控制 xPercent ── */
.bs-slider {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    will-change: transform;
}

/* ── 單一 Item：每個 100vw，撐滿整個可視區 ── */
.bs-item {
    flex: 0 0 100vw;
    width: 100vw;
    height: 100%;
    display: flex;
    align-items: center;
}

.bs-flex {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    gap: 0;
}

/* ── 圖片區 ── */
.bs-img-wrap {
    flex: 0 0 50%;
    width: 50%;
    overflow: hidden;
}

.bs-img {
    display: block;
    max-width: 100%;
}

/* ── 文字區 ── */
.bs-txt-area {
    flex: 1;
    padding: 60px 6%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
}

/* ── Counter（01 ── 03） ── */
.bs-counter {
    display: flex;
    align-items: center;
    font-weight: 300;
    font-size: 0.86rem;
    letter-spacing: 0.05em;
    color: #9b9b9b;
    gap: 10px;
}

.bs-count {
    font-size: 0.86rem;
    font-weight: 300;
}

.bs-bar {
    display: block;
    width: 60px;
    height: 1px;
    background: #9b9b9b;
    position: relative;
    overflow: hidden;
}

.bs-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: #9b9b9b;
    transition: width 0.6s ease;
}

/* ── 標號 ── */
.bs-no {
    width: 48px;
    height: 24px;
    border-radius: 30px;
    background-color: #3296fa;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-bottom: 1.43rem;
    color: #fff;
}

/* ── 標題 ── */
.bs-item-title {
    margin: 0;
    font-size: clamp(1.5rem, 2.5vw, 2.25rem);
    font-weight: 700;
    line-height: 1.3;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bs-item-title .f-eng {
    font-size: clamp(0.875rem, 1.2vw, 1rem);
    font-weight: 400;
    letter-spacing: 0.08em;
    opacity: 0.7;
}

/* ── 說明 ── */
.bs-item-desc {
    max-width: 460px;
}

.bs-item-desc p {
    margin: 0;
    line-height: 1.8;
    font-size: clamp(0.875rem, 1vw, 1rem);
}

/* ── 按鈕 ── */
.bs-btn-wrap {
    margin-top: 8px;
}

.bs-btn {
    display: inline-block;
    position: relative;
    overflow: hidden;
    font-size: 0.875rem;
    letter-spacing: 0.12em;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 4px;
}

.bs-btn-text {
    display: block;
    position: relative;
    overflow: hidden;
    height: 1.2em;
}

.bs-hover-top,
.bs-hover-bottom {
    display: block;
    transition: transform 0.35s ease;
}

.bs-hover-top {
    transform: translateY(-100%);
}

.bs-hover-bottom {
    transform: translateY(0%);
    position: absolute;
    top: 0;
    left: 0;
}

.bs-btn:hover .bs-hover-top {
    transform: translateY(0%);
}

.bs-btn:hover .bs-hover-bottom {
    transform: translateY(100%);
}

/* ── 手機／平板幻燈片導覽按鈕（桌機隱藏） ── */
.bs-nav {
    display: none;
}

/* ── 響應式：手機／平板（≤1024px）改為普通幻燈片 ── */
@media (max-width: 1024px) {

    /* section 不需要 min-height 撐住，讓內容自然撐 */
    .bs-section {
        min-height: unset;
    }

    /* slider-wrap 改為可見視窗，一次只顯示一張 */
    .bs-slider-wrap {
        overflow: hidden;
    }

    /* 手機版把所有 height:100% 鏈斷開 */
    .bs-pin-container,
    .bs-slider-wrap,
    .bs-slider,
    .bs-item,
    .bs-flex {
        height: auto;
    }

    /* slider 維持橫排，由 JS 控制 translateX */
    .bs-slider {
        display: flex;
        flex-direction: row;
        transition: transform 0.45s ease;
        will-change: transform;
    }

    /* 每張 item 佔滿 100% 容器寬 */
    .bs-item {
        flex: 0 0 100%;
        width: 100%;
    }

    .bs-flex {
        flex-direction: column;
    }

    .bs-img-wrap {
        flex: 0 0 auto;
        width: 60%;
        height: 280px;
        margin: 0 auto;
    }

    .bs-heading-wrap {
        padding: 10% 0%;
    }

    .bs-txt-area {
        padding: 30px 5%;
        gap: 16px;
    }

    /* 顯示上下一張按鈕 */
    .bs-nav {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 16px;
        padding: 20px 0 40px;
    }

    .bs-nav-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: none;
        background: #3781E0;
        color: #fff;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        transition: background 0.2s;
    }

    .bs-nav-btn:hover {
        background: #2562b8;
    }

    .bs-nav-dots {
        display: flex;
        gap: 8px;
    }

    .bs-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #ccc;
        cursor: pointer;
        transition: background 0.3s;
    }

    .bs-dot.is-active {
        background: #333;
    }
}

/* ── 中大螢幕（1366px 以下） ── */
@media (max-width: 1366px) {
    .bs-heading-wrap {
        padding: 145px 5% 30px;
        margin: 0% 6%;
    }

    .bs-img {
        max-width: 65%;
        display: block;
        margin: auto;
    }
}

/* ── 大螢幕（1440px 以上） ── */
@media (min-width: 1440px) {
    .bs-heading-wrap {
        padding: 3% 6%;
        margin: 0%;
        width: 66%;
    }

    .bs-img {
        max-width: 65%;
        display: block;
        margin: auto;
    }
}
