:root {
    --primary: #004C8A; /* FJU Blue */
    --primary-dark: #003662;
    --primary-soft: rgba(0, 76, 138, 0.05); /* Soft Blue Tint */
    --fju-blue: #004C8A; /* RGB 0, 76, 138 */
    --fju-yellow: #FEEAA4; /* RGB 254, 238, 164 */
    --secondary: #F9D423;
    --accent: #FF5722;
    --white: #ffffff;
    --bg-light: #F9FBFA;
    --text-main: #333333; /* Dark Gray for main text */
    --text-muted: #555555;
    --border: #E5E7EB;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 76, 138, 0.08); /* Updated shadow color to BLUE */
    --radius-lg: 8px;
    --radius-md: 4px;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Serif TC', serif;
    color: var(--text-main);
    background: var(--bg-light);
    line-height: 1.8;
}

h1,
h2,
h3,
.logo,
.site-title,
.top-link,
.nav-links a {
    font-family: 'Noto Serif TC', 'Playfair Display', serif;
    font-weight: 700;
}

h1,
h2,
h3,
h4 {
    font-weight: 800;
    letter-spacing: -0.01em;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Top Header Global Style */
.top-header {
    background: var(--fju-yellow);
    height: 60px; /* Increased from 50px as requested */
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001; /* Above navigation bar */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); /* Added shadow for brand prominence */
}

/* Updated Top Nav Layout */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.top-left {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.top-left:hover {
    opacity: 0.8;
}

.top-logo {
    height: 48px; /* Increased for brand prominence */
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.site-title {
    color: #0F527F; /* RGB: 15, 82, 127 */
    font-size: 1.4rem; /* Balanced brand size */
    font-weight: 800; /* Strong but more refined */
    letter-spacing: 0.04em;
    text-shadow: 1px 1px 3px rgba(15, 82, 127, 0.1); /* Branded shadow color */
    display: flex;
    align-items: center;
}

.top-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-link {
    color: #0F527F;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem; /* Matched with nav links */
    transition: var(--transition);
}

.top-link:hover {
    opacity: 0.7;
}

.top-divider {
    color: #0F527F;
    opacity: 0.4;
    font-size: 1.1rem;
}

header {
    position: fixed;
    top: 60px; /* Adjusted to be below the new 60px yellow bar */
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 10px 0;
    transition: var(--transition);
    background: #FFFFFF;
    border-bottom: 2px solid var(--border); /* Slightly stronger border */
}

header.scrolled {
    padding: 8px 0;
    top: 0; 
    box-shadow: var(--shadow-sm);
    z-index: 1002;
}

nav {
    display: flex;
    align-items: center;
    justify-content: center; /* Center main links */
}

.nav-content {
    width: 100%;
    display: flex;
    justify-content: center;
}

.nav-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 900;
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: var(--transition);
}

.logo img {
    width: 54px; /* Enlarged Logo */
    height: auto;
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 32px; /* Increased spacing */
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #333333;
    font-weight: 700;
    transition: var(--transition);
    font-size: 1.1rem; /* Enlarged as requested */
}

.nav-links a:hover {
    color: var(--accent);
}

.login-link {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.9rem;
    text-decoration: none;
}

.btn-demo {
    padding: 10px 24px;
    background: var(--fju-blue);
    color: #ffffff !important;
    border: 1px solid var(--fju-blue);
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-demo:hover {
    background: transparent;
    color: var(--primary);
    transform: none;
    box-shadow: none;
}

.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Space for the icon */
    padding: 12px 32px;
    background: #E9EBF7; /* Soft Blue */
    color: var(--fju-blue) !important;
    border: 1.5px solid rgba(0, 76, 138, 0.15);
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 76, 138, 0.05);
    margin-top: 15px;
}

.external-icon {
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.btn-soft:hover .external-icon {
    opacity: 1;
    transform: translate(2px, -2px); /* Slight outward movement on hover */
}

.btn-soft:hover {
    background: #FFFFFF;
    border-color: var(--fju-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 76, 138, 0.1);
}

/* Hero Section (滿版輪播,對應 banner 資料表) */
.hero {
    position: relative;
    margin-top: 132px; /* 讓出固定表頭(黃條 60px + 白色 nav 約 72px) */
    height: clamp(480px, 48.2vw, 800px); /* 貼近 PC 圖 1920×925 比例 */
    background: var(--primary-dark);
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero-slides {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.hero-slide-media,
.hero-slide-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-slide-media img {
    object-fit: cover;
    display: block;
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
}

.hero-slide-inner {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-slide-content {
    max-width: 620px;
    color: #fff;
    text-align: left;
    opacity: 0;
    transform: translateY(24px);
}

.hero-slide.active .hero-slide-content {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease 0.25s, transform 0.7s ease 0.25s;
}

/* 標籤徽章(tags 無連結時) */
.hero-badge {
    display: inline-block;
    padding: 6px 18px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(254, 238, 164, 0.18);
    border: 1px solid rgba(254, 238, 164, 0.55);
    color: var(--fju-yellow);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.hero-title {
    font-family: 'Noto Serif TC', serif;
    font-size: clamp(2rem, 3.4vw, 3.2rem);
    line-height: 1.35;
    font-weight: 900;
    letter-spacing: -0.01em;
    color: #fff;
    margin-bottom: 16px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85), 0 6px 24px rgba(0, 0, 0, 0.6);
}

.hero-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.hero-title a:hover {
    color: var(--fju-yellow);
}

.hero-title span {
    display: block;
    margin-top: 10px;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 1.5vw, 1.35rem);
    font-weight: 600;
    color: var(--fju-yellow);
    letter-spacing: 0.06em;
    margin-bottom: 14px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85), 0 6px 20px rgba(0, 0, 0, 0.55);
}

/* 輪播說明(content),最多 3 行 */
.hero-desc {
    font-size: 1rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 28px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8), 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* CTA 按鈕(tags + tagsurl) */
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 34px;
    background: var(--fju-yellow);
    color: var(--primary-dark);
    border-radius: 999px;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: var(--transition);
}

.hero-cta:hover {
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.hero-cta-arrow {
    transition: transform 0.3s ease;
}

.hero-cta:hover .hero-cta-arrow {
    transform: translateX(4px);
}

/* Nav Arrows Styles - Glassmorphism style */
.hero-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    transition: var(--transition);
    user-select: none;
    line-height: 1;
    padding-bottom: 6px;
}

.hero-nav-arrow:hover {
    background: #fff;
    color: var(--primary);
    transform: translateY(-50%) scale(1.08);
}

.hero-nav-arrow.prev { left: 32px; }
.hero-nav-arrow.next { right: 32px; }

/* Nav Dots Styles(長條 pill 型) */
.hero-nav-dots {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    background: rgba(255, 255, 255, 0.45);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
}

.hero-dot.active {
    width: 36px;
    background: var(--fju-yellow);
}

.hero-dot:hover {
    background: #fff;
}

/* 手機版(banner.img2 430×500 直式) */
@media (max-width: 768px) {
    .hero {
        margin-top: 60px; /* 手機僅剩黃色頂條固定 */
        height: clamp(420px, 116vw, 640px);
    }

    .hero-slide-inner {
        align-items: center;
    }

    .hero-desc {
        -webkit-line-clamp: 2;
        margin-bottom: 20px;
    }

    .hero-cta {
        padding: 12px 26px;
        font-size: 0.95rem;
    }

    .hero-nav-arrow { display: none; } /* 手機以滑動手勢切換 */

    .hero-nav-dots { bottom: 20px; }
}

/* Marquee / Promotion Bar */
.promo-bar {
    background: #111;
    color: white;
    padding: 10px 0;
    font-size: 0.85rem;
    overflow: hidden;
}

.promo-content {
    display: flex;
    gap: 50px;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Pathway Cards (Bellevue Style) */
section {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 60px;
    text-align: center;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.pillar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.pathway-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
    box-shadow: none;
    /* Flat design */
}

.pathway-card:hover {
    border-color: var(--primary);
    transform: none;
    box-shadow: var(--shadow-sm);
}

.card-level {
    position: absolute;
    top: 0;
    left: 0;
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: 0 0 8px 0;
}

.card-level.adv {
    background: var(--secondary);
}

.card-dept {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 15px;
    display: inline-block;
}

.pathway-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary);
    /* Vibrant Emerald */
    border-bottom: 2px solid var(--secondary);
    /* Gold highlight */
    display: inline-block;
    padding-bottom: 5px;
}

.pathway-card ul {
    list-style: none;
    margin-bottom: 20px;
    flex-grow: 1;
}

.pathway-card ul li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text-main);
    position: relative;
    padding-left: 20px;
}

.pathway-card ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--secondary);
    /* Vibrant Gold Arrow */
    font-weight: 900;
}

/* Stats */
.stats-wrap {
    margin-top: -60px;
}

.stat-box {
    background: white;
    border: 1px solid var(--border);
    padding: 40px;
    border-radius: var(--radius-md);
    text-align: center;
}

.stat-val {
    font-size: 3.5rem;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 5px;
}

/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.hamburger:hover {
    background: rgba(15, 82, 127, 0.12);
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #0F527F;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1099;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Nav Drawer */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100dvh;
    background: #fff;
    z-index: 1100;
    overflow-y: auto;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding-top: 72px;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

.mobile-nav.open { right: 0; }

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.mobile-nav-links > li {
    border-bottom: 1px solid var(--border, #e8e8e8);
}

/* 一般選單連結,與 .mobile-dropdown-toggle 同樣式 */
.mobile-nav-links > li > a {
    display: block;
    padding: 16px 24px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    font-family: 'Noto Serif TC', serif;
    text-align: left;
    transition: background 0.2s;
}

.mobile-nav-links > li > a:hover {
    background: #f0f4f8;
}

.mobile-dropdown-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    padding: 16px 24px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    font-family: 'Noto Serif TC', serif;
    text-align: left;
    transition: background 0.2s;
}

.mobile-dropdown-toggle:hover {
    background: #f0f4f8;
}

.mobile-arrow {
    font-size: 0.85rem;
    opacity: 0.55;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.mobile-has-dropdown.open .mobile-arrow {
    transform: rotate(180deg);
}

.mobile-dropdown {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8f9fb;
}

.mobile-has-dropdown.open .mobile-dropdown {
    max-height: 500px;
}

.mobile-dropdown li a {
    display: block;
    padding: 12px 24px 12px 36px;
    color: var(--fju-blue, #0F527F);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-top: 1px solid var(--border, #e8e8e8);
    transition: background 0.2s;
}

.mobile-dropdown li a:hover {
    background: #e4edf6;
}

.mobile-nav-footer {
    padding: 24px;
    border-top: 1px solid var(--border, #e8e8e8);
}

.mobile-login-btn {
    display: block;
    text-align: center;
    padding: 14px;
    background: var(--fju-blue, #0F527F);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    transition: opacity 0.2s;
}

.mobile-login-btn:hover { opacity: 0.85; }

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0 14px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border, #e8e8e8);
}

.mobile-user-avatar {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.mobile-user-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.mobile-user-actions {
    display: flex;
    gap: 10px;
}

.mobile-user-actions .mobile-login-btn {
    flex: 1;
}

.mobile-logout-btn {
    flex: 1;
    display: block;
    text-align: center;
    padding: 14px;
    background: transparent;
    border: 1.5px solid var(--border, #e8e8e8);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

.mobile-logout-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-main);
}

@media (max-width: 1024px) {
    .top-user-area { display: none; }
}

/* Responsive */
@media (max-width: 1024px) {
    .pillar-grid {
        grid-template-columns: 1fr;
    }

    .nav-center {
        display: none;
    }

    header {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .container {
        padding: 0 24px;
    }
}

/* Back to Top */
#btt {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

#btt.visible {
    opacity: 1;
    visibility: visible;
}

/* Dropdown Navigation */
.nav-links li {
    position: relative;
    padding: 10px 0;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    list-style: none;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-links li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.has-dropdown > a {
    display: flex;
    align-items: center;
}

.has-dropdown > a::after {
    content: '▾';
    margin-left: 8px;
    font-size: 0.8rem;
    opacity: 0.5;
    transition: transform 0.3s ease;
}

.has-dropdown:hover > a::after {
    transform: rotate(180deg);
}

.dropdown li {
    padding: 0;
}

.dropdown li a {
    padding: 8px 24px;
    display: block;
    color: var(--fju-blue);
    font-size: 1rem; /* Enlarged dropdown font */
    font-weight: 600;
    transition: background 0.2s;
}

.dropdown li a:hover {
    background: var(--primary-soft);
    color: var(--fju-blue);
}

/* Footer Refined */
.main-footer {
    background: var(--fju-blue);
    color: white;
    padding: 80px 0 40px;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    position: relative;
    z-index: 2;
    text-align: left;
}

.footer-logo {
    color: white !important;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.footer-info p {
    opacity: 0.8;
    line-height: 1.8;
    max-width: 400px;
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 25px;
    color: var(--secondary);
    font-family: 'Inter', 'Sinonoma', sans-serif;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: 0.3s;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-contact p {
    opacity: 0.8;
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-bottom {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    opacity: 0.5;
    font-size: 0.85rem;
    position: relative;
    z-index: 2;
}

.footer-glow {
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    filter: blur(100px);
    pointer-events: none;
}

@media (max-width: 768px) {
    .main-footer {
        padding: 50px 0 30px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-info p {
        max-width: 100%;
    }

    .footer-links h4,
    .footer-contact h4 {
        margin-bottom: 15px;
    }

    .footer-links ul {
        padding: 0;
    }

    .footer-bottom {
        margin-top: 40px;
        padding-top: 25px;
        font-size: 0.8rem;
    }
}

/* Learning Cascade Section (Redesigned) */
.mindmap-section {
    padding: 120px 0;
    background: #f8fafc;
    overflow: hidden;
    position: relative;
}

.learning-cascade {
    position: relative;
    max-width: 1200px;
    margin: 80px auto 0;
    z-index: 5;
}

.cascade-top {
    display: flex;
    justify-content: center;
    margin-bottom: 70px; /* Reduced to bring cards closer to hub */
    position: relative;
    z-index: 10;
}

.main-hub {
    width: 180px;
    height: 180px;
    background: #FFDB00; /* Bright Yellow (RGU 255 219 0) */
    color: #333333; /* Dark Gray for readability on yellow */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column; /* Stack text and button */
    gap: 15px;
    font-size: 1.6rem;
    font-weight: 800;
    box-shadow: 0 20px 40px rgba(255, 219, 0, 0.2);
    border: 4px solid white;
    position: relative;
    animation: floating 4s ease-in-out infinite;
}

.btn-explore {
    padding: 10px 28px;
    background: linear-gradient(135deg, #FF5722 0%, #E64A19 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: pulse-red 2s infinite;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-explore:hover {
    transform: scale(1.15) translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 87, 34, 0.6);
    background: linear-gradient(135deg, #FF7043 0%, #D84315 100%);
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(255, 87, 34, 0.7); transform: scale(1); }
    70% { box-shadow: 0 0 0 15px rgba(255, 87, 34, 0); transform: scale(1.05); }
    100% { box-shadow: 0 0 0 0 rgba(255, 87, 34, 0); transform: scale(1); }
}

@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.cascade-bottom {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    position: relative;
    z-index: 10;
}

.resource-node {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 35px 15px; /* Reduced side padding slightly for parallel labels */
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-sm);
    text-decoration: none; /* Reset link style */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 320px; /* Force consistent heights */
}

.resource-node:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: var(--fju-blue);
    box-shadow: var(--shadow-md);
}

.node-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.node-label {
    font-size: 1.3rem; /* Further enlarged as requested */
    color: var(--fju-blue);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.node-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.node-btns {
    margin-top: auto;
    width: 100%;
    display: flex;
    flex-direction: row; /* Horizontal alignment as requested */
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.node-title {
    background: #FEEAA4; /* Unified Yellow */
    color: #555555; /* Soft deep gray instead of #333333 */
    padding: 6px 12px; /* Slimmer for side-by-side */
    border-radius: 50px;
    font-size: 0.95rem; /* Adjusted size */
    font-weight: 700; /* Slightly reduced weight for better visual balance */
    margin-top: auto; 
    display: inline-block;
    transition: all 0.3s var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    white-space: nowrap;
}

.node-title:hover {
    background: #F9D423 !important; /* Vibrant Gold on hover */
    transform: scale(1.05); 
    box-shadow: 0 5px 15px rgba(249, 212, 35, 0.3);
    color: #555555;
}

.node-title.disabled {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #a0a0a0 !important;
    cursor: not-allowed;
    box-shadow: none;
}

.node-title.disabled:hover {
    background: rgba(0, 0, 0, 0.06) !important;
    transform: none !important;
    box-shadow: none !important;
    color: #a0a0a0 !important;
}

/* 2-column layout for Node 2 buttons */
.node-2 .node-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}

.node-2 .node-btns .node-title {
    margin: 0;
    width: 100%;
    text-align: center;
    white-space: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    padding: 8px 4px;
    line-height: 1.2;
    min-height: 40px;
    border-radius: 12px; /* slightly smaller radius looks better for grids */
}

/* SVG Connectors */
.cascade-svg {
    position: absolute;
    top: 90px;
    left: 0;
    width: 100%;
    height: 160px; /* Bridge the exact 70px gap from hub center to card tops */
    z-index: 1;
    pointer-events: none;
    opacity: 1.0; /* Full visibility */
}

.connector-line {
    fill: none;
    stroke: var(--fju-blue);
    stroke-width: 3; /* Thicker line */
    stroke-dasharray: 8, 8; /* Clearer dots */
    animation: dash 20s linear infinite;
}

@keyframes dash {
    to { stroke-dashoffset: -200; }
}

@media (max-width: 900px) {
    .cascade-bottom {
        grid-template-columns: repeat(2, 1fr);
    }
    .cascade-svg {
        display: none;
    }
}

@media (max-width: 600px) {
    .cascade-bottom {
        grid-template-columns: 1fr;
    }
}

/* Learning Activities Section */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.activity-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

.activity-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
    border-color: var(--primary);
}

.activity-label {
    align-self: flex-start;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.label-lecture {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 107, 61, 0.2);
}

.label-course {
    background: #0D47A1;
    /* High Vibrant Blue */
    color: white;
}

.label-comp {
    background: #E65100;
    /* High Vibrant Orange */
    color: white;
}

.activity-content {
    flex-grow: 1;
}

.activity-content h3 {
    font-family: 'Noto Serif TC', serif;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 12px;
    color: var(--text-main);
}

.activity-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.activity-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
}

@media (max-width: 1024px) {
    .activities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .activities-grid {
        grid-template-columns: 1fr;
    }
}

/* Colorful Course Section Styles */
.course-section {
    padding: 100px 0;
}

.course-section .text-lead,
#activities .section-header p {
    font-size: 1.35rem; /* Consistent oversized lead text */
    color: var(--text-muted);
    margin: 15px auto 0;
    max-width: 800px;
}
.course-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.course-card {
    border-radius: 20px;
    padding: 40px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Card Specific Colors from Palette */

/* Card 1: 創新跨領域學院 (Sky Blue Palette) - Slot 1 */
.course-card:nth-child(1) {
    background: #C3DEE7;
    color: #333333;
}
.course-card:nth-child(1) .card-unit {
    background: #8DDDFF;
    color: #0F527F;
}
.course-card:nth-child(1) h3 {
    color: #0F527F;
}

/* Card 2: 磨課師課程 (Indigo Palette) - Slot 2 */
.course-card:nth-child(2) {
    background: #E3EBF7; 
    color: #4A4A4A;
}
.course-card:nth-child(2) .card-unit {
    background: #7E97B1;
    color: white;
}
.course-card:nth-child(2) h3 {
    color: #2C3E50;
}
.course-card:nth-child(2) p {
    color: #6D7278;
}

/* Card 3: 英語網路學院 (Sage Palette) - Slot 3 */
.course-card:nth-child(3) {
    background: #E5F2E0; 
    color: #4A4A4A;
}
.course-card:nth-child(3) .card-unit {
    background: #87A38E;
    color: white;
}
.course-card:nth-child(3) h3 {
    color: #2F4F4F;
}

/* Card 4: 跨領域學分學程 (Peach Palette) - Slot 4 */
.course-card:nth-child(4) {
    background: #F5EBE2; 
    color: #333333;
}
.course-card:nth-child(4) .card-unit {
    background: #EDBC93;
    color: #621016;
}
.course-card:nth-child(4) h3 {
    color: #D2472A;
}

/* Common Card Elements */
.card-unit {
    position: absolute;
    top: 0;
    right: 0;
    padding: 8px 18px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 0 0 0 15px;
    letter-spacing: 0.02em;
}

.course-card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    font-weight: 800;
    font-family: 'Noto Serif TC', serif;
}

.course-card p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 25px;
    flex-grow: 1;
    opacity: 0.9;
}

.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-visit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Space for the icon */
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.05); /* Professional muted tint */
    color: inherit !important;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
    border: 1.5px solid rgba(0, 0, 0, 0.1);
}

.btn-visit:hover {
    background: rgba(255, 255, 255, 0.4);
    border-color: currentColor;
    transform: translateY(-2px);
}

/* Harmonized Buttons for Card 3 */
.yt-btn {
    background: #E57373; /* Muted Soft Red for Professionalism */
    border-color: #E57373;
    color: white !important;
}

.fb-btn {
    background: #64B5F6; /* Muted Soft Blue */
    border-color: #64B5F6;
    color: white !important;
}

.yt-btn:hover {
    background: white;
    color: #E57373 !important;
    border-color: #E57373;
    box-shadow: 0 4px 12px rgba(229, 115, 115, 0.2);
}

.fb-btn:hover {
    background: white;
    color: #64B5F6 !important;
    border-color: #64B5F6;
    box-shadow: 0 4px 12px rgba(100, 181, 246, 0.2);
}

@media (max-width: 900px) {
    .course-grid {
        grid-template-columns: 1fr;
    }
}

/* Achievement Sharing Tabs */
.sharing-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0 60px;
    flex-wrap: wrap;
}

.sharing-tab {
    padding: 12px 36px;
    border-radius: 50px;
    border: 1.5px solid #D1D8E0; 
    background: #E9EBF7; /* Distinct pale blue background */
    color: #4A4A4A;
    font-family: 'Noto Serif TC', serif;
    font-size: 1.15rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.sharing-tab:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.sharing-tab.active {
    background: #FFDB00;
    border-color: #FFDB00;
    color: #333333;
    box-shadow: 0 10px 25px rgba(255, 219, 0, 0.2);
}

@media (max-width: 640px) {
    .sharing-tabs {
        flex-direction: column;
        gap: 12px;
    }
}

/* Explore Button in Main Hub */
.main-hub {
    flex-direction: column;
    gap: 10px;
}

.btn-explore {
    padding: 8px 20px;
    background: var(--fju-blue);
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 76, 138, 0.2);
}

.btn-explore:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 76, 138, 0.3);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    height: 85vh;
    background: #090d20; /* Match game background */
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 28px;
    line-height: 45px;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #FF5722;
    border-color: #FF5722;
    color: white;
    transform: rotate(90deg) scale(1.1);
}

#gameIframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* News Section Styles */
.news-section {
    padding: 80px 0 100px 0;
    background: #ffffff;
}

.news-header {
    margin-bottom: 30px;
}

.news-title {
    font-size: 2.2rem;
    color: #2E1F47; /* Dark Indigo/Purple */
    font-family: 'Noto Serif TC', serif;
    font-weight: 800;
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

/* Filter Tabs */
.news-tabs-container {
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.news-tab {
    padding: 10px 20px;
    font-size: 1.05rem;
    font-family: 'Inter', 'Noto Serif TC', sans-serif;
    font-weight: 600;
    color: #555555;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    bottom: -1px;
    border-bottom: 2px solid transparent;
}

.news-tab:hover {
    color: #8B2C2C;
}

.news-tab.active {
    background-color: #8B2C2C; /* Dark Red from screenshot */
    color: #ffffff;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    border-bottom: 2px solid #8B2C2C;
}

/* News Cards List */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.news-card {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #F3F4F6;
    border-radius: 12px;
    padding: 12px 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    text-decoration: none;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 76, 138, 0.08);
    border-color: #E5E7EB;
}

/* Date Block */
.news-date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    padding-right: 32px;
    border-right: 1px solid #F0F0F0;
    text-align: center;
}

.news-year {
    font-size: 0.9rem;
    color: #9CA3AF;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    margin-bottom: 4px;
}

.news-day-month {
    font-size: 1.5rem;
    color: #111827;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* Content Block */
.news-content-block {
    flex-grow: 1;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

/* Badges */
.news-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-activity {
    background-color: #FEF3C7; /* Soft yellow/orange */
    color: #D97706; /* Dark amber */
}

.badge-competition {
    background-color: #FFEDD5; /* Soft orange */
    color: #EA580C; /* Dark orange */
}

.badge-other {
    background-color: #E0F2FE; /* Soft blue */
    color: #0284C7;
}

.badge-honor {
    background-color: #F3E8FF; /* Soft purple */
    color: #9333EA;
}

.news-card-title {
    font-size: 1.35rem;
    color: #3C2A5F; /* Rich purple/indigo title */
    font-family: 'Noto Serif TC', serif;
    font-weight: 700;
    margin: 4px 0;
    line-height: 1.4;
    transition: color 0.2s;
}

.news-card:hover .news-card-title {
    color: #004C8A;
}

.news-snippet {
    font-size: 0.95rem;
    color: #6B7280;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Arrow Icon */
.news-arrow {
    color: #D1D5DB;
    font-size: 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.news-card:hover .news-arrow {
    color: #004C8A;
    transform: translateX(4px);
}

/* Responsive */
@media (max-width: 768px) {
    .news-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        gap: 16px;
    }

    .news-date-block {
        flex-direction: row;
        gap: 8px;
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid #F0F0F0;
        width: 100%;
        justify-content: flex-start;
        padding-bottom: 12px;
    }

    .news-content-block {
        padding: 0;
    }

    .news-arrow {
        display: none;
    }
}