
.floating-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 754px;
    z-index: 0;
    pointer-events: none;
    /* 關鍵：先寫遮罩顏色，再寫圖片路徑，用逗號隔開 */
    overflow: hidden; /* 確保影片超出部分被裁切 */
    /* 這是最底層的保險：如果影片掛了，這張圖會出現 */
    background: linear-gradient(#02083070, #02083070),
    url("../../../img/ida/lobby/hero-section-bg.jpg");
    background-size: cover;
    background-position: center;
}

/* 影片本人：確保它像 background-size: cover 一樣填滿 */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* 居中對齊 */
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover; /* 關鍵：這行讓影片行為跟圖片 cover 一樣 */
    z-index: 1; /* 蓋在 CSS 背景圖上方 */
}

/* 遮罩層：放你原本的漸層顏色，蓋在影片上方 */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 使用你原本設定的顏色 */
    background: linear-gradient(#02083070, #02083070);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(#02083070, #02083070);
    z-index: 2; /* 蓋在影片上方，確保文字清晰 */
}

.item1 {
    left: 5% !important;
    top: 65% !important;
    animation: item1-animation 3s ease-in-out infinite;
}

@keyframes item1-animation {
    0% {
        transform: translateY(0) rotate(10deg);
    }
    50% {
        transform: translateY(-10px) rotate(10deg);
    }
    100% {
        transform: translateY(0) rotate(10deg);
    }
}

@media (min-width: 768px) {
    .item1 {
        left: 10% !important;
        top: 30% !important;
    }
}


@media (min-width: 768px) {
    .item2 {
        left: 25% !important;
        top: 20% !important;
    }
}
.item2 {
    left: 8%;
    top: 15%;
    animation: item2-animation 4s ease-in-out infinite;
}

@keyframes item2-animation {
    0% {
        transform: translateY(0) rotate(1.00deg);
    }
    50% {
        transform: translateY(-10px) rotate(1.00deg);
    }
    100% {
        transform: translateY(0) rotate(1.00deg);
    }
}

@media (min-width: 768px) {
    .item3 {
        left: 60% !important;
        top: 35% !important;
    }
}
.item3 {
    left: 50%;
    top: 20%;
    animation: item3-animation 5s ease-in-out infinite;
}

@keyframes item3-animation {
    0% {
        transform: translateY(0) rotate(-40.00deg);
    }
    50% {
        transform: translateY(-10px) rotate(-40.00deg);
    }
    100% {
        transform: translateY(0) rotate(-40.00deg);
    }
}

.item4 {
    left: 85%;
    top: 22%;
    animation: item4-animation 3s ease-in-out infinite;
}

@keyframes item4-animation {
    0% {
        transform: translateY(0) rotate(35.00deg);
    }
    50% {
        transform: translateY(-10px) rotate(35.00deg);
    }
    100% {
        transform: translateY(0) rotate(35.00deg);
    }
}

.item5 {
    left: 25.92%;
    top: 60.07%;
    animation: item5-animation 4s ease-in-out infinite;
    filter: blur(1px);
    width: 15px !important;
}

@keyframes item5-animation {
    0% {
        transform: translateY(0) rotate(90.00deg);
    }
    50% {
        transform: translateY(-10px) rotate(90.00deg);
    }
    100% {
        transform: translateY(0) rotate(90.00deg);
    }
}

.item6 {
    left: 35%;
    top: 45%;
    animation: item6-animation 5s ease-in-out infinite;
    filter: blur(1px);
    width: 15px !important;
}

@keyframes item6-animation {
    0% {
        transform: translateY(0) rotate(60deg);
    }
    50% {
        transform: translateY(-10px) rotate(60deg);
    }
    100% {
        transform: translateY(0) rotate(60deg);
    }
}

.item7 {
    left: 50%;
    top: 75%;
    animation: item7-animation 3s ease-in-out infinite;
    filter: blur(1px);
    width: 33px !important;
}

@keyframes item7-animation {
    0% {
        transform: translateY(0) rotate(-30.00deg);
    }
    50% {
        transform: translateY(-10px) rotate(-30.00deg);
    }
    100% {
        transform: translateY(0) rotate(-30.00deg);
    }
}

.item8 {
    left: 68%;
    top: 60%;
    animation: item8-animation 4s ease-in-out infinite;
    filter: blur(1px);
}

@keyframes item8-animation {
    0% {
        transform: translateY(0) rotate(90.00deg);
    }
    50% {
        transform: translateY(-10px) rotate(90.00deg);
    }
    100% {
        transform: translateY(0) rotate(90.00deg);
    }
}

.item9 {
    left: 75%;
    top: 85%;
    animation: item9-animation 5s ease-in-out infinite;
    filter: blur(1px);
    width: 33px !important;
}

@keyframes item9-animation {
    0% {
        transform: translateY(0) rotate(40.00deg);
    }
    50% {
        transform: translateY(-10px) rotate(40.00deg);
    }
    100% {
        transform: translateY(0) rotate(40.00deg);
    }
}

.item10 {
    left: 30%;
    top: 80.00%;
    animation: item10-animation 4s ease-in-out infinite;
    filter: blur(3px);
}

@keyframes item10-animation {
    0% {
        transform: translateY(0) rotate(-40.00deg);
    }
    50% {
        transform: translateY(-10px) rotate(-40.00deg);
    }
    100% {
        transform: translateY(0) rotate(-40.00deg);
    }
}




.slogan {
    position: relative;
    z-index: 11; /* 比 hero-section 再高一點 */
    display: inline-block;
    overflow: hidden;
    color: transparent; /* 初始隱藏文字 */
}


@keyframes fadeInText {
    to {
        opacity: 1;
    }
}

.reveal-text-1 {
    color: #FFFFFF;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: fadeInText 0.5s ease-in forwards;
}

.reveal-mask-1 {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: #105998;
    z-index: 2;
    animation: revealEffect 0.5s forwards;
}

.reveal-text-2 {
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: fadeInText 0.8s ease-in 0.3s forwards;
}

.reveal-mask-2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: #105998;
    z-index: 2;
    animation: revealEffect 0.8s 0.3s forwards;
}

.subtitle-group {
    padding-top: 15px;
}

/* 1. 橫向排列設定 */
.hero-flex-layout {
    display: flex;
    align-items: center;   /* 垂直置中 */
    justify-content: space-between;
    width: 100%;
}

.hero-text-side {
    flex: 1;               /* 佔據剩餘空間 */
    max-width: 800px;      /* 限制文字寬度防止過長 */
}

/* 2. 圓形按鈕與旋轉文字 */
.hero-button-side {
    display: none; /* 先隱藏 */
    position: relative;
    padding-left: 50px;    /* 給予一點間距 */
}

.circle-btn-wrapper {
    position: relative;
    width: 200px;          /* 增加容器大小讓旋轉文字有空間 */
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-circle-login {
    width: 120px;          /* 圓形按鈕本體大小 */
    height: 120px;
    background-color: #7d81ff; /* 紫色調 */
    color: white !important;
    border-radius: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1.3;
    z-index: 5;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(125, 129, 255, 0.4);
}

/* 3. SVG 旋轉文字樣式 */
.rotating-text {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: rotateText 15s linear infinite;
}

.svg-text {
    fill: rgba(255, 255, 255, 0.8); /* 稍微透明的白色文字 */
    font-size: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

@keyframes rotateText {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/*!* 4. RWD 處理：手機版要變回上下排列 *!*/
/*@media (max-width: 991px) {*/
/*    .hero-flex-layout {*/
/*        flex-direction: column;*/
/*        text-align: center;*/
/*    }*/
/*    .hero-button-side {*/
/*        padding-left: 0;*/
/*        margin-top: 40px;*/
/*    }*/
/*    .hero-text-side {*/
/*        max-width: 100%;*/
/*    }*/
/*}*/

@keyframes revealEffect {
    0% {
        width: 0%;
        left: 0%;
    }
    50% {
        width: 100%;
        left: 0%;
    }
    100% {
        width: 0%;
        left: 100%;
    }
}


.hero-section h1 {
    color: #263238;
    font-size: 4rem;
    margin-bottom: 15px;
    font-weight: bold;
    line-height: 1.3;
}

.hero-section p {
    color: #FFFFFF;
    font-size: 1.25rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.hero-section a {
    font-weight: 700;
    font-size: 1rem;
    color: #FAFAFA !important;
    padding: 1rem 2rem;
}

.hero-content {
    display: inline-block;
}

.subtitle {
    font-size: 1rem;
    line-height: 200%;
    opacity: 0; /* 預設隱藏 */
    animation-fill-mode: forwards;
    animation-name: fadeInUp;
    animation-timing-function: ease-in-out;
    max-width: 100%;
}

.subtitle-animate {
    animation-delay: 1s;
    animation-duration: 0.5s;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
}

.card-layout {
    display: flex;
    gap: 24px;
    max-width: 1440px;
    margin: 40px auto;
}

.left {
    flex: 1.1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.right {
    flex: 1;
}

.card {
    position: relative;
    background-color: rgba(250, 250, 250, 0.8);
    border: 1px solid #FFFFFF;
    border-radius: 1rem;
    padding: 2rem;
    height: 100%;
    backdrop-filter: blur(12px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.text .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    background-color: rgba(250, 250, 250, 0.8);
    padding-left: 0;
}

.text .header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: bold;
    color: #1a1a1a;
}

.text .arrow {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1f5fa8;
    color: white;
    font-size: 18px;
    text-decoration: none;
    flex-shrink: 0;
}

.text p {
    margin: 0 0 0.5rem;
    line-height: 1.7;
    color: #4a5568;
    font-size: 1.05rem;
}

/* RWD Breakpoints */

/* Tablet & Small Desktop: < 1024px */
@media (max-width: 1023px) {
    .card.big .text .header {
        justify-content: space-between;
    }
}

/* Mobile: < 768px */
@media (max-width: 767px) {
    .text .header {
        justify-content: space-between !important;
        gap: 12px;
    }

    .card {
        padding: 1.5rem;
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================
   1. 父容器設定
   ========================================= */
.hero-section {
    position: relative; /* 關鍵：讓內部的 absolute 元素以這裡為參照 */
    z-index: 10;        /* 確保高於背景的 0 */
    width: 100%;
    /*min-height: 80vh; !* 或是您原本的高度設定 *!*/
    padding: 304px 0 80px 0;
    text-align: left;
}

.related-links {
    margin: 290px 0 212px 0;
}

.related-links h2 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #263238;
    margin: 0;
    position: relative;
    z-index: 1;
}

.col-related-title {
    display: flex !important;
    flex-direction: column;
    justify-content: flex-end; /* 垂直置底 */
    align-items: flex-end;     /* 水平靠右 */

    /* 關鍵：確保 col 佔滿父層 row 的全部高度 */
    flex-grow: 1;
}

/* 確保背景色塊的定位基準 */
.col-related-title h2 {
    position: relative;
    display: inline-block; /* 讓寬度等於文字寬度，背景才不會跑掉 */
    margin-bottom: 0;      /* 務必移除底邊距 */
    margin-right: 2rem;
}

/* 1. 電腦版預設樣式 */
.card-container {
    display: flex;
    flex-wrap: wrap;    /* 允許換行 */
    gap: 24px;          /* 卡片之間的間距 */
    width: 100%;
    margin: 32px 0 12px 0;
}

.link-card {
    /* 設定為 Flex 容器，讓文字能到底部 */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    /* 寬度設定：電腦版預設 230px，1 代表允許在剩餘空間微調 */
    flex: 0 0 230px;
    height: 190px;
    padding: 32px;      /* 讓文字與邊框有留白 */
    border-radius: 24px;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 700;
    color: #FAFAFA !important;
    line-height: 125%;

    /* --- 關鍵：設定平滑動畫 --- */
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
    box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);

    /* 預設一點點陰影，讓浮起感更真實 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* --- Hover 特效：右邊浮起 --- */
.link-card:hover {
    /* 1. 向右上方移動並輕微放大 */
    /* translate(水平位移, 垂直位移) */
    transform: translate(2px, -5px) scale(1.02);

    /* 2. 強化下方的陰影，創造高度感 */
    /* h-offset v-offset blur spread color */
    box-shadow: 0 15px 10px rgba(142, 153, 230, 0.68); /* 淺淺的深藍色 */
}

/* 2. RWD 平板與手機版設定 (例如 991px 以下) */
@media (max-width: 991px) {
    .card-container {
        /* 如果希望完全強制一行一個，可以加上這行 (雖然 flex-wrap 配合滿版寬度也能達成) */
        flex-direction: column;
    }

    .link-card {
        flex: 0 0 100%;  /* 關鍵：強制卡片佔據 100% 寬度 */
        height: 100px;
        width: 100%;     /* 確保滿版 */
        aspect-ratio: auto; /* 平板版通常不需要維持正方形，可以改回長方形比較美觀 */
        min-height: 100px;  /* 設定一個舒適的高度 */
    }
}

.view-more-btn-2 {
    display: inline-flex;
    align-items: center;
    background-color: #105998;
    color: white !important;
    padding: 10px 24px;
    border-radius: 32px;
    text-decoration: none;
    font-weight: bold;
    float: right;
    margin-top: 0;
    margin-bottom: 120px;
}
.view-more-btn-2:hover {
    background-color: #094a80;
}

.bg-links {
    /* 漸層放在前面，圖片放在後面，用逗號隔開 */
    background-image: linear-gradient(0deg, rgba(36, 64, 232, 0.5) 0%, rgba(4, 6, 25, 0.76) 100%),
    url("../../../img/ida/lobby/bg-links.jpg");
    /* 2. 關鍵：確保圖片填滿並自動縮放 */
    background-size: cover;      /* 就像 object-fit: cover，圖片會縮放到完全覆蓋容器，不留白 */

    /* 3. 關鍵：確保圖片置中 */
    background-position: center; /* 即使圖片比例不合，也會從中間裁切而非左上角 */

    /* 4. 防止重複 */
    background-repeat: no-repeat;
}

.partnership-platform {
    background-image: linear-gradient(rgba(25, 118, 210, 0.8), rgba(25, 118, 210, 0.8)),
    url("../../../img/ida/lobby/partnership-platform-bg.jpg");
}

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #4B4B4B;
    color: white !important;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.scroll-top:hover {
    background-color: #094a80;
}

.modal-content {
    background-color: #F2F5F6;
}

.announceTime {
    font-size: 0.875rem;
    color: #546E7A;
}

.custom-checkbox {
    border: 1px solid black;
    width: 16px;
    height: 16px;
}

.form-check-label {
    color: #263238;
}


/* 平板版本 (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .floating-bg-layer {
        height: 658px;
    }

    .hero-section {
        padding: 168px 20px 230px 20px;
    }

    .hero-section h1 {
        font-size: 3rem;
        padding: 4px 0;
    }

    .hero-section p {
        font-size: 1.25rem;
    }
}

/* 手機版本 (小於 768px) */
@media (max-width: 767px) {
    .floating-bg-layer {
        height: 652px;
    }

    .hero-section {
        padding: 120px 15px 230px 15px;
        background-position: center;
    }

    .hero-section h1 {
        font-size: 3rem;
        padding: 0;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .subtitle svg {
        width: 100px;
        height: 12px;
    }


    .related-links {
        padding: 30px 15px 0px 15px;

    }

    .related-links h2 {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }


    .scroll-top svg {
        width: 14px;
        height: 10px;
    }

    /* 浮動背景元素調整 */
    .floating-bg-layer .item {
        width: 40px;
    }

    .item5, .item6, .item8 {
        width: 10px !important;
    }

    .item7, .item9 {
        width: 22px !important;
    }
}

/* 極小手機 (小於 375px) */
@media (max-width: 374px) {

    .hero-section h1 {
        font-size: 1.25rem;
    }

}

/* 內聯樣式轉換 */
.announcement-row-even {
    background-color: #F2F5F6CC;
}

.announcement-row-odd {
    background-color: #E7ECEE;
}

.modal-title-custom {
    font-size: 1.25rem;
}

.modal-content-max-h {
    max-height: 80vh;
}

.list-section {
    margin-top: 200px;
}

/**
-----手風琴卡片區域 開始-----
 */
.card-bg-1 { background-image: url('../../../img/ida/lobby/lobby-card-bg-1.jpg'); }
.card-bg-2 { background-image: url('../../../img/ida/lobby/lobby-card-bg-2.jpg'); }
.card-bg-3 { background-image: url('../../../img/ida/lobby/lobby-card-bg-3.jpg'); }

.expand-container {
    display: flex;
    gap: 30px;
    width: 100%;
    height: 320px;
    align-items: stretch;
}

.expand-card {
    flex: 1;
    border-radius: 16px;
    padding: 32px;
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* 未展開時文字靠下 */
    /* 圖片背景設定 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* 增加亮度與模糊的初始值 */
    filter: brightness(0.9) blur(0px);
    transform: scale(1);

    /* 關鍵：組合動畫屬性 */
    /* 我們對 flex、filter 和 transform 同時進行過度 */
    transition:
            flex 0.7s cubic-bezier(0.25, 1, 0.5, 1),
            filter 0.4s ease,
            transform 0.4s ease;

    will-change: flex, filter; /* 強制硬體加速，減少掉幀 */
}

/* 懸停瞬間的「殘影/動能」效果 */
.expand-card:hover {
    z-index: 10;
}

/* 圖片遮罩：確保文字清晰 */
.expand-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

/* --- 第一張卡片的專屬遮罩 (不論打開或收合) --- */
.expand-card:nth-child(1)::before {
    background: linear-gradient(0deg, rgba(36, 64, 232, 0.76) 0%, rgba(4, 6, 25, 0.76) 100%);
}

/* --- 第二、三張卡片的專屬遮罩 (不論打開或收合) --- */
.expand-card:nth-child(2)::before,
.expand-card:nth-child(3)::before {
    background: linear-gradient(180deg, rgba(19, 29, 88, 0.56) 0%, rgba(13, 16, 42, 0.56) 100%);
}

.card-content {
    position: relative;
    z-index: 2; /* 內容必須在遮罩上方 */
}

/* 展開後的卡片狀態 */
/* 修改：原本統一的 active 比例 */
.expand-card.active {
    flex: 2; /* 第一、二張卡片展開佔比 */
    justify-content: flex-end;
    filter: brightness(1) blur(0px); /* 展開定格後恢復清晰 */
}

/* 新增：專門針對第三張卡片（最後一個子元素）展開時的佔比 */
.expand-card:last-child.active {
    flex: 2.5; /* 調大比例，讓左右兩欄有足夠空間 */
    padding-bottom: 0 !important; /* 展開時移除底部內距 */
}

/* 標題列容器 */
.title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;    /* 垂直置中 */
    width: 100%;
    margin-bottom: 0;    /* 這裡才是標題列與下方文字的間距 */
}

.expand-card.active .title-row {
    margin-bottom: 30px;
}

/* 標題樣式 */
.card-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 !important;   /* 強制覆蓋 Bootstrap 預設的 margin */
    padding: 0;
    line-height: 1.2;       /* 緊湊行高有助於精準對齊 */
    display: flex;
    align-items: center;    /* 內部文字也對齊 */
    flex: 1;
}
/* 關鍵：控制斷行標籤 */
.break-line {
    display: inline; /* 沒展開時，執行斷行 */
}

.expand-card.active .card-title {
    font-size: 2rem; /* 展開後標題變小 (如圖2) */
    margin-bottom: 1rem;
    white-space: normal; /* 容許折行 */
}

.expand-card.active .break-line {
    display: none; /* 展開後，把斷行標籤藏起來 */
}

/* 描述文字排版 */
.card-desc {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    /* 關鍵 1：移除 translateY 避免位移感 */
    /* 關鍵 2：讓消失（收回）的速度極快，展開的速度維持原樣 */
    transition: opacity 0.2s ease, max-height 0s ease 0.2s;

    line-height: 1.8;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    visibility: hidden; /* 確保沒展開時完全不佔位且不可見 */
}

.expand-card.active .card-desc {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
    /* 展開時：文字稍微延遲出現，等卡片拉寬一點再顯示，視覺更乾淨 */
    transition: opacity 0.5s ease 0.3s, max-height 0s ease;
}

/* 箭頭樣式 */
.arrow-circle {
    display: none;
}

/* 只有在 active 狀態下才顯示箭頭 */
.expand-card.active .arrow-circle {
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    min-width: 50px;        /* 固定寬度，不被擠壓 */
    background: white;
    color: #3f3fcc;
    border-radius: 50%;
}

/* 展開後的標題字體與斷行邏輯維持原樣 */
.expand-card.active .card-title {
    font-size: 2rem;
    white-space: nowrap;
}

.expand-card.active .break-line {
    display: none;
}

/* 1. 內部的左右 Flex 容器 */
.desc-flex-container {
    display: flex;
    gap: 10px;          /* 調整左右之間的距離 */
    width: 100%;
    align-items: flex-start; /* 確保內容靠上對齊 */
}

/* 2. 左側簡介文字 (佔據 60% 寬度，可依需求調整) */
.desc-left {
    flex: 1;          /* 讓左側比例稍大，例如 1.5:1 */
}

/* 3. 右側申報項目 (佔據剩餘寬度) */
.desc-right {
    flex: 1;            /* 左側與右側比例為 1.5:1 */
}

/* 4. 針對備註文字的樣式微調 */
.desc-right .remark {
    font-size: 0.9rem;  /* 縮小一點點字體，讓它看起來像備註 */
    color: rgba(255, 255, 255, 0.7); /* 淡化一點顏色 */
    line-height: 1.5;   /* 調整行高 */
}

.desc-right p {
    margin: 0;
}

.desc-left p {
    margin: 0;
}

.sm-break-line {
    display: none; /* 沒展開時，執行斷行 */
}
.expand-card.active .sm-break-line {
    display: none; /* 展開後，把斷行標籤藏起來 */
}
/* --- RWD 通用調整：當螢幕小於 991px 時 --- */
@media (max-width: 991px) {
    .break-line {
        display: none; /* 沒展開時，執行斷行 */
    }

    .card-title {
        font-size: 2rem;
    }

    /* 展開後的標題字體與斷行邏輯維持原樣 */
    .expand-card.active .card-title {
        font-size: 2rem;
        white-space: nowrap;
    }

    .expand-container {
        flex-direction: column; /* 轉為垂直 */
        height: 660px;
        gap: 30px;
    }

    .expand-card {
        flex: 1;                /* 關鍵：讓三張卡片預設平分高度 */
        width: 100%;
        height: auto;           /* 移除固定高度，交給 flex 控制 */
        min-height: 0;          /* 必須設為 0，否則 flex 壓縮會失效 */
        padding: 20px 24px;
        transition: flex 0.7s cubic-bezier(0.25, 1, 0.5, 1); /* 維持絲滑的壓縮感 */
    }

    /* 展開狀態 */
    .expand-card.active {
        flex: 7;                /* 展開的卡片佔比較大，其餘兩張會被自動壓縮 */
    }

    /* 新增：專門針對第三張卡片（最後一個子元素）展開時的佔比 */
    .expand-card:last-child.active {
        flex: 8; /* 調大比例，讓左右兩欄有足夠空間 */
    }

    /* --- 關鍵修正：解決文字第一次點開消失的問題 --- */
    .card-desc {
        /* 在手機版，我們讓文字出現得乾脆一點 */
        transition: opacity 0.4s ease;
        transform: none; /* 移除位移 */
        overflow-y: auto;
        max-height: 0;
    }

    .expand-card.active .card-desc {
        /*max-height: 360px;*/
        opacity: 1;
        visibility: visible;
        /* 移除延遲 (0.3s -> 0s)，讓文字隨高度同步出現 */
        transition: opacity 0.4s ease 0.1s;
    }

    /* 第三張卡片左右分欄變上下堆疊 */
    .desc-flex-container {
        flex-direction: column;
        gap: 15px;
    }

    .desc-left, .desc-right {
        flex: none;
        width: 100%;
    }

    .desc-right {
        border-left: none;
        padding-left: 0;
        padding-top: 15px;
    }
}
@media (max-width: 767px) {
    .expand-card.active .sm-break-line {
        display: inline; /* 展開後，把斷行標籤藏起來 */
    }

    .card-title {
        font-size: 1.5rem;
    }

    /* 展開後的標題字體與斷行邏輯維持原樣 */
    .expand-card.active .card-title {
        font-size: 1.5rem;
        white-space: nowrap;
    }

    .expand-container {
        height: 740px;
        gap: 20px;
    }

    /* 展開狀態 */
    .expand-card.active {
        flex: 6;                /* 展開的卡片佔比較大，其餘兩張會被自動壓縮 */
    }

    /* 新增：專門針對第三張卡片（最後一個子元素）展開時的佔比 */
    .expand-card:last-child.active {
        flex: 14; /* 調大比例，讓左右兩欄有足夠空間 */
    }
}
/**
-----手風琴卡片區域 結束-----
 */