html {
  scroll-behavior: smooth;
}

#why-taiwan,
#event-schedule,
#company {
  scroll-margin-top: 120px;
}


.hero-cover {
  height: 100vh;
  background: linear-gradient(
      rgba(0,0,0,0.2),
      rgba(0,0,0,0.2)
    ),
    url('../images/hero.png');
  background-size: cover;
  background-position: center;
}

.intro-section {
    background: #f5f5f2;
}

.info-box {
    padding: 40px;
    border-radius: 30px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.info-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}


.green-box {
    background: #b9d7b4;
}

.yellow-box {
    background: #e5e39c;
}





.intro-section {
    background: #f5f5f2;
    position: relative;
    overflow: hidden;
}

/* 裝飾圓形 */
.decor-circle {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(183, 214, 180, 0.4), transparent 70%);
    top: -150px;
    right: -150px;
    border-radius: 50%;
    z-index: 0;
}

/* 讓內容浮在裝飾上方 */
.intro-section .container {
    position: relative;
    z-index: 2;
}

.intro-section::after {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(230, 220, 150, 0.3), transparent 70%);
    bottom: -150px;
    left: -100px;
    border-radius: 50%;
    z-index: 0;
}

.yellow-box {
    background: #e5e39c;
    margin-left: 40px;
}

.info-box h3 {
    font-weight: 700;
    margin-bottom: 20px;
}

.info-box p {
    font-size: 1.05rem;
    line-height: 1.6;
}

/* 初始隱藏狀態 */
.fade-in-section {
    opacity: 0;
    transform: translateY(50px);
    transition: 
        opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}



/* 滑到時顯示 */
.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.event-title {
    font-size: 4rem;
    font-weight: 700;
    color: #3b2b2b;
}

/* 左側圖片卡片 */
.event-image-card {
    pposition: relative;
    border-radius: 25px;
    overflow: hidden;

    aspect-ratio: 16 / 9;

    background-size: cover;
    background-position: center;

    transition: transform .4s ease;
}

.event-image-card:hover{
    transform: scale(1.04);
}


/* 東岸藍色濾鏡 */
.east-coast {
    background: linear-gradient(rgba(70,120,170,0.6), rgba(70,120,170,0.6)),
                url('../images/east.png');
    background-size: cover;
    background-position: center;
}



/* 活動項目排版 */
.event-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
}

.event-item h5 {
    font-size: 1.6rem;
    font-weight: 500;
}


.event-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* Coming Soon text */

.coming-soon{
    font-size:1.6rem;
    font-weight:600;
    color:#3b2b2b;
}

/* 西岸綠色濾鏡 */
.west-coast {
    background: linear-gradient(
        rgba(120,160,110,0.75),
        rgba(120,160,110,0.75)
    ),
    url('../images/west.png');
    background-size: cover;
    background-position: center;
}

/* Link Section */
/* ===== Partner Link Section ===== */

.link-section {
    background: #f6f7f4;
}

.link-title {
    font-size: 4rem;
    font-weight: 700;
    color: #3b2b2b;
}

/* ===== 統一 Link Section 所有 Logo 大小 ===== */
.link-card {
    height: 180px; /* 固定卡片高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px; /* 增加內邊距，防止 Logo 貼邊 */
}

.link-card img {
    /* 1. 設定固定的視覺佔用空間 */
    height: 65px !important;    /* 稍微調大一點點，讓視覺更飽滿 */
    width: 160px !important;    /* 給予一個固定的寬度範圍 */
    
    /* 2. 關鍵：確保圖片在範圍內「自適應」顯示而不變形 */
    object-fit: contain !important; 
    
    /* 保持原本的視覺效果 */
    filter: grayscale(100%) contrast(90%);
    opacity: 0.85;
    transition: all .35s ease;
}

/* Hover 效果 */
.link-card:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.08); /* 縮放稍微減小一點，防止圖片糊掉 */
}

/* ===== 手機版微調 (RWD) ===== */
@media (max-width: 991px) {
    .link-card {
        height: 130px; 
        padding: 15px;
    }
    
    .link-card img {
        height: 45px !important;
        width: 110px !important;
    }
}

/* ===== Footer ===== */

.site-footer {
    background: linear-gradient(90deg, #e6d8a8, #b8c7b2);
    padding: 70px 0 50px;
    font-size: 0.95rem;
    border-top:1px solid rgba(0,0,0,.08);
}

/* 讓三欄垂直對齊 */
.site-footer .row {
    align-items: flex-start;
}

.footer-title{
    font-size:0.9rem;
    font-weight:700;
    letter-spacing:0.5px;
    margin-bottom:16px;
    color:#2f3a3a;
}

.footer-brand{
    font-weight:600;
    margin-bottom:8px;
}

.footer-copy a {
    color: inherit !important;          /* 強制繼承父層顏色 (#2f3a3a)，移除藍色 */
    text-decoration: none !important;    /* 強制移除底線 */
}

.footer-copy a:hover{
    text-decoration:underline;
}

/* 左側導覽 */
.footer-links a {
    display: block;
    color: #2f3a3a;
    text-decoration: none;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
    transition: all .25s ease;
}

.footer-links a:hover {
    transform: translateX(6px);
    color: #000;
}

/* 中間社群 */
.footer-social {
    text-align: center;
}

.footer-social a {
    color: #2f3a3a;
    text-decoration: none;
    margin: 0 14px;
    letter-spacing: 0.5px;
    transition: all .25s ease;
}

.footer-social a:hover {
    color: #000;
}

/* 右側版權 */
.footer-copy {
    text-align: right;
    color: #2f3a3a;
    line-height: 1.7;
    max-width: 320px;
    margin-left: auto;
}

/* 手機版調整 */
@media (max-width: 768px) {

    .footer-links {
        margin-bottom: 30px;
    }

    .footer-social {
        margin-bottom: 25px;
    }

    .footer-copy a{
    color: inherit;
    text-decoration: underline;
    }

    
}

/* ===== Back To Top ===== */

.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;

    background: #3b2b2b;
    color: #fff;
    font-size: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);

    transition: all .3s ease;
    z-index: 9999;   /* ← 這行要有 */
}

/* 出現時 */
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Hover */
.back-to-top:hover {
    background: #000;
    transform: translateY(-3px);
}

/* =====================================
   Bootstrap Navbar Override (正確版本)
   ===================================== */

/* 初始：透明 */
.navbar.navbar-expand.navbar-custom {
    background-color: transparent;
    padding: 14px 30px;
    border-radius: 50px;
    max-width: 1200px;
    margin: 5px auto;

    box-shadow: 0 8px 25px rgba(0,0,0,0.08);

    transition: all .35s ease;
}

.navbar-custom{
top:-10px;
}

/* Hero 上文字白色 */
.navbar.navbar-expand-lg.navbar-custom .navbar-brand,
.navbar.navbar-expand-lg.navbar-custom .nav-link {
    color: #fff;
}

/* Scroll 後 */
.navbar.navbar-expand-lg.navbar-custom.scrolled {
    background-color: rgba(255,255,255,0.85);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0,0,0,.08);

}

/* Scroll 後文字 */
.navbar.navbar-expand-lg.navbar-custom.scrolled .navbar-brand,
.navbar.navbar-expand-lg.navbar-custom.scrolled .nav-link {
    color: #222;
}

.navbar-custom .nav-link:hover{
    color:#000;
    opacity:.7;
}
/* =====================================
   WHY TAIWAN SECTION (PRO VERSION)
   ===================================== */

.why-taiwan-section{
    background:#f7f7f5;
    padding:110px 0;
    position:relative;
}

/* 背景點點 */
.why-taiwan-section::before{
    content:"";
    position:absolute;
    inset:0;
    background-image:radial-gradient(#e3e3e3 1px, transparent 1px);
    background-size:18px 18px;
    opacity:.35;
}

/* container 在點點之上 */
.why-taiwan-section .container{
    position:relative;
    z-index:2;
}

.why-label{
    position:absolute;
    top:16px;
    right:20px;

    font-size:0.75rem;
    font-weight:700;
    letter-spacing:.5px;

    color:#fff;

    background:#000;
    padding:4px 10px;
    border-radius:20px;

    box-shadow:0 2px 6px rgba(0,0,0,.15);
}

/* 左側標題 */
.career-title{
    font-size: 4rem;
    font-weight: 700;
    color: #3b2b2b;
}

.no-break{
  white-space: nowrap;
}

.career-text{
    max-width:520px;
    line-height:1.8;
    color:#555;
    font-size:1.05rem;
}

/* 卡片 */
.why-card{
    position: relative;
    padding: 28px 30px;
    border-radius: 12px;
    margin-bottom: 18px;
    color:#222;
}

.why-card:hover{
    transform:translateY(-8px);
    box-shadow:0 25px 55px rgba(0,0,0,0.15);
}

/* 顏色 */
.why-card.green{
    background:#33c3a5;
}

.why-card.brown{
    background:#b68963;
}


/* WHY TAIWAN */
.card-title{
    font-size:.75rem;
    font-weight:700;
    letter-spacing:1px;
    margin-bottom:6px;
}

/* 標題 */
.why-card h5{
    font-weight:700;
    margin-bottom:10px;
}
/* 列表 */
.why-card ul{
    padding-left:18px;
    margin:0;
}

/* 錯位效果 */
.why-card:nth-child(2),
.why-card:nth-child(4){
    margin-left:80px;
}

.why-card:nth-child(1),
.why-card:nth-child(3){
    margin-right:40px;
}

.why-card{
    position: relative;
    padding: 28px 30px;
    border-radius: 12px;
    margin-bottom: 18px;
    color:#222;
    transition: transform .25s ease, box-shadow .25s ease;
}

.why-card:hover{
    transform: translateY(-6px);
    box-shadow:0 15px 40px rgba(0,0,0,.12);
}

/* icon */
.why-icon{
    font-size:22px;
    margin-bottom:10px;
    opacity:.9;
}

/* 手機版 */
@media (max-width:768px){

    .career-title{
        font-size:2.1rem;
    }

    .why-card:nth-child(2),
    .why-card:nth-child(4){
        margin-left:0;
    }

}

/* ===== Navbar ===== */

.navbar-custom .nav-link{
    color:#fff;
    transition: all .3s ease;
}

/* ===== Navbar underline animation ===== */

.navbar-custom .nav-link{
    position:relative;
}

.navbar-custom .nav-link::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-6px;
    width:0;
    height:2px;
    background:#000;
    transition: width .3s ease;
}



/* hover */
.navbar-custom .nav-link:hover{
    color:#000;
    opacity:0.7;
}

/* scroll 後 navbar */
.navbar-custom.scrolled{
    background:#ffffff;
}

/* scroll 後文字 */
.navbar-custom.scrolled .nav-link{
    color:#222;
}

/* scroll 後 hover */
.navbar-custom.scrolled .nav-link:hover{
    color:#000;
}



#why-taiwan,
#event-schedule,
#company{
    scroll-margin-top:120px;
}

/* ===== Hero ===== */
.about-hero {
    height: 50vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
                url('https://images.unsplash.com/photo-1522202176988-66273c2fd55f');
    background-size: cover;
    background-position: center;
}

/* ===== About 文字區 ===== */
.about-content {
    max-width: 900px;
    margin: 60px auto;
    line-height: 1.8;
    font-size: 16px;
}

/* ===== 無圖 Hero ===== */
.about-hero-simple {
    padding: 100px 20px 60px;
    background: #f8f9fa;
}

.about-hero-simple h1 {
    font-size: 42px;
    font-weight: 700;
}

.about-hero-simple .subtitle {
    font-size: 18px;
    color: #6c757d;
}

/* ===== About 文字區 ===== */
.about-content {
    max-width: 900px;
    margin: 60px auto;
    line-height: 1.9;
    font-size: 16px;
    color: #333;
}

/* ===== Section 間距統一 ===== */
section {
    padding-top: 60px;
    padding-bottom: 60px;
}

.video-wrapper:hover {
    transform: scale(1.02);
    transition: 0.3s;
}

/* ===== Overview 區塊 ===== */
.overview-title {
    font-size: 32px;
    font-weight: 700;
}

.overview-text {
    margin-top: 16px;
    color: #555;
    line-height: 1.8;
}

/* ===== 影片比例（超重要） */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    border-radius: 12px;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    border: 0;
}

/* ===== RWD 微調 ===== */
@media (max-width: 992px) {
    .overview-title {
        margin-top: 20px;
    }
}

/* ===== 強制統一 Section Typography ===== */
.section-title {
    font-size: 32px !important;
    font-weight: 700 !important;
    line-height: 1.3;
    color: #3b2b2b;
}

.section-text {
    margin-top: 18px;
    font-size: 16px !important;
    line-height: 1.8;
    color: #555;
}

section {
    padding: 80px 0;
}

/* 預設透明 */
.navbar.navbar-custom {
    background: transparent;
}

/* scroll / about page */
.navbar-custom.scrolled {
    background: #ffffff !important;
    backdrop-filter: blur(10px);
}

/* 字色 */
.navbar-custom.scrolled .nav-link,
.navbar-custom.scrolled .navbar-brand {
    color: #222 !important;
}

/* =====================================
   手機版統整修正 (991px 以下)
   ===================================== */
@media (max-width: 991px) {
    
    /* 1. 讓內容下移，避免被 Navbar 擋住 */
    body {
        padding-top: 70px !important; 
    }

    /* 2. 手機版 Navbar：強制白色實色背景 */
    .navbar-custom {
        top: 0 !important;
        position: fixed !important;
        width: 100% !important;
        background-color: #ffffff !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 10px 15px !important;
    }

    /* 3. 手機版導覽列字色轉為深色 (解決白色背景看不見字的問題) */
    .navbar-custom .navbar-brand,
    .navbar-custom .nav-link {
        color: #333333 !important;
    }

    /* 4. 手機版 Hero 區塊：保持圖片比例，絕對不裁切 */
    .hero-cover {
        height: auto !important; 
        aspect-ratio: 16 / 9 !important; /* 照圖片比例縮放 */
        min-height: 250px;
        background-size: contain !important; 
        background-repeat: no-repeat !important;
        background-position: center top !important; 
        background-attachment: scroll !important;
        margin-top: 0 !important; 
    }

    /* 5. 確保漢堡按鈕是黑色的 */
    .navbar-toggler-icon {
        filter: invert(0) brightness(0) !important; 
    }

} /* <--- 所有的手機修正都在這一個大括號內正確結束 */

/* =====================================
   手機版細節二次優化 (針對白色區塊與文字重疊)
   ===================================== */
@media (max-width: 991px) {

    /* 1. 消除 Hero 下方可能出現的白色間隙 */
    .hero-cover {
        margin-bottom: -1px !important; /* 微調位移消除白線 */
        background-color: #f7f7f5 !important; /* 設定與下方 section 相同的底色 */
    }

    /* 2. 修正 Why Taiwan 卡片文字重疊問題 */
    .why-card {
        padding: 20px !important; /* 縮小內邊距，換取文字空間 */
        height: auto !important;   /* 確保高度隨內容撐開 */
        margin-right: 0 !important; /* 取消桌機版的右側間距 */
        margin-left: 0 !important;  /* 取消桌機版的左側間距 */
    }

    .why-card h5 {
        font-size: 1.1rem !important; /* 稍微縮小標題字級以免擠爆 */
        word-break: break-word;      /* 強制長字折行 */
    }

    .why-card ul {
        padding-left: 15px !important;
        font-size: 0.9rem !important; /* 縮小清單字體 */
    }

    /* 3. Footer 手機版視覺優化：改為置中排版 */
    .site-footer {
        padding: 40px 0 !important;
        text-align: center !important; /* 手機版通常置中比較美觀 */
    }

    .footer-copy {
        text-align: center !important;
        margin: 20px auto 0 !important;
        max-width: 100% !important;
    }

    
       /* ✅ 修正 Resources 頁面，讓社群連結並排 */
    .footer-social {
        text-align: center;
        display: flex;          /* 啟用 Flexbox */
        justify-content: center; /* 水平置中 */
        gap: 28px;              /* 設定連結之間的間距 (原本是左右 margin 14px，加起來是 28px) */
    }

    /* 移除原本的 margin 設定，改用 gap 控制 */
    footer-social {
        display: flex;
        flex-direction: column; /* 強制垂直排列 */
        align-items: center;    /* 置中對齊 */
        gap: 10px;              /* 設定文字間距 */
        margin-bottom: 30px;    /* 增加與下方版權宣告的距離 */
    }

    .footer-social a {
        margin: 0 !important;   /* 移除原本可能存在的水平間距 */
        display: block;         /* 確保每個連結佔據一行 */
    }

    .footer-links a {
        margin-bottom: 0 !important;
    }
}

/* =====================================
   終極移除所有圖片濾鏡 (Hero + Events)
   ===================================== */

/* 移除 Hero 濾鏡 */
.hero-cover {
    /* 只保留圖片路徑，刪除 linear-gradient */
    background-image: url('../images/hero.png') !important;
    background-color: transparent !important;
    filter: none !important;
}

/* 移除 Event 東岸圖片濾鏡 */
.east-coast {
    background-image: url('../images/east.png') !important;
    background-color: transparent !important;
    filter: none !important;
}

/* 移除 Event 西岸圖片濾鏡 */
.west-coast {
    background-image: url('../images/west.png') !important;
    background-color: transparent !important;
    filter: none !important;
}

/* 確保所有圖片卡片在 Hover 時也不會有濾鏡變化 */
.event-image-card, 
.event-image-card:hover {
    filter: none !important;
    -webkit-filter: none !important;
}

/* 1. 全域封鎖水平捲軸，防止左右晃動 */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* 2. 針對手機版 (991px 以下) 的精準修正 */
@media (max-width: 991px) {
    
    /* 修正 Hero 區塊：防止背景圖與文字撐破版面 */
    .hero-cover {
        height: auto !important; 
        min-height: 400px; /* 確保手機上有足夠高度顯示文字 */
        padding: 100px 0 60px !important;
        background-attachment: scroll !important; /* 手機版關閉固定背景以增加效能 */
        background-size: cover !important; 
        overflow: hidden;
    }

    /* 縮小標題字級：防止長句在手機上溢出螢幕 */
    .display-4, .career-title, .event-title, .link-title {
        font-size: 1.8rem !important; /* 強制縮小大標題 */
        line-height: 1.3 !important;
        word-break: break-word !important; /* 確保單字過長會自動斷行 */
    }

    .lead {
        font-size: 1rem !important;
        padding: 0 15px;
    }

    /* 修正 Why Taiwan 卡片：移除桌機版的左右錯位 (margin-left/right) */
    .why-card {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        padding: 20px !important;
    }

    /* 確保所有容器與列不超出螢幕 */
    .container, .row {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* 修正 Event 卡片圖片比例 */
    .event-image-card {
        margin-bottom: 20px;
    }
}

/* 補強：確保所有圖片都不會超過螢幕寬度 */
img {
    max-width: 100%;
    height: auto;
}

/* ===== 1. 全域封鎖水平捲軸，防止左右晃動 ===== */
html, body {
    max-width: 100%;
    overflow-x: hidden; /* 強制隱藏水平捲軸 */
    position: relative;
}

/* 確保所有圖片不超過容器寬度 */
img {
    max-width: 100%;
    height: auto;
}

/* ===== 2. 桌機版 Hero 設定 (保持 Cover 填滿) ===== */
.hero-cover {
    height: 100vh; /* 桌機版維持全螢幕高度 */
    background-image: url('../images/hero.png') !important; /* 確保路徑正確 */
    background-size: cover; /* 桌機版填滿 */
    background-position: center;
    background-color: transparent !important;
    filter: none !important; /* 移除濾鏡 */
}

/* ===== 3. 行動端 (991px 以下) 跑版與圖片裁切修正 ===== */
@media (max-width: 991px) {
    
    /* 修正 Hero 區塊：改為完整顯示圖片並自適應高度 */
    .hero-cover {
        height: auto !important; /* 手機版取消固定高度 */
        min-height: 250px; /* 給一個保底高度 */
        aspect-ratio: 16 / 9; /* 強制依照 16:9 比例縮放圖片 (不裁切) */
        background-size: contain !important; /* 手機版改為「完整顯示」 */
        background-repeat: no-repeat !important;
        background-position: center top !important; 
        padding: 80px 0 40px !important; /* 減少上下內邊距 */
        margin-top: 60px; /* 避免被固定在頂部的 Navbar 擋住 */
        background-attachment: scroll !important; /* 關閉固定背景 */
    }

    /* 調整 Hero 文字大小，防止大字撐開寬度 */
    .display-4, .career-title, .event-section .event-title, .link-section .link-title {
        font-size: 1.8rem !important; /* 縮小手機版的標題字體 */
        line-height: 1.3 !important;
        word-break: break-word !important; /* 確保單字過長會自動斷行 */
    }
    
    .lead {
        font-size: 1rem !important;
        padding: 0 15px;
    }
}

/* ===== 4. 手機版 Footer 細節優化 (針對白色區塊與社群排版) ===== */
@media (max-width: 991px) {

    /* 1. 修正 Why Taiwan 卡片文字重疊問題 */
    .why-card {
        padding: 20px !important;
        height: auto !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    .why-card h5 {
        font-size: 1.1rem !important;
        word-break: break-word;
    }

    /* 2. ✅ 修正 Footer Social Media 排版為垂直堆疊 */
    .footer-social {
        display: flex !important;
        flex-direction: column !important; /* 強制垂直排列 */
        align-items: center !important;    /* 置中對齊 */
        gap: 10px !important;              /* 設定連結間距 */
        margin-bottom: 30px;    /* 增加與下方版權宣告的距離 */
        text-align: center;
    }

    .footer-social a {
        margin: 0 !important;   /* 移除原本可能存在的水平間距 */
        display: block;         /* 確保每個連結佔據一行 */
        color: #2f3a3a;
        text-decoration: none;
    }
}

@media (max-width: 991px) {
    /* 1. 調整卡片容器，確保有足夠空間 */
    .why-card {
        padding-top: 50px !important; /* 增加上方內邊距，把文字往下推 */
        position: relative;
        display: flex;
        flex-direction: column;
    }

    /* 2. 重新定位黑色標籤 */
    .why-label {
        position: absolute;
        top: 15px !important;   /* 固定距離頂部 15px */
        right: 15px !important;  /* ✅ 改為靠右，距離右側 15px */
        left: auto !important;   /* ❌ 取消靠左定位 */
        
        /* 保持原本的樣式設定，不需變動 */
        font-size: 0.7rem !important;
        padding: 4px 10px !important;
        background: #000;
        color: #fff;
        border-radius: 20px;
        z-index: 5;
    }

    /* 3. 調整卡片內的標題 (例如 Industry Leadership) */
    .why-card h5 {
        margin-top: 10px !important; /* 確保標題與標籤之間有間隔 */
        font-size: 1.2rem !important;
        line-height: 1.4 !important;
        font-weight: 800 !important;
        word-break: break-word; /* 防止長單字撐開 */
    }

    /* 4. 調整列表文字大小，讓整體更協調 */
    .why-card ul {
        padding-left: 20px !important;
        margin-top: 10px !important;
    }
    
    .why-card li {
        font-size: 0.95rem !important;
        margin-bottom: 8px !important;
    }
}

@media (max-width: 991px) {
    /* ✅ 修正 Resources 的部會按鈕容器 */
    .nav-logo-card {
        padding: 10px !important; /* 縮小內邊距以爭取空間 */
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important; /* 文字與 ICON 靠左對齊 */
        gap: 8px !important; /* 縮小 ICON 與文字間距 */
        height: auto !important; /* 讓高度隨內容撐開，不設死 */
    }

    /* ✅ 修正部會 ICON 本身不被切掉 */
    .nav-logo-small {
        width: 32px !important;  /* 稍微縮小 ICON 容器 */
        height: 32px !important;
        flex-shrink: 0 !important; /* 防止 ICON 被文字擠扁 */
        overflow: visible !important; /* 確保內容不會溢出被裁切 */
    }

    /* ✅ 核心修正：ICON 圖片本身的自適應設定 */
    .nav-logo-small img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important; /* 關鍵：確保整張圖片完整顯示在框框內，不裁切、不變形 */
    }

    /* 調整 ICON 旁的文字 */
    .nav-logo-card span {
        font-size: 0.85rem !important; /* 稍微縮小字體 */
        white-space: nowrap !important; /* 防止文字斷行擠壓 ICON */
    }
}

/* ===== 統一 Link Section 所有 Logo 大小 ===== */
.link-card {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.link-card img {
    /* 強制統一高度，寬度自動縮放 */
    height: 60px !important; 
    width: auto !important;
    max-width: 85% !important; /* 確保寬度不超出卡片 */
    
    /* 核心設定：確保圖片比例正確且不被裁切 */
    object-fit: contain !important;
    
    /* 保持原本的視覺效果 */
    filter: grayscale(100%) contrast(90%);
    opacity: 0.85;
    transition: all .35s ease;
}

/* Hover 時的縮放效果保持一致 */
.link-card:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* ===== 手機版微調 (RWD) ===== */
@media (max-width: 991px) {
    .link-card {
        height: 120px; /* 手機版卡片高度縮小 */
    }
    
    .link-card img {
        height: 45px !important; /* 手機版 Icon 稍微縮小 */
    }
}

/* ===== 桌機版基本設定 ===== */
.footer-social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

/* ===== 手機版全域一致性 (991px 以下) ===== */
@media (max-width: 991px) {
    /* 強制 Footer 內所有欄位垂直置中 */
    .site-footer .row {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    /* 針對 Navigation 連結 */
    .footer-links {
        display: flex !important;
        flex-direction: column !important;
        margin-bottom: 30px !important;
    }

    /* 針對 Social Media 連結：強制從橫排變豎排 */
    .footer-social-links {
        flex-direction: column !important; /* 這行是關鍵 */
        gap: 15px !important;
        align-items: center !important;
        margin-bottom: 30px !important;
    }

    /* 針對右側版權文字 */
    .footer-copy {
        text-align: center !important;
        width: 100% !important;
    }

    .footer-copy .footer-brand {
        margin-bottom: 5px !important;
    }
}

/* Event Tabs 導航 */
.event-tabs .nav-link {
    text-align: left;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ccc;
    background: none;
    border: none;
    padding: 10px 0;
    transition: all 0.3s ease;
}

.event-tabs .nav-link.active {
    color: #3b2b2b;
    border-left: 4px solid #b68963;
    padding-left: 15px;
}

/* Notice 提示框 */
.event-notice {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #e6d8a8;
}

/* 活動清單卡片 */
.event-list-card {
    background: #fff;
    border-radius: 15px;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.event-list-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.event-icon {
    width: 50px;
    height: 50px;
    background: #f0f7f5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 25px;
}

.event-info { flex: 2; }
.event-info h6 { font-weight: 800; margin: 0; font-size: 1.1rem; }
.event-info p { font-size: 0.85rem; color: #777; margin: 5px 0 0; }

.event-meta { flex: 1; padding: 0 15px; }
.event-meta .label { display: block; font-size: 0.65rem; color: #999; font-weight: 700; }
.event-meta .value { font-size: 0.9rem; font-weight: 600; color: #444; }

.event-arrow {
    font-size: 1.5rem;
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.event-list-card:hover .event-arrow { color: #3b2b2b; }

/* Coming Soon 虛線框 */
.event-coming-soon-box {
    border: 2px dashed #eee;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #3b2b2b;
    margin-top: 20px;
}

/* 手機版適應 */
@media (max-width: 991px) {
    .event-list-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .event-meta { padding: 0; }
    .event-tabs .nav-link { font-size: 1.4rem; }
}

/* =====================================
   Hero Section 終極上下適應修正 (電腦版)
   ===================================== */
.hero-cover {
    /* 1. 移除固定高度，讓高度由比例自動計算 */
    height: auto !important; 
    min-height: auto !important;
    
    /* 2. 鎖定寬高比 (假設您的圖片是 1920x1080，比例即為 16/9) */
    /* 這是最關鍵的一行，它能保證無論螢幕多寬，圖片永遠完整 */
    aspect-ratio: 16 / 9 !important; 

    /* 3. 背景圖片設定 */
    background-image: url('../images/hero.png') !important;
    background-size: 100% 100% !important; /* 強制填滿鎖定的比例框 */
    background-position: center top !important;
    background-repeat: no-repeat !important;

    /* 4. 處理 Navbar 遮擋問題 */
    /* 由於圖片現在會頂到最上方，我們用 padding 把內容往下推 */
    padding-top: 80px !important; 
    
    /* 5. 消除邊距 */
    margin-top: 0 !important;
    border: none !important;
}

/* 針對超大螢幕的保險設定 */
@media (min-width: 1921px) {
    .hero-cover {
        max-height: 90vh; /* 防止在超寬螢幕下 Hero 變得太高 */
    }
}

/* 針對手機版的自動適應 */
@media (max-width: 767px) {
    .hero-cover {
        padding-top: 60px !important;
        /* 手機版可以維持同樣比例，或稍微調高一點點 */
        aspect-ratio: 16 / 9 !important; 
    }
}