/* Original Design Style CSS - Enhanced with Modern Features */

/* Base Styles - Following Original Design with Accessibility */
body {
    margin: 0;
    font-family: 'Microsoft JhengHei', '微軟正黑體', sans-serif;
    font-size: 80%;
    line-height: 1.9;
    color: #333;
    background: url('../images/body_bg.jpg') top repeat-x;
    /* Accessibility: Ensure sufficient color contrast */
    background-color: #E8F3FF;
}

/* Banner Styles with Mountain Theme */
.banner {
    background: 
        linear-gradient(135deg, #FF6600, #FF8833),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 200"><defs><linearGradient id="mountain-banner" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%23ff6600;stop-opacity:0.8"/><stop offset="50%" style="stop-color:%23ff8833;stop-opacity:0.6"/><stop offset="100%" style="stop-color:%23ffab40;stop-opacity:0.4"/></linearGradient></defs><path d="M0,150 L200,100 L400,120 L600,80 L800,110 L1000,90 L1200,100 L1200,200 L0,200 Z" fill="url(%23mountain-banner)"/></svg>');
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 193, 7, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner-content h1 {
    margin: 0;
    font-size: 2.5em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.banner-content p {
    margin: 5px 0 0 0;
    font-size: 1.2em;
    opacity: 0.9;
}

/* Enhanced Main Layout - Responsive */
.main {
    background: url('../images/main_bg.jpg') center repeat-y;
    margin-top: -20px;
    padding-top: 20px;
    min-height: 600px;
}

.main2 {
    background: url('../images/banner_bg2.jpg') no-repeat #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    padding: 20px;
}

/* Full Screen Layout with Nature Theme */
.main-fullscreen {
    width: 100%;
    min-height: calc(100vh - 420px); /* 工具列(40px) + 導覽列(80px) + banner(300px) = 420px */
    background: 
        linear-gradient(135deg, rgba(245, 247, 250, 0.9) 0%, rgba(195, 207, 226, 0.9) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><linearGradient id="mountain" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%23667eea;stop-opacity:0.1"/><stop offset="100%" style="stop-color:%23764ba2;stop-opacity:0.1"/></linearGradient></defs><path d="M0,600 L200,400 L400,500 L600,300 L800,450 L1000,350 L1200,400 L1200,800 L0,800 Z" fill="url(%23mountain)"/></svg>'),
        linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-size: cover, 100% 100%, cover;
    background-position: center, center, center;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
    margin-top: 0;
}

.main-fullscreen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 193, 7, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(76, 175, 80, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(33, 150, 243, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.main-container {
    width: 100%;
    max-width: 1177px; /* Desktop default: 1024px (+15%) */
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box; /* prevent max-width + padding from overflowing viewport */
}

/* Responsive: Larger screens (above 1400px) */
@media (min-width: 1400px) {
    .main-container {
        max-width: 1400px;
    }
}

.layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-height: calc(100vh - 200px);
}

.content-section {
    background: transparent;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden; /* avoid horizontal scrollbar */
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

/* Nature Decorative Elements */
.content-section::before {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><linearGradient id="butterfly" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%23ff6b6b;stop-opacity:0.3"/><stop offset="50%" style="stop-color:%23feca57;stop-opacity:0.3"/><stop offset="100%" style="stop-color:%234ecdc4;stop-opacity:0.3"/></linearGradient></defs><path d="M50,20 C60,10 80,15 85,30 C90,45 80,60 70,65 C60,70 40,65 30,60 C20,55 15,40 20,25 C25,15 40,10 50,20 Z" fill="url(%23butterfly)"/><path d="M50,20 C40,10 20,15 15,30 C10,45 20,60 30,65 C40,70 60,65 70,60 C80,55 85,40 80,25 C75,15 60,10 50,20 Z" fill="url(%23butterfly)"/></svg>') no-repeat center;
    background-size: contain;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.content-section::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><linearGradient id="deer" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%238d6e63;stop-opacity:0.4"/><stop offset="100%" style="stop-color:%23a1887f;stop-opacity:0.4"/></linearGradient></defs><path d="M50,80 C45,75 40,70 35,65 C30,60 25,55 30,50 C35,45 40,40 45,35 C50,30 55,35 60,40 C65,45 70,50 65,55 C60,60 55,65 50,80 Z" fill="url(%23deer)"/><circle cx="45" cy="30" r="8" fill="url(%23deer)"/><circle cx="55" cy="30" r="8" fill="url(%23deer)"/></svg>') no-repeat center;
    background-size: contain;
    opacity: 0.5;
    animation: gentle-sway 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

@keyframes gentle-sway {
    0%, 100% { transform: translateX(0px) rotate(0deg); }
    50% { transform: translateX(5px) rotate(2deg); }
}

/* Floating Nature Elements */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.butterfly-1, .butterfly-2, .deer-1, .mountain-silhouette {
    position: absolute;
    font-size: 2rem;
    opacity: 0.3;
    animation-duration: 8s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

.butterfly-1 {
    top: 20%;
    left: 10%;
    animation-name: butterfly-dance;
}

.butterfly-2 {
    top: 60%;
    right: 15%;
    animation-name: butterfly-dance;
    animation-delay: -4s;
}

.deer-1 {
    bottom: 20%;
    left: 20%;
    animation-name: deer-grazing;
}

.mountain-silhouette {
    top: 10%;
    right: 10%;
    animation-name: mountain-peace;
}

@keyframes butterfly-dance {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(5deg); }
    50% { transform: translateY(-10px) rotate(-3deg); }
    75% { transform: translateY(-15px) rotate(2deg); }
}

@keyframes deer-grazing {
    0%, 100% { transform: translateX(0px) rotate(0deg); }
    50% { transform: translateX(10px) rotate(1deg); }
}

@keyframes mountain-peace {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* Full Screen Design - Content Management Blocks */
.homepage-layout {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: transparent;
}

.content-row {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    padding: 20px;
    min-height: calc(100vh - 40px);
    align-items: start;
}

.left-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    align-content: start;
}

.right-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 20px;
}

/* Content Blocks - Full Screen Design with Nature Theme */
.content-block {
    background: 
        linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.95) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 300"><defs><pattern id="student-pattern" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="8" fill="%23e3f2fd" opacity="0.3"/><circle cx="80" cy="30" r="6" fill="%23f3e5f5" opacity="0.3"/><circle cx="50" cy="70" r="10" fill="%23e8f5e8" opacity="0.3"/><circle cx="30" cy="80" r="5" fill="%23fff3e0" opacity="0.3"/></pattern></defs><rect width="400" height="300" fill="url(%23student-pattern)"/></svg>');
    border: 1px solid #ddd;
    border-radius: 12px;
    margin-bottom: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    min-height: 200px;
    backdrop-filter: blur(10px);
}

.content-block:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.content-block.editable {
    cursor: pointer;
    border: 2px dashed #FF6600;
}

.content-block.editable:hover {
    border-color: #FF8833;
    background: #fff8f5;
}

.content-block.editing {
    border: 2px solid #0066CC;
    box-shadow: 0 0 20px rgba(0,102,204,0.3);
}

.block-header {
    background: linear-gradient(135deg, #FF6600, #FF8833);
    color: white;
    padding: 12px 20px;
    margin: 0;
    border-bottom: 1px solid #e0e0e0;
}

.block-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.block-content {
    padding: 20px;
}

.block-footer {
    background: #f8f9fa;
    padding: 10px 20px;
    text-align: right;
    border-top: 1px solid #e0e0e0;
}

.block-footer a {
    color: #0066CC;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.block-footer a:hover {
    color: #FF6600;
    text-decoration: underline;
}

.no-content {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* News Items */
.news-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    gap: 15px;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    min-width: 80px;
    font-size: 12px;
    color: #666;
    text-align: center;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.news-title {
    flex: 1;
    min-width: 0;
}

.news-title a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    display: block;
    line-height: 1.4;
}

.news-title a:hover {
    color: #FF6600;
    text-decoration: underline;
}

.news-action {
    min-width: 50px;
    text-align: center;
}

.news-action a {
    color: #0066CC;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border: 1px solid #0066CC;
    border-radius: 3px;
    transition: all 0.3s;
}

.news-action a:hover {
    color: #fff;
    background: #0066CC;
}

/* Department News with Color Coding */
.department-section {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.department-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.department-title {
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
    border-left: 4px solid;
}

/* Department Color Schemes */
.department-title.教務處 {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    border-left-color: #1976d2;
}

.department-title.學務處 {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
    border-left-color: #388e3c;
}

.department-title.總務處 {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc80 100%);
    color: #ef6c00;
    border-left-color: #ff9800;
}

.department-title.輔導室 {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #7b1fa2;
    border-left-color: #9c27b0;
}

.department-title.人事室 {
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
    color: #00695c;
    border-left-color: #009688;
}

.department-title.會計室 {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    color: #c2185b;
    border-left-color: #e91e63;
}

.department-title.圖書館 {
    background: linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%);
    color: #558b2f;
    border-left-color: #689f38;
}

.department-title.榮譽榜 {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #f57c00;
    border-left-color: #ffc107;
}

.department-news-list {
    margin-left: 10px;
}

.dept-news-item {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.4;
}

.dept-news-item a {
    color: #0066CC;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.dept-news-item a:hover {
    color: #FF6600;
    text-decoration: underline;
}

.dept-news-date {
    color: #666;
    font-size: 11px;
    margin-left: 8px;
}

/* Campus Activities Preview */
.activities-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.activity-preview-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.activity-preview-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.activity-preview-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.activity-preview-image {
    position: relative;
    height: 120px;
    overflow: hidden;
}

.activity-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.activity-preview-item:hover .activity-preview-image img {
    transform: scale(1.05);
}

.activity-preview-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
}

.activity-preview-category {
    background: rgba(255,102,0,0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.activity-preview-info {
    padding: 12px;
}

.activity-preview-info h4 {
    font-size: 0.9rem;
    margin: 0 0 5px 0;
    color: #333;
    line-height: 1.3;
    font-weight: 600;
}

.activity-preview-date {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}

/* Quick Links */
.quick-links-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-link-item {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #0066CC;
    transition: all 0.3s;
}

.quick-link-item:hover {
    background: #e9ecef;
    border-left-color: #FF6600;
    transform: translateX(3px);
}

.quick-link-item a {
    color: #333;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s;
}

.quick-link-item a:hover {
    color: #FF6600;
}

/* School Info */
.school-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #0066CC;
    font-size: 13px;
    line-height: 1.4;
}

.info-item strong {
    color: #FF6600;
    font-weight: bold;
}

/* Editor Controls */
.block-editor {
    position: absolute;
    top: 10px;
    right: 10px;
    display: none;
    gap: 5px;
}

.content-block:hover .block-editor {
    display: flex;
}

.editor-btn {
    background: #0066CC;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.editor-btn:hover {
    background: #FF6600;
    transform: scale(1.05);
}

.editor-btn.edit {
    background: #28a745;
}

.editor-btn.delete {
    background: #dc3545;
}

.editor-btn.move {
    background: #6c757d;
}

/* Full Screen Responsive Design */
@media (max-width: 1400px) {
    .content-row {
        grid-template-columns: 1fr 280px;
        gap: 25px;
    }
    
    .left-content {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 1200px) {
    .content-row {
        grid-template-columns: 1fr 250px;
        gap: 20px;
    }
    
    .left-content {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 15px;
    }
}

/* Desktop Default: 1024px and above */
@media (min-width: 1024px) {
    .main-container {
        max-width: 1024px;
        margin: 0 auto;
        padding: 0 20px;
    }
    
    .layout-grid {
        max-width: 1024px;
        margin: 0 auto;
    }
    
    .content-section {
        max-width: 1024px;
        margin: 0 auto;
    }
    
    .utility-container {
        max-width: 1024px;
    }
    
    .nav-container {
        max-width: 1024px;
    }
}

/* Tablet and below: less than 1024px */
@media (max-width: 1023px) {
    .layout-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    
    .content-section {
        order: 1;
    }
    
    .content-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .right-content {
        position: static;
        order: -1;
    }
    
    .left-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .menuitem_1 {
        padding: 10px 12px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .content-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .right-content {
        width: 100%;
    }
    
    .glossymenu {
        padding: 10px;
    }
    
    .menuitem_1 {
        padding: 8px 10px;
        margin-bottom: 6px;
        font-size: 13px;
    }
    
    .menuitem_1 span {
        font-size: 13px !important;
    }
    
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 0;
    }
    
    .news-date {
        min-width: auto;
        align-self: flex-start;
    }
    
    .news-title {
        width: 100%;
    }
    
    .news-action {
        align-self: flex-end;
    }
    
    .department-section {
        margin-bottom: 20px;
    }
    
    .department-title {
        font-size: 16px;
        padding: 10px 15px;
    }
    
    .quick-links-list {
        gap: 10px;
    }
    
    .quick-link-item {
        padding: 10px 15px;
    }
    
    .school-info {
        gap: 10px;
    }
    
    .info-item {
        padding: 10px 15px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .homepage-layout {
        padding: 0 5px;
    }
    
    .content-block {
        margin-bottom: 15px;
    }
    
    .block-header {
        padding: 10px 15px;
    }
    
    .block-header h3 {
        font-size: 14px;
    }
    
    .block-content {
        padding: 15px;
    }
    
    .glossymenu {
        padding: 8px;
    }
    
    .menuitem_1 {
        padding: 6px 8px;
        margin-bottom: 4px;
        font-size: 12px;
    }
    
    .menuitem_1 span {
        font-size: 12px !important;
    }
    
    .news-item {
        padding: 8px 0;
    }
    
    .news-date {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .news-title a {
        font-size: 13px;
    }
    
    .news-action a {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .department-title {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .dept-news-item {
        font-size: 12px;
    }
    
    .quick-link-item a {
        font-size: 12px;
    }
    
    .info-item {
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* WCAG Accessibility Enhancements */
.content-block:focus-within {
    outline: 2px solid #FF6600;
    outline-offset: 2px;
}

.news-title a:focus,
.news-action a:focus,
.quick-link-item a:focus {
    outline: 2px solid #0066CC;
    outline-offset: 2px;
    border-radius: 3px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .content-block {
        border: 2px solid #000;
    }
    
    .block-header {
        background: #000;
        color: #fff;
    }
    
    .news-title a,
    .dept-news-item a,
    .quick-link-item a {
        color: #000;
    }
    
    .news-title a:hover,
    .dept-news-item a:hover,
    .quick-link-item a:hover {
        color: #000;
        text-decoration: underline;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .content-block,
    .news-title a,
    .news-action a,
    .quick-link-item,
    .quick-link-item a {
        transition: none;
    }
    
    .quick-link-item:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .content-block {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .block-header {
        background: #f0f0f0 !important;
        color: #000 !important;
    }
    
    .news-title a,
    .dept-news-item a,
    .quick-link-item a {
        color: #000 !important;
        text-decoration: none !important;
    }
}

/* Menu Styles - RWD & WCAG Compliant */
.glossymenu {
    width: 100%;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.menuitem_1 {
    display: block;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.menuitem_1:hover {
    background: #FF6600;
    color: #fff;
    border-color: #FF6600;
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(255,102,0,0.3);
}

.menuitem_1:focus {
    outline: 2px solid #0066CC;
    outline-offset: 2px;
}

.menuitem_1 b {
    font-weight: bold;
}

.menuitem_1 font {
    font-family: Arial, sans-serif;
}

.menuitem_1 span {
    display: block;
    line-height: 1.4;
}

/* Remove old table-based styles */
.block1, .block2 {
    display: none;
}

/* Block Style Variants */
.content-block.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.content-block.highlight .block-header {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.content-block.minimal {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    box-shadow: none;
}

.content-block.minimal .block-header {
    background: #6c757d;
}

/* Drag and Drop Styles */
.content-block.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
    z-index: 1000;
}

.content-block.drag-over {
    border: 2px dashed #FF6600;
    background: #fff8f5;
}

.block-header {
    background: #FF6600;
    color: white;
    padding: 8px 15px;
    margin: 0;
    font-weight: bold;
    font-size: 14px;
}

.block-header h3 {
    margin: 0;
    font-size: 14px;
}

.block-footer {
    width: 100%;
    text-align: right;
    line-height: 24px;
    padding-right: 10px;
    padding-bottom: 10px;
}

.block-footer a {
    color: #0066CC;
    text-decoration: none;
}

.block-footer a:hover {
    color: #FF6600;
    text-decoration: underline;
}

/* News Table Styles */
.news-table {
    padding: 0 15px;
}

.news-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #666666;
}

.news-row:last-child {
    border-bottom: none;
}

.news-date {
    width: 21%;
    text-align: center;
    font-size: 12px;
    color: #666;
}

.news-title {
    width: 59%;
    padding: 0 10px;
}

.news-title a {
    color: #0066CC;
    text-decoration: none;
    font-size: 13px;
}

.news-title a:hover {
    color: #FF6600;
    text-decoration: underline;
}

.news-action {
    width: 20%;
    text-align: center;
}

.news-action a {
    color: #0066CC;
    text-decoration: none;
    font-size: 12px;
}

.news-action a:hover {
    color: #FF6600;
    text-decoration: underline;
}

/* Department Table Styles */
.department-table {
    padding: 0 15px;
}

.department-row {
    display: flex;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.department-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.department-name {
    width: 20%;
    text-align: center;
    background: #f0f0f0;
    padding: 8px;
    font-weight: bold;
    font-size: 13px;
    border-radius: 3px;
    margin-right: 10px;
}

.department-news {
    width: 100%;
    padding: 5px 0;
    display: block; /* Default: vertical layout */
}

/* Desktop: One department per row (single column) */
@media (min-width: 1024px) {
    .department-news {
        display: block; /* Single column: one department per row */
        width: 100%;
    }
    
    .department-section {
        margin-bottom: 0; /* Remove bottom margin when in grid */
        border-bottom: none; /* Remove border when in grid */
        padding-bottom: 0;
    }
    
    .department-section:not(:last-child) {
        border-bottom: 1px solid #eee; /* Keep border for visual separation */
        padding-bottom: 15px;
        margin-bottom: 0;
    }
}

.dept-news-item {
    margin-bottom: 5px;
    font-size: 12px;
}

.dept-news-item a {
    color: #0066CC;
    text-decoration: none;
}

.dept-news-item a:hover {
    color: #FF6600;
    text-decoration: underline;
}

.dept-news-date {
    color: #666;
    font-size: 11px;
    margin-left: 5px;
}

/* Campus Content */
.campus-content {
    padding: 15px;
    text-align: center;
}

.campus-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Right Content Styles */
.right {
    border: 1px solid #cccccc;
    margin-bottom: 10px;
    background: #FFFFFF;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.right_content {
    width: 100%;
    margin: 0 auto;
    padding: 10px;
}

.right_content h3 {
    margin: 0 0 10px 0;
    color: #000;
    font-size: 16px;
    padding-left: 15px;
    background: url('../images/h3_bg.gif') no-repeat;
    line-height: 30px;
}

/* Link Table Styles */
.link-table {
    width: 100%;
}

.link-row {
    display: flex;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.link-row:last-child {
    border-bottom: none;
}

.link-title {
    flex: 1;
    font-size: 12px;
    color: #333;
    padding-right: 10px;
}

.link-action {
    width: 20px;
    text-align: center;
}

.link-action a {
    color: #0066CC;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}

.link-action a:hover {
    color: #FF6600;
    text-decoration: underline;
}

/* School Info */
.school-info {
    padding: 10px 0;
}

.school-info p {
    margin: 8px 0;
    padding: 5px;
    background: white;
    border-radius: 3px;
    border-left: 3px solid #0066CC;
    font-size: 12px;
    line-height: 1.4;
}

.school-info strong {
    color: #FF6600;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .right-content {
        width: 100%;
    }
    
    .news-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .news-date, .news-title, .news-action {
        width: 100%;
    }
    
    .news-date {
        text-align: left;
        background: #f8f9fa;
        padding: 3px 8px;
        border-radius: 3px;
        font-size: 11px;
    }
    
    .news-action {
        text-align: right;
    }
    
    .department-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .department-name {
        width: 100%;
        text-align: left;
        margin-right: 0;
    }
    
    .department-news {
        width: 100%;
    }
    
    .link-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .link-title {
        width: 100%;
        padding-right: 0;
    }
    
    .link-action {
        width: 100%;
        text-align: left;
    }
}

@media (max-width: 576px) {
    .homepage-layout {
        padding: 0 5px;
    }
    
    .block1, .block2 {
        margin-bottom: 20px;
    }
    
    .news-table, .department-table {
        padding: 0 10px;
    }
    
    .right_content {
        padding: 8px;
    }
    
    .school-info p {
        font-size: 11px;
        margin: 6px 0;
    }
}

/* Links with accessibility enhancements */
a:link { 
    text-decoration: none; 
    color: #0066CC; 
    /* Accessibility: Ensure sufficient contrast */
    transition: color 0.2s ease;
}
a:hover { 
    text-decoration: underline; 
    color: #FF6600; 
    /* Accessibility: Maintain focus visibility */
    outline: 2px solid #FF6600;
    outline-offset: 2px;
}
a:visited { 
    text-decoration: none; 
    color: #0066CC; 
}
a:focus {
    /* Accessibility: Clear focus indicator */
    outline: 2px solid #FF6600;
    outline-offset: 2px;
    text-decoration: underline;
}

h3 { 
    margin: 0; 
    color: #000; 
    font-size: 16px; 
    padding-left: 15px; 
    background: url('../images/h3_bg.gif') no-repeat;
}

caption { font-weight: bold; }

/* Layout Structure - Following Original */
.main2, .banner, .footer, .line { width: 920px; }
.top, .main2, .banner, .footer, .line { margin-left: auto; margin-right: auto; }
.main { 
    background: url('../images/main_bg.jpg') center repeat-y; 
    margin-top: -165px;
}
.main2 { 
    background: url('../images/banner_bg2.jpg') no-repeat #FFFFFF;
}
.main3 { 
    background: url('../images/main3.png') bottom no-repeat;
}

/* CSS Variables for Dynamic Color Control */
:root {
    /* Utility Bar Colors - 活潑現代配色 */
    --utility-bg-start: #667eea;
    --utility-bg-mid: #764ba2;
    --utility-bg-end: #f093fb;
    --utility-text: #ffffff; /* 改為完全不透明，確保清晰 */
    --utility-text-shadow: rgba(0, 0, 0, 0.5); /* 文字陰影增強對比 */
    --utility-hover-bg: rgba(255, 255, 255, 0.2);
    --utility-border: rgba(255, 255, 255, 0.3);
    
    /* Navigation Bar Colors */
    --nav-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* 改為漸變背景以配合白色文字 */
    --nav-border: rgba(255, 255, 255, 0.3);
    --nav-text: #ffffff; /* 改為白色文字 */
    --nav-text-shadow: rgba(0, 0, 0, 0.3); /* 添加陰影確保清晰 */
    --nav-hover-bg: rgba(255, 255, 255, 0.15);
    --nav-hover-text: #ffffff;
    --nav-hover-text-shadow: rgba(0, 0, 0, 0.4);
    --nav-active-bg: rgba(255, 255, 255, 0.25);
    --nav-active-text: #ffffff;
    --nav-active-text-shadow: rgba(0, 0, 0, 0.5);
    
    /* Brand Colors */
    --brand-main-color: #667eea;
    --brand-main-text-shadow: rgba(0, 0, 0, 0.3); /* 品牌文字陰影 */
    --brand-en-color: #4a4a4a; /* 更深的灰色，提高對比度 */
    --brand-en-text-shadow: none;
    --brand-hover-color: #5568d3;
    
    /* Banner Colors */
    --banner-bg-start: #667eea;
    --banner-bg-end: #764ba2;
    
    /* Admin Link Color */
    --admin-bg: rgba(255, 107, 107, 0.2);
    --admin-hover-bg: rgba(255, 107, 107, 0.4);
    --admin-text: #ffffff;
    --admin-text-shadow: rgba(0, 0, 0, 0.4);
}

/* Unified Card Container for Top Navigation, Brand, and Banner - 統一設計 */
.top-card-container {
    position: relative;
    width: 100%;
    margin: 0 auto 20px auto;
    background: linear-gradient(180deg, 
        var(--utility-bg-start) 0%, 
        var(--utility-bg-mid) 15%, 
        var(--utility-bg-end) 30%,
        var(--banner-bg-start) 45%,
        var(--banner-bg-end) 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(102, 126, 234, 0.2);
    overflow: hidden;
    z-index: 1000 !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 右側漸層設計 - 仿導覽列漸層 */
.top-card-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%; /* 右側40%寬度，漸層覆蓋範圍 */
    height: 100%;
    background: linear-gradient(135deg, 
        transparent 0%, 
        var(--banner-bg-start) 30%, 
        var(--banner-bg-end) 100%);
    opacity: 0.6; /* 半透明，與背景融合 */
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: multiply; /* 使用乘法混合模式，與背景和諧融合 */
}

/* Top Utility Bar (參考教育部網站設計) - 與整體統一 */
.top-utility-bar {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, var(--utility-bg-start) 0%, var(--utility-bg-mid) 50%, var(--utility-bg-end) 100%);
    border-bottom: none; /* 取消邊界線 */
    z-index: 1003 !important;
    display: block !important;
    visibility: visible !important;
    box-shadow: none; /* 移除陰影，由父容器統一管理 */
    transition: all 0.3s ease;
}

.utility-container {
    max-width: 1024px; /* Desktop default: 1024px */
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Responsive: Larger screens (above 1400px) */
@media (min-width: 1400px) {
    .utility-container {
        max-width: 1400px;
    }
}

.utility-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    padding: 0;
}

.utility-links {
    display: flex;
    align-items: center;
    gap: 0;
}

.utility-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: #ffffff; /* 統一使用白色文字 */
    text-decoration: none;
    font-size: 14px;
    font-weight: 600; /* 增加字重，提高可讀性 */
    transition: all 0.3s ease;
    border-right: 1px solid var(--utility-border);
    white-space: nowrap;
    text-shadow: 0 1px 3px var(--utility-text-shadow), 0 2px 6px var(--utility-text-shadow); /* 多層陰影增強對比 */
    letter-spacing: 0.3px; /* 增加字距，提高可讀性 */
}

.utility-link:first-child {
    border-left: none;
}

.utility-link:last-child {
    border-right: none;
}

.utility-link:hover,
.utility-link:focus {
    background: var(--utility-hover-bg);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    text-shadow: 0 2px 4px var(--utility-text-shadow), 0 3px 8px var(--utility-text-shadow); /* 增強 hover 時的陰影 */
    font-weight: 700; /* hover 時更粗 */
}

.utility-link.active {
    background: var(--utility-hover-bg);
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 2px 4px var(--utility-text-shadow), 0 3px 8px var(--utility-text-shadow);
}

.utility-icon {
    font-size: 14px;
    opacity: 1; /* 改為完全不透明，確保圖示清晰 */
    filter: drop-shadow(0 1px 2px var(--utility-text-shadow)); /* 添加陰影增強對比 */
}

/* Bootstrap Icons 於頂部工具列（與 emoji 並列時略放大對齊視覺） */
.utility-icon--bi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.utility-icon--bi .bi {
    font-size: 1.1em;
    line-height: 1;
}

/* 學校 Email：亮系圖示（暖白＋淡金光暈，於紫系工具列上更醒目） */
.utility-icon--bi-light .bi {
    font-size: 1.15em;
    color: #fffbeb;
    filter: drop-shadow(0 0 5px rgba(254, 240, 138, 0.9)) drop-shadow(0 1px 2px var(--utility-text-shadow));
}

.utility-text {
    font-weight: 600; /* 與連結字重一致 */
    color: #ffffff; /* 確保文字為白色 */
}

.utility-right {
    display: flex;
    align-items: center;
    gap: 0;
}

.utility-link.admin {
    background: var(--admin-bg);
    border-left: 1px solid var(--utility-border);
    color: #ffffff; /* 統一使用白色文字，與其他連結一致 */
    text-shadow: 0 1px 3px var(--utility-text-shadow), 0 2px 6px var(--utility-text-shadow); /* 使用相同的陰影效果 */
}

.utility-link.admin:hover,
.utility-link.admin:focus {
    background: var(--admin-hover-bg);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    text-shadow: 0 2px 4px var(--utility-text-shadow), 0 3px 8px var(--utility-text-shadow); /* 使用相同的陰影效果 */
    font-weight: 700;
}

/* Main Navigation Bar (活潑現代配色) - 與整體統一 */
.top-nav-bar {
    position: relative;
    width: 100%;
    z-index: 1002 !important;
    background: linear-gradient(135deg, var(--banner-bg-start) 0%, var(--banner-bg-end) 100%); /* 使用漸變背景 */
    border-bottom: none; /* 取消邊界線 */
    display: block !important;
    visibility: visible !important;
    box-shadow: none; /* 移除陰影，由父容器統一管理 */
    border-radius: 0; /* 移除圓角，由父容器統一管理 */
    margin-bottom: 0; /* 移除間距，由父容器統一管理 */
    transition: all 0.3s ease;
}

/* Banner Section (Separated from Navigation) - 與整體統一 */
.top-navigation {
    position: relative;
    width: 100%;
    height: 200px; /* 回復原本的 200px 高度 */
    overflow: hidden; /* 確保圓角效果 */
    z-index: 1000 !important;
    background: linear-gradient(135deg, var(--banner-bg-start) 0%, var(--banner-bg-end) 100%); /* 與導覽列使用相同漸變 */
    display: block !important;
    visibility: visible !important;
    margin-top: 0; /* 與導覽列分離 */
    margin-bottom: 0; /* 移除間距，由父容器統一管理 */
    border-radius: 0; /* 移除圓角，由父容器統一管理 */
    box-shadow: none; /* 移除陰影，由父容器統一管理 */
    transition: all 0.3s ease;
}

.top-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px; /* Banner 高度 200px，與 .top-navigation 一致 */
    border-radius: 0; /* 移除圓角，由父容器統一管理 */
    overflow: hidden; /* 確保圓角效果 */
    z-index: 1;
    pointer-events: none;
}

/* Banner 預設背景 - 與導覽列使用相同的主題設計，但保持層次感 */
.banner-slide.active {
    background: linear-gradient(135deg, var(--banner-bg-start) 0%, var(--banner-bg-end) 100%) !important;
    opacity: 0.95; /* 稍微透明，與父容器背景融合 */
    mix-blend-mode: normal; /* 保持正常混合模式 */
}

/* Banner 背景圖片時，添加遮罩層以保持統一感 */
.banner-slide[style*="background-image"] {
    position: relative;
}

.banner-slide[style*="background-image"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        var(--banner-bg-start) 0%, 
        var(--banner-bg-end) 100%);
    opacity: 0.4; /* 半透明遮罩，保持圖片可見性同時統一配色 */
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: overlay; /* 使用覆蓋混合模式，讓圖片與配色和諧融合 */
}

/* Banner Navigation Links (Now inside modern-nav) */
.banner-nav-links {
    position: relative;
    flex: 0 0 auto; /* 不伸縮，保持內容寬度 */
    z-index: 1003;
    pointer-events: auto;
    display: flex;
    align-items: center;
    margin-left: auto; /* 推到右側 */
    margin-right: 20px; /* 與右側動態連結保持間距 */
}

.banner-nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap; /* 不換行，保持在同一行 */
    justify-content: flex-start;
    background: transparent; /* 移除背景，因為已經在 modern-nav 中 */
    border-radius: 0;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.banner-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px; /* 減少 padding，適應同一行 */
    color: #2c3e50; /* 深色文字 */
    text-decoration: none;
    border-radius: 16px;
    font-weight: 600;
    font-size: 13px; /* 稍微減小字體 */
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2); /* 半透明背景，與 modern-nav 融合 */
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    outline: none;
    min-height: 36px; /* 稍微減小高度 */
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.banner-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.banner-nav-link:hover::before,
.banner-nav-link:focus::before {
    left: 100%;
}

.banner-nav-link:hover,
.banner-nav-link:focus {
    background: rgba(102, 126, 234, 0.15); /* 藍色背景 */
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 0 15px rgba(102, 126, 234, 0.2);
    color: #667eea; /* 藍色文字 */
}

.banner-nav-link:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.banner-nav-link.active {
    background: rgba(102, 126, 234, 0.2); /* 藍色背景 */
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 
        0 4px 16px rgba(102, 126, 234, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 0 20px rgba(102, 126, 234, 0.3);
    color: #667eea; /* 藍色文字 */
}

.banner-nav-link.social:hover,
.banner-nav-link.social:focus {
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
    border-color: rgba(24, 119, 242, 0.6);
    color: #ffffff; /* Facebook 藍色時使用白色文字 */
}

.banner-nav-link.admin:hover,
.banner-nav-link.admin:focus {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    border-color: rgba(255, 107, 107, 0.6);
    color: #ffffff; /* 紅色時使用白色文字 */
}

.banner-nav-icon {
    font-size: 16px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    position: relative;
    filter: none; /* 移除陰影濾鏡，因為現在是深色文字在淺色背景上 */
}

.banner-nav-link:hover .banner-nav-icon,
.banner-nav-link:focus .banner-nav-icon {
    transform: scale(1.2) rotate(5deg);
    filter: none; /* 移除陰影濾鏡 */
}

.banner-nav-text {
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 1;
    position: relative;
    text-shadow: none; /* 移除文字陰影，因為現在是深色文字在淺色背景上 */
    transition: all 0.3s ease;
}

.banner-nav-link:hover .banner-nav-text,
.banner-nav-link:focus .banner-nav-text {
    text-shadow: none; /* 移除文字陰影 */
}

.top-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.nav-container {
    position: relative;
    z-index: 1001 !important;
    max-width: 1024px; /* Desktop default: 1024px */
    width: 100%;
    margin: 0 auto;
    padding: 0 30px;
    height: 80px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
}

/* Responsive: Larger screens (above 1400px) */
@media (min-width: 1400px) {
    .nav-container {
        max-width: 1400px;
    }
}

/* 調整 .nav-container 的寬度，使其佔整個螢幕100%，左右側設計一致，以左側為主 */
@media (min-width: 992px) {
    .nav-container {
        width: 100%; /* 佔整個螢幕100% */
        max-width: 100%; /* 最大寬度為100% */
        margin-left: 0; /* 左側無間距，貼齊邊緣 */
        margin-right: 0; /* 右側無間距，貼齊邊緣 */
        padding: 0 30px; /* 保持內距 */
    }
}

@media (min-width: 1400px) {
    .nav-container {
        width: 100%; /* 佔整個螢幕100% */
        max-width: 100%; /* 最大寬度為100% */
        margin-left: 0; /* 左側無間距，貼齊邊緣 */
        margin-right: 0; /* 右側無間距，貼齊邊緣 */
        padding: 0 30px; /* 保持內距 */
    }
}
    visibility: visible !important;
}

.nav-container > * {
    pointer-events: auto; /* Re-enable clicks on nav elements */
}

/* Main Navigation Design (參考教育部網站設計) */
.main-nav {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    height: 80px;
    background: linear-gradient(135deg, var(--banner-bg-start) 0%, var(--banner-bg-end) 100%); /* 使用漸變背景 */
    position: relative;
    z-index: 1002 !important;
    visibility: visible !important;
    opacity: 1 !important;
    gap: 20px; /* 元素之間的間距 */
    border-radius: 0 0 20px 20px; /* 卡片式圓角（底部） */
}

.modern-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.6s ease;
}

.modern-nav:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.35) 0%, 
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0.3) 100%);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 16px 64px rgba(0, 0, 0, 0.3),
        0 6px 24px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.modern-nav:hover::before {
    left: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    z-index: 1;
    margin-right: 30px; /* 與特色標語保持間距 */
    padding: 12px 24px; /* 增加內距，卡片式設計 */
    background: transparent; /* 透明背景，繼承父元素 .main-nav 的背景 */
    border-radius: 16px; /* 卡片式圓角 */
    border: 1px solid rgba(255, 255, 255, 0.2); /* 與導覽列主題一致的邊框 */
    backdrop-filter: none; /* 移除毛玻璃效果，與導覽列一致 */
    -webkit-backdrop-filter: none;
    box-shadow: none; /* 移除陰影 */
    transition: all 0.3s ease;
    position: relative;
}

/* 移除 ::before 偽元素，因為不再需要延伸背景，直接使用父元素背景 */
.nav-brand::before {
    display: none; /* 移除背景延伸效果 */
}

.nav-brand:hover {
    background: transparent; /* hover 時保持透明，繼承父元素背景 */
    border-color: rgba(255, 255, 255, 0.4); /* hover 時邊框稍微增強 */
    box-shadow: none; /* 移除陰影 */
    transform: translateY(-2px); /* 輕微上移效果 */
}

.nav-brand:hover::before {
    display: none; /* 移除 hover 時的背景延伸效果 */
}

/* School Features - 學校特色標語 */
.school-features {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    justify-content: center;
    z-index: 1;
    margin: 0 20px;
    padding: 8px 0; /* 添加垂直內距，與品牌文字對齊 */
    position: relative;
    background: transparent; /* 透明背景，繼承父元素 .main-nav 的背景 */
}

/* 移除 ::before 偽元素，因為不再需要延伸背景，直接使用父元素背景 */
.school-features::before {
    display: none; /* 移除背景延伸效果 */
}

.school-features:hover::before {
    display: none; /* 移除 hover 時的背景延伸效果 */
}

.features-list {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.feature-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: transparent; /* 移除背景，讓配色延伸 */
    border: 1px solid rgba(255, 255, 255, 0.2); /* 減弱邊框 */
    border-radius: 20px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: all 0.3s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px); /* 減弱模糊效果 */
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.1); /* 簡化背景，讓延伸效果更明顯 */
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* 移除 feature-slogan 樣式，因為已經刪除了該元素 */

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    outline: none;
    transition: all 0.3s ease;
}

.brand-link:focus-visible {
    outline: 3px solid var(--brand-main-color);
    outline-offset: 4px;
    border-radius: 8px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1.2;
}

.brand-text-main {
    font-size: 24px; /* 中文主標題 */
    font-weight: 800; /* 增加字重 */
    color: #ffffff; /* 改為白色文字，在漸變背景上更清晰 */
    letter-spacing: 1.5px; /* 增加字距 */
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 0, 0, 0.2); /* 多層陰影增強對比 */
}

.brand-text-en {
    font-size: 12px; /* 英文副標題 */
    font-weight: 600; /* 增加字重 */
    color: rgba(255, 255, 255, 0.9); /* 改為半透明白色，在漸變背景上更清晰 */
    letter-spacing: 1px; /* 增加字距 */
    transition: all 0.3s ease;
    white-space: nowrap;
    text-transform: uppercase; /* 英文大寫 */
    position: relative;
    z-index: 1;
    margin-top: 2px; /* 與中文保持間距 */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.2); /* 多層陰影增強對比 */
}

.brand-text-main {
    position: relative;
}

.brand-text-main::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.8); /* 改為白色底線，在漸變背景上更清晰 */
    border-radius: 2px;
    transition: width 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.5);
}

.brand-link:hover .brand-text-main,
.brand-link:focus .brand-text-main {
    color: #ffffff;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.5), 0 5px 15px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 0, 0, 0.3); /* 增強 hover 時的陰影 */
    transform: scale(1.02);
}

.brand-link:hover .brand-text-en,
.brand-link:focus .brand-text-en {
    color: #ffffff; /* 改為完全不透明白色 */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 3px 8px rgba(0, 0, 0, 0.3); /* 增強 hover 時的陰影 */
}

.brand-link:hover .brand-text-main::after,
.brand-link:focus .brand-text-main::after {
    width: 100%;
}

.nav-menu {
    display: flex !important;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 0 0 auto;
    margin-left: auto;
    padding: 8px 0; /* 添加垂直內距，與品牌文字對齊 */
    position: relative;
}

/* 移除 ::before 偽元素，因為不再需要延伸背景，直接使用父元素背景 */
.nav-menu::before {
    display: none; /* 移除背景延伸效果，取消右側凸出來的小矩形 */
}

.nav-menu:hover::before {
    display: none; /* 移除 hover 時的背景延伸效果 */
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: var(--nav-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    outline: none;
    min-height: 44px; /* WCAG 2.1 minimum touch target */
    text-shadow: 0 1px 3px var(--nav-text-shadow), 0 2px 6px var(--nav-text-shadow); /* 多層陰影確保清晰 */
    letter-spacing: 0.3px; /* 增加字距 */
    border-radius: 12px; /* 添加圓角，與品牌文字呼應 */
    margin: 0 4px; /* 添加間距 */
}

/* Focus indicator for accessibility */
.nav-link:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
    background: var(--nav-hover-bg);
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.nav-link:hover::before,
.nav-link:focus::before {
    left: 100%;
}

.nav-link:hover,
.nav-link:focus {
    background: var(--nav-hover-bg);
    color: var(--nav-hover-text);
    border-bottom-color: rgba(255, 255, 255, 0.5);
    z-index: 1;
    transform: translateY(-2px);
    box-shadow: none; /* 移除陰影 */
    text-shadow: 0 2px 4px var(--nav-hover-text-shadow), 0 3px 8px var(--nav-hover-text-shadow); /* 增強 hover 時的陰影 */
    font-weight: 700; /* hover 時更粗 */
}

.nav-link.social:hover,
.nav-link.social:focus {
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.nav-link.admin:hover,
.nav-link.admin:focus {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.nav-link.active {
    background: var(--nav-active-bg);
    color: var(--nav-active-text);
    border-bottom-color: rgba(255, 255, 255, 0.6);
    font-weight: 700;
    box-shadow: none; /* 移除陰影 */
    text-shadow: 0 2px 4px var(--nav-active-text-shadow), 0 3px 8px var(--nav-active-text-shadow); /* 增強 active 時的陰影 */
}

.nav-icon {
    font-size: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    position: relative;
    filter: drop-shadow(0 2px 4px var(--nav-text-shadow)); /* 使用 CSS 變數 */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nav-text); /* 確保使用 CSS 變數 */
}

.nav-link:hover .nav-icon,
.nav-link:focus .nav-icon {
    transform: scale(1.15) rotate(8deg);
    filter: drop-shadow(0 2px 4px var(--nav-hover-text-shadow)) drop-shadow(0 4px 8px var(--nav-hover-text-shadow));
    color: var(--nav-hover-text);
}

.nav-text {
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 1;
    position: relative;
    text-shadow: 0 1px 3px var(--nav-text-shadow), 0 2px 6px var(--nav-text-shadow); /* 使用 CSS 變數 */
    transition: all 0.3s ease;
    color: var(--nav-text); /* 確保使用 CSS 變數 */
}

.nav-link:hover .nav-text,
.nav-link:focus .nav-text {
    color: var(--nav-hover-text);
    text-shadow: 0 2px 4px var(--nav-hover-text-shadow), 0 3px 8px var(--nav-hover-text-shadow);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.15) 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 44px;
    min-height: 44px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-height: 44px;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1001;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
    background: linear-gradient(135deg, var(--brand-hover-color) 0%, var(--banner-bg-end) 100%);
    border-color: var(--nav-border);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    outline: 3px solid var(--brand-main-color);
    outline-offset: 2px;
}

.mobile-menu-toggle:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.mobile-menu-toggle[aria-expanded="true"] {
    background: linear-gradient(135deg, var(--brand-hover-color) 0%, var(--banner-bg-end) 100%);
    border-color: var(--nav-border);
}

.mobile-menu-toggle .menu-icon-open,
.mobile-menu-toggle .menu-icon-close {
    display: block;
    line-height: 1;
    font-weight: bold;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Responsive - Enhanced */
@media (max-width: 991px) {
    .top-card-container {
        border-radius: 16px; /* 平板統一圓角 */
        margin-bottom: 15px;
    }
    
    .top-nav-bar {
        border-radius: 0; /* 移除圓角，由父容器統一管理 */
        margin-bottom: 0; /* 移除間距，由父容器統一管理 */
    }
    
    .top-navigation {
        height: 180px; /* 回復原本大小 */
        border-radius: 0; /* 移除圓角，由父容器統一管理 */
        margin-bottom: 0; /* 移除間距，由父容器統一管理 */
    }
    
    .top-bg-container {
        top: 0;
        height: 180px;
        border-radius: 0; /* 移除圓角，由父容器統一管理 */
    }
    
    .main-nav {
        border-radius: 0; /* 移除圓角，由父容器統一管理 */
    }
    
    .nav-brand {
        padding: 10px 18px; /* 調整內距 */
        border-radius: 14px; /* 平板卡片式圓角 */
    }
    
    .school-features {
        margin: 0 10px;
    }
    
    .features-list {
        gap: 8px;
    }
    
    .feature-item {
        font-size: 12px;
        padding: 5px 12px;
    }
    
    .feature-item.feature-slogan {
        font-size: 13px;
        padding: 6px 14px;
    }
    
    .banner-nav-links {
        margin-right: 0; /* 移除 margin-right */
    }
    
    .banner-nav-link {
        padding: 6px 10px;
        font-size: 12px;
        min-height: 32px;
    }
    
    .banner-nav-text {
        display: none; /* 小螢幕隱藏文字，只顯示圖示 */
    }
    
    .nav-container {
        padding: 0 15px;
        height: auto;
    }
    
    .modern-nav {
        padding: 0 20px;
        height: 66px;
        border-radius: 20px;
        gap: 10px; /* 減少間距 */
    }
    
    .brand-text-main {
        font-size: 18px; /* 減小字體 */
    }
    
    .brand-text-en {
        font-size: 9px; /* 減小英文字體 */
    }
    
    .nav-brand {
        padding: 6px 15px; /* 調整內距 */
        margin-right: 20px;
    }
    
    .nav-brand::before {
        left: -15px; /* 調整延伸距離 */
        right: -15px;
    }
    
    .school-features::before {
        left: -15px; /* 調整延伸距離 */
        right: -15px;
    }
    
    .nav-menu::before {
        display: none; /* 移除背景延伸效果，取消右側凸出來的小矩形 */
    }
    
    .top-navigation {
        height: 250px; /* 平板 banner 高度 */
    }
    
    .top-bg-container {
        height: 250px;
    }
    
    .main-fullscreen {
        min-height: calc(100vh - 370px); /* 工具列(40px) + 導覽列(80px) + banner(250px) = 370px */
    }
    
    .nav-menu {
        gap: 6px;
    }
    
    .nav-link {
        padding: 12px 18px;
        font-size: 14px;
        border-radius: 14px;
    }
    
    .brand-text {
        font-size: 24px;
        letter-spacing: 1.5px;
    }
    
    /* Banner Navigation Links - Tablet */
    .banner-nav-links {
        padding: 10px 15px;
    }
    
    .banner-nav-menu {
        gap: 6px;
    }
    
    .banner-nav-link {
        padding: 8px 14px;
        font-size: 13px;
        min-height: 36px;
    }
    
    .banner-nav-icon {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .top-card-container {
        border-radius: 12px; /* 手機統一圓角 */
        margin-bottom: 12px;
    }
    
    .top-nav-bar {
        border-radius: 0; /* 移除圓角，由父容器統一管理 */
        margin-bottom: 0; /* 移除間距，由父容器統一管理 */
    }
    
    .top-navigation {
        height: 160px; /* 回復原本大小 */
        border-radius: 0; /* 移除圓角，由父容器統一管理 */
        margin-bottom: 0; /* 移除間距，由父容器統一管理 */
    }
    
    .top-bg-container {
        top: 0;
        height: 160px;
        border-radius: 0; /* 移除圓角，由父容器統一管理 */
    }
    
    .main-nav {
        border-radius: 0; /* 移除圓角，由父容器統一管理 */
    }
    
    .nav-brand {
        padding: 8px 16px; /* 調整內距 */
        border-radius: 12px; /* 手機卡片式圓角 */
    }
    
    .school-features {
        display: none; /* 手機隱藏特色標語，節省空間 */
    }
    
    .nav-brand {
        margin-right: 0;
    }
    
    .banner-nav-links {
        margin-right: 0;
    }
    
    .banner-nav-link {
        padding: 5px 8px;
        font-size: 11px;
        min-height: 30px;
    }
    
    .banner-nav-text {
        display: none; /* 隱藏文字 */
    }
    
    .banner-nav-icon {
        font-size: 18px; /* 增大圖示 */
    }
    
    .nav-container {
        padding: 0 10px;
        height: auto;
    }
    
    .modern-nav {
        padding: 0 16px;
        height: 60px;
        gap: 8px;
    }
    
    .brand-text-main {
        font-size: 16px;
    }
    
    .brand-text-en {
        font-size: 8px;
    }
    
    .top-navigation {
        height: 200px; /* 手機 banner 高度 */
    }
    
    .top-bg-container {
        height: 200px;
    }
    
    .main-fullscreen {
        min-height: calc(100vh - 320px); /* 工具列(40px) + 導覽列(80px) + banner(200px) = 320px */
    }
    
    .modern-nav {
        flex-direction: row;
        height: 60px;
        padding: 0 16px;
        justify-content: space-between;
        position: relative;
        border-radius: 18px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Banner Navigation Links - Mobile */
    .banner-nav-links {
        padding: 8px 10px;
        flex-wrap: wrap;
    }
    
    .banner-nav-menu {
        gap: 4px;
        width: 100%;
        justify-content: center;
    }
    
    .banner-nav-link {
        padding: 6px 12px;
        font-size: 12px;
        min-height: 32px;
        border-radius: 16px;
        flex: 0 1 auto;
    }
    
    .banner-nav-text {
        display: none; /* Hide text on small screens, show only icons */
    }
    
    .banner-nav-icon {
        font-size: 16px;
        margin: 0;
    }
    
    .banner-nav-link {
        padding: 8px 12px;
        min-width: 40px;
        justify-content: center;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: linear-gradient(135deg, 
            rgba(20, 20, 30, 0.98) 0%, 
            rgba(15, 15, 25, 0.98) 100%);
        backdrop-filter: blur(30px) saturate(180%);
        -webkit-backdrop-filter: blur(30px) saturate(180%);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 80px 20px 20px;
        gap: 10px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        box-shadow: -4px 0 30px rgba(0, 0, 0, 0.5);
        border-left: 1px solid rgba(255, 255, 255, 0.15);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        width: 100%;
        padding: 18px 24px;
        font-size: 16px;
        border-radius: 14px;
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.12) 0%, 
            rgba(255, 255, 255, 0.08) 100%);
        border: 1.5px solid rgba(255, 255, 255, 0.2);
        margin-bottom: 10px;
        justify-content: flex-start;
        min-height: 56px;
        box-shadow: 
            0 2px 8px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    
    .nav-link:hover,
    .nav-link:focus {
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.2) 0%, 
            rgba(255, 255, 255, 0.15) 100%);
        border-color: rgba(255, 255, 255, 0.3);
        transform: translateX(6px);
        box-shadow: 
            0 4px 12px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    
    .nav-text {
        display: block;
        font-size: 16px;
    }
    
    .nav-icon {
        font-size: 22px;
        min-width: 24px;
    }
    
    .brand-text {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .top-card-container {
        border-radius: 10px; /* 小螢幕統一圓角 */
        margin-bottom: 10px;
    }
    
    .top-nav-bar {
        border-radius: 0; /* 移除圓角，由父容器統一管理 */
        margin-bottom: 0; /* 移除間距，由父容器統一管理 */
    }
    
    .top-navigation {
        height: 150px; /* 回復原本大小 */
        border-radius: 0; /* 移除圓角，由父容器統一管理 */
        margin-bottom: 0; /* 移除間距，由父容器統一管理 */
    }
    
    .top-bg-container {
        top: 0;
        height: 150px;
        border-radius: 0; /* 移除圓角，由父容器統一管理 */
    }
    
    .main-nav {
        border-radius: 0; /* 移除圓角，由父容器統一管理 */
    }
    
    .nav-brand {
        padding: 6px 12px; /* 調整內距 */
        border-radius: 10px; /* 小螢幕卡片式圓角 */
    }
    
    .school-features {
        display: none; /* 小螢幕隱藏特色標語 */
    }
    
    .nav-brand {
        margin-right: 0;
    }
    
    .banner-nav-links {
        margin-right: 0;
    }
    
    .banner-nav-link {
        padding: 4px 6px;
        font-size: 10px;
        min-height: 28px;
    }
    
    .banner-nav-text {
        display: none; /* 隱藏文字 */
    }
    
    .banner-nav-icon {
        font-size: 16px;
    }
    
    .nav-container {
        padding: 0 10px;
        height: auto;
    }
    
    .modern-nav {
        padding: 0 14px;
        height: 58px;
        gap: 6px;
    }
    
    .brand-text-main {
        font-size: 14px;
    }
    
    .brand-text-en {
        font-size: 7px;
        display: none; /* 小螢幕隱藏英文 */
    }
    
    .top-navigation {
        height: 180px; /* 小螢幕 banner 高度 */
    }
    
    .top-bg-container {
        height: 180px;
    }
    
    .main-fullscreen {
        min-height: calc(100vh - 300px); /* 工具列(40px) + 導覽列(80px) + banner(180px) = 300px */
    }
    
    .modern-nav {
        height: 58px;
        padding: 0 14px;
        border-radius: 16px;
    }
    
    .brand-text {
        font-size: 20px;
        letter-spacing: 1px;
    }
    
    .mobile-menu-toggle {
        padding: 10px 14px;
        font-size: 22px;
    }
    
    .nav-menu {
        width: 90%;
        max-width: 280px;
    }
    
    /* Banner Navigation Links - Small Mobile */
    .banner-nav-links {
        padding: 6px 8px;
    }
    
    .banner-nav-menu {
        gap: 3px;
    }
    
    .banner-nav-link {
        padding: 6px 10px;
        font-size: 11px;
        min-height: 30px;
        border-radius: 14px;
        min-width: 36px;
    }
    
    .banner-nav-icon {
        font-size: 14px;
    }
}

/* Reduced motion support for accessibility */
@media (prefers-reduced-motion: reduce) {
    .nav-link,
    .nav-icon,
    .modern-nav,
    .brand-text,
    .banner-nav-link,
    .banner-nav-icon {
        transition: none;
        animation: none;
    }
    
    .nav-link:hover,
    .nav-link:focus,
    .banner-nav-link:hover,
    .banner-nav-link:focus {
        transform: none;
    }
    
    .nav-link:hover .nav-icon,
    .nav-link:focus .nav-icon,
    .banner-nav-link:hover .banner-nav-icon,
    .banner-nav-link:focus .banner-nav-icon {
        transform: none;
    }
    
    .modern-nav::before,
    .banner-nav-link::before {
        display: none;
    }
}

/* Top Navigation Editor Styles */
.nav-editor {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.top-navigation:hover .nav-editor {
    opacity: 1;
}

.editor-btn {
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 5px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.editor-btn:hover {
    background: rgba(0,0,0,0.9);
}

.editor-btn.image {
    background: rgba(255,102,0,0.8);
}

.editor-btn.image:hover {
    background: rgba(255,102,0,1);
}

/* Modal Styles for Top Navigation Editor */
.editor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.nav-links-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-link-item {
    display: flex;
    gap: 10px;
}

.nav-link-item input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.preview-container {
    text-align: center;
    margin-top: 15px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
    text-align: right;
}

.save-btn, .cancel-btn {
    padding: 8px 16px;
    margin-left: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.save-btn {
    background: #28a745;
    color: white;
}

.cancel-btn {
    background: #6c757d;
    color: white;
}

/* Content Areas */
.text { width: 98%; padding: 10px; }
.content { padding: 10px; }
.bottom { 
    background: url('../images/bottom_bg.jpg') top center no-repeat #D2FFD2; 
    height: 100px;
}

/* Homepage Blocks - Original Design */
.left { margin-top: 10px; }
.right { 
    border: 1px solid #cccccc; 
    margin-bottom: 10px; 
    background: #FFFFFF;
}
.right_content { 
    width: 240px; 
    margin: 0 auto; 
    height: 210px;
}

/* News Blocks */
.block1 {
    width: 400px;
    background: url('../images/block_bg1.png') no-repeat #FFFFFF; 
    line-height: 1.5; 
    border: 1px solid #cccccc; 
    margin-bottom: 40px; 
    padding-top: 35px;
}

.block2 {
    width: 400px;
    background: url('../images/block_bg2.png') no-repeat #FFFFFF; 
    line-height: 1.5; 
    border: 1px solid #cccccc; 
    text-align: center; 
    padding-top: 35px;
}

.block3 {
    width: 390px; 
    text-align: right; 
    line-height: 24px;
}

/* Tables */
.brief caption { border-bottom: 1px dashed #CCCCCC; }
.brief th { color: #FFFFFF; text-align: right; }
.brief th a { color: #FFFFFF; font-weight: normal; }
.brief th a:hover { color: #FFFFCC; }
.brief td { line-height: 24px; }

.news td { text-align: center; border-bottom: 1px dashed #666666; }
.news th { background: url('../images/th_bg.gif.jpg') repeat-x #000000; color: #FFF; }

.link td { border-bottom: 1px dashed #CCCCCC; }
.link th { background: #E6E6CC; color: #000; }

/* Footer */
.footer { 
    color: #000000; 
    font-weight: bold; 
    padding-top: 35px; 
    overflow: hidden;
}

/* Accessibility Links */
.a2 { 
    color: #FFFFFF; 
    font-size: 10px; 
    text-decoration: none; 
    line-height: 0.3;
}

/* Original LGM Menu Styles */
.glossymenu {
    margin: 5px 0 160px 0;
    padding: 0;
    width: 200px;
    border: 1px solid #9A9A9A;
    border-bottom-width: 0;
}

.glossymenu a {
    background: #E8F3FF url('../images/arrow.gif') no-repeat right center;
    color: #000;
    display: block;
    font-weight: bold;
    padding: 5px 0 5px 10px;
    text-decoration: none;
    border-bottom: 1px solid #9A9A9A;
    font-size: 13px;
}

.glossymenu a:hover {
    background: #D2FFD2 url('../images/arrow.gif') no-repeat right center;
    color: #000;
}

.glossymenu a.selected {
    background: #D2FFD2 url('../images/arrow.gif') no-repeat right center;
    color: #000;
}

/* Menu Section Headers */
.menu h3 {
    margin: 0 0 10px 0;
    color: #000;
    font-size: 16px;
    padding-left: 15px;
    background: url('../images/h3_bg.gif') no-repeat;
    font-weight: bold;
}

.menu ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.menu li {
    margin-bottom: 2px;
}

.menu a {
    color: #000;
    display: block;
    font-weight: bold;
    padding: 5px 0 5px 10px;
    text-decoration: none;
    border: 1px solid #9A9A9A;
    border-bottom-width: 0;
    font-size: 13px;
}

/* Enhanced LGM Menu Design */
.menu-section {
    margin-bottom: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.menu-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: rgba(255,255,255,0.3);
}

.menu-section h3 {
    margin: 0 0 12px 0;
    color: #000;
    font-size: 16px;
    font-weight: 700;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0.1));
    border-radius: 8px;
    border-left: 4px solid #FF6600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.menu-section h3::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.menu-section:hover h3::before {
    left: 100%;
}

.menu-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-section li {
    margin-bottom: 3px;
    position: relative;
}

.menu-section a {
    display: block;
    padding: 10px 15px;
    color: #000;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
}

.menu-section a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.menu-section a:hover::before {
    left: 100%;
}

.menu-section a:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: rgba(0,0,0,0.2);
}

/* 學校簡介 Section - Enhanced Light Blue */
.menu-section:first-of-type {
    background: linear-gradient(135deg, rgba(232,243,255,0.8), rgba(232,243,255,0.4));
    border-left: 4px solid #4A90E2;
}

.menu-section:first-of-type a {
    background: linear-gradient(135deg, #E8F3FF, #D6E8FF);
    border-left: 3px solid #4A90E2;
}

.menu-section:first-of-type a:hover {
    background: linear-gradient(135deg, #D6E8FF, #C2DDFF);
    border-left-color: #2E5BBA;
}

/* 行政單位 Section - Enhanced Light Green */
.menu-section:nth-of-type(2) {
    background: linear-gradient(135deg, rgba(210,255,210,0.8), rgba(210,255,210,0.4));
    border-left: 4px solid #4CAF50;
}

.menu-section:nth-of-type(2) a {
    background: linear-gradient(135deg, #D2FFD2, #B8F5B8);
    border-left: 3px solid #4CAF50;
}

.menu-section:nth-of-type(2) a:hover {
    background: linear-gradient(135deg, #B8F5B8, #9EE59E);
    border-left-color: #388E3C;
}

/* 學校課程 Section - Enhanced Light Yellow */
.menu-section:nth-of-type(3) {
    background: linear-gradient(135deg, rgba(255,248,220,0.8), rgba(255,248,220,0.4));
    border-left: 4px solid #FF9800;
}

.menu-section:nth-of-type(3) a {
    background: linear-gradient(135deg, #FFF8DC, #FFF2B3);
    border-left: 3px solid #FF9800;
}

.menu-section:nth-of-type(3) a:hover {
    background: linear-gradient(135deg, #FFF2B3, #FFEC8A);
    border-left-color: #F57C00;
}

/* 學習資源 Section - Enhanced Light Blue */
.menu-section:nth-of-type(4) {
    background: linear-gradient(135deg, rgba(240,248,255,0.8), rgba(240,248,255,0.4));
    border-left: 4px solid #2196F3;
}

.menu-section:nth-of-type(4) a {
    background: linear-gradient(135deg, #F0F8FF, #E3F2FD);
    border-left: 3px solid #2196F3;
}

.menu-section:nth-of-type(4) a:hover {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    border-left-color: #1976D2;
}

/* Additional Modern Design Elements */
.menu-section {
    position: relative;
}

.menu-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
    pointer-events: none;
}

.menu-section:hover::after {
    transform: translateX(100%);
}

/* Enhanced Link Icons */
.menu-section a[href*="school"]::before {
    content: '🏫 ';
    margin-right: 5px;
}

.menu-section a[href*="lgm"]::before {
    content: '🏢 ';
    margin-right: 5px;
}

.menu-section a[href*="course"]::before {
    content: '📚 ';
    margin-right: 5px;
}

.menu-section a[href*="water"]::before {
    content: '💧 ';
    margin-right: 5px;
}

.menu-section a[href*="link"]::before {
    content: '🔗 ';
    margin-right: 5px;
}

.menu-section a[href*="12basic"]::before {
    content: '🎓 ';
    margin-right: 5px;
}

.menu-section a[href*="honor"]::before {
    content: '🏆 ';
    margin-right: 5px;
}

.menu-section a[href*="news"]::before {
    content: '📰 ';
    margin-right: 5px;
}

.menu-section a[href*="schedule"]::before {
    content: '📅 ';
    margin-right: 5px;
}

.menu-section a[href*="paper"]::before {
    content: '📄 ';
    margin-right: 5px;
}

.menu-section a[href*="tel"]::before {
    content: '📞 ';
    margin-right: 5px;
}

.menu-section a[href*="contact"]::before {
    content: '📧 ';
    margin-right: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-section {
        margin-bottom: 15px;
        padding: 10px;
    }
    
    .menu-section h3 {
        font-size: 14px;
        padding: 6px 10px;
    }
    
    .menu-section a {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .menu-section a:hover {
        transform: translateX(4px);
    }
}

/* Loading Animation */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.menu-section {
    animation: slideInLeft 0.6s ease-out;
}

.menu-section:nth-of-type(1) { animation-delay: 0.1s; }
.menu-section:nth-of-type(2) { animation-delay: 0.2s; }
.menu-section:nth-of-type(3) { animation-delay: 0.3s; }
.menu-section:nth-of-type(4) { animation-delay: 0.4s; }

.menu a:last-child {
    border-bottom: 1px solid #9A9A9A;
}

/* Submenu */
.submenu {
    background: #F0F8FF;
    border-bottom: 1px solid #9A9A9A;
    display: none;
}

.submenu a {
    background: #F0F8FF;
    color: #000;
    display: block;
    font-weight: normal;
    padding: 5px 0 5px 20px;
    text-decoration: none;
    border-bottom: 1px solid #9A9A9A;
}

.submenu a:hover {
    background: #E8F3FF;
    color: #000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main2, .banner, .footer, .line { width: 100%; }
    .top { width: 100%; }
    .block1, .block2 { width: 100%; }
    .glossymenu { width: 100%; }
}

/* Modern Enhancements */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Skip Links for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
    font-weight: bold;
}

.skip-link:focus {
    top: 6px;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Focus Management */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid #FF6600;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    body { background: #fff; color: #000; }
    .nav a { color: #000; }
    .brief th { color: #000; }
    .glossymenu a { 
        background: #fff; 
        color: #000; 
        border: 2px solid #000;
    }
    .glossymenu a:hover {
        background: #000;
        color: #fff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast class for JavaScript detection */
.high-contrast {
    filter: contrast(150%);
}

.high-contrast .glossymenu a {
    background: #fff !important;
    color: #000 !important;
    border: 2px solid #000 !important;
}

.high-contrast .glossymenu a:hover {
    background: #000 !important;
    color: #fff !important;
}

/* Reduced motion class */
.reduced-motion * {
    animation: none !important;
    transition: none !important;
}

/* Link table styles - matching original design */
.link {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.link th {
    background-color: #f0f0f0;
    color: #333;
    padding: 8px;
    text-align: left;
    font-weight: bold;
    border: 1px solid #ccc;
}

.link td {
    padding: 8px;
    border: 1px solid #ccc;
    text-align: center;
}

.link a {
    color: #0066CC;
    text-decoration: none;
    font-weight: bold;
}

.link a:hover {
    color: #FF6600;
    text-decoration: underline;
}

/* Menu image styles */
.glossymenu img {
    vertical-align: middle;
    margin-right: 5px;
    max-width: 20px;
    max-height: 20px;
}

/* Accessibility improvements for menu images */
.glossymenu img[alt] {
    border: 0;
}

/* Skip link for menu */
.a2 {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.a2:focus {
    position: static;
    left: auto;
    width: auto;
    height: auto;
    background: #000;
    color: #fff;
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 3px;
}

/* Responsive Content Blocks System */
.content-blocks-container {
    margin: 20px 0;
}

.content-block {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.content-block:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.block-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.block-header h3,
.block-header h4,
.block-header h5 {
    margin: 0;
    color: #333;
    font-size: 1.2em;
}

.block-header h4 {
    font-size: 1.1em;
}

.block-header h5 {
    font-size: 1em;
}

.block-actions {
    display: flex;
    gap: 5px;
}

.block-content {
    padding: 20px;
}

/* News Block Styles */
.news-list {
    margin-bottom: 15px;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    color: #666;
    font-size: 0.9em;
    min-width: 80px;
    margin-right: 15px;
}

.news-title a {
    color: #0066CC;
    text-decoration: none;
    font-weight: 500;
}

.news-title a:hover {
    color: #FF6600;
    text-decoration: underline;
}

.news-more {
    text-align: center;
    margin-top: 15px;
}

/* Quick Links Styles */
.quick-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-link {
    display: block;
    padding: 8px 12px;
    background: #f8f9fa;
    color: #0066CC;
    text-decoration: none;
    border-radius: 4px;
    border-left: 3px solid #0066CC;
    transition: all 0.3s ease;
}

.quick-link:hover {
    background: #e9ecef;
    color: #FF6600;
    border-left-color: #FF6600;
    text-decoration: none;
    transform: translateX(5px);
}

/* Sidebar Block Styles */
.sidebar-block {
    margin-bottom: 15px;
}

.sidebar-block .block-header {
    padding: 10px 15px;
    background: #e9ecef;
}

.sidebar-block .block-content {
    padding: 15px;
}

/* Footer Block Styles */
.footer-block {
    margin-bottom: 15px;
}

.footer-block .block-header {
    padding: 8px 12px;
    background: #f8f9fa;
}

.footer-block .block-content {
    padding: 12px;
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-blocks-container .row {
        margin: 0;
    }
    
    .content-blocks-container .col-lg-8,
    .content-blocks-container .col-lg-4 {
        padding: 0 10px;
    }
    
    .block-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .block-actions {
        align-self: flex-end;
    }
    
    .news-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .news-date {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .quick-links {
        gap: 5px;
    }
    
    .quick-link {
        padding: 6px 10px;
        font-size: 0.9em;
    }
}

@media (max-width: 576px) {
    .content-block {
        margin-bottom: 15px;
    }
    
    .block-header {
        padding: 10px 15px;
    }
    
    .block-content {
        padding: 15px;
    }
    
    .block-header h3 {
        font-size: 1.1em;
    }
    
    .block-header h4 {
        font-size: 1em;
    }
    
    .block-header h5 {
        font-size: 0.9em;
    }
}

/* Accessibility Enhancements */
.content-block:focus-within {
    outline: 2px solid #FF6600;
    outline-offset: 2px;
}

.block-actions .btn {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.block-actions .btn:hover {
    opacity: 1;
}

/* Department News Styles */
.department-news {
    margin-top: 15px;
}

.department-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.department-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.department-title {
    color: #FF6600;
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 5px 10px;
    background: #f8f9fa;
    border-left: 3px solid #FF6600;
    border-radius: 3px;
}

.department-news-list {
    margin-left: 10px;
}

.department-news-list .news-item {
    padding: 8px 0;
    border-bottom: 1px dotted #ddd;
}

.department-news-list .news-item:last-child {
    border-bottom: none;
}

.department-news-list .news-date {
    min-width: 50px;
    font-size: 0.85em;
    color: #666;
}

.department-news-list .news-title a {
    font-size: 0.9em;
    line-height: 1.4;
}

/* Responsive department news */
@media (max-width: 768px) {
    .department-section {
        margin-bottom: 15px;
    }
    
    .department-title {
        font-size: 1em;
        padding: 4px 8px;
    }
    
    .department-news-list {
        margin-left: 5px;
    }
    
    .department-news-list .news-item {
        padding: 6px 0;
    }
}

/* School Information Styles */
.school-info {
    padding: 10px;
    background: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.school-info p {
    margin: 8px 0;
    padding: 5px;
    background: white;
    border-radius: 3px;
    border-left: 3px solid #0066CC;
}

.school-info strong {
    color: #FF6600;
    font-weight: bold;
}

/* Enhanced Banner Responsive */
@media (max-width: 768px) {
    .banner-content h1 {
        font-size: 2em;
    }
    
    .banner-content p {
        font-size: 1em;
    }
    
    .banner {
        padding: 15px 0;
    }
}

@media (max-width: 576px) {
    .banner-content h1 {
        font-size: 1.5em;
    }
    
    .banner-content p {
        font-size: 0.9em;
    }
    
    .banner {
        padding: 10px 0;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .content-block {
        border: 2px solid #000;
    }
    
    .block-header {
        background: #000;
        color: #fff;
    }
    
    .quick-link {
        border: 1px solid #000;
        background: #fff;
        color: #000;
    }
    
    .quick-link:hover {
        background: #000;
        color: #fff;
    }
    
    .department-title {
        background: #000;
        color: #fff;
        border-left-color: #fff;
    }
    
    .school-info {
        border: 2px solid #000;
        background: #fff;
    }
    
    .school-info p {
        border: 1px solid #000;
        background: #fff;
        color: #000;
    }
}