﻿.chairman-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.05) 0%, rgba(142, 68, 173, 0.08) 100%);
    border-radius: 2rem;
    margin: 2rem 0;
    border: 1px solid rgba(155, 89, 182, 0.1);
    box-shadow: 0 10px 35px rgba(155, 89, 182, 0.1);
    position: relative;
    overflow: hidden;
}
.divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #9B59B6, #8E44AD);
    border-radius: 2px;
}

.supervisor-philosophy {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.05) 0%, rgba(142, 68, 173, 0.05) 100%);
    border-left: 4px solid #9B59B6;
    border-radius: 0 10px 10px 0;
}
.leader-frame {
    max-width: 340px; /* 原本 280 → 放大到 340 */
    aspect-ratio: 3/4;
    position: relative;
    border-radius: 15px;
    overflow: visible !important; /* 允許徽章露出框外 */
    padding-bottom: 16px; /* 預留下方空間，避免被切到 */
    border: 4px solid #f8f9fa;
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.2);
}

.leader-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 15px !important; /* 確保圖片維持圓角 */
    display: block;
}

.leader-badge {
    position: absolute; /* 記得保留絕對定位 */
    bottom: -8px; /* 小幅突出 */
    right: -8px;
    background: linear-gradient(135deg, #6f42c1, #5a2d91);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(142,68,173,.4);
}

/* 一般成員卡片 */
.member-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.1);
    transition: all 0.4s ease;
    border: 1px solid rgba(155, 89, 182, 0.1);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 480px; /* 增加最小高度以容納三列資訊 */
}

    .member-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: linear-gradient(90deg, #9B59B6, #8E44AD, #663399);
        transform: scaleX(0);
        transform-origin: center;
        transition: transform .4s ease;
    }

    .member-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 40px rgba(155, 89, 182, 0.2);
        border-color: rgba(155,89,182,.2);
    }

        .member-card:hover::before {
            transform: scaleX(1);
        }

/* 一般成員照片容器（比 leader 小） */
/* 容器允許徽章外凸 */
.member-photo {
    position: relative;
    width: 100%;
    max-width: 200px;
    aspect-ratio: 3/4;
    border-radius: 15px;
    overflow: visible !important; /* 允許徽章露出 */
    margin: 0 auto 1rem;
    border: 4px solid #f8f9fa;
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.2);
    transition: box-shadow .3s ease;
}

    .member-photo img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
        border-radius: 15px;
        transition: transform .3s ease;
    }

.member-card:hover .member-photo img {
    transform: scale(1.04);
}

.member-card:hover .member-photo {
    box-shadow: 0 12px 35px rgba(155, 89, 182, 0.3);
}

/* 圓形徽章（僅圖示） */
.member-badge {
    position: absolute;
    bottom: -8px; /* 小幅突出 */
    right: -8px;
    width: 35px; /* 固定寬高才會是正圓 */
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,.3);
    transition: all .3s ease;
    z-index: 1; /* 確保浮在最上層 */
}

.executive-badge {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.director-badge {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.supervisor-badge {
    background: linear-gradient(135deg, #6f42c1, #5a2d91);
}

.service-badge {
    background: linear-gradient(135deg, #fd7e14, #e8590c);
}

/* 資訊面板通用 */
.info-panel {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.1);
}

/* 漂亮的膠囊按鈕（與整體紫色系一致） */
.expand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    width: 100%;
    max-width: 260px;
    padding: .75rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(155,89,182,.35);
    background: #fff;
    color: #6c4a8e;
    font-weight: 600;
    letter-spacing: .5px;
    box-shadow: 0 8px 18px rgba(155,89,182,.12);
    transition: all .25s ease;
}

    .expand-btn:hover {
        color: #fff;
        background: linear-gradient(135deg,#8E44AD,#9B59B6);
        border-color: transparent;
        box-shadow: 0 10px 22px rgba(155,89,182,.22);
    }

    .expand-btn:focus {
        outline: none;
        box-shadow: 0 0 0 0.2rem rgba(155,89,182,.15);
    }

    /* 文字切換（用 aria-expanded 控制顯示） */
    .expand-btn .label-expanded {
        display: none;
    }

    .expand-btn[aria-expanded="true"] .label-collapsed {
        display: none;
    }

    .expand-btn[aria-expanded="true"] .label-expanded {
        display: inline;
    }

    /* 箭頭旋轉動畫 */
    .expand-btn .chevron {
        transition: transform .25s ease;
    }

    .expand-btn[aria-expanded="true"] .chevron {
        transform: rotate(180deg);
    }

/* Collapse 過場更柔和（可選） */
.collapse:not(.show) {
    display: none;
}

.collapsing {
    transition: height .25s ease;
}

/* RWD：確保 leader 與 member 比例一致、大小關係維持 */
@media (max-width: 992px) {
    .leader-frame {
        max-width: 280px;
    }
    /* 平板 leader */
    .member-photo {
        max-width: 180px;
    }
    /* 平板成員 */
}

@media (max-width: 768px) {
    .member-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        height: auto;
        min-height: auto;
    }

    .leader-frame {
        max-width: 220px;
    }
    /* 手機 leader */
    .member-photo {
        max-width: 160px;
    }
    /* 手機成員，維持較小 */
    .member-badge {
        bottom: -6px;
        right: -6px;
    }

    .leader-badge {
        bottom: -6px;
        right: -6px;
    }
}

@media (min-width: 769px) {
    .service-card {
        min-height: 450px;
        height: 100%;
        display: flex;
        flex-direction: column;
    }
}

/* 區塊 RWD 微調（保留你原設定） */
@media (min-width: 992px) and (max-width: 1320px) {
    .vice-chairman-section .col-lg-3,
    .directors-section .col-lg-3,
    .supervisors-section .col-lg-3,
    .service-team-section .col-lg-3 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* 其他原樣式保留（顏色、陰影等） */
.chairman-message {

    padding: 1rem;
    border-radius: 12px;
    border-left: 4px solid var(--alumni-primary);
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.05) 0%, rgba(142, 68, 173, 0.05) 100%);

}

.member-info {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.member-name {
    font-size: 1.4rem;
    color: var(--alumni-dark);
    font-weight: 600;
}

.member-title {
    color: var(--alumni-primary);
    font-size: 1rem;
    font-weight: 500;
}

.member-company {
    color: #6c757d;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.3rem;
    line-height: 1.3;
    word-break: break-word;
    hyphens: auto;
}

.member-position {
    color: #6c757d;
    font-size: .9rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
    word-break: break-word;
    hyphens: auto;
}

    .member-company i, .member-position i {
        margin-right: 8px;
        width: 16px;
        text-align: center;
        color: var(--alumni-primary);
        font-size: 0.9rem;
        flex-shrink: 0; /* 防止圖示被壓縮 */
    }

/* 理事長與首席監事區塊，套用相同漸層背景 */
section.chairman-section,
section.chief-supervisor-section {
    background: linear-gradient(135deg, rgba(139,95,191,.05) 0%, rgba(155,89,182,.10) 100%) !important;
    background-color: transparent !important;
}

    /* 移除可能來自 theme 的偽元素或色塊 */
    section.chairman-section::before,
    section.chief-supervisor-section::before {
        background: none !important;
        content: none !important;
    }

    /* 內層 container 改透明，讓外層漸層透出 */
    section.chairman-section > .container,
    section.chief-supervisor-section > .container {
        background: transparent !important;
    }