/* 基礎樣式重設 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 橫幅容器 */
.banner-container {
    position: relative;
    width: 100%;
    min-height: 250px;
    background-color: #ffffff;
    padding: 40px 60px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 教授資訊外容器（用來定位最左邊的綠色直線條） */
.profile-container {
    position: relative;
    padding-left: 20px; /* 留出綠色直線條的空間 */
    text-align: left;    /* 確保文字靠左 */
    margin-bottom: 30px;
}

/* 教授資訊最左邊的垂直綠色直線 */
.profile-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 5px;          /* 直線厚度 */
    height: calc(100% - 8px); /* 讓線條高度自動跟隨三行文字高度 */
    min-height: 50px;    /* 確保最少有一定高度 */
    background-color: #0f766e; /* 深綠色 */
    border-radius: 2px;
}

/* 教授資訊文字區塊 */
.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* 確保內容物件靠左 */
}

/* 姓名樣式 */
.profile-name {
    font-size: 22px;
    font-weight: bold;
    color: #121559;
    line-height: 1.2;
}

/* 職稱樣式 */
.profile-title {
    font-size: 14px;
    color: #475569;
    margin-top: 6px;
    font-weight: 500;
}

/* 單位機構樣式 */
.profile-org {
    font-size: 14px;
    color: #475569;
    margin-top: 4px;
}

/* 主標題區塊（完全靠左對齊，並確保文字在波浪上方） */
.main-content {
    text-align: left;
    z-index: 2; 
    padding-left: 20px; /* 與上方文字對齊線保持一致 */
}

/* 主標題樣式 */
.main-title {
    font-size: 48px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

/* 副標題樣式 */
.sub-title {
    font-size: 22px;
    font-weight: 700;
    color: #15803d; /* 綠色字體 */
    font-style: italic; /* 斜體 */
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

/* 副標題下方的綠色短底線 */
.sub-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 45px;
    height: 4px;
    background-color: #16a34a;
    border-radius: 2px;
}

/* 完美還原的滿版網頁波浪背景控制 */
.wave-background {
    position: absolute;
    left: 0;             /* 從極左側邊界開始 */
    right: 0;            /* 延伸至極右側邊界 */
    bottom: 0;           /* 完美貼齊底部零間隙 */
    width: 100%;         /* 橫向強制 100% 滿版填滿 */
    height: 100%;        /* 縱向完整充滿容器背景，以便呈現從底部到右上的大幅度揚起 */
    z-index: 1;          
    pointer-events: none;
}


/* ==========================================
   📦 2x2 完美的對稱網格排版
   ========================================== */
.contrast-grid-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 強制上二下二 */
    gap: 40px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* 卡片基礎：邊框自帶雙色高飽和度漸層 */
.contrast-card {
    background: linear-gradient(135deg, var(--c1), var(--c2));
    border-radius: 24px;
    padding: 4px; 
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
}

/* 卡片內部：極致純白與外框線條撞色 */
.card-inner {
    background: #FFFFFF; 
    border-radius: 20px;
    padding: 45px 35px;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* 背景巨型巨型數字 */
.card-num  {
    position: absolute;
    right: -15px;      /* 稍微往右側延伸，增加破格排版感 */
    top: -25px;
    font-size: 140px;  /* 放大字體，讓深色更具張力 */
    font-weight: 900;
    opacity: 0.45;     /* 提高透明度，使其深色完全顯現 */
    line-height: 1;
    z-index: 0;        /* 確保在文字後方，不影響閱讀 */
}

/* 標籤小方塊 */
.card-badge {
    align-self: flex-start;
    padding: 6px 16px;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 1px;
    border-radius: 50px;
    margin-bottom: 25px;
}

/* 卡片主標題：採用飽和寶石色 */
.contrast-card h2 {
    font-size: 30px;
    margin-bottom: 15px;
    font-weight: 900;
}

.contrast-card p {
    font-size: 26px;
    line-height: 1.8;
    color: #4B5563; 
    margin-bottom: 35px;
    font-family: system-ui, sans-serif;
}

/* 按鈕核心樣式 */
.action-btn {
    margin-top: auto;
    text-decoration: none;
    padding: 14px 30px;
    font-weight: 900;
    text-align: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* 懸停時卡片向上浮起浮起 */
.contrast-card:hover {
    transform: translateY(-10px) scale(1.01);
}

/* ==========================================
   🎨 淺色底專用：四大項目高對比互補色
   ========================================== */

/* 大項 1：翡翠綠 X 艷麗粉 */
.color-green-pink { --c1: #00B359; --c2: #E60067; }
.color-green-pink .card-num { color: #00B359; }
.color-green-pink .card-badge { background: #00B359; color: #fff; }
.color-green-pink h2 { color: #121559; }
.color-green-pink .action-btn { border: 2px solid #E60067; color: #E60067; }
.color-green-pink .action-btn:hover { background: #E60067; color: #fff; box-shadow: 0 10px 20px rgba(230, 0, 103, 0.25); }
.color-green-pink:hover { box-shadow: 0 20px 40px rgba(0, 179, 89, 0.15); }

/* 大項 2：琥珀橙 X 寶石藍 */
.color-orange-blue { --c1: #E64A00; --c2: #0099B3; }
.color-orange-blue .card-num { color: #E64A00; }
.color-orange-blue .card-badge { background: #E64A00; color: #fff; }
.color-orange-blue h2 { color: #121559; }
.color-orange-blue .action-btn { border: 2px solid #0099B3; color: #0099B3; }
.color-orange-blue .action-btn:hover { background: #0099B3; color: #fff; box-shadow: 0 10px 20px rgba(0, 153, 179, 0.25); }
.color-orange-blue:hover { box-shadow: 0 20px 40px rgba(230, 74, 0, 0.15); }

/* 大項 3：芥末黃 X 皇家紫 */
.color-yellow-purple { --c1: #B3D900; --c2: #7A00E6; }
.color-yellow-purple .card-num { color: #7A00E6; }
.color-yellow-purple .card-badge { background: #7A00E6; color: #fff; }
.color-yellow-purple h2 { color: #121559; }
.color-yellow-purple .action-btn { border: 2px solid #7A00E6; color: #7A00E6; }
.color-yellow-purple .action-btn:hover { background: #7A00E6; color: #fff; box-shadow: 0 10px 20px rgba(122, 0, 230, 0.25); }
.color-yellow-purple:hover { box-shadow: 0 20px 40px rgba(122, 0, 230, 0.15); }

/* 大項 4：深烈紅 X 深青綠 */
.color-red-cyan { --c1: #D9002B; --c2: #00A3A3; }
.color-red-cyan .card-num { color: #D9002B; }
.color-red-cyan .card-badge { background: #D9002B; color: #fff; }
.color-red-cyan h2 { color: #121559; }
.color-red-cyan .action-btn { border: 2px solid #00A3A3; color: #00A3A3; }
.color-red-cyan .action-btn:hover { background: #00A3A3; color: #000; box-shadow: 0 10px 20px rgba(0, 163, 163, 0.25); }
.color-red-cyan:hover { box-shadow: 0 20px 40px rgba(217, 0, 43, 0.15); }


/* ==========================================================================
   2. learn more part 2
   ========================================================================== */




/* 外層：2欄 × 2列 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(180px, 1fr));
    gap: 15px;

    width: calc(100% - 160px);
    margin: 0 auto;

    min-height: 400px;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* 個別區塊 */
.info-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    width: 100%;
    height: 100%;
    padding: 20px;

    border: 1px solid #17427c;
    border-radius: 10px;
    box-sizing: border-box;
}

/* 標題 */
.info-card h3 {
    color: #17427c;
    font-size: 18px;
    margin: 0 0 10px;
}

/* 底部資訊列 */
.info-card__footer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

/* Description */
.info-card__footer p {
    color: #666;
    font-size: 14px;
    margin: 0;
    white-space: nowrap;
}

/* 中間分隔線 */
.info-card__footer .divider {
    color: #17427c;
    font-size: 16px;
}

/* Learn More */
.info-card__footer a {
    color: #07529b;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

/* 滑鼠效果 */
.info-card__footer a:hover {
    color: #063e78;
    text-decoration: underline;
}

/* ==========================================================================
   2. 下方按鈕呼籲區塊 (CTA Section)
   ========================================================================== */
.cta-container {
    width: 100%;
    margin-top: 24px;          /* 與上方橫幅保持完美間距 */
    padding: 24px 0;           
    border-radius: 12px;       
    background: linear-gradient(to right, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%); /* 左右對稱淡藍漸層 */
    display: flex;
    justify-content: center;   /* 讓按鈕水平置中 */
    align-items: center;       
    box-sizing: border-box;
}

/* 深藍色膠囊型按鈕 */
.cta-button {
    display: inline-flex;
    align-items: center;       
    justify-content: center;
    background-color: #004b93; /* 經典深藍 */
    color: #ffffff;            
    text-decoration: none;     
    padding: 12px 32px;        
    border-radius: 50px;       
    font-size: 16px;
    font-weight: 600;          
    letter-spacing: 0.3px;
    transition: all 0.2s ease-in-out; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* 按鈕滑鼠懸停（Hover）動效 */
.cta-button:hover {
    background-color: #00366b; 
    transform: translateY(-1px); 
    box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.15);
}

.cta-button:active {
    transform: translateY(1px);
}

.btn-text {
    margin: 0 12px 0 10px;    
}

.icon-file {
    width: 20px;
    height: 20px;
    color: #ffffff;
}

.icon-arrow {
    width: 14px;
    height: 14px;
    color: #ffffff;
    transition: transform 0.2s ease;
}

/* 懸停時讓箭頭往前探 */
.cta-button:hover .icon-arrow {
    transform: translateX(3px);
}

/* ==========================================
   📱 平板與手機版響應式修正 (RWD)
   ========================================== */

/* 平板尺寸以下 (768px 以下) */
@media (max-width: 768px) {
    /* 1. 橫幅內距與標題縮小 */
    .banner-container {
        padding: 30px 24px;
        min-height: auto;
    }

    .main-title {
        font-size: 32px;
    }

    .sub-title {
        font-size: 18px;
    }

    /* 2. 第一組卡片網格：從 2 欄改為單欄，並調整間距 */
    .contrast-grid-layout {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 0 20px;
    }

    /* 卡片內部空間與字體縮小 */
    .card-inner {
        padding: 30px 24px;
    }

    .card-num {
        font-size: 100px;
        right: -10px;
        top: -15px;
    }

    .card-badge {
        font-size: 20px;
        padding: 4px 14px;
        margin-bottom: 16px;
    }

    .contrast-card h2 {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .contrast-card p {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 24px;
    }

    /* 3. 第二組資訊網格：提早改為單欄並放寬左右邊距 */
    .info-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        width: calc(100% - 40px);
        min-height: auto;
    }

    .info-card {
        min-height: auto;
    }

    /* 允許底部資訊在螢幕極窄時自動換行，避免文字被切掉 */
    .info-card__footer {
        flex-wrap: wrap;
        gap: 8px;
    }

    .info-card__footer p {
        white-space: normal;
    }

    /* 4. 底部 CTA 按鈕區塊調整 */
    .cta-container {
        padding: 20px 16px;
        margin-top: 20px;
    }

    .cta-button {
        width: 100%;
        max-width: 340px;
        padding: 12px 20px;
        font-size: 15px;
    }
}