:root {
    --primary-color: #0d3b2d;
    --primary-light: #1a5c4a;
    --primary-gradient: linear-gradient(135deg, #0d3b2d 0%, #1a5c4a 100%);
    --secondary-color: #fb8c00;
    --energy-orange: #ff6d00;
    --accent-color: #f1c40f;
    --bg-warm: #fffbf0;
    --bg-cream: #fdfcf9;
    --bg-light: #f4f7f5;
    --text-dark: #1a1a1a;
    --text-muted: #5d6d7e;
    --text-white: #ffffff;
    --border-color: rgba(13, 59, 45, 0.08);
    --shadow-soft: 0 10px 40px rgba(13, 59, 45, 0.06);
    --shadow-med: 0 20px 50px rgba(13, 59, 45, 0.12);
    --shadow-premium: 0 30px 60px -12px rgba(13, 59, 45, 0.18), 0 18px 36px -18px rgba(0, 0, 0, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --radius: 20px;
    --radius-lg: 32px;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Noto Serif TC', serif;
    line-height: 1.8;
    color: var(--text-dark);
    background-color: var(--bg-cream);
    overflow-x: hidden;
    letter-spacing: -0.01em;
    position: relative;
    font-size: 16px;
    /* Increased from default */
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    opacity: 0.04;
    z-index: 9999;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.page-bg {
    background-color: var(--bg-cream);
    padding: 80px 0;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

.flex-justify {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Header Refinement */
header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    padding: 0;
    box-shadow: 0 10px 30px rgba(13, 59, 45, 0.08);
}

.top-bar {
    background: rgb(140, 22, 22);
    color: var(--text-white);
    padding: 6px 0;
    font-size: 14px;
    /* Slightly increased height */
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.top-bar-left {
    margin-left: 18px;
    /* Aligned with the cross on the logo shield */
}

.top-bar-right a {
    margin-left: 20px;
    opacity: 0.9;
}

.top-bar-right a:hover {
    opacity: 1;
}

.lang-toggle {
    margin-left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 2px 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.75);
    vertical-align: middle;
    transition: background 0.2s;
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lang-opt {
    transition: color 0.2s, opacity 0.2s;
    opacity: 0.65;
}

.lang-opt.active {
    color: #fff;
    opacity: 1;
}

.lang-divider {
    opacity: 0.5;
}

.main-header {
    background: #ffffff;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-nav-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* Stack search above menu */
    align-items: flex-end;
    /* Align search and menu to the right */
    gap: 8px;
    padding-top: 5px;
}

.header-top-actions {
    margin-bottom: 5px;
}

.header-search {
    display: flex;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    padding: 0 16px;
    background: #ffffff;
    width: 280px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.header-search:focus-within {
    border-color: rgb(117, 26, 27);
    box-shadow: 0 4px 15px rgba(117, 26, 27, 0.1);
}

.header-search input {
    border: none;
    outline: none;
    background: transparent;
    padding: 8px 0;
    font-size: 14px;
    flex: 1;
    color: var(--text-dark);
}

.header-search button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: rgb(117, 26, 27);
    /* Branding color */
    margin-left: 10px;
    transition: var(--transition);
}

.header-search button:hover {
    transform: scale(1.1);
}

.primary-list {
    display: flex;
    gap: 6px;
    /* Reduced from 10px */
}

.primary-list li a {
    font-size: 17px;
    font-weight: 600;
    color: rgb(117, 26, 27);
    padding: 12px 14px;
    letter-spacing: 0.02em;
    position: relative;
    transition: var(--transition);
}

.primary-list li a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 0;
    height: 2px;
    background: rgb(117, 26, 27);
    transition: var(--transition);
    transform: translateX(-50%);
    border-radius: 2px;
}

.primary-list li a:hover {
    opacity: 0.8;
}

.primary-list li a:hover::after {
    width: calc(100% - 36px);
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-icon {
    font-size: 12px;
    margin-left: 4px;
    transition: transform 0.3s;
}

.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(13, 59, 45, 0.1);
    border-radius: 12px;
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    border: 1px solid rgba(13, 59, 45, 0.05);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    display: block;
    width: 100%;
}

.primary-list .dropdown-menu li a {
    display: block;
    padding: 10px 24px;
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
}

.primary-list .dropdown-menu li a::after {
    display: none;
}

.primary-list .dropdown-menu li a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.logo-area .logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    /* Added space for logo */
}

.logo-img {
    height: 60px;
    /* Optimal size */
    width: auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.05));
    transition: var(--transition);
}

.logo:hover .logo-img {
    transform: scale(1.05) rotate(-2deg);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-family: 'Playfair Display', 'Noto Serif TC', serif;
    font-size: 30px;
    /* Decreased slightly for better balance */
    font-weight: 800;
    color: rgb(117, 26, 27);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.logo-sub {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #334155;
    /* Deepened from var(--text-muted) */
    margin-top: 4px;
}

/* Removed Search Area to make room for menu */

/* Dual Navigation */
.nav-container {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* Unused primary-nav removed */

.secondary-nav {
    background: #fffbf0;
    border-bottom: 2px solid rgba(251, 140, 0, 0.2);
}

.nav-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

/* Unused primary nav styles removed */

.secondary-nav .nav-list li a {
    display: block;
    padding: 14px 22px;
    font-size: 16px;
    /* Increased from 14px */
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.nav-list li a:hover {
    color: var(--primary-color);
}

/* Mobile Toggle Styles */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-bar {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 4px;
    transition: var(--transition);
}

/* Mobile Nav Overlay Styles */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(240%);
    -webkit-backdrop-filter: blur(40px) saturate(240%);
    z-index: 2000;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    justify-content: flex-end;
}

.mobile-nav-overlay.active {
    transform: translateX(-100%);
}

.mobile-nav-content {
    width: 85%;
    max-width: 400px;
    height: 100%;
    background: #fff;
    padding: 80px 40px;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow-y: auto;
}

.mobile-nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 40px;
    background: transparent;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
}

.mobile-nav-logo {
    margin-bottom: 40px;
}

.mobile-primary-list li,
.mobile-secondary-list li {
    margin-bottom: 20px;
}

.mobile-primary-list li a {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.mobile-submenu {
    padding-left: 20px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.mobile-submenu li {
    margin-bottom: 12px;
}

.mobile-submenu li a {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-muted);
}

.mobile-nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 30px 0;
}

.mobile-secondary-list li a {
    font-size: 16px;
    color: var(--text-muted);
}

.mobile-lang-toggle-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-lang-label {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.mobile-lang-toggle {
    display: flex;
    gap: 8px;
}

.mobile-lang-btn {
    flex: 1;
    padding: 10px 0;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.mobile-lang-btn.active {
    background: rgb(140, 22, 22);
    border-color: rgb(140, 22, 22);
    color: #fff;
}

/* Main Content Wrapper */
.main-section-wrapper {
    display: flex;
    flex-direction: column;
    gap: 100px;
    /* Breathe more */
    padding-top: 60px;
}

.card-style {
    background: #fff;
    border-radius: var(--radius);
    padding: 50px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

/* Hero Carousel */
.hero-carousel-wrapper {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 400px;
    width: 100%;
    transition: var(--transition);
}

.hero-carousel-wrapper.full-width {
    border-radius: 0;
    height: 500px;
}

.hero-slider {
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1),
        transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.hero-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.hero-slide.active .hero-slide-bg {
    transform: scale(1.02);
}

.hero-content {
    background: rgba(255, 255, 255, 0.1);
    /* Subtle White Base */
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* Clean Glass Border */
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.1),
        inset 0 0 80px rgba(255, 255, 255, 0.05);
    /* Multi-layered shadow for depth */
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition:
        opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.4s,
        transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
    position: relative;
    overflow: hidden;
    width: 480px;
    /* Slightly wider for balance */
    max-width: 90%;
    margin: 0 auto;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: var(--radius-lg);
}

.hero-content h1 {
    font-family: 'Playfair Display', 'Noto Serif TC', serif;
    font-size: 42px;
    /* Larger title */
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.hero-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

.hero-slide.active .hero-content {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Button Overhaul */
.btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--energy-orange) 0%, var(--secondary-color) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.btn-primary:hover {
    background: var(--energy-orange);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(251, 140, 0, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-content h1 {
    font-family: 'Playfair Display', 'Noto Serif TC', serif;
    font-size: 32px;
    /* Smaller title for the smaller box */
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 16px;
    /* Smaller font */
    margin-bottom: 24px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Hero Search Bar Integration */
.hero-search-container {
    margin-top: 25px;
    width: 100%;
}

.persistent-search {
    position: relative;
    bottom: 0;
    left: 0;
    transform: none;
    z-index: 20;
}

.search-box {
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 16px;
    /* Compact padding */
    border-radius: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    width: 100%;
}

.search-box:focus-within {
    background: #fff;
    box-shadow: 0 10px 25px rgba(13, 59, 45, 0.1);
}

.search-box i {
    color: var(--primary-color);
    font-size: 16px;
    margin-right: 12px;
    opacity: 0.7;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 0;
    font-size: 14px;
    /* Scaled down */
    outline: none;
    color: var(--text-dark);
}

.search-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    /* Scaled down */
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

/* Slider Controls */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}

.slider-arrow.prev {
    left: 20px;
}

.slider-arrow.next {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
}

.dot.active {
    background: #fff;
}

.section-title {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-bottom: 40px;
    gap: 15px;
}

.section-title h2 {
    font-family: 'Playfair Display', 'Noto Serif TC', serif;
    font-size: 28px;
    font-weight: 700;
    color: rgb(117, 26, 27);
    letter-spacing: -0.5px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    border-radius: 2px;
}

/* Universal Carousel Nav Buttons */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.carousel-nav-btn:hover {
    background: var(--secondary-color);
    color: #fff;
    border-color: var(--secondary-color);
    box-shadow: 0 6px 20px rgba(251, 140, 0, 0.3);
}

.carousel-nav-btn.prev {
    left: -20px;
}

.carousel-nav-btn.next {
    right: -20px;
}

.eslite-carousel-wrapper,
.reviews-carousel-wrapper {
    position: relative;
    padding: 0 10px;
}

/* Latest News Area */
.news-section {
    padding-top: 15px;
    padding-bottom: 15px;
    border-radius: 0 !important;
    /* Squared corners */
}

.news-header-wrapper {
    margin-bottom: 30px;
}

.news-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.news-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
}

.news-header h2 {
    font-family: 'Playfair Display', 'Noto Serif TC', serif;
    font-size: 28px;
    font-weight: 700;
    color: rgb(117, 26, 27);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.news-header h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    border-radius: 2px;
}

.news-tabs {
    display: flex;
    gap: 30px;
}

.news-tab {
    cursor: pointer;
    font-weight: 600;
    padding-bottom: 5px;
    font-size: 15px;
    /* Increased from 14px */
}

.news-tab.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.more-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.more-link:hover {
    border-bottom-color: var(--secondary-color);
    color: var(--accent-color);
}

.news-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0; /* More spacious items */
    border-bottom: 1px solid rgba(0,0,0,0.05); /* Softer border */
    transition: var(--transition);
}

.news-item:last-child {
    border-bottom: none;
}

.news-item>div {
    display: flex;
    align-items: center;
}

.news-badge {
    background: rgb(255, 189, 84);
    color: #fff;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 14px; /* Increased from 13px */
    font-weight: 800;
    margin-right: 20px; /* More breathing room after badge */
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: none;
}

.news-title {
    font-size: 18px; /* Increased for better legibility */
    font-weight: 600; /* Slightly bolder for hierarchy */
    color: var(--text-dark);
    line-height: 1.4;
    transition: color 0.3s;
}

.news-item:hover .news-title {
    color: var(--primary-color); /* Interactive title on hover */
}

.news-date {
    font-size: 15px; /* Harmonized with the overall scale */
    color: var(--text-muted);
}

/* Module Spacing */
.module-spacing {
    margin-bottom: 20px;
}

.section-bg-white {
    background-color: #ffffff !important;
    padding: 25px 40px;
    margin-left: -40px;
    margin-right: -40px;
}

/* Booktopia Program Wall */
.program-wall-booktopia {
    background: #fff;
    padding: 60px 40px;
    border-radius: 0 !important;
}

.centered-title {
    text-align: center;
    justify-content: center;
    font-family: 'Playfair Display', 'Noto Serif TC', serif;
    font-size: 28px;
    margin-bottom: 30px;
    color: rgb(117, 26, 27);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.centered-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    border-radius: 2px;
}

.program-grid-6cols {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 30px;
    margin-top: 20px;
}

@media (min-width: 768px) {
    .program-grid-6cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .program-grid-6cols {
        grid-template-columns: repeat(3, 1fr);
    }
}

.program-category-group {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
}

.category-header {
    display: flex;
    align-items: flex-start;
    /* Align to top in case of wrapping */
    gap: 10px;
    padding: 0 10px;
    flex-wrap: wrap;
    min-height: 64px;
    /* Ensure space for at least two lines of text to align cards uniformly */
}

.category-indicator {
    width: 6px;
    height: 24px;
    border-radius: 10px;
    flex-shrink: 0;
    margin-top: 2px;
    /* Slight adjustment to align with the first line of text */
}

.category-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    font-family: 'Outfit', 'Noto Serif TC', sans-serif;
    width: calc(100% - 16px);
    line-height: 1.4;
}

.category-header h3~h3 {
    margin-left: 16px;
    /* Offset the width of the indicator and gap to align with text above */
    margin-top: 2px;
    /* Reduced from 4px */
}

.program-card {
    position: relative;
    border-radius: 16px;
    padding: 15px 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-top-width: 4px;
    border-top-style: solid;
    transition: transform 0.3s, box-shadow 0.3s;
    flex: 1;
    /* Stretch to fill container */
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.program-desc {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.program-features {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
    /* Balanced margin */
    font-size: 16px;
    color: #445566;
    line-height: 1.75;
    /* Optimized for comfort */
    letter-spacing: 0.015em;
    /* Added for visual comfort */
    flex-grow: 1;
    font-family: 'Outfit', 'Noto Serif TC', sans-serif;
}

.program-features li {
    margin-bottom: 8px;
}

.program-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.program-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid;
    transition: background-color 0.2s;
    line-height: 1.2;
}

.program-btn i {
    margin-left: 6px;
    font-size: 12px;
}

.program-btn-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.program-btn-small {
    text-align: center;
    padding: 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid;
    transition: background-color 0.2s;
}

.badge-new {
    position: absolute;
    top: -12px;
    right: 20px;
    background: #ef4444;
    /* red-500 */
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

/* Color Themes */
/* Amber (五創) */
.bg-amber {
    background-color: #fbbf24;
}

.program-card.bg-amber-light {
    background-color: #fffbeb;
}

.program-card.border-amber {
    border-top-color: #fbbf24;
}

.text-amber-dark {
    color: #b45309;
}

.btn-amber {
    background: #ffffff;
    border-color: #fde68a;
    color: #b45309;
}

.btn-amber:hover {
    background: #fef3c7;
}

/* Slate (大數據) */
.bg-slate {
    background-color: #94a3b8;
}

.program-card.bg-slate-light {
    background-color: #f1f5f9;
}

.program-card.border-slate {
    border-top-color: #94a3b8;
}

.text-slate-dark {
    color: #334155;
}

.btn-slate {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #334155;
}

.btn-slate:hover {
    background: #e2e8f0;
}

/* Cyan (在地) */
.bg-cyan {
    background-color: #22d3ee;
}

.program-card.bg-cyan-light {
    background-color: #ecfeff;
}

.program-card.border-cyan {
    border-top-color: #22d3ee;
}

.text-cyan-dark {
    color: #0e7490;
}

.btn-cyan {
    background: #ffffff;
    border-color: #a5f3fc;
    color: #0e7490;
}

.btn-cyan:hover {
    background: #cffafe;
}

/* Indigo (永續創新) */
.bg-indigo {
    background-color: #818cf8;
}

.program-card.bg-indigo-light {
    background-color: #eef2ff;
}

.program-card.border-indigo {
    border-top-color: #818cf8;
}

.text-indigo-dark {
    color: #4338ca;
}

.btn-indigo {
    background: #ffffff;
    border-color: #c7d2fe;
    color: #4338ca;
}

.btn-indigo:hover {
    background: #e0e7ff;
}

/* Blue (設計思維) */
.bg-blue {
    background-color: #3b82f6;
}

.program-card.bg-blue-light {
    background-color: #eff6ff;
}

.program-card.border-blue {
    border-top-color: #3b82f6;
}

.text-blue-dark {
    color: #1d4ed8;
}

.btn-blue {
    background: #ffffff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.btn-blue:hover {
    background: #dbeafe;
}

/* Orange (AI) */
.bg-orange {
    background-color: #fb923c;
}

.program-card.bg-orange-light {
    background-color: #fff7ed;
}

.program-card.border-orange {
    border-top-color: #fb923c;
}

.text-orange-dark {
    color: #c2410c;
}

.btn-orange {
    background: #ffffff;
    border-color: #fed7aa;
    color: #c2410c;
}

.btn-orange:hover {
    background: #ffedd5;
}

/* Course Overview Section (Sidebar Layout) */
.course-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.course-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
}

.sidebar-search {
    display: flex;
    margin-bottom: 30px;
}

.sidebar-search input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    font-size: 15px;
    outline: none;
}

.sidebar-search button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-search button:hover {
    background: var(--secondary-color);
}

.sidebar-categories {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

.sidebar-categories h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--nav-tan);
    color: var(--primary-color);
}

.sidebar-categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-categories li {
    margin-bottom: 12px;
}

.sidebar-categories li:last-child {
    margin-bottom: 0;
}

.sidebar-categories a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.sidebar-categories a::before {
    content: '\f105';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 10px;
    color: var(--nav-tan);
    transition: var(--transition);
}

.sidebar-categories a:hover,
.sidebar-categories li.active a {
    color: var(--energy-orange);
    font-weight: 700;
}

.sidebar-categories li.active a::before,
.sidebar-categories a:hover::before {
    color: var(--energy-orange);
    transform: translateX(3px);
}

.course-main {
    flex: 1;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.course-blog-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.course-blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.course-blog-card:hover .card-img-wrapper img {
    transform: scale(1.08);
    /* slight zoom on hover */
}

.card-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--energy-orange);
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.favorite-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.favorite-btn:hover {
    background: #fff;
    color: #ff4757;
    transform: scale(1.1);
}

.favorite-btn.active {
    color: #ff4757;
}

.favorite-btn.active i {
    animation: pulseHeart 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pulseHeart {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}

.card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.card-meta i {
    margin-right: 5px;
}

.card-title {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 15px;
    color: var(--text-color);
    font-weight: 700;
}

.course-blog-card:hover .card-title {
    color: var(--primary-color);
}

.card-desc {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-footer {
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
    display: flex;
    justify-content: flex-end;
}

.read-more {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.course-blog-card:hover .read-more {
    color: var(--energy-orange);
}

.course-blog-card:hover .read-more i {
    transform: translateX(4px);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: #fff;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.page-link:hover,
.page-link.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

@media screen and (max-width: 900px) {
    .course-layout {
        flex-direction: column;
    }

    .course-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 30px;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }
}

/* Showcase Grid (FJU Style) */
#showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.showcase-card {
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.showcase-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.showcase-img-container {
    height: 220px;
    position: relative;
}

.showcase-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.showcase-tag-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--energy-orange);
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    /* Increased from 11px */
    font-weight: 700;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 10px rgba(251, 140, 0, 0.3);
}



/* Background Decoration Enhancement */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    filter: blur(100px);
    opacity: 0.15;
    animation: drift 20s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-light), transparent);
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--secondary-color), transparent);
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-color), transparent);
    top: 40%;
    left: 20%;
    animation-delay: -10s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(50px, 80px) rotate(15deg);
    }
}

/* Section Transitions */
.section-full-width {
    padding-top: 20px;
    position: relative;
}

.section-full-width::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, transparent, inherit);
    pointer-events: none;
}

/* Card Improvements */
.card-style {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 60px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card-style:hover {
    box-shadow: var(--shadow-premium);
    border-color: rgba(13, 59, 45, 0.15);
}

/* Scroll Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Premium Warm-Toned Background Colors */
.bg-light-green {
    background-color: #f6f7f9;
    /* Soft bridge neutral for transitioning into the gray footer */
}

.bg-peach-cream {
    background-color: #fefefe;
    /* Clean off-white that keeps focus on the news content */
}

.bg-pale-yellow {
    background-color: #fafbfc;
    /* Very subtle cool neutral that bridges the red and gray palettes */
}

.bg-light-gray {
    background-color: #f9f8f6;
    /* Paper tint - legacy, can be replaced */
}

/* Eslite-Style Recommendations Area Refined */
.eslite-recommend-area {
    overflow: hidden;
}

.eslite-header {
    background: transparent;
    padding: 30px 20px 20px;
    display: flex;
    justify-content: center;
    position: relative;
    border-bottom: 4px solid #d3e4e1;
}

.eslite-title-box {
    background: var(--primary-gradient);
    color: #fff;
    padding: 12px 50px;
    font-size: 24px;
    font-weight: 800;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.15);
    letter-spacing: 0.1em;
    box-shadow: 0 10px 20px rgba(10, 77, 60, 0.2);
}

.eslite-header::before,
.eslite-header::after {
    content: '✦  ✦  ✦';
    color: var(--primary-color);
    font-size: 12px;
    opacity: 0.6;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.eslite-header::before {
    left: 15%;
}

.eslite-header::after {
    right: 15%;
}

.eslite-body {
    padding: 25px 40px 40px;
}

.eslite-carousel {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scrollbar-width: none;
}

.eslite-carousel::-webkit-scrollbar {
    display: none;
}

.eslite-card {
    min-width: 170px;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.eslite-card .course-img {
    height: 160px;
    background: #eee;
}

.eslite-card .course-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eslite-card .course-info {
    background: var(--primary-color);
    color: #fff;
    padding: 15px 10px;
    text-align: center;
    flex-grow: 1;
}

.eslite-card .course-name {
    font-size: 16px;
    /* Increased from 14px */
    font-weight: 700;
    margin-bottom: 4px;
    color: #fff;
}

.eslite-card .course-promo {
    font-size: 13px;
    /* Increased from 11px */
    color: var(--accent-color);
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Interdisciplinary Section (Premium Refinement) */
.icon-nav-section {
    padding-top: 40px !important;
    padding-bottom: 60px !important;
    background: transparent !important;
}

.icon-nav-section .section-title {
    margin-bottom: 50px;
}

.section-subtitle-link {
    font-size: 1rem;
    color: #0d9488;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.section-subtitle-link:hover {
    color: #c2410c;
}

.section-subtitle-link i {
    font-size: 0.875rem;
    margin-left: 4px;
}

.icon-nav-section .section-title h2::after {
    left: 50%;
    transform: translateX(-50%);
}

.icon-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px 60px;
    max-width: 1100px;
    margin: 0 auto;
}

.icon-item {
    flex: 0 0 calc(33.333% - 60px);
    min-width: 280px;
    text-align: center;
    cursor: pointer;
    padding: 30px 20px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08); /* Increased contrast */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05); /* Deeper shadow */
    transition: var(--transition);
}

.icon-item:hover {
    transform: translateY(-12px); /* Higher lift */
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1); /* Dramatically deeper shadow on hover */
    border-color: rgba(117, 26, 27, 0.2); /* Highlight border with brand color tint */
}

.icon-circle {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden; /* Keep image within circle */
}

.domain-icon-img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    transition: var(--transition);
}

.icon-item:hover .domain-icon-img {
    transform: scale(1.1);
}

.icon-circle::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 1px dashed transparent;
    transition: var(--transition);
}

.icon-item:hover .icon-circle::after {
    border-color: inherit;
    transform: rotate(45deg);
}

.icon-item span {
    display: block;
    font-weight: 800;
    font-size: 24px;
    color: #c2410c; /* Warm Orange-Brown from image */
    margin-bottom: 12px;
    font-family: 'Playfair Display', 'Noto Serif TC', serif;
}

.icon-item .icon-desc {
    font-size: 15px;
    color: #5d6d7e;
    line-height: 1.7;
    font-weight: 400;
    padding: 0 10px;
    text-align: center;
    margin-top: 0;
}

@media screen and (max-width: 1024px) {
    .icon-item {
        flex: 0 0 calc(50% - 40px);
    }
}

@media screen and (max-width: 600px) {
    .icon-list {
        gap: 20px;
    }
    .icon-item {
        flex: 0 0 100%;
        min-width: 100%;
    }
}

/* Footer Refinement */
footer {
    background: #8F8796;
    color: var(--text-white);
    padding: 100px 0 60px;
    margin-top: 100px;
    position: relative;
    overflow: hidden;
}

.footer-logo-area {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: flex-start;
}

.footer-logo-img {
    height: 48px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 80px;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .program-grid-booktopia {
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (max-width: 768px) {

    .top-bar,
    .header-nav-area,
    .secondary-nav {
        display: none !important;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero-carousel-wrapper {
        height: 480px !important;
        /* Restored background height */
    }

    .hero-content {
        padding: 20px !important;
        /* Compact padding */
        width: 70% !important;
        /* Shrunk width to 1/3 approximately */
        max-width: 300px;
        transform: translateY(-20px) scale(0.95) !important;
    }

    .hero-content h1 {
        font-size: 20px !important;
        /* Smaller title */
        margin-bottom: 8px !important;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }

    .hero-content p,
    .hero-btns .btn-secondary {
        display: none !important;
        /* Hide description and secondary button to save space */
    }

    .hero-btns {
        margin-top: 5px;
    }

    .hero-btns .btn-primary {
        padding: 6px 16px;
        font-size: 13px;
        max-width: 140px;
    }

    .persistent-search {
        bottom: 12px !important;
    }

    .search-box {
        padding: 10px 16px !important;
    }

    .search-btn {
        padding: 8px 16px !important;
        font-size: 14px !important;
    }

    .program-grid-booktopia {
        grid-template-columns: 1fr;
    }

    .centered-title {
        font-size: 28px !important;
        margin-bottom: 30px !important;
    }

    .section-title h2,
    .news-header h2,
    .eslite-title-box,
    .v2-main-title {
        font-size: 28px !important;
    }

    .icon-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: left;
    }

    .footer-brand {
        text-align: left;
    }

    /* News Section Mobile Optimization */
    .news-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 15px 0 !important;
        gap: 10px;
    }

    .news-item>div {
        flex-direction: row !important;
        align-items: flex-start !important;
        width: 100% !important;
        gap: 12px !important;
    }

    .news-badge {
        flex-shrink: 0 !important;
        margin-right: 0 !important;
        padding: 4px 10px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
    }

    .news-title {
        font-size: 15px !important;
        line-height: 1.5 !important;
        flex: 1 !important;
    }

    .news-date {
        align-self: flex-end !important;
        font-size: 12px !important;
        color: var(--text-muted) !important;
        margin-top: -5px !important;
    }

    .section-bg-white {
        padding: 20px;
        margin-left: -20px;
        margin-right: -20px;
    }

    .eslite-header::before,
    .eslite-header::after {
        display: none;
    }

    .eslite-body {
        padding: 20px;
    }

    /* Professional UX: Peek Effect for Carousels */
    .eslite-carousel,
    .reviews-carousel {
        padding-right: 40px !important;
        /* Show peek of next card */
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 15px !important;
    }

    .eslite-card,
    .review-card {
        flex: 0 0 82% !important;
        /* Card width for peek effect */
        scroll-snap-align: start;
    }

    /* Hide redundant arrows on mobile */
    .carousel-nav-btn {
        display: none !important;
    }

    /* Touch Feedback */
    .news-item:active,
    .category-item:active,
    .btn:active {
        background-color: rgba(13, 59, 45, 0.05) !important;
        transform: scale(0.98);
        transition: transform 0.1s;
    }

    .card-style {
        border-radius: 24px !important;
        padding: 24px !important;
    }

    .news-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .news-tabs {
        gap: 16px;
        flex-wrap: wrap;
    }

    .news-header-wrapper {
        margin-bottom: 16px;
    }
}

/* Back to Top Button Styling */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(13, 59, 45, 0.3);
}

.back-to-top:active {
    transform: scale(0.95);
}

@media screen and (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

@media screen and (max-width: 480px) {
    .logo-main {
        font-size: 26px;
    }

    .hero-carousel-wrapper {
        height: 400px !important;
    }

    .hero-content h1 {
        font-size: 18px !important;
    }

    .category-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}

/* =========================================
   Elective Courses Explorer V2
   ========================================= */
.course-layout-v2-wrapper {
    font-family: 'Inter', 'Noto Serif TC', serif;
}

.course-grid-v2-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1280px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .course-grid-v2-layout {
        flex-direction: row;
    }
}

.course-v2-main {
    flex: 1;
    order: 1;
}

.course-v2-sidebar {
    order: 2;
}

@media (min-width: 768px) {
    .course-v2-main {
        order: 0;
    }

    .course-v2-sidebar {
        order: 0;
    }
}

.v2-main-title {
    font-family: 'Playfair Display', 'Noto Serif TC', serif;
    font-size: 28px;
    font-weight: 700;
    color: rgb(117, 26, 27);
    margin-bottom: 40px;
    letter-spacing: -0.01em;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    position: relative;
}

.v2-main-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    border-radius: 2px;
}

/* Sidebar */

@media (min-width: 768px) {
    .course-v2-sidebar {
        width: 256px;
        flex-shrink: 0;
    }
}

.v2-sidebar-inner {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    padding: 24px;
    position: sticky;
    top: 100px;
}

.v2-sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 16px;
}

.text-blue {
    color: #2563eb;
}

.v2-filter-group {
    margin-bottom: 24px;
}

.v2-filter-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.v2-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.v2-radio-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.v2-radio-label:hover {
    background-color: #f9fafb;
}

.v2-radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    margin: 0;
}

.v2-radio-label span {
    font-size: 0.875rem;
    color: #4b5563;
}

.v2-radio-label.active span {
    font-weight: 700;
    color: #1d4ed8;
}

.v2-select-dropdown {
    width: 100%;
    padding: 10px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.875rem;
    color: #374151;
    outline: none;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

.v2-select-dropdown:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.highlight-focus {
    animation: flash-focus 1.5s ease-out;
}

@keyframes flash-focus {
    0% { box-shadow: 0 0 0 0px rgba(59, 130, 246, 0.5); border-color: #3b82f6; }
    30% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0.3); border-color: #3b82f6; }
    100% { box-shadow: 0 0 0 0px rgba(59, 130, 246, 0); border-color: #e5e7eb; }
}

.v2-reset-btn {
    width: 100%;
    margin-top: 32px;
    padding: 8px 0;
    font-size: 0.875rem;
    color: #9ca3af;
    background: transparent;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.v2-reset-btn:hover {
    color: #2563eb;
    border-color: #bfdbfe;
    background-color: #eff6ff;
}

/* Main Content */
.course-v2-main {
    flex: 1;
}

.v2-top-bar {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    padding: 40px 30px;
    margin-bottom: 32px;
}

.v2-top-bar-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 1024px) {
    .v2-top-bar-inner {
        flex-direction: row;
    }
}

.v2-domain-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.v2-domain-btn {
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.v2-domain-btn:hover {
    filter: brightness(0.9);
}

.v2-domain-btn.active {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

.v2-domain-btn.bg-gray {
    background-color: #6b7280;
    color: white;
}

.v2-domain-btn.bg-teal {
    background-color: #FFB8D9;
    color: #444;
}

.v2-domain-btn.bg-blue {
    background-color: #FFF9C8;
    color: #444;
}

.v2-domain-btn.bg-orange {
    background-color: #C6EED6;
    color: #444;
}

.v2-domain-btn.bg-rose {
    background-color: #B3E1F8;
    color: #444;
}

.v2-domain-btn.bg-purple {
    background-color: #E6CBF7;
    color: #444;
}

.v2-search-box {
    position: relative;
    width: 100%;
}

@media (min-width: 1024px) {
    .v2-search-box {
        width: 256px;
    }
}

.v2-search-box input {
    width: 100%;
    padding: 8px 16px 8px 40px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.3s;
}

.v2-search-box input:focus {
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.v2-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
}

.v2-results-stats {
    margin-bottom: 24px;
    padding: 0 8px;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.text-blue-bold {
    color: #2563eb;
    font-weight: 700;
}

.text-rose {
    color: #f43f5e;
}

/* Grid layout for cards */
.v2-course-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 24px;
}

@media (min-width: 1024px) {
    .v2-course-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1280px) {
    .v2-course-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.v2-course-card {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #cbd5e0; /* Darker border */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* More pronounced shadow */
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.v2-course-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    border-color: #a0aec0;
    transform: translateY(-4px);
}

.v2-card-img-wrapper {
    position: relative;
    width: 100%;
    height: 100px; /* Reduced further by 1/3 approximately */
    overflow: hidden;
    background-color: #f9fafb;
}

.v2-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.v2-course-card:hover .v2-card-img {
    transform: scale(1.05);
}

.v2-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.v2-fav-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    right: auto;
    z-index: 10;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #f9fafb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.v2-fav-btn:hover {
    background: #ffffff;
    transform: scale(1.1);
}

.v2-fav-btn:active {
    transform: scale(0.95);
}

.v2-fav-btn i {
    font-size: 16px;
    color: #d1d5db;
    /* gray-300 */
    transition: color 0.2s;
}

.v2-fav-btn.favorited i {
    color: #f43f5e;
    /* rose-500 */
}

/* Hide heart internally if it's the far (empty) or fas (filled) */
.v2-fav-btn.favorited .fa-heart {
    font-weight: 900;
    /* Solid */
}

.v2-fav-btn:not(.favorited) .fa-heart {
    font-weight: 400;
    /* Regular outline */
}

.v2-card-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    z-index: 10;
}

.v2-badge {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    color: white;
}

.v2-badge-sustain {
    background-color: #FFB8D9;
    color: #444;
}

.v2-badge-startup {
    background-color: #FFF9C8;
    color: #444;
}

.v2-badge-health {
    background-color: #C6EED6;
    color: #444;
}

.v2-badge-humanity {
    background-color: #B3E1F8;
    color: #444;
}

.v2-badge-tech {
    background-color: #E6CBF7;
    color: #444;
}

.v2-course-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px 0;
    transition: color 0.2s;
    padding-right: 32px;
    /* space for heart icon */
}

.v2-course-card:hover h3 {
    color: #2563eb;
}

.v2-course-desc {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.v2-course-footer {
    padding-top: 16px;
    border-top: 1px solid #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
}

.v2-course-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.v2-course-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.v2-course-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.v2-course-link:hover {
    color: #1d4ed8;
}

/* Refined Course Card Elements */
.v2-card-semester-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    background: rgba(13, 59, 45, 0.85); /* Deep green glass */
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    border-top-right-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 5;
    box-shadow: 2px -2px 10px rgba(0, 0, 0, 0.1);
}

.v2-course-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #edf2f7;
}

.v2-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.v2-detail-item i {
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.v2-detail-text {
    display: flex;
    flex-direction: column;
}

.v2-detail-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.v2-detail-value {
    font-size: 0.875rem;
    color: #1e293b;
    font-weight: 600;
}

.v2-course-footer {
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
}

.v2-course-link {
    font-size: 0.875rem;
    color: #2563eb;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.v2-course-link:hover i {
    transform: translateX(4px);
}

.v2-empty-state {
    text-align: center;
    padding: 80px 20px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px dashed #e5e7eb;
}

.text-gray-light {
    color: #e5e7eb;
    font-size: 64px;
    margin-bottom: 16px;
}

.v2-empty-state h3 {
    font-size: 1.125rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 8px;
}

.v2-empty-state p {
    color: #6b7280;
    font-size: 1rem;
}

/* =========================================
   News List & Detail Pages
   ========================================= */

/* Page Hero */
.page-hero {
    background: linear-gradient(135deg, #fdf8f4 0%, #fefcf9 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 36px 0;
}

.page-hero-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.page-hero h1 {
    font-family: 'Playfair Display', 'Noto Serif TC', serif;
    font-size: 30px;
    font-weight: 700;
    color: rgb(117, 26, 27);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: rgb(117, 26, 27);
}

.breadcrumb .bc-sep {
    font-size: 10px;
    opacity: 0.45;
}

/* News List Two-Column Layout */
.news-list-layout {
    display: flex;
    gap: 40px;
    padding: 48px 0 80px;
    align-items: flex-start;
}

.news-list-main {
    flex: 1;
    min-width: 0;
}

/* Sidebar */
.news-sidebar {
    width: 252px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-sidebar-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.sidebar-widget-title {
    font-size: 15px;
    font-weight: 700;
    color: rgb(117, 26, 27);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(117, 26, 27, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-cat-list li {
    margin-bottom: 2px;
}

.sidebar-cat-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 15px;
    color: var(--text-muted);
    transition: all 0.2s;
}

.sidebar-cat-list li.active a,
.sidebar-cat-list li a:hover {
    background: rgba(117, 26, 27, 0.06);
    color: rgb(117, 26, 27);
    font-weight: 600;
}

.cat-count {
    background: rgba(117, 26, 27, 0.1);
    color: rgb(117, 26, 27);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    min-width: 24px;
    text-align: center;
}

.sidebar-cat-list li.active .cat-count {
    background: rgb(117, 26, 27);
    color: #fff;
}

.sidebar-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sidebar-recent-list li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-recent-list li:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-recent-list li a {
    display: block;
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 4px;
    transition: color 0.2s;
}

.sidebar-recent-list li a:hover {
    color: rgb(117, 26, 27);
}

.recent-date {
    font-size: 12px;
    color: var(--text-muted);
}

/* News List Main Area */
.news-list-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 12px;
}

.news-count-text {
    font-size: 14px;
    color: var(--text-muted);
}

.news-count-text strong {
    color: rgb(117, 26, 27);
    font-weight: 700;
}

/* News Badge Variants */
.news-badge.badge-event {
    background: #3b82f6;
}

/* Pagination */
.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.page-btn:hover,
.page-btn.active {
    background: rgb(117, 26, 27);
    border-color: rgb(117, 26, 27);
    color: #fff;
}

.page-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* Article Detail Layout */
.article-layout {
    display: flex;
    gap: 40px;
    padding: 48px 0 80px;
    align-items: flex-start;
}

.article-main {
    flex: 1;
    min-width: 0;
}

.article-card {
    background: #fff;
    border-radius: 20px;
    padding: 48px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.article-header {
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.article-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.article-date {
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-views {
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-title {
    font-family: 'Playfair Display', 'Noto Serif TC', serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Article Body Content */
.article-content {
    font-size: 16px;
    line-height: 2;
    color: #334155;
}

.article-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: rgb(117, 26, 27);
    margin: 32px 0 12px;
    padding-left: 14px;
    border-left: 4px solid rgb(255, 189, 84);
}

.article-content p {
    margin-bottom: 16px;
}

.article-content ul,
.article-content ol {
    padding-left: 24px;
    margin-bottom: 20px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content .info-box {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-left: 4px solid #38bdf8;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 24px 0;
}

.article-content .info-box p {
    margin-bottom: 6px;
}

.article-content .info-box p:last-child {
    margin-bottom: 0;
}

.article-content .highlight-box {
    background: #fefce8;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 20px 0;
    font-weight: 600;
    color: #78350f;
}

/* Article Navigation (Prev/Next) */
.article-nav {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    gap: 12px;
}

.article-nav-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    max-width: 45%;
    min-width: 0;
}

.article-nav-btn:hover {
    background: rgb(117, 26, 27);
    color: #fff;
    border-color: rgb(117, 26, 27);
}

.article-nav-btn .nav-label {
    font-size: 11px;
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-nav-btn .nav-title {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.article-nav-center {
    display: flex;
    align-items: center;
}

.back-to-list {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    background: rgba(117, 26, 27, 0.06);
    color: rgb(117, 26, 27);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.back-to-list:hover {
    background: rgb(117, 26, 27);
    color: #fff;
}

/* Responsive – News Pages */
@media screen and (max-width: 900px) {
    .news-list-layout,
    .article-layout {
        flex-direction: column;
        padding: 32px 0 60px;
        gap: 0;
    }

    .news-sidebar {
        width: 100%;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
        margin-top: 32px;
        padding-top: 28px;
        border-top: 2px solid rgba(117, 26, 27, 0.1);
    }

    .news-sidebar .news-sidebar-card {
        flex: 1;
        min-width: 240px;
    }

    .article-card {
        padding: 28px 20px;
    }

    .article-title {
        font-size: 22px;
    }
}

@media screen and (max-width: 600px) {
    .page-hero {
        padding: 24px 0;
    }

    .page-hero h1 {
        font-size: 22px;
    }

    .news-sidebar {
        flex-direction: column;
        gap: 12px;
        margin-top: 24px;
        padding-top: 24px;
    }

    .news-sidebar .news-sidebar-card {
        min-width: unset;
    }

    .article-nav {
        flex-direction: column;
    }

    .article-nav-btn {
        max-width: 100%;
    }
}

/* ── FAQ Page ── */
.faq-count-text {
    font-size: 14px;
    color: var(--text-muted);
}

.faq-count-text strong {
    color: rgb(117, 26, 27);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.faq-item:hover {
    box-shadow: 0 4px 20px rgba(117, 26, 27, 0.1);
}

.faq-item.open {
    border-color: rgba(117, 26, 27, 0.25);
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    cursor: pointer;
    user-select: none;
}

.faq-q-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(117, 26, 27, 0.08);
    color: rgb(117, 26, 27);
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
}

.faq-q-text {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    line-height: 1.5;
}

.faq-toggle-icon {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 13px;
    transition: transform 0.25s ease;
}

.faq-item.open .faq-toggle-icon {
    transform: rotate(180deg);
    color: rgb(117, 26, 27);
}

.faq-answer {
    display: none;
    padding: 0 24px 22px 70px;
    font-size: 14.5px;
    color: var(--text-muted);
    line-height: 1.8;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 16px;
}

.faq-item.open .faq-answer {
    display: block;
}

.faq-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    background: rgba(117, 26, 27, 0.1);
    color: rgb(117, 26, 27);
    margin-right: 6px;
    vertical-align: middle;
}

.faq-badge.badge-course { background: rgba(117, 26, 27, 0.1); color: rgb(117, 26, 27); }
.faq-badge.badge-apply  { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.faq-badge.badge-credit { background: rgba(16, 185, 129, 0.12); color: #059669; }
.faq-badge.badge-other  { background: rgba(100, 116, 139, 0.12); color: #475569; }

@media screen and (max-width: 600px) {
    .faq-answer {
        padding-left: 24px;
    }
}

/* =========================================
   課程列表頁手機優化
   ========================================= */

/* 手機篩選浮動按鈕 */
.v2-mobile-filter-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
    transition: background 0.2s;
}

.v2-mobile-filter-toggle:hover {
    background: #1d4ed8;
}

/* 側欄遮罩 */
.v2-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.v2-sidebar-overlay.open {
    display: block;
}

/* 側欄關閉按鈕（手機用） */
.v2-sidebar-close {
    display: none;
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6b7280;
    cursor: pointer;
    padding: 4px 8px;
    z-index: 10;
    line-height: 1;
}

.v2-sidebar-close:hover {
    color: #1f2937;
}

@media (max-width: 767px) {
    /* 顯示手機篩選按鈕 */
    .v2-mobile-filter-toggle {
        display: flex;
    }

    /* 顯示側欄關閉按鈕 */
    .v2-sidebar-close {
        display: block;
    }

    /* 側欄改為從左滑入 */
    .course-v2-sidebar {
        position: fixed !important;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100dvh;
        z-index: 1000;
        overflow-y: auto;
        transition: left 0.3s ease;
        order: 0 !important;
    }

    .course-v2-sidebar.open {
        left: 0;
    }

    .v2-sidebar-inner {
        position: relative !important;
        top: auto !important;
        border-radius: 0;
        min-height: 100%;
        padding-top: 52px;
    }

    /* 縮減 top-bar 內距 */
    .v2-top-bar {
        padding: 16px;
        margin-bottom: 16px;
    }

    /* 課程卡片改單欄 */
    .v2-course-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 16px;
    }

    /* 卡片標題字級縮小一點 */
    .v2-course-card h3 {
        font-size: 1rem;
    }

    /* 卡片圖片高度稍微增加以維持比例 */
    .v2-card-img-wrapper {
        height: 140px;
    }
}

/* 平板：2 欄 */
@media (min-width: 640px) and (max-width: 1023px) {
    .v2-course-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}