/* 主要樣式文件 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft JhengHei', 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    padding-top: 76px; /* 為固定導航欄留出空間 */
}

/* 導航欄樣式 - 白色系列 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border-bottom: 1px solid #e9ecef;
    min-height: 60px;
    padding: 0.5rem 0;
}

/* 管理頁面固定導航欄 */
.navbar.fixed-top {
    background: rgba(255, 255, 255, 1);
    min-height: 60px;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.4rem;
    color: #2c3e50 !important;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
}

/* 導航欄Logo圖片樣式 */
.navbar-brand img {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.1));
}

/* 滾動時稍微縮小logo */
.navbar.scrolled .navbar-brand img {
    height: 35px;
}

/* 確保圖片不會被擠壓 */
.navbar-brand {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    min-width: 150px;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .navbar-brand img {
        height: 35px;
        max-width: 150px;
    }
    
    .navbar.scrolled .navbar-brand img {
        height: 30px;
    }
    
    .navbar-brand {
        min-width: 120px;
    }
}

/* 超小屏幕調整 */
@media (max-width: 480px) {
    .navbar-brand img {
        height: 30px;
        max-width: 120px;
    }
    
    .navbar.scrolled .navbar-brand img {
        height: 28px;
    }
}

.navbar-nav .nav-link {
    color: #495057 !important;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
    border-radius: 20px;
}

.navbar-nav .nav-link:hover {
    color: #007bff !important;
    background: rgba(0, 123, 255, 0.1);
}

.navbar-nav .nav-link.active {
    color: #007bff !important;
    background: rgba(0, 123, 255, 0.1);
}

.dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 0.5rem 0;
    background: white;
}

.dropdown-item {
    padding: 0.7rem 1.5rem;
    transition: all 0.3s ease;
    color: #495057;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #007bff;
}

/* 手機菜單按鈕樣式 */
.navbar-toggler {
    border: 2px solid #495057 !important;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    background-color: transparent;
    transition: all 0.3s ease;
    position: relative;
    width: 48px;
    height: 40px;
}

.navbar-toggler:hover {
    border-color: #007bff !important;
    background-color: rgba(0, 123, 255, 0.1);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

/* 自定義三條線到X的動畫 */
.navbar-toggler .navbar-toggler-icon {
    background-image: none !important;
    position: relative;
    width: 24px;
    height: 18px;
    margin: auto;
}

/* 創建三條線 */
.navbar-toggler .navbar-toggler-icon,
.navbar-toggler .navbar-toggler-icon::before,
.navbar-toggler .navbar-toggler-icon::after {
    background-color: #495057;
    height: 2px;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.navbar-toggler .navbar-toggler-icon::before,
.navbar-toggler .navbar-toggler-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    left: 0;
}

.navbar-toggler .navbar-toggler-icon::before {
    top: -8px;
}

.navbar-toggler .navbar-toggler-icon::after {
    bottom: -8px;
}

/* 懸停效果 - 改變顏色 */
.navbar-toggler:hover .navbar-toggler-icon,
.navbar-toggler:hover .navbar-toggler-icon::before,
.navbar-toggler:hover .navbar-toggler-icon::after {
    background-color: #007bff;
}

/* 展開狀態 - 三條線變成X */
.navbar-toggler[aria-expanded="true"] {
    border-color: #007bff !important;
    background-color: rgba(0, 123, 255, 0.1);
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-color: transparent;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    transform: rotate(45deg);
    top: 0;
    background-color: #007bff;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    transform: rotate(-45deg);
    bottom: 0;
    background-color: #007bff;
}

/* 響應式菜單內容 */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: white;
        border-radius: 0.5rem;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        margin-top: 0.5rem;
        padding: 1rem;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0;
        border-radius: 0.375rem;
    }
    
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        border: none;
        box-shadow: none;
        background: transparent;
        margin: 0;
        padding: 0;
    }
    
    .dropdown-item {
        padding: 0.5rem 1rem;
        text-align: center;
    }
}

/* 主要內容區域 */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 0;
}

/* 菜單按鈕區域 */
.menu-buttons {
    background: #ffffff;
    padding: 3rem 0;
    border-bottom: 1px solid #e9ecef;
}

.menu-btn {
    display: block;
    width: 100%;
    padding: 2rem;
    margin-bottom: 1rem;
    text-decoration: none;
    color: #495057;
    border-radius: 15px;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    background: #ffffff;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.menu-btn:hover {
    color: #007bff;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,123,255,0.15);
    border-color: #007bff;
}

.menu-btn i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.btn-school {
    border-color: #28a745;
}

.btn-school:hover {
    color: #28a745;
    border-color: #28a745;
    box-shadow: 0 8px 25px rgba(40,167,69,0.15);
}

.btn-student {
    border-color: #007bff;
}

.btn-student:hover {
    color: #007bff;
    border-color: #007bff;
    box-shadow: 0 8px 25px rgba(0,123,255,0.15);
}

.btn-marker {
    border-color: #6f42c1;
}

.btn-marker:hover {
    color: #6f42c1;
    border-color: #6f42c1;
    box-shadow: 0 8px 25px rgba(111,66,193,0.15);
}

.btn-register {
    border-color: #ffc107;
}

.btn-register:hover {
    color: #ffc107;
    border-color: #ffc107;
    box-shadow: 0 8px 25px rgba(255,193,7,0.15);
}

/* 輪換照片區域 */
.carousel-section {
    background: #ffffff;
    padding: 0;
}

.carousel-item img {
    height: 400px;
    object-fit: cover;
    width: 100%;
}

/* 管理版面上傳的輪播圖片 */
.carousel-image {
    height: 400px;
    object-fit: cover;
    width: 100%;
    filter: brightness(0.8); /* 稍微暗化背景，讓文字更清楚 */
    transition: filter 0.3s ease;
}

.carousel-item:hover .carousel-image {
    filter: brightness(0.9);
}

.carousel-caption {
    background: rgba(0,0,0,0.5);
    border-radius: 10px;
    padding: 2rem;
    backdrop-filter: blur(5px);
}

.carousel-caption h5 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* 最新消息區域 */
.news-section {
    background: #f8f9fa;
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #007bff;
    margin: 1rem auto;
    border-radius: 2px;
}

.news-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.news-image {
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    border-radius: 15px 15px 0 0;
    overflow: hidden;
}

.news-image img {
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-date {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-title a:hover {
    color: #007bff;
    transition: color 0.3s ease;
}

.news-content {
    color: #6c757d;
    line-height: 1.6;
    flex-grow: 1;
}

/* 聯絡我們區域 */
.contact-section {
    background: #ffffff;
    padding: 4rem 0;
    border-top: 1px solid #e9ecef;
}

.contact-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    height: 100%;
}

.contact-info .contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.contact-info .contact-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.contact-info .contact-item i {
    width: 40px;
    height: 40px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.contact-form .form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: white;
}

.contact-form .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background: white;
}

.contact-form .form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.contact-form .btn-primary {
    background: #007bff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-form .btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

/* 按鈕樣式 */
.btn {
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    padding: 0.75rem 1.5rem;
}

.btn-primary {
    background: #007bff;
    border: none;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

.btn-outline-primary {
    color: #007bff;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
}

/* 卡片樣式 */
.card {
    border: 1px solid #e9ecef;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    background: white;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    border-radius: 15px 15px 0 0 !important;
    font-weight: 600;
    color: #2c3e50;
}

/* 頁腳 */
.footer {
    background: #2c3e50;
    color: #fff;
    margin-top: 0;
}

.footer h5, .footer h6 {
    font-weight: 600;
    color: #ffffff;
}

.footer .text-warning {
    color: #ffc107 !important;
}

.footer .social-links a {
    transition: all 0.3s ease;
    display: inline-block;
    color: #95a5a6;
}

.footer .social-links a:hover {
    color: #ffc107 !important;
    transform: translateY(-3px);
}

.footer ul li a {
    color: #95a5a6;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer ul li a:hover {
    color: white !important;
    padding-left: 5px;
}

.contact-info .d-flex {
    color: #95a5a6;
}

.contact-info .d-flex:hover {
    color: white !important;
    transition: all 0.3s ease;
}

.footer .border-secondary {
    border-color: #404040 !important;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .menu-btn {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    .menu-btn i {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .carousel-item img {
        height: 250px;
    }
    
    .carousel-caption {
        padding: 1rem;
    }
    
    .carousel-caption h5 {
        font-size: 1.3rem;
    }
}

/* 主要內容區域 */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* 卡片樣式 */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    font-weight: bold;
}

/* 按鈕樣式 */
.btn {
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
}

.btn-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
}

/* 英雄區域特殊樣式 */
.hero-section {
    color: white;
    padding: 0;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><polygon points="0,0 1000,100 1000,0"/></svg>');
    background-size: cover;
}

.min-vh-75 {
    min-height: 75vh;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    line-height: 1.6;
}

.hero-buttons .btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.hero-stats h3 {
    font-size: 2rem;
    font-weight: 700;
}

.hero-image {
    position: relative;
    z-index: 1;
}

.hero-placeholder {
    padding: 3rem;
    border: 2px dashed rgba(255,255,255,0.3);
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
}

/* 節標題樣式 */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    margin: 1rem auto;
    border-radius: 2px;
}

/* 功能卡片樣式 */
.feature-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: none;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.feature-card .btn {
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 600;
}

/* 服務項目樣式 */
.service-item {
    padding: 2rem 1rem;
    transition: all 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.service-item h5 {
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

/* 新聞項目樣式 */
.news-item {
    transition: all 0.3s ease;
}

.news-item:hover {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin: -1rem;
}

.date-box {
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 0.9rem;
}

/* 考試項目樣式 */
.exam-item {
    transition: all 0.3s ease;
}

.exam-item:hover {
    background: white !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* 卡片陰影效果 */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.card.border-0 {
    border-radius: 15px;
    overflow: hidden;
}

.card-header {
    border: none;
    font-weight: 600;
}

/* 快速連結懸停效果 */
.list-group-item-action:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: transparent;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons .btn {
        padding: 10px 20px;
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* 表單樣式 */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-group label {
    font-weight: 600;
    color: #495057;
}

/* 登入表單特殊樣式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    color: #667eea;
    font-weight: bold;
}

/* 表格樣式 */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.table th {
    border: none;
    font-weight: 600;
}

.table td {
    vertical-align: middle;
    border-color: #e9ecef;
}

/* 狀態標籤 */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-active {
    background: #28a745;
    color: white;
}

.status-inactive {
    background: #6c757d;
    color: white;
}

.status-pending {
    background: #ffc107;
    color: #212529;
}

.status-completed {
    background: #17a2b8;
    color: white;
}

/* 統計卡片 */
.stats-card {
    color: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* 頁腳 */
.footer {
    background: #1a1a1a;
    color: #fff;
    margin-top: 0;
}

.footer h5, .footer h6 {
    font-weight: 600;
}

.footer .social-links a {
    transition: all 0.3s ease;
    display: inline-block;
}

.footer .social-links a:hover {
    color: #ffc107 !important;
    transform: translateY(-3px);
}

.footer ul li a:hover {
    color: white !important;
    padding-left: 5px;
    transition: all 0.3s ease;
}

.contact-info .d-flex:hover {
    color: white !important;
    transition: all 0.3s ease;
}

.footer .border-secondary {
    border-color: #404040 !important;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .function-btn {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    .stats-number {
        font-size: 2rem;
    }
}

/* 載入動畫 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 警告訊息 */
.alert {
    border: none;
    border-radius: 10px;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.alert-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

/* 最新消息區域 */
.news-section {
    background: #ffffff;
    padding: 80px 0;
}

.news-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 30px;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.news-date {
    color: #007bff;
    font-size: 14px;
    margin-bottom: 15px;
    font-weight: 500;
}

.news-title a {
    color: #333 !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: #007bff !important;
}

.news-content {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* 聯絡我們區域樣式更新 */
.contact-section {
    background: #f8f9fa;
    padding: 80px 0;
}

.contact-info .contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 20px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.contact-info .contact-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.contact-icon i {
    color: white;
    font-size: 18px;
}

.contact-content h6 {
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
}

.contact-content p {
    margin-bottom: 0;
    line-height: 1.6;
}

.contact-form {
    background: #ffffff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}

.contact-form .form-control {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 50px;
    height: 50px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #007bff;
    border-color: #007bff;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

/* 學校管理功能按鈕樣式 */
.school-function-btn {
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.school-function-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-decoration: none;
}

.school-function-btn i {
    transition: all 0.3s ease;
}

.school-function-btn:hover i {
    transform: scale(1.1);
}

.school-function-btn small {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* 響應式功能按鈕 */
@media (max-width: 768px) {
    .school-function-btn {
        padding: 1.5rem !important;
    }
    
    .school-function-btn i {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .school-function-btn span {
        font-size: 0.9rem;
    }
}

/* 統一儀表板佈局 */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid #e9ecef;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    position: fixed;
    top: 60px; /* 匹配固定導航欄高度 */
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav .nav-link {
    color: #495057;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    border-radius: 0;
}

.sidebar-nav .nav-link:hover {
    background: #f8f9fa;
    color: #007bff;
    border-left: 3px solid #007bff;
}

.sidebar-nav .nav-link.active {
    background: #e7f3ff;
    color: #007bff;
    border-left: 3px solid #007bff;
    font-weight: 600;
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
}

/* 側邊欄警告樣式 */
.sidebar .alert-sm {
    font-size: 0.75rem;
    margin: 0.5rem;
    padding: 0.5rem;
    border-radius: 5px;
}

/* 禁用的導航連結樣式 */
.sidebar-nav .nav-link.disabled {
    color: #6c757d !important;
    background: transparent !important;
    cursor: not-allowed;
    border-left: none !important;
}

.sidebar-nav .nav-link.disabled:hover {
    background: transparent !important;
    color: #6c757d !important;
    border-left: none !important;
}

/* 側邊欄徽章樣式 */
.sidebar-nav .nav-link .badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    background: #f8f9fa;
    min-height: calc(100vh - 60px); /* 匹配固定導航欄高度 */
}

.content-header {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.content-section {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

/* 響應式設計 */
@media (max-width: 992px) {
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-left: 250px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .dashboard-layout {
        position: relative;
    }
}

/* 學校資料頁面專用樣式 - 白色系主題 */
.content-header.bg-white {
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.content-header.bg-white:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

.info-item {
    padding: 0.75rem;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    margin-bottom: 0.5rem;
}

.info-item label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.info-item .h6 {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    color: #2c3e50;
}

/* 統一的白色系圖標樣式 */
.form-label i,
.card-header i {
    color: #6c757d !important;
}

/* 卡片間距優化 */
.card.mb-4:last-of-type {
    margin-bottom: 2rem !important;
}

/* 表單提交按鈕樣式 - 白色系 */
.btn-outline-dark.btn-lg.px-5 {
    padding-left: 3rem !important;
    padding-right: 3rem !important;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 25px;
    border: 2px solid #6c757d;
    color: #6c757d;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.2);
    transition: all 0.3s ease;
}

.btn-outline-dark.btn-lg.px-5:hover {
    background: #6c757d;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

/* 警告訊息樣式增強 */
.alert-dismissible {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

/* 新聞列表樣式 */
.news-list-item {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.news-list-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.news-list-item .news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-list-item:hover .news-image {
    transform: scale(1.05);
}

.news-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.type-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-weight: 500;
}

.news-title {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.news-title:hover {
    color: #3498db;
    text-decoration: none;
}

.news-excerpt {
    color: #6c757d;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 無新聞狀態樣式 */
.no-news {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin: 2rem 0;
}

.no-news i {
    color: #bdc3c7;
    margin-bottom: 1.5rem;
}

.no-news h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.no-news p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 搜尋表單樣式 */
.search-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.search-form .form-control {
    border-radius: 10px;
    border: 1px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.search-form .form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.search-form .btn {
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* 分頁樣式優化 */
.pagination .page-link {
    border-radius: 10px;
    margin: 0 0.2rem;
    padding: 0.6rem 1rem;
    font-weight: 500;
    color: #3498db;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.pagination .page-item.active .page-link {
    background: #3498db;
    border-color: #3498db;
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .news-list-item .news-image {
        height: 150px;
    }
    
    .news-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .type-badge {
        margin-bottom: 0.5rem;
    }
    
    .search-form {
        padding: 1rem;
    }
    
    .search-form .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .no-news {
        padding: 2rem 1rem;
    }
    
    .no-news i {
        font-size: 3rem !important;
    }
}

@media (max-width: 576px) {
    .news-list-item {
        margin-bottom: 1.5rem;
    }
    
    .news-list-item .card-body {
        padding: 1.5rem !important;
    }
    
    .pagination .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* 簡潔頁腳樣式 */
.footer .contact-item {
    transition: transform 0.3s ease;
    padding: 1rem;
    border-radius: 10px;
}

.footer .contact-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.footer .contact-item i {
    display: block;
    margin: 0 auto 0.5rem;
}

.footer .contact-item p {
    font-size: 0.9rem;
}

/* 響應式頁腳 */
@media (max-width: 768px) {
    .footer .contact-item {
        margin-bottom: 1rem;
    }
    
    .footer .contact-item i {
        font-size: 1rem !important;
    }
    
    .footer .contact-item p {
        font-size: 0.8rem;
    }
}
