/* ===================================================================
   intro.css - 業務介紹頁專用樣式
   =================================================================== */

/* --- 1. 業務介紹頁專用變數 & 頁面樣式 --- */
:root {
    /* 這個變數只被業務介紹頁的輪播器使用 */
    --intro-img: 100px;
}

body {
    /* 業務介紹頁獨有的淺藍色背景 */
    background-color: #6195cc;
}

/* 業務介紹頁 main 區塊有自己獨特的 padding */
main {
    padding: calc(var(--header-height) + 15px);
    margin: auto;
}


/* --- 2. 業務介紹輪播界面 (Intro Carousel) --- */
/* 這是業務介紹頁 100% 獨有的元件設計 */
.carousel-container {
    margin-top: calc(var(--header-height) + 40px);
    position: relative;
    width: 100%;
    height: calc(var(--intro-img) - 110px);
    background-color: #ffffff;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: none;
    transition: object-position 0.5s ease;
}

.carousel-buttons {
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 0;
    top: 28%;
    transform: translateY(-50%);
    z-index: 10;
}

.carousel-button {
    margin: 10px 0;
    color: #ffffff;
    padding: 10px 10px 10px 20px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    background-color: #3030309d;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.336);
    font-size: 3rem;
    transition: background 0.3s ease, box-shadow 0.3s ease,transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.281);
    border-left: 2px solid #ccc;
    border-top: 2px solid #ccc;
    border-bottom: 2px solid #ccc;
    border-right: none;
    font-weight: bold;
    border-radius: 30px 0 0 10px;
}

.carousel-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 1px 5px #ccc;
}

.text-overlay {
    position: absolute;
    bottom: 5%;
    left: 1%;
    right: 1%;
    text-align: left;
    color: #fff;
    background: rgba(51, 51, 51, 0.726);
    padding: 10px 10px 10px 20px;
    border-radius: 40px 10px 10px 10px;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.24);
    transition: width 1s ease-in-out;
}

.text-overlay h1 {
    font-size: 3em;
    margin: 0;
    white-space: nowrap;
    font-weight: bold;
}

.text-overlay p {
    font-size: 1.5em;
    margin: 0;
    font-weight: bold;
}

/* 業務介紹頁專屬的圖片動畫 */
@keyframes slide-right {
    from { object-position: 30% center; }
    to { object-position: center center; }
}

@keyframes slide-left {
    from { object-position: center center; }
    to { object-position: 30% center; }
}


/* --- 3. 業務介紹頁專用響應式設計 --- */
@media (max-width: 870px) {
    .carousel-container {
        height: calc(var(--intro-img) - 130px);
    }
    .carousel-button {
        font-size: 2.5rem;
    }
}

/* 這些動畫相關的 RWD 也是業務介紹頁專屬的 */
@media (min-width: 1050px) {
    .carousel-item img {
        animation: none;
        object-position: center center;
    }
}

@media (max-width: 1023px) {
    .carousel-item img {
        animation: slide-left 1s forwards;
    }
}

@media (min-width: 1024px) {
    .carousel-item img {
        animation: slide-right 1s forwards;
    }
}