/* e速網現代化樣式 */

/* 基礎設置 */
:root {
    --primary-color: #2c5aa0;
    --secondary-color: #f8f9fa;
    --accent-color: #28a745;
    --text-color: #333;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --border-radius: 8px;
    --max-width: 1200px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft JhengHei', '微軟正黑體', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    padding-top: 76px; /* 為固定導航留空間 */
}

/* 容器限制寬度 */
.container {
    max-width: var(--max-width);
}

/* 導航樣式 */
.navbar {
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e4a8c 100%) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: rgba(255,255,255,0.1);
    border-radius: var(--border-radius);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 主內容區域 */
.main-content {
    min-height: calc(100vh - 76px);
}

/* 輪播圖樣式 */
.hero-carousel {
    height: 400px;
    overflow: hidden;
}

.hero-carousel .carousel-item {
    height: 400px;
}

.hero-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    background: rgba(0,0,0,0.5);
    border-radius: var(--border-radius);
    padding: 2rem;
}

/* 卡片樣式 */
.card {
    border: none;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e4a8c 100%);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    font-weight: 600;
}

/* 按鈕樣式 */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e4a8c 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e4a8c 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-color) 0%, #218838 100%);
    border: none;
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 表格樣式 */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e4a8c 100%);
    color: white;
    border: none;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: rgba(44, 90, 160, 0.05);
}

/* 價格表樣式 */
.pricing-table {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.pricing-table:hover {
    transform: translateY(-5px);
}

.pricing-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e4a8c 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1rem 0;
}

.pricing-features {
    padding: 2rem;
}

.pricing-features ul {
    list-style: none;
    padding: 0;
}

.pricing-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features .fa-check {
    color: var(--accent-color);
    margin-right: 0.5rem;
}

/* 表單樣式 */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    padding: 0.75rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--text-color);
}

/* 側邊欄樣式 */
.sidebar {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.sidebar h5 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.sidebar li:last-child {
    border-bottom: none;
}

.sidebar a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar a:hover {
    color: var(--primary-color);
}

/* 新聞列表樣式 */
.news-item {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.news-item:hover {
    transform: translateY(-2px);
}

.news-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.news-title {
    color: var(--primary-color);
    font-weight: 600;
    margin: 0.5rem 0;
}

/* 聯絡資訊樣式 */
.contact-info {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e4a8c 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
}

.contact-info h5 {
    color: white;
    margin-bottom: 1rem;
}

.contact-info .fa {
    margin-right: 0.5rem;
    width: 20px;
}

/* Line客服樣式 */
.line-service {
    background: #00c300;
    color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
}

.line-service:hover {
    background: #00a300;
    color: white;
    text-decoration: none;
}

/* 頁腳樣式 */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer h5 {
    color: white;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: white;
}

.footer .social-links a {
    display: inline-block;
    margin-right: 1rem;
    font-size: 1.5rem;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .hero-carousel {
        height: 250px;
    }
    
    .hero-carousel .carousel-item {
        height: 250px;
    }
    
    .carousel-caption {
        padding: 1rem;
    }
    
    .pricing-price {
        font-size: 2rem;
    }
    
    .sidebar {
        margin-top: 2rem;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 66px;
    }
    
    .hero-carousel {
        height: 200px;
    }
    
    .hero-carousel .carousel-item {
        height: 200px;
    }
    
    .carousel-caption h3 {
        font-size: 1.2rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
    }
}

/* 動畫效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 載入動畫 */
.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); }
}

/* 工具提示樣式 */
.tooltip-inner {
    background-color: var(--primary-color);
    border-radius: var(--border-radius);
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: var(--primary-color);
}

/* 警告框樣式 */
.alert {
    border-radius: var(--border-radius);
    border: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #cce7ff;
    color: #004085;
}
/*
 表格中超連結樣式優化 */
.table-secondary a {
    color: #0d6efd !important; /* Bootstrap 主要藍色 */
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.table-secondary a:hover {
    color: #0a58ca !important; /* 更深的藍色 */
    text-decoration: underline !important;
    transform: translateY(-1px);
}

.table-secondary a:focus {
    color: #0a58ca !important;
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* 確保在深色背景的表頭中超連結也清晰可見 */
.table thead.table-dark a,
.bg-dark a {
    color: #66d9ff !important; /* 淺藍色，在深色背景上更清晰 */
}

.table thead.table-dark a:hover,
.bg-dark a:hover {
    color: #99e6ff !important;
    text-decoration: underline !important;
}

/* 為不同表格背景色提供最佳對比度的超連結顏色 */
.table-primary a {
    color: #ffffff !important;
    font-weight: 600;
}

.table-primary a:hover {
    color: #e6f3ff !important;
    text-decoration: underline !important;
}

.table-success a {
    color: #0f5132 !important;
    font-weight: 600;
}

.table-success a:hover {
    color: #051f14 !important;
    text-decoration: underline !important;
}

.table-warning a {
    color: #664d03 !important;
    font-weight: 600;
}

.table-warning a:hover {
    color: #332701 !important;
    text-decoration: underline !important;
}

.table-info a {
    color: #055160 !important;
    font-weight: 600;
}

.table-info a:hover {
    color: #032830 !important;
    text-decoration: underline !important;
}/* Tailwi
nd CSS 灰色背景中的超連結樣式 */
.bg-gray-100 a,
.bg-gray-200 a,
.bg-gray-300 a {
    color: #1d4ed8 !important; /* 深藍色，在淺灰背景上清晰可見 */
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.bg-gray-100 a:hover,
.bg-gray-200 a:hover,
.bg-gray-300 a:hover {
    color: #1e40af !important; /* 更深的藍色 */
    text-decoration: underline !important;
    transform: translateY(-1px);
}

.bg-gray-600 a,
.bg-gray-700 a,
.bg-gray-800 a,
.bg-gray-900 a {
    color: #60a5fa !important; /* 淺藍色，在深灰背景上清晰可見 */
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.bg-gray-600 a:hover,
.bg-gray-700 a:hover,
.bg-gray-800 a:hover,
.bg-gray-900 a:hover {
    color: #93c5fd !important; /* 更淺的藍色 */
    text-decoration: underline !important;
    transform: translateY(-1px);
}

/* 確保在表格單元格中的超連結也有正確的樣式 */
td.bg-gray-100 a,
td.bg-gray-200 a,
th.bg-gray-100 a,
th.bg-gray-200 a {
    color: #1d4ed8 !important;
    font-weight: 600;
}

td.bg-gray-100 a:hover,
td.bg-gray-200 a:hover,
th.bg-gray-100 a:hover,
th.bg-gray-200 a:hover {
    color: #1e40af !important;
    text-decoration: underline !important;
}

/* 為了確保最高優先級，針對特定的表格行背景 */
tr.bg-gray-100 a,
tr.bg-gray-200 a {
    color: #1d4ed8 !important;
    font-weight: 600;
    text-decoration: none !important;
}

tr.bg-gray-100 a:hover,
tr.bg-gray-200 a:hover {
    color: #1e40af !important;
    text-decoration: underline !important;
}