/* ===== index-inline.css - Premium Homepage Styles ===== */
/* Version: 20260130 - Enhanced Edition */

/* ===== Hidden Utility ===== */
.hidden {
    display: none !important;
}

/* ===== Entrance Animations ===== */
@keyframes ripple-effect {
    0%   { width: 0;     height: 0;     opacity: 0.5; }
    100% { width: 400px; height: 400px; opacity: 0;   }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-15px) rotate(2deg);
    }
}

@keyframes aurora {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* ===== Hero Badge Top (招生中標籤) ===== */
.hero-badge-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.1), rgba(0, 194, 255, 0.1));
    border: 1px solid rgba(0, 102, 255, 0.2);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
    animation: fadeInDown 0.8s ease-out;
}

.hero-badge-top .badge-icon {
    font-size: 18px;
}

/* ===== Hero Title Enhancement ===== */
.hero-title {
    font-size: 52px;
    line-height: 1.2;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--text-main);
}

.text-gradient-premium {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, #00E5FF 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero-section {
    position: relative;
    padding: 140px 0 120px;
    background: #fbfdff;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% -20%, rgba(0, 102, 255, 0.08) 0%, transparent 60%);
    z-index: 1;
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(0, 102, 255, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 1;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 16px;
    border-left: 4px solid var(--secondary);
    padding-left: 20px;
}

.hero-description {
    font-size: 16px;
    color: var(--text-body);
    line-height: 1.8;
    margin-bottom: 40px;
    opacity: 0.95;
    letter-spacing: 0.03em;
    max-width: 540px;
}

/* 玻璃態面板進階優化 */
.glass-panel-premium {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.05),
        inset 0 0 20px rgba(255, 255, 255, 0.5);
}

/* 標題與段落強調樣式 */
.hero-title,
.section-title {
    letter-spacing: -0.01em;
}

strong {
    color: var(--primary);
    position: relative;
    font-weight: 700;
}

p strong {
    background: linear-gradient(120deg, rgba(0, 102, 255, 0.1) 0%, rgba(0, 102, 255, 0.1) 100%);
    background-repeat: no-repeat;
    background-size: 100% 0.3em;
    background-position: 0 90%;
}

/* ===== Header (Premium Navigation) ===== */
.header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 68px;
    padding: 0 24px;
}

/* Logo Design */
.logo-wrap {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.logo-badge {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    background: rgba(0, 102, 255, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
    width: fit-content;
    font-weight: 700;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-year {
    font-size: 22px;
    font-weight: 900;
    color: var(--text-main);
}

.title-main {
    font-size: 19px;
    font-weight: 800;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
}

.title-highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: 6px;
    position: relative;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 0px rgba(0, 102, 255, 0));
    }

    50% {
        filter: drop-shadow(0 0 10px rgba(0, 102, 255, 0.4));
    }
}

/* Navigation Links */
.nav-links-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-body);
    transition: all 0.3s ease;
    padding: 8px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-cta {
    background: var(--primary);
    color: white !important;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 13px;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.2);
}

.nav-cta::after {
    display: none;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.3);
}

.cta-arrow {
    margin-left: 6px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.nav-cta:hover .cta-arrow {
    transform: translateX(4px);
}

/* ===== Hero Visual Enhancement ===== */
.visual-container {
    position: relative;
    width: 520px;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.15) 0%, transparent 70%);
    filter: blur(40px);
    z-index: 0;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.hero-img {
    position: relative;
    z-index: 1;
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 102, 255, 0.15);
}

.visual-badge {
    position: absolute;
    bottom: 20px;
    right: -20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 16px 24px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 102, 255, 0.3);
    z-index: 2;
    animation: float 3s ease-in-out infinite;
}

.visual-badge .badge-number {
    display: block;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.visual-badge .badge-text {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 4px;
}

/* ===== Particles Animation ===== */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: floatParticle 15s ease-in-out infinite;
}

.particle-1 {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(0, 194, 255, 0.2), transparent 70%);
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.particle-2 {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.15), transparent 70%);
    top: 60%;
    left: 15%;
    animation-delay: 2s;
}

.particle-3 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 194, 255, 0.1), transparent 70%);
    top: 20%;
    right: 10%;
    animation-delay: 4s;
}

.particle-4 {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.2), transparent 70%);
    bottom: 30%;
    right: 20%;
    animation-delay: 6s;
}

.particle-5 {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.15), transparent 70%);
    bottom: 10%;
    left: 40%;
    animation-delay: 8s;
}

@keyframes floatParticle {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }

    25% {
        transform: translate(30px, -40px) scale(1.1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-20px, -60px) scale(0.9);
        opacity: 0.5;
    }

    75% {
        transform: translate(40px, -20px) scale(1.05);
        opacity: 0.7;
    }
}

/* ===== Glass Orb Enhancement ===== */
.glass-orb.orb-2 {
    width: 80px;
    height: 80px;
    top: auto;
    bottom: 40%;
    right: 20%;
    animation-delay: 2s;
}

/* ===== Console Header ===== */
.console-header {
    margin-bottom: 20px;
}

.console-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.console-icon {
    font-size: 24px;
}



/* ===== About Section ===== */
.about-section {
    padding: 100px 0;
    background: linear-gradient(to bottom, #F8FAFC 0%, #FFFFFF 100%);
}

.section-intro-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-body);
    margin-bottom: 35px;
    padding-left: 24px;
    border-left: 5px solid var(--primary);
    background: linear-gradient(to right, rgba(0, 102, 255, 0.05), transparent);
    padding: 24px;
    border-radius: 0 16px 16px 0;
}

.section-intro-text strong {
    color: var(--primary);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.1), rgba(0, 194, 255, 0.1));
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 42px;
    font-weight: 900;
    color: var(--text-main);
    margin-bottom: 24px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 24px auto 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-item {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #F1F5F9;
    transition: all 0.3s;
}

.about-item:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 30px rgba(0, 102, 255, 0.1);
    border-color: rgba(0, 102, 255, 0.2);
}

.about-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.about-text h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.about-text p {
    font-size: 15px;
    color: var(--text-body);
    line-height: 1.7;
}

.about-visual {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.about-visual img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.about-badge {
    position: absolute;
    bottom: 24px;
    left: 24px;
    display: flex;
    gap: 12px;
}

.about-badge span {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.about-badge .badge-highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

/* ===== Advantages Section (課程四大優勢區) ===== */
.advantages-section {
    padding: 100px 0;
    background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 50%, #F0F7FF 100%);
    position: relative;
    overflow: hidden;
}

.advantages-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(0, 102, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 194, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.advantage-card {
    display: flex;
    gap: 24px;
    padding: 32px;
    background: white;
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.advantage-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.advantage-card:hover::before {
    transform: scaleX(1);
}

.console-icon {
    font-size: 24px;
    color: var(--text-main);
}

/* ===== Date Range Filter Styling ===== */
.date-range-group {
    display: flex;
    gap: 12px;
}

.date-input {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0px;
}

@media (max-width: 480px) {
    .date-range-group {
        flex-direction: column;
    }
}

.date-input label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

/* ===== Inline Style Replacements (CSP unsafe-inline removal) ===== */

/* Date inputs inside filter console */
.date-input .minimal-input {
    padding: 10px 16px;
    margin-top: 4px;
}

/* Scroll anchor buttons (shown/hidden via JS element.style.display) */
#scrollAnchorBtns {
    display: none;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 16px 0 8px;
}

/* Workshop cards container full width */
#workshopCards {
    width: 100%;
}

/* Footer top text colour (index page) */
.footer-top-colored {
    color: #1f3945;
}

/* Footer badge images */
.footer-badge-logo-sm {
    width: 50px;
}
.footer-badge-logo-md {
    width: 100px;
}

/* Filter actions row */
.filter-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

/* Workshops page – hero section overrides */
.workshops-page-hero {
    padding: 100px 0 60px;
    min-height: auto;
    background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 100%);
}

/* Workshops page – main section top padding reset */
.workshops-main-section {
    padding-top: 0;
}

/* Workshops page – filter console positioning */
.workshops-filter-panel {
    margin-bottom: 50px;
    transform: translateY(-30px);
}

/* ===== JS Template Literal Inline Style Replacements ===== */

/* Card meta row (縣市+日期並排) */
.card-meta {
    display: flex;
    gap: 12px;
}
.card-meta .meta-item {
    flex: 1;
}

/* Card footer – 直向排列 */
.card-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

/* Card footer 第一列（聯繫資訊 + 課程資訊並排） */
.card-footer-row {
    display: flex;
    gap: 8px;
}
.card-footer-row .contact-info-btn,
.card-footer-row .class-info-btn {
    flex: 1;
    white-space: nowrap;
}

/* 立即報名連結 */
.registration-link {
    text-align: center;
    text-decoration: none;
}

/* 報名截止按鈕 */
.registration-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 分類區塊容器 */
.category-block {
    margin-bottom: 50px;
    width: 100%;
}

/* 分類標題列 */
.category-title {
    background-color: #3477f6;
    color: white;
    padding: 12px 24px;
    border-radius: 8px 8px 0 0;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* 分類內部網格 – Grid 模式 */
.category-grid.workshop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* 分類內部網格 – List 模式 */
.category-grid.workshop-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 載入失敗訊息 */
.load-error-msg {
    text-align: center;
    padding: 60px 20px;
    color: #64748B;
}

/* 篩選狀態文字中的數字強調 */
.filter-count-highlight {
    color: var(--primary);
    font-size: 1.2em;
}

/* SweetAlert2 聯繫資訊彈窗 */
.popup-contact-wrap {
    font-size: 0.95rem;
    line-height: 2;
    text-align: left;
}
.popup-contact-row {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}
.popup-contact-row:last-child {
    border-bottom: none;
}
.popup-contact-label {
    color: #666;
}

/* SweetAlert2 課程資訊彈窗 */
.popup-info-wrap {
    font-size: 0.95rem;
    line-height: 1.8;
}
.popup-info-line {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
}
.popup-info-line:last-child {
    border-bottom: none;
}

/* ===== 手機版導覽列 =====
 *
 * 原本的問題：
 * .nav-links-wrap 是橫向 flex，六個連結沒有設寬度也沒擋收縮，窄螢幕下被壓到
 * 比內容還窄，中文於是逐字直排（375px 實測「課程搜尋」只有 25.1px 寬、105.6px 高）；
 * .header-flex 高度又固定 68px，撐開的選單直接溢出蓋住下方內容。
 *
 * 實測 .nav 高度 vs .header-flex 的 68px：
 *   768px→38.4   600~430px→60.8   398px→83.2   375px→105.6
 * 超過 68px 就開始蓋住下方，也就是 398px 以下會明顯跑版。
 *
 * 做法：不隱藏任何項目（政府網站導覽全可見比藏進漢堡選單好），改成
 *   1. 每個項目給固定寬度 + flex-shrink:0 —— 這是關鍵，項目不再被壓縮，
 *      中文就會在指定的字數換行，而不是逐字直排；
 *   2. 容器 flex-wrap:wrap —— 真的排不下時整列換行，不會再擠成一團；
 *   3. .header-flex 改 height:auto + min-height —— header 跟著內容長高，不再溢出。
 *
 * 寬度用 em：中文字寬剛好是 1em，所以 2em = 每行兩字，4em = 每行四字。
 * 選擇器用 href 屬性而不是 nth-child，日後調整項目順序也不會錯位。
 */

/* 這顆按鈕原本沒有任何樣式卻仍然佔位（被算成 4x4px 的空按鈕）。
   導覽項目現在全部可見，不需要漢堡選單，一律隱藏。 */
.mobile-menu-btn {
    display: none;
}

@media (max-width: 768px) {
    /* responsive.css 在這個斷點把 .header .container 設成 column，
     * 會讓導覽列被推到底部。改回單列，並解除固定高度讓 header 能長高。
     * 用 .header .header-flex（0,2,0）與 .header .container 同權重，
     * 靠 index-inline.css 載入順序在後勝出。 */
    /* 手機版把 header 壓矮：導覽內容本身只有約 43px，
     * 68px 的 min-height 是桌機單行選單的高度，兩行選單用不到；
     * responsive.css 的 15px 上下 padding 在手機上也偏厚。
     * 兩個一起縮，header 從 99px 降到約 64px，而且高度改由內容決定，
     * 窄螢幕導覽換成兩排時會自己長高，不會再溢出。 */
    .header {
        padding: 6px 0;
    }

    .header .header-flex {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        height: auto;
        min-height: 0;
        padding: 4px 12px;
        gap: 0;
    }

    .nav {
        width: 100%;
    }

    .nav-links-wrap {
        flex-wrap: wrap;
        justify-content: center;
        align-items: stretch;
        gap: 8px 10px;
    }

    .nav-link {
        /* flex-shrink:0 是重點：不讓項目被壓縮到比內容窄，
           中文才會照下面設定的寬度換行，而不是逐字直排 */
        flex: 0 0 auto;
        font-size: 13px;
        line-height: 1.35;
        padding: 4px 0;
        text-align: center;
    }

    /* 課程搜尋 / 課程列表 / 網站導覽：每行兩字。
     * 一定要用 *=（包含）而不是 =（完全相同）：index.html 的連結寫成
     * "#industries"，但 detail / sitemap / workshops 三頁寫的是
     * "index.html#industries"。用完全比對的話那三頁會比不到，
     * 項目就沒有寬度、變回單行整串，跟旁邊兩行的項目高度不一致而跑版。 */
    .nav-link[href*="#industries"],
    .nav-link[href*="#workshops"],
    .nav-link[href*="sitemap.html"] {
        width: 2em;
    }

    /* SME AI平台：要斷成 SME / AI平台。
     * 只給寬度不夠——瀏覽器會先把「SME AI」塞滿第一行，再從「平」前面斷開
     * （中文預設任意兩字之間都可斷行），結果是 SME AI / 平台。
     * word-break:keep-all 讓斷行只發生在空格處，AI平台 就成為不可分割的單位。
     * 這條只能套在這個項目：其他中文項目沒有空格，套了會完全不換行而撐破版面。 */
    .nav-link[href*="smeai.tw"] {
        width: 3.4em;
        word-break: keep-all;
    }

    /* 產業線上通識課程：每行四字 */
    .nav-link[href*="smelearning.org.tw"] {
        width: 4em;
    }

    /* 立刻聯絡：維持單行藥丸狀，不跟著上面的規則換行 */
    .nav-cta {
        width: auto;
        white-space: nowrap;
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* ===== 平台網址變更公告（課程列表副標題下方，備註樣式） ===== */
.url-change-notice {
    max-width: 760px;
    margin: 12px auto 0;
    font-size: 13px;
    line-height: 1.6;
    color: #6B7280;
    word-break: break-all;
}
