﻿/*css/carousel.css*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --brand-red: #d32f2f;
    --white: #ffffff;
}

/*body {*/
    /*background: #000;*/
/*}*/

/* 輪播容器 */
.carousel {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 21 / 9;
/*    visibility: hidden;*/
    background: white;
}
    /*.carousel.is-ready {
        visibility: visible;*/ /* ← 加這行 */
    /*}*/
.carousel-inner {
    position: relative;

    width: 100%;
    height: 100%;
}

/* 幻燈片 */
.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 1.2s ease-in-out, transform 1.2s ease-in-out;
    pointer-events: none;
      will-change: transform;
}
    .carousel-item.active {
        opacity: 1;
        transform: scale(1);
        pointer-events: auto;
        z-index: 1;
    }

/* 圖片連結 */
.slide-link {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    cursor: pointer;
}

    .slide-link img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        pointer-events: none;
    }

/* 遮罩層（保留結構） */
.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    pointer-events: none;
}

/* 內容區塊（保留結構） */
.slide-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    z-index: 3;
    pointer-events: none;
}

.slide-content-inner {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 60px;
}

/* 指示器 */
.dots {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -50px;
    display: flex;
    /*gap: 8px;*/
    z-index: 10;
}

.dot {
    width: 54px;
    height: 0px;
    cursor: pointer;
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .dot::before {
        content: '';
        width: 40px;
        height: 4px;
        border-radius: 5px;
        background: #EEEAE7;
        transition: all 0.4s ease;
    }

    .dot:hover::before {
        background: #D0CBCB;
    }

    .dot.active::before {
        width: 70px;
        background: #bebab7;
    }

/* 響應式 - 平板 */
@media (max-width: 1024px) {
    .slide-content-inner {
        padding: 0 40px;
    }
}
@media (min-width: 769px) and (max-width: 1069px) {
    .slide-link {
        top: 70px;
    }
}
    /* 響應式 */
    @media (max-width: 768px) {
        .dots {
            left: 50%;
            right: auto;
            transform: translateX(-50%);
            bottom: 20px;
        }

        .dot {
            width: 40px;
            height: 0px;
        }

            .dot::before {
                width: 24px;
            }

            .dot.active::before {
                width: 40px;
            }

        .carousel {
            margin-top: 60px;
            aspect-ratio: 9 / 16;
        }

        .slide-link {
            top: 0;
        }
    }
    /* 減少動效 */
    @media (prefers-reduced-motion: reduce) {
        .carousel-item,
        .dot {
            transition: none;
        }
    }


.carousel-arrow {
    position: absolute;
    top: 60%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: #000000;
    border: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.carousel-arrow-left {
    left: 0;
}

.carousel-arrow-right {
    right: 0;
}

.carousel:hover .carousel-arrow {
    opacity: 1;
}

.carousel-arrow:hover {
    background: white;
    color: #000000;
}