/* 律師團隊 */
.team-title {
    font-family: "Noto Serif TC","Noto Sans TC", sans-serif;
    color: black;
    font-size: 40px;
    font-weight: bold;
    margin-bottom: 20px;
}

#team{
    background-color: white;
    position: relative;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-container {
    display: block;
    width: 55vw; 
    max-width: 900px; 
    aspect-ratio: 4 / 3;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    z-index: 10;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.8);
    border-radius: 2% 2%;
}

@media screen and (min-width: 801px) {  
    #team {
        position: relative;
    }
    #team::before {
        content: ""; 
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url("../pic/backgroud.jpg");
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
        opacity: 0.5; 
        z-index: 0; 
    }
}
@media screen and (max-width: 800px) {
    #team::before {
        content: none;
    }
}

.mobile-team {
    display: none;
}

.team-images {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.team-images img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    opacity: 0; /* 預設隱藏 */
    transition: opacity 0.5s ease-in-out;
}

.team-images img.active {
    opacity: 1; /* 只顯示被選中的圖片 */
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
}
.prev {
    left: 0;
}
.next {
    right: 0;
}

@media (max-width: 800px) {
    .prev, .next{
        display: none;
    }
    .team-container {
        display: none;
    }
    
    .mobile-team {
        display: block;
        display: flex;
        flex-direction: column; 
        align-items: center;
    }
    /* 律師圖片 */
    .lawyer-img {
        width: 90%;
        max-width: 400px;
        border-radius: 10px;
    }

    /* 律師名稱 */
    .lawyer-name {
        font-size: 22px;
        font-weight: bold;
        color: black;
        margin-top: 10px;
        text-align: center;
    }

    /* 介紹按鈕 */
    .lawyer-buttons {
        display: flex;
        gap: 10px;
        margin-top: 15px;
    }
    .info-btn {
        background-color: white;
        border: 2px solid black;
        color: black;
        padding: 10px 20px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 16px;
    }
    .info-btn:hover {
        background-color: black;
        color: white;
    }
    .info-btn.active {
        background-color: black !important;
        color: white !important;
        border-color: black !important;
    }

    /* 內容區塊 */
    .lawyer-content {
        width: 100%;
        max-width: 400px;
        margin-top: 15px;
        text-align: left;
    }
    .lawyer-text {
        display: none;
        font-size: 16px;
        color: black;
        padding: 15px;
        border-radius: 10px;
        /* margin-top: 20px; */
    }
    .lawyer-text.active {
        display: block;
    }
    .lawyer-text h3 {
        font-size: 20px;
        font-weight: bold;
        margin: 20px 0 10px;
        color: #222;
        text-align: left;
    }
    
    .lawyer-text ul {
        list-style-type: none; /* 移除預設的圓點 */
        padding: 0;
        margin: 0;
    }
    
    .lawyer-text ul li {
        font-family: "Noto Serif TC","Noto Sans TC", sans-serif;
        font-size: 16px;
        line-height: 1.8;
        display: flex;
        padding-left: 10px;
        align-items: flex-start; 
        gap: 8px; 
    }
    
    .lawyer-text ul li::before {
        content: "•"; /* 前置符號 */
        color: #333;
        font-weight: bold;
        font-size: 18px;  
        flex-shrink: 0;
        width: 12px;
    }

    .lawyer-img-container {
        position: relative;
        width: 100%;
        max-width: 400px;
    }

    .dots-container {
        position: absolute;
        bottom: 70px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 8px;
        background: none;
    }
    
    .dot {
        width: 10px;
        height: 10px;
        background-color: gray;
        border-radius: 50%;
        cursor: pointer;
        transition: background 0.3s;
    }
    
    .dot.active {
        background-color: black;
    }
}