/* ============================================================
   重置 & 基础
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    background: #ffffff;
    font-family: 'Segoe UI', 'PingFang SC', Roboto, sans-serif;
}

/* ============================================================
   Logo
   ============================================================ */
#logo {
    position: relative;
    display: block;
    margin: 8px auto 0 auto;
    z-index: 20;
    width: 400px;
    height: auto;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

@media (min-width: 1200px) {
    #logo {
        max-width: 800px;
    }
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
    position: relative;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 10;
    pointer-events: none;
    user-select: none;
    background-image: url('footer.png');
    background-size: 100% auto;
    background-position: center bottom;
    background-repeat: no-repeat;
    top: auto;
    height: auto;
    min-height: 120px;
}

.footer-content {
    padding: 40px 20px 30px;
    text-align: center;
    color: rgba(7, 7, 7, 0.9);
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    pointer-events: none;
    user-select: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    min-height: 164px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.footer-content a {
    color: #000000;
    text-decoration: none;
    pointer-events: auto;
    transition: color 0.3s ease, background 0.3s ease;
    padding: 4px 12px;
    border-radius: 4px;
}

.footer-content a:visited {
    color: #000000;
}

.footer-content a:hover {
    color: #000000;
    background: rgba(255, 255, 255, 0.12);
}

.footer-content a:active {
    color: rgba(255, 255, 255, 0.85);
}

.footer-content .separator {
    margin: 0 10px;
    opacity: 0.3;
}

.footer-content .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
}

.footer-content .copyright {
    font-size: 0.8rem;
    opacity: 0.7;
    letter-spacing: 1px;
}

/* ============================================================
   修復 page-content 內部內容顯示
   ============================================================ */
.page-content,
.page-content-inner {
    max-width: 100% !important;
    width: 95% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    
    /* ★ 改用 auto 讓左右邊距自動平分，實現居中對齊 */
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ============================================================
   覆蓋 page-content 樣式（與背景影片融合）
   ============================================================ */
.page-content {
    position: relative;
    margin: 30px auto 120px auto;
    z-index: 20;
    color: #222;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    border: none;
    max-width: 1850px;
    width: 92%;
    overflow-y: visible;
    pointer-events: auto;
    box-shadow: none;
}

/* 美化捲軸 */
.page-content::-webkit-scrollbar {
    width: 4px;
}

.page-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.page-content::-webkit-scrollbar-track {
    background: transparent;
}

/* ============================================================
   兩欄佈局 (60% / 40%) - 最簡 Grid 寫法 (電腦版)
   ============================================================ */
.two-column-layout {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 24px;
    width: 100%;
}

.left-column,
.right-column {
    width: 100%;
}

/* ============================================================
   資訊卡片 (最新消息 & 校外比賽佳績)
   ============================================================ */
.info-box {
    background: rgba(255, 255, 255, 0.50);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 16px;
    padding: 24px 22px;
    margin-bottom: 14px;
    border: 1px solid rgba(200, 200, 200, 0.30);
    transition: background 0.3s ease, transform 0.3s ease;
}

.info-box:hover {
    background: rgba(255, 255, 255, 0.75);
    transform: translateY(-2px);
}

.info-box h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #222;
    border-left: 4px solid #4a9eff;
    padding-left: 14px;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
}

.info-box h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #222;
    border-left: 4px solid #7ab8ff;
    padding-left: 14px;
    margin: 18px 0 8px 0;
    letter-spacing: 0.5px;
}

.info-box.achievement h2 {
    border-left-color: #ff8c00;
}

.info-box ul {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

.info-box ul li {
    padding: 4px 0;
    font-size: 0.95rem;
    color: rgba(0, 0, 0, 0.9);
    line-height: 1.6;
    position: relative;
}

.info-box ul li:last-child {
    border-bottom: none;
}

.info-box.achievement ul li {
    padding-left: 28px;
}

.info-box.achievement ul li::before {
    content: "🎖️";
    position: absolute;
    left: 0;
    top: 10px;
    font-size: 16px;
}

/* ============================================================
   影片卡片 (最新影片)
   ============================================================ */
.video-box {
    background: rgba(255, 255, 255, 0.50);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 18px 20px 20px 20px;
    border: 1px solid rgba(200, 200, 200, 0.30);
    transition: background 0.3s ease, transform 0.3s ease;
    margin-bottom: 24px;
}

.video-box:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.video-box h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
    border-left: 4px solid #ff6b6b;
    padding-left: 14px;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.5);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-caption {
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    letter-spacing: 0.3px;
}

/* ============================================================
   超連結顏色修正
   ============================================================ */
a {
    color: #4a9eff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:visited {
    color: #6c5ce7;
}

a:hover {
    color: #2d7dd2;
    text-decoration: underline;
}

a:active {
    color: #ff6b6b;
}

/* ============================================================
   Info Box 超連結美化
   ============================================================ */
.info-box a {
    display: inline;
    text-decoration: none;
    transition: all 0.3s ease;
    color: inherit;
    vertical-align: baseline;
}

.info-box a img {
    transition: all 0.4s ease;
    display: block;
    width: 100%;
    height: auto;
}

.info-box a:hover img {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.info-box a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(74, 158, 255, 0.1) 0%, 
        transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: 8px;
}

.info-box a:hover::after {
    opacity: 1;
}

.info-box h2 + a {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
    color: inherit;
}

.info-box h2 + a:hover {
    box-shadow: 0 8px 35px rgba(74, 158, 255, 0.2);
    transform: translateY(-3px);
}

.info-box h2 + a:visited {
    color: inherit;
}

.info-box h2 + a[href*="anniversary"]:hover {
    box-shadow: 0 8px 35px rgba(255, 107, 107, 0.25);
}

.info-box h2 + a[href*="news_assets"]:hover {
    box-shadow: 0 8px 35px rgba(46, 213, 115, 0.25);
}

/* ============================================================
   新聞列表美化與對齊 (整合版)
   ============================================================ */
.info-box ul li.news-item {
    position: relative;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(200, 200, 200, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    list-style: none;             /* 移除預設黑點 */
    
    /* 使用 Flexbox 實現左側日期、右側內容對齊 */
    display: flex;
    align-items: flex-start;      /* 多行時，日期與第一行文字頂端對齊 */
    gap: 12px;                    /* 日期與文字之間的間距 */
    transition: all 0.3s ease;
}

/* 隱藏偽元素點號 */
.info-box ul li.news-item::before {
    display: none;
}

/* hover 懸停效果 */
.info-box ul li.news-item:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    border-color: rgba(74, 158, 255, 0.2);
}

.info-box ul li .news-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4a9eff, #6c5ce7);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums; /* 強制等寬數字，避免 1 和 0 寬度不一 */
    
    width: 90px;                        /* 固定膠囊寬度 */
    height: 24px;                       /* 固定高度 */
    border-radius: 20px;
    text-align: center;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(74, 158, 255, 0.25);
    white-space: nowrap;
    
    flex-shrink: 0;                     /* 防止被右側文字壓縮 */
    margin-top: 1px;                    /* 微調與文字第一行的高度 */
}

.info-box ul li a.news-content,
.info-box ul li a.news-text {
    text-decoration: none;
    transition: color 0.2s ease;
}
.info-box ul li a.news-content:hover,
.info-box ul li a.news-text:hover {
    color: #4a9eff;
}
.info-box ul li .news-link {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 200px;
    text-decoration: none;
    color: inherit;
    min-width: 100px;
    align-self: center;
}

.info-box ul li .news-link .news-content {
    flex: 1;
    transition: color 0.2s ease;
}

.info-box ul li > a:hover {
    color: #1c66f0;
}

.info-box ul li .news-link:hover .news-content {
    color: #4a9eff;
}

.info-box ul li .news-link:visited .news-content {
    color: #6c5ce7;
}

.info-box ul li .news-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 158, 255, 0.1);
    color: #4a9eff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    align-self: center;
}

.info-box ul li .news-link:hover .news-arrow {
    background: #4a9eff;
    color: white;
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(74, 158, 255, 0.3);
}

/* ============================================================
   新聞分類樣式
   ============================================================ */
.info-box ul li.news-item.important {
    border-left: 4px solid #ff4757;
    background: rgba(255, 71, 87, 0.05);
}

.info-box ul li.news-item.important .news-date {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    box-shadow: 0 2px 6px rgba(255, 71, 87, 0.3);
}

.info-box ul li.news-item.event {
    border-left: 4px solid #2ed573;
    background: rgba(46, 213, 115, 0.05);
}

.info-box ul li.news-item.event .news-date {
    background: linear-gradient(135deg, #2ed573, #7bed9f);
    box-shadow: 0 2px 6px rgba(46, 213, 115, 0.3);
}

.info-box ul li.news-item.general .news-date {
    background: linear-gradient(135deg, #a4b0be, #747d8c);
    box-shadow: 0 2px 6px rgba(116, 125, 140, 0.2);
}

.info-box ul li.news-item.urgent {
    border-left: 4px solid #ff6348;
    background: rgba(255, 99, 72, 0.06);
    animation: pulse-urgent 2s infinite;
}

.info-box ul li.news-item.urgent .news-date {
    background: linear-gradient(135deg, #ff6348, #ff4757);
    box-shadow: 0 2px 10px rgba(255, 99, 72, 0.4);
    animation: pulse-date 1.5s infinite;
}

@keyframes pulse-urgent {
    0%, 100% { background: rgba(255, 99, 72, 0.06); }
    50% { background: rgba(255, 99, 72, 0.15); }
}

@keyframes pulse-date {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.info-box ul li.news-item.empty {
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    border: 2px dashed rgba(200, 200, 200, 0.3);
}

.info-box ul li .news-empty {
    color: #999;
    font-size: 0.95rem;
}

/* ============================================================
   更多新聞按鈕
   ============================================================ */
.info-box .news-more {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 20px;
    background: rgba(74, 158, 255, 0.1);
    color: #4a9eff;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(74, 158, 255, 0.2);
}

.info-box .news-more:hover {
    background: #4a9eff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
}

.info-box .news-more:visited {
    color: #4a9eff;
}

.info-box .news-more:visited:hover {
    color: white;
}

/* ============================================================
   常見連結美化（已完全取消 hover 效果）
   ============================================================ */
.full-width-box .link-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    align-items: center;
}

.full-width-box .link-grid a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 300px;
    height: 70px;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.7);
    padding: 0;
    color: inherit;
    flex-shrink: 0;
    text-decoration: none;
    transition: none;               /* 取消過渡動畫 */
}

/* 完全鎖死 hover / focus / active 狀態 */
.full-width-box .link-grid a:hover,
.full-width-box .link-grid a:focus,
.full-width-box .link-grid a:active {
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    background: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none !important;
    color: inherit !important;
    filter: none !important;
}

.full-width-box .link-grid a img {
    display: block;
    width: auto;
    height: auto;
    max-width: 98%;
    max-height: 98%;
    object-fit: contain;
    transition: none;
}

.full-width-box .link-grid a:hover img {
    filter: none !important;
}

.full-width-box .link-grid a:visited {
    color: inherit;
}

/* ============================================================
   背景影片
   ============================================================ */
#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

/* ============================================================
   全寬 Banner（無框、全螢幕寬度）- 電腦版
   ============================================================ */
.full-width-banner {
    width: 100%;
    max-width: none;
    margin: 20px 0 0 0;
    padding: 0;
    position: relative;
    z-index: 1;
    background: transparent;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    height: 300px;
    overflow: hidden;
}

.full-width-banner img {
    width: 100%;
    height: auto;
    display: block;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0;
    padding: 0;
}

/* ============================================================
   語言切換按鈕 - 電腦版
   ============================================================ */
.lang-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-decoration: none;
    display: inline-block;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

/* ============================================================
   年度主題 - 右上角 M字額瀏海按鈕
   ============================================================ */
.notch-btn {
    position: absolute;
    top: 0;
    right: 20px;
    z-index: 9999;
    background: rgba(18, 81, 253, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    text-decoration: none;
    padding: 10px 28px 14px;
    border-radius: 0 0 22px 22px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}
 
.notch-btn:hover {
    background: rgba(39, 61, 255, 0.8);
    padding-bottom: 20px;
    color: #fff;
    text-decoration: none;
}

.notch-btn:visited {
    color: #fff;
    text-decoration: none;
}

/* ============================================================
   文字閃光效果
   ============================================================ */
.notch-text {
    background: linear-gradient(
        120deg,
        #ffffff 0%,
        #cdf0a6 40%,
        #f8b8ea 50%,
        #a8e4cd 60%,
        #ffffff 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: shine 8s linear infinite;
}

@keyframes shine {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================================
   手機響應式 ( <= 1024px )
   ============================================================ */
@media screen and (max-width: 1024px) {

    .notch-btn {
        display: none !important;
    }

    
    #logo {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 80%;
        max-width: 380px;
        margin: 80px auto 0 auto;
        z-index: 20;
        display: block;
    }

    .lang-toggle {
        top: 10px;
        left: 15px;
        padding: 6px 14px;
        font-size: 12px;
    }

    .page-content {
        position: relative;
        margin: 30px auto 0 auto !important;
        width: 100% !important;
        padding: 20px 16px !important;
        max-height: none;
        overflow-y: visible;
        border-radius: 18px;
        top: auto;
        bottom: auto;
        left: auto;
        transform: none;
        box-sizing: border-box;
    }

    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .left-column,
    .right-column {
        width: 100%;
        max-width: 100%;
    }

    .info-box,
    .video-box {
        padding: 14px 16px;
        margin-bottom: 10px;
    }

    .info-box h2,
    .video-box h2 {
        font-size: 1rem;
        padding-left: 10px;
        border-left-width: 3px;
        margin-bottom: 10px;
    }

    .info-box h3 {
        font-size: 0.95rem;
        padding-left: 10px;
        border-left-width: 3px;
    }

    .info-box ul li {
        font-size: 0.85rem;
        padding: 6px 0;
        background-size: 16px;
    }

    .info-box.achievement ul li {
        padding-left: 24px;
        padding-right: 0;
    }

    .info-box.achievement ul li::before {
        top: 8px;
        font-size: 14px;
    }

    .video-caption {
        font-size: 0.78rem;
    }

    .info-box ul li .news-date {
        min-width: 55px;
        font-size: 0.65rem;
        padding: 2px 10px;
    }

    .info-box ul li .news-content {
        font-size: 0.85rem;
        flex: 1 1 100%;
    }

    .info-box ul li .news-link {
        flex: 1 1 100%;
    }

    .info-box ul li .news-arrow {
        display: none;
    }

    .info-box .news-more {
        width: 100%;
        text-align: center;
    }

    .info-box a:hover img {
        transform: scale(1);
    }

    .info-box h2 + a:hover {
        transform: translateY(0);
    }

    /* 手機版常用連結也完全取消 hover */
    .full-width-box .link-grid a:hover {
        transform: none !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
        background: rgba(255, 255, 255, 0.7) !important;
    }

    .full-width-banner {
        margin: 0 !important;
        padding-top: 120px !important;
        height: 400px !important;
        overflow: hidden;
    }

    .footer {
        min-height: 80px;
    }

    .footer-content {
        padding: 25px 12px 18px;
        font-size: 0.7rem;
        min-height: 60px;
    }

    .footer-content .copyright {
        font-size: 0.65rem;
    }

    .footer-content .separator {
        margin: 0 6px;
    }

    .footer-content .footer-links {
        gap: 2px 4px;
    }

    .footer-content a {
        padding: 3px 8px;
        font-size: 0.7rem;
    }
}
@media screen and (max-width: 1200px) {
    #fullscreen-slideshow,
    .notch-btn {
        display: none !important;
    }
}