@import url('https://fonts.googleapis.com/css2?family=Chiron+GoRound+TC:wght@200..900&display=swap');
*{
    font-family: "century gothic","Chiron GoRound TC";
    font-optical-sizing: auto;
    /* background-color: #1077c3; */
}

/* ===== collection 輪播動畫 ===== */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@layer utilities {
    .animate-scroll {
        animation: scroll 30s linear infinite;
    }
}

body{
    overflow-x: hidden;
}
nav{
    /* background-image: url('assets/bg01.jpg'); */
    background-color: #1077c3;
    color: #fff;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}
nav h1{
    /* text-shadow: 0 0 10px #fff; */
}
.btn1,.btn2{
    border-radius: 10px;
}
.btn1{
    background-color: #00B900;
    color: #fff
}
.btn2{
    background-color: #3b5998;
    color: #fff
}
hr{
    width:10%;
    border-bottom: solid 1px #333;
    position: relative;
    left:45%
}

/* ===== .card 輪播樣式 ===== */
.card-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 2%
}

.card {
    position: relative;
    width: 100%;
    height: auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background-color: #f5f5f5;
}

.card-slide {
    display: none;
    width: 100%;
    height: 300px;
    object-fit: contain;
}

.card-slide.active {
    display: block;
}

.card-slide.active {
    display: block;
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 指示點樣式 */
.card-dots {
    text-align: center;
    padding: 15px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.dot:hover {
    background-color: #999;
    transform: scale(1.1);
}

.dot.active {
    background-color: #3b82f6;
    transform: scale(1.3);
}

/* 前後按鈕樣式 */
.card-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border: none;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.card-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.card-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.card-prev {
    left: 10px;
}

.card-next {
    right: 10px;
}


/* 響應式設計 */
@media (max-width: 768px) {
    .card {
        min-height: 250px;
    }
    
    .card-btn {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
}

    /* 寬度 > 560px：並列顯示，隱藏輪播功能 */
@media (min-width: 968px) {
    .card-container {
        max-width: 100%;
        padding: 0 0 2% 0;
    }
    
    .card {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
        justify-content: center;
        align-items: center;
        overflow: visible;
        width: 60%;
        margin: 3% auto;
    }
    .card-slide {
        display: block !important;
        height: 400px;
        object-fit: contain;
        border-radius: 0;
        box-shadow: none;
    }
    .card-slide1{
        width: 35%;
    }
    .card-slide2{
        width: 65%;
    }
    
    .card-slide.active {
        animation: none;
    }
    
    /* 隱藏輪播控制元素 */
    .card-dots,
    .card-prev,
    .card-next {
        display: none;
    }
}

/* ===== .serviceitems 樣式 ===== */
.serviceitems {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.serviceitems h4 {
    flex-grow: 0;
    margin-bottom: 5%;
    line-height: 1.4;
}

.serviceitems img {
    flex-grow: 1;
    width: 100%;
    height: auto;
}