/* ==========================================================================
   校務行政專區 - 主樣式表 (CSS)
   設計風格：
   1. 上方標題列：「校務行政」採用深海寶藍至靛藍漸層（Deep Midnight Navy Gradient），
      與下方按鈕的水藍色做出明顯區隔，左側深色背景使白字明確可讀。
   2. 按鈕配色：圖一風格 (藍色系與綠色系交替)
   ========================================================================== */

:root {
    /* 全頁背景 */
    --bg-main: #f4f9fc;
    --bg-card: #ffffff;
    
    /* 標題列漸層：深藍至靛藍漸層 (Deep Sapphire Navy) 
       與下方按鈕的亮藍區隔，且左側深色處置確保「校務行政」白字最高讀取對比度 */
    --header-dark-start: #0c2461; /* 深海靛藍 (Deep Midnight Navy) */
    --header-mid: #1e3799;        /* 皇家寶藍 (Royal Sapphire) */
    --header-end: #3c6382;        /* 鋼青藍 (Steel Blue) */
    --header-border: #081942;
    
    /* 按鈕主題：圖一風格 - 亮藍色系 (Electric Ocean Blue) */
    --blue-btn-start: #00a8ff;
    --blue-btn-end: #0077c8;
    --blue-btn-shadow: rgba(0, 140, 230, 0.35);
    
    /* 按鈕主題：圖一風格 - 翠綠色系 (Emerald Mint Green) */
    --green-btn-start: #2ed573;
    --green-btn-end: #10ac84;
    --green-btn-shadow: rgba(16, 172, 132, 0.35);
    
    /* 字體與邊框 */
    --font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --border-radius-lg: 16px;
    --border-radius-md: 12px;
    --border-radius-sm: 6px;
    --transition-fast: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 全域重置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(#e1effa 1.5px, transparent 1.5px),
        radial-gradient(#e1effa 1.5px, var(--bg-main) 1.5px);
    background-size: 36px 36px;
    background-position: 0 0, 18px 18px;
    color: #333333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   頂部校網橫幅 (Banner)
   ========================================================================== */
.school-banner {
    background: linear-gradient(180deg, #eaf6ff 0%, #d4ebfc 100%);
    border-bottom: 3px solid #b3dcfa;
    padding: 1.5rem 1rem 2.2rem 1rem;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 120, 215, 0.1);
    overflow: hidden;
}

.banner-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.banner-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #00a8ff, #0077c8);
    color: #ffffff;
    font-size: 26px;
    font-weight: 900;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 120, 215, 0.3);
    border: 2px solid #ffffff;
}

.badge-text {
    display: flex;
    flex-direction: column;
}

.badge-county {
    font-size: 14px;
    font-weight: 700;
    color: #0077c8;
    letter-spacing: 1px;
}

.badge-school-en {
    font-size: 11px;
    color: #557;
}

.school-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: #005691;
    text-shadow: 2px 2px 0px #ffffff, -1px -1px 0px #ffffff, 1px -1px 0px #ffffff, -1px 1px 0px #ffffff;
    letter-spacing: 2px;
}

.banner-decor {
    font-size: 24px;
    color: #ff9f43;
    display: flex;
    gap: 6px;
}

.star-decor {
    animation: floatStar 3s ease-in-out infinite alternate;
}

.star-decor.small {
    font-size: 16px;
    color: #00a8ff;
    animation-delay: 1s;
}

@keyframes floatStar {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-6px) rotate(15deg); }
}

.grass-decor {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 12px;
    background: repeating-linear-gradient(
        45deg,
        #7bed9f,
        #7bed9f 10px,
        #2ed573 10px,
        #2ed573 20px
    );
    opacity: 0.7;
}

/* ==========================================================================
   主要內容區與外框 Widget
   ========================================================================== */
.main-content {
    flex: 1;
    max-width: 1050px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 1rem;
}

.widget-wrapper {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px rgba(12, 36, 97, 0.12), 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 2px solid #b3dcfa;
    overflow: hidden;
}

/* 上方區塊標題列 */
.widget-header {
    background: linear-gradient(90deg, #0066cc 0%, #0088e8 35%, #00a8c6 70%, #02a884 100%) !important;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid #0052a3;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 12px rgba(0, 102, 204, 0.25);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* 黃色放大鏡徽章 */
.search-badge {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #fff3b0, #ffd15c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 2px solid #ffffff;
    flex-shrink: 0;
}

/* 校園規範 標題文字 */
.widget-title {
    font-size: 1.55rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 2.5px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6), 0 0 12px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   獨立按鈕列表區域 (參考圖示：3 欄排列，斜角切邊星號徽章 + 雙藍色調漸層)
   ========================================================================== */
.button-grid {
    padding: 26px 22px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 18px;
}

/* 獨立按鈕本體 */
.nav-button {
    text-decoration: none;
    display: flex;
    align-items: center;
    min-height: 56px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
    user-select: none;
    border: none;
}

/* 淺天空藍配色 (Theme Light Blue) */
.nav-button.theme-light-blue {
    background: linear-gradient(95deg, #629df8 0%, #7fb3ff 100%);
    box-shadow: 0 6px 18px rgba(98, 157, 248, 0.36);
}

.nav-button.theme-light-blue .btn-star-badge {
    background: linear-gradient(135deg, #3562ea 0%, #254ed5 100%);
}

/* 深寶石藍配色 (Theme Royal Blue) */
.nav-button.theme-royal-blue {
    background: linear-gradient(95deg, #4364ee 0%, #5879f7 100%);
    box-shadow: 0 6px 18px rgba(67, 100, 238, 0.40);
}

.nav-button.theme-royal-blue .btn-star-badge {
    background: linear-gradient(135deg, #2441bd 0%, #1a329c 100%);
}

/* 左側斜角切邊星號徽章 (.btn-star-badge) */
.btn-star-badge {
    position: absolute;
    top: 0;
    left: -10px;
    width: 50px;
    height: 100%;
    transform: skewX(-16deg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    border-right: 2px solid rgba(255, 255, 255, 0.45);
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.12);
}

/* ★ 星號 Icon */
.btn-star-icon {
    font-size: 1.15rem;
    color: #ffffff;
    transform: skewX(16deg); /* 反向傾斜校正星號 */
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 右側標題文字 */
.btn-text {
    flex: 1;
    padding-left: 48px; /* 避開左側斜角切邊徽章 */
    padding-right: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
    color: #ffffff;
    font-size: 1.02rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.35;
    word-break: break-word;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 按鈕 Hover 效果 */
.nav-button:hover {
    transform: translateY(-3px) scale(1.015);
}

.nav-button.theme-light-blue:hover {
    box-shadow: 0 10px 24px rgba(98, 157, 248, 0.55);
    filter: brightness(1.04);
}

.nav-button.theme-royal-blue:hover {
    box-shadow: 0 10px 24px rgba(67, 100, 238, 0.60);
    filter: brightness(1.04);
}

.nav-button:hover .btn-star-icon {
    transform: skewX(16deg) scale(1.25) rotate(15deg);
}

/* 按鈕 Active 效果 */
.nav-button:active {
    transform: translateY(1px) scale(0.99);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   頁尾
   ========================================================================== */
.site-footer {
    text-align: center;
    padding: 1.5rem;
    color: #779;
    font-size: 0.85rem;
    margin-top: auto;
}

/* RWD 響應式調整 */
@media (max-width: 900px) {
    .button-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .banner-container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .button-grid {
        grid-template-columns: 1fr;
        padding: 16px 12px;
    }
}

