/* ================================================
   Business Domain Widget — business-domain.css
   ================================================ */

.bd-section {
    position: relative;
    padding: 40px 0;
    width: 100%;
    /* 讓左右 overflow 可以顯示 */
    overflow: visible;
}

/* overflow-x hidden 裁掉左右，overflow-y visible 不裁高度 */
.bd-track-outer {
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Flex 水平排列，JS 控制 translateX */
.bd-track {
    display: flex;
    flex-direction: row;
    will-change: transform;
    transition: transform 0.55s cubic-bezier(0.77,0,0.18,1);
    align-items: stretch;
}

/* 卡片：flex item，固定寬度由 JS 透過 CSS variable 設定 */
.bd-card {
    flex: 0 0 var(--bd-card-width, 70%);
    width: var(--bd-card-width, 70%);
    margin-right: 20px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    display: block;
    background: #eee;
    position: relative;
    transition: opacity 0.4s ease;
    opacity: 0.5;
}

.bd-card:last-child {
    margin-right: 0;
}

.bd-card.is-active {
    opacity: 1;
    cursor: default;
    z-index: 2;
}

/* 圖片 */
.bd-img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease;
    transform-origin: center center;
}

.bd-card.is-active:hover .bd-img {
    transform: scale(1.05);
}

/* Overlay */
.bd-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(55, 129, 224, 0.7) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
}

/* 說明：active hover 才顯示 */
.bd-desc {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.7;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    margin: 0 0 8px;
}

.bd-card.is-active:hover .bd-desc {
    opacity: 1;
    transform: translateY(0);
}

/* 標題 */
.bd-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: bold;
    margin: 0;
    line-height: 1.3;
}

/* 箭頭 */
.bd-arrows {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

.bd-prev,
.bd-next {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid currentColor;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    color: inherit;
    padding: 0;
}

.bd-prev:hover,
.bd-next:hover {
    background: currentColor;
}

.bd-prev:hover svg,
.bd-next:hover svg {
    stroke: #fff;
}

.bd-prev svg,
.bd-next svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.bd-prev:disabled,
.bd-next:disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}
