/* ================= 導覽列：固定頂部 + 平滑過渡 ================= */
.custom-ntu-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1050;
    padding: 1.15rem 2rem;
    background: linear-gradient(180deg, rgba(10, 25, 47, 0.75) 0%, rgba(10, 25, 47, 0.2) 75%, transparent 100%);
    transition: all 0.35s ease-in-out;
}

/* 頁面往下滑動時套用的半透明漸層毛玻璃效果 */
.custom-ntu-navbar.scrolled {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, rgba(15, 30, 54, 0.92) 0%, rgba(20, 48, 85, 0.88) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 左側品牌與文字排版 (校名 | 專案名稱) */
.ntu-brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.2;
    color: #ffffff;
}
.ntu-brand-en {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.5px;
}
.ntu-brand-divider {
    width: 1px;
    height: 34px;
    background-color: rgba(255, 255, 255, 0.35);
    margin: 0 1.2rem;
}

/* 右側選單連結：電腦版字體加大 */
.custom-ntu-navbar .nav-link {
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 1.05rem;
    font-weight: 500;
    padding: 0.45rem 0.9rem !important;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}
.custom-ntu-navbar .nav-link:hover,
.custom-ntu-navbar .nav-link.active {
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* 確保 Hero 區塊留有頂部內距，避免前景被固定導覽列遮蔽 */
.hero-section {
    position: relative;
    padding-top: 7rem !important;
}

/* ================= 平板與手機版（小於 1200px）專屬展開樣式 ================= */
/* ================= 平板與手機版（小於 1200px）專屬優化 ================= */
@media (max-width: 1199.98px) {
    .custom-ntu-navbar {
        padding: 0.75rem 1.25rem !important;
    }

    /* 1. 手機/平板端：直接隱藏學士帽圖標與直線分隔線 */
    .custom-ntu-navbar .navbar-brand .rounded-circle,
    .ntu-brand-divider {
        display: none !important;
    }

    /* 2. 標題靠左自然舒展，不再被圖示壓縮 */
    .custom-ntu-navbar .navbar-brand {
        margin-right: auto !important;
    }
    .ntu-brand-title {
        font-size: 1.05rem !important;
        font-weight: 700;
        white-space: nowrap;
    }
    .ntu-brand-en {
        font-size: 0.68rem !important;
        opacity: 0.8;
    }

    /* 3. 展開的深藍毛玻璃下拉選單面板 */
    .custom-ntu-navbar .navbar-collapse {
        background: rgba(15, 30, 54, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-radius: 14px;
        padding: 1rem 0.85rem;
        margin-top: 0.65rem;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
        border: 1px solid rgba(255, 255, 255, 0.12);
    }

    .custom-ntu-navbar .navbar-nav {
        gap: 0.25rem;
    }

    .custom-ntu-navbar .nav-link {
        font-size: 1.05rem;
        padding: 0.65rem 1rem !important;
        border-radius: 8px;
        display: block;
    }

    .custom-ntu-navbar .nav-link:hover,
    .custom-ntu-navbar .nav-link.active {
        background-color: rgba(255, 255, 255, 0.12);
        color: #ffffff !important;
    }
}




/* 讓所有內頁的 .page-header 自適應留出導覽列高度 */
.page-header {
    padding-top: 8.5rem !important;
}

@media (max-width: 1199.98px) {
    .page-header {
        padding-top: 7rem !important;
    }
}