
    /* ==========================================
       1. 全域變數定義 (集中管理色系)
       ========================================== */
    :root {
        --sky-bg: #F0F8FF;          /* 極淡粉藍背景 */
        --sky-primary: #74C0FC;     /* 主色：粉藍 */
        --sky-dark: #1971C2;        /* 深藍：文字與強調 */
        --sky-accent: #D0EBFF;      /* 淺藍：Hover 與標籤 */
        --card-shadow: 0 8px 24px rgba(149, 157, 165, 0.08);
        --transition: all 0.3s ease;
    }

    /* ==========================================
       2. 基礎排版與通用元件
       ========================================== */
    body {
        background-color: var(--sky-bg);
        font-family: 'Noto Sans TC', sans-serif;
        color: #2C3E50; /* 深藍灰，比純黑更耐看 */
        overflow-x: hidden;
    }

    .card {
        border: none;
        border-radius: 16px;
        box-shadow: var(--card-shadow);
        background: #ffffff;
        margin-bottom: 1.5rem;
    }

    .card-title-sky {
        color: var(--sky-dark);
        font-weight: 700;
        border-left: 5px solid var(--sky-primary);
        padding-left: 12px;
        margin-bottom: 1.5rem;
    }

    /* ==========================================
       3. 導航列 (Navbar)
       ========================================== */
    .navbar {
        background-color: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px);
        border-bottom: 2px solid var(--sky-accent);
        padding: 0.8rem 0;
    }

    .navbar-brand {
        font-weight: 700;
        color: var(--sky-dark) !important;
    }

    /* ==========================================
       4. 輪播圖 (Carousel) - 調整高度與動畫
       ========================================== */
    .carousel-section {
        margin-bottom: 2rem;
        border-radius: 20px;
        overflow: hidden;
        box-shadow: var(--card-shadow);
    }

    .carousel-item img {
        height: 350px; /* 電腦版核心高度調整 */
        object-fit: cover;
        width: 100%;
        transition: transform 10s ease;
    }

    .carousel-item.active img {
        transform: scale(1.05); /* 緩慢放大感 */
    }

    .custom-caption {
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(4px);
        padding: 20px 30px;
        border-radius: 15px;
        bottom: 10%;
        max-width: 85%;
        margin: 0 auto;
        text-align: left;
        border-left: 5px solid var(--sky-primary);
    }

    /* ==========================================
       5. 公告列表表格 (Table)
       ========================================== */
    .custom-news-table {
        border-collapse: separate;
        border-spacing: 0 5px;
    }

    .table-sky-light {
        background-color: var(--sky-bg) !important;
        border-bottom: 2px solid var(--sky-accent);
    }

    .news-row {
        transition: var(--transition);
    }

    .news-row:hover {
        background-color: #F8FDFF !important;
        transform: scale(1.002);
    }

    .badge-category {
        background-color: var(--sky-accent);
        color: var(--sky-dark);
        font-weight: 500;
    }

    /* ==========================================
       6. 側邊欄工具 (Sidebar)
       ========================================== */
    .quick-link {
        display: flex;
        align-items: center;
        padding: 15px;
        margin-bottom: 12px;
        background-color: white;
        border-radius: 12px;
        text-decoration: none;
        color: #495057;
        border: 1px solid var(--sky-accent);
        transition: var(--transition);
    }

    .quick-link:hover {
        background-color: var(--sky-accent);
        transform: translateY(-3px);
        color: var(--sky-dark);
        box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    }

    .quick-link i {
        font-size: 1.8rem;
        margin-right: 15px;
        color: var(--sky-primary);
    }

    /* ==========================================
       7. 響應式微調 (RWD)
       ========================================== */
    @media (max-width: 991.98px) {
        .carousel-item img { height: 280px; }
        .custom-caption { max-width: 95%; bottom: 5%; padding: 10px 15px; }
        .custom-caption h2 { font-size: 1.2rem; }
    }

    @media (max-width: 575.98px) {
        .carousel-item img { height: 200px; }
    }

    /* ==========================================
       . 馬戲團微調 (RWD)
       ========================================== */   
    /* 輪播圖文字遮罩優化 */
    .custom-caption {
        background: rgba(0, 0, 0, 0.4); /* 半透明黑背景 */
        backdrop-filter: blur(4px);    /* 磨砂玻璃效果 */
        padding: 20px 30px;
        border-radius: 15px;
        bottom: 15%;                   /* 讓文字稍微往上抬一點 */
        max-width: 80%;
        margin: 0 auto;
        text-align: left;              /* 改為靠左對齊更有現代感 */
        border-left: 5px solid var(--sky-primary);
    }

    .carousel-item img {
        transition: transform 10s ease; /* 緩慢放大效果，很有質感 */
        height: 250px;       /* 電腦版建議高度：350px - 400px */
        /* object-fit: cover;    關鍵：確保圖片比例正確且填滿容器，不變形 */
        /* object-fit: contain;    關鍵：確保圖片高度正確且填滿容器，不變形 */
        object-fit: normal;    /* 關鍵：確保圖片高度正確且填滿容器，不變形 */
        width: 100%;
    }

    .carousel-item.active img {
        transform: scale(1.05);
    }
    /* ==========================================
       8. 歷屆試題列表 (Archive)
       ========================================== */
    .exam-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    
    .exam-item {
        margin-bottom: 1.2rem;
    }
    
    .exam-item a {
        text-decoration: none;
        color: var(--sky-dark);
    }
    

