/* css/advisors.css */
/* Styles for the 顧問資料 page with special emphasis on highest-\nranked positions. 讓整頁看起來華麗，而且與網站現有風格一致。 */

/* container */
.advisor-boxes {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around; /* 改用 space-around 讓間距更平均 */
    gap: 60px; /* 加大間隔 */
    margin: 80px auto; /* 增大頂部距離 */
    width: 90%;
    max-width: 1400px; /* 拉寬容器 */
}

/* individual card */
.advisor-box {
    background: linear-gradient(135deg, #ffffff 0%, #e6f7ff 50%, #ffffff 100%);
    border: 3px solid #2b7cff; /* 主色藍邊 */
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    width: 300px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
    transition: transform 0.4s ease, box-shadow 0.4s ease,
                background-position 1s;
    position: relative;
    background-size: 200% 200%; /* 為動畫準備 */
}

.advisor-box h2 {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 15px;
    color: #333;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.advisor-box p {
    font-size: 1.05rem;
    margin: 6px 0;
    color: #444;
}

/* 裝飾用小三角 (金色絲帶角) */
.advisor-box::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-top: 40px solid #d4af37;
    border-left: 40px solid transparent;
}

.advisor-box:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 45px rgba(0,0,0,0.35);
    /* 背景）。當 hover 時展現閃光移動效果 */
    background-position: right center;
}

/* 在手機或較窄螢幕時改成直列 */
@media (max-width: 768px) {
    .advisor-boxes {
        flex-direction: column;
        align-items: center;
    }
    .advisor-box {
        width: 90%;
    }
}
/* 背景移動動畫 */
@keyframes gradientShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.advisor-box {
    animation: gradientShine 5s infinite linear;
}
/* 標題美化 */
.content-section h1 {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 900;
    color: #2b7cff;
    margin-bottom: 10px;
    position: relative;
    letter-spacing: 1px;
}

/* 在標題下添加下劃線裝飾 */
.content-section h1::after {
    content: "";
    display: block;
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #2b7cff, #ffb347);
    margin: 8px auto 0;
    border-radius: 2px;
}

/* 引言文字 */
.content-section .lead {
    text-align: center;
    font-size: 1.2rem;
    margin-top: 15px;
    color: #555;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 113學年度顧問名單 */
.subadvisor-section {
    margin-top: 60px;
}

.subadvisor-section h2 {
    text-align: center;
    font-size: 2rem;
    color: #333;
    margin-bottom: 25px;
    font-weight: 700;
}

.subadvisor-group {
    margin-bottom: 30px;
}

.subadvisor-group h3 {
    font-size: 1.4rem;
    color: #2b7cff;
    margin-bottom: 10px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.subadvisor-group h3:hover {
    color: #1a5aa8;
    border-bottom-color: #2b7cff;
}

.toggle-btn {
    background-color: transparent;
    color: #2b7cff;
    border: 1px solid #2b7cff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background-color: #2b7cff;
    color: white;
}

.hidden {
    display: none;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.subadvisor-list:not(.hidden) {
    opacity: 1;
    max-height: 2000px; /* 足夠大 */
}

.subadvisor-list {
    list-style: none;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 10px;
    column-count: 2;
    column-gap: 60px;
    opacity: 1;
    max-height: 2000px;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.subadvisor-list.hidden {
    opacity: 0;
    max-height: 0;
}

.subadvisor-list li {
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 1rem;
    color: #444;
    position: relative;
    padding-left: 20px;
    opacity: 0;
    animation: fadeInUp 0.6s forwards;
}

/* 小圓點裝飾 */
.subadvisor-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 8px;
    height: 8px;
    background-color: #2b7cff;
    border-radius: 50%;
}

.subadvisor-list li:hover {
    color: #2b7cff;
    transform: translateX(5px);
    transition: transform 0.3s, color 0.3s;
}

@media (max-width: 768px) {
    .subadvisor-list {
        column-count: 1;
    }
}

/* 顧問名單動畫 */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
