﻿/* 主要配色風格 */
.text-purple {
    color: #9B59B6 !important;
}

.bg-purple {
    background-color: #9B59B6 !important;
}

/* 頁面標題樣式 */
.page-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem 0;
    margin-bottom: 2rem;
    border-radius: 0;
    box-shadow: 0 2px 15px rgba(142, 68, 173, 0.1);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #9B59B6;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    line-height: 1.6;
}

/* 總顧問特別展示區 */
.chief-advisor-section {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.05) 0%, rgba(142, 68, 173, 0.08) 100%);
    border-radius: 2rem;
    padding: 3rem;
    border: 1px solid rgba(155, 89, 182, 0.1);
    box-shadow: 0 15px 35px rgba(155, 89, 182, 0.15);
    margin-bottom: 3rem;
    transition: all 0.3s ease;
}

    .chief-advisor-section:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 45px rgba(155, 89, 182, 0.2);
    }



/* 顧問卡片樣式 */
.advisor-card {
    transition: all .3s ease;
    border: 2px solid #E8E8E8;
    border-radius: 15px;
    overflow: hidden;
    height: 100%;
    background: #FFFFFF;
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
    /* 這兩行改掉 */
    align-items: stretch; /* 原本是 center → 會讓子元素寬度變內容寬 */
    justify-content: flex-start; /* 原本是 center */
}

    .advisor-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 15px 40px rgba(155,89,182,.15);
        border-color: #9B59B6 !important;
    }
    /* 讓圖片框與內容都撐滿卡片寬度 */
    .advisor-card > .advisor-image,
    .advisor-card > .card-body {
        width: 100%;
        box-sizing: border-box;
    }


/* 照片顯示區域 */
/* 照片框：用 3:4 比例避免 CLS；不要固定高度 */
.advisor-image {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4; /* 🔑 取代 height: 280px */
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background: #f8f9fa;
    border-bottom: 1px solid #f2f2f2;
}


    /* 滿版裁切（版面最整齊）；若想不裁切改 contain 即可 */
    .advisor-image img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover; /* 或改成 contain：不裁切完整顯示 */
        object-position: center top;
        transition: transform .25s ease;
    }

.advisor-card:hover .advisor-image img {
    transform: scale(1.03);
}


/* 總顧問照片樣式 */
/* 總顧問相片：用比例承接，不用 max-height */
.chief-advisor-photo {
    display: block;
    width: 100%;
    height: auto;
    max-width: 360px; /* 視版面可調 */
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(142,68,173,.3);
}

    .chief-advisor-photo:hover {
        transform: scale(1.03);
    }

/* 預設頭像佔位符 */
.placeholder-block {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8E44AD 0%, #9B59B6 100%);
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

/* 顧問徽章 */
.advisor-crown {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8E44AD, #9B59B6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(142, 68, 173, 0.4);
    border: 3px solid white;
    transition: all 0.3s ease;
}

.advisor-card:hover .advisor-crown {
    transform: rotate(15deg) scale(1.1);
}

/* 總顧問特殊徽章 */
.chief-advisor-crown {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

/* 卡片內容區 */
.card-body {
    padding: 1.75rem 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(to bottom, #FFFFFF 0%, #FAFAFA 100%);
}

.advisor-info h3 {
    font-size: 2rem;
    font-weight: bold;
}
.advisor-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #9B59B6;
    margin-bottom: 0.75rem;
    text-align: center;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.advisor-company {
    color: #6c757d;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
    margin-bottom: 0.5rem;
}

.advisor-title {
    color: #6c757d;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
    margin-bottom: 1rem;
    min-height: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.advisor-message {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.05) 0%, rgba(155, 89, 182, 0.02) 100%);
    border-left: 4px solid #9B59B6;
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.1);
    flex: 1;
}

.advisor-details {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.1);
}
/* 流體字級：桌機維持接近原本，平板/手機自動縮 */
.advisor-name {
    font-size: clamp(1.0rem, 1.1vw + 0.9rem, 1.35rem);
    letter-spacing: .2px; /* 原 0.5px 在手機略顯擁擠 */
    margin-bottom: .5rem;
}

.advisor-company,
.advisor-title {
    font-size: clamp(.80rem, 0.8vw + 0.55rem, .95rem);
    line-height: 1.45;
}

.advisor-message p {
    color: #2c3e50;
    font-size: 0.9rem;
    line-height: 1.65;
    margin: 0;
    text-align: justify;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
}

/* 總顧問賀詞完整顯示 */
.chief-advisor-section .advisor-message div {
    color: #2c3e50;
    font-size: 0.95rem;
    line-height: 1.8;
    margin: 0;
    text-align: justify;
    display: block;
    overflow: visible;
    font-weight: 400;
    white-space: normal;
}

/* 服務範疇區塊 */
.services-section {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.03) 0%, rgba(142, 68, 173, 0.05) 100%);
    border-radius: 2rem;
    padding: 3rem 2rem;
    border: 1px solid rgba(155, 89, 182, 0.1);
    box-shadow: 0 10px 35px rgba(155, 89, 182, 0.1);
    margin-top: 3rem;
}

/* 響應式設計優化 */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem !important;
    }

    .advisor-card {
        max-width: 400px; /* Adjust for larger devices */
    }

    .advisor-name {
        font-size: 1.2rem !important;
    }

    .advisor-name {
        font-size: 1.05rem;
        margin-bottom: .4rem;
    }

    .advisor-company,
    .advisor-title {
        font-size: .85rem;
        line-height: 1.4;
        margin-bottom: .35rem;
    }
    /* 行高與預留高度稍降，避免留白過大 */
    .advisor-title {
        min-height: 1.1rem;
    }
    /* 若卡片內距覺得偏寬，可以一併縮小 */
    .advisor-card .card-body {
        padding: .9rem .9rem 1.1rem;
    }
}


@media (max-width: 576px) {
    .advisor-name {
        font-size: 1.1rem !important;
    }

    .advisor-name {
        font-size: 1rem;
        margin-bottom: .35rem;
    }

    .advisor-company,
    .advisor-title {
        font-size: .8rem;
        line-height: 1.35;
        margin-bottom: .3rem;
    }

    .advisor-title {
        min-height: 1rem;
    }

    .advisor-card .card-body {
        padding: .75rem .8rem 1rem;
    }

    .advisor-message {
        padding: .8rem;
    }

        .advisor-message p {
            font-size: .85rem;
        }
}


.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.process-step {
    transition: all 0.3s ease;
}

    .process-step:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(155, 89, 182, 0.2) !important;
    }

.chief-advisor-card {
    transition: all 0.3s ease;
}

    .chief-advisor-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 45px rgba(155, 89, 182, 0.2) !important;
    }

/* 響應式設計 */
@media (max-width: 768px) {
    .advisor-card-body {
        padding: 1.5rem !important;
    }

    .process-step {
        margin-bottom: 2rem;
    }

    .chief-advisor-card {
        padding: 2rem !important;
    }

    .advisor-photo-container {
        max-width: 250px !important;
    }

    .advisor-card-image {
        max-height: 280px !important;
        object-fit: contain !important;
        object-position: center !important;
    }
}

/* 直式照片優化 */
.advisor-photo, .advisor-card-image {
    max-height: 280px;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

    /* 照片載入失敗或缺少時的預設樣式 */
    .advisor-card-image[src=""],
    .advisor-card-image:not([src]) {
        display: none;
    }

.advisor-card-header::after {
    content: '';
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, rgba(142, 68, 173, 0.1) 0%, rgba(155, 89, 182, 0.2) 50%, rgba(175, 122, 197, 0.1) 100%);
    border-radius: 15px;
    position: relative;
}

.advisor-card-header::before {
    content: '\f0c0';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(142, 68, 173, 0.5);
    z-index: 2;
    pointer-events: none;
}

/* 手機直式瀏覽優化 */
@media (max-width: 576px) {
    .advisor-photo-container {
        max-width: 200px !important;
    }

    .col-lg-4.col-md-6 {
        margin-bottom: 2rem;
    }

    .chief-advisor-card {
        padding: 1.5rem !important;
    }
}
