/* 全域字體設定 */
body {
    font-family: 'Noto Sans TC', 'PingFang TC', 'Hiragino Sans GB', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #212529;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Font Awesome 圖示字體設定 */
.fa, .fas, .far, .fal, .fab, .fa-solid, .fa-regular, .fa-light, .fa-brands {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 5 Free", "Font Awesome 5 Pro" !important;
    font-weight: 900 !important;
    font-style: normal !important;
}

/* 預設所有Font Awesome圖示大小 */
.fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands {
    font-size: 16px;
}

/* 首頁社群按鈕圖示大小 - 桌面版（終極優先權） */
@media (min-width: 768px) {
    body .social-share-buttons .social-btn i,
    body .social-btn i.fa-solid,
    body .social-btn i.fa-brands,
    body .social-btn i,
    .social-share-buttons .social-btn i,
    .social-btn i.fa-solid,
    .social-btn i.fa-brands,
    .social-btn i {
        font-size: 18px !important;
    }
    body .social-share-buttons .social-btn.line-official i:first-child,
    body .social-btn.line-official i:first-child,
    .social-share-buttons .social-btn.line-official i:first-child,
    .social-btn.line-official i:first-child {
        font-size: 14px !important;
    }
    body .social-share-buttons .social-btn.line-official i:last-child,
    body .social-btn.line-official i:last-child,
    .social-share-buttons .social-btn.line-official i:last-child,
    .social-btn.line-official i:last-child {
        font-size: 16px !important;
    }
}

/* 首頁社群按鈕圖示大小 - 手機版 */
@media (max-width: 767px) {
    .social-share-buttons .social-btn i,
    .social-btn i.fa-solid,
    .social-btn i.fa-brands,
    .social-btn i {
        font-size: 14px !important;
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Sans TC', 'PingFang TC', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.005em;
    color: #1a1a1a;
}

/* 特殊字重設定 */
.h1, h1 { font-weight: 700; font-size: 2.2rem; }
.h2, h2 { font-weight: 700; font-size: 1.8rem; }
.h3, h3 { font-weight: 700; font-size: 1.5rem; }
.h4, h4 { font-weight: 600; font-size: 1.3rem; }
.h5, h5 { font-weight: 600; font-size: 1.1rem; }
.h6, h6 { font-weight: 600; font-size: 1rem; }

/* 輕量化文字 */
.font-light {
    font-weight: 300;
}

/* 中等粗度文字 */
.font-medium {
    font-weight: 500;
}

/* 粗體文字 */
.font-bold {
    font-weight: 700;
}

/* 調整輸入框和按鈕字體 */
input, button, textarea, select {
    font-family: 'Noto Sans TC', 'Source Han Sans TC', sans-serif;
    font-weight: 400;
}

/* 段落文字美化 */
p {
    line-height: 1.7;
    margin-bottom: 1.2em;
    color: #333333;
    font-weight: 400;
}

/* 列表樣式優化 */
ul li, ol li {
    line-height: 1.6;
    margin-bottom: 0.5em;
    color: #333333;
}

/* 卡片內文字優化 */
.card-body, .concept-card {
    line-height: 1.6;
}

.concept-card h4 {
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.concept-card p, .concept-card li {
    font-size: 1rem;
    line-height: 1.6;
    color: #333333;
    font-weight: 400;
}

/* 導航文字優化 */
.navbar .nav-link {
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #333333 !important;
}

/* 按鈕文字優化 */
.btn {
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* 表格文字優化 */
.table {
    font-size: 1rem;
    line-height: 1.5;
    color: #333333;
}

.table th {
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #1a1a1a;
}

.table td {
    color: #333333;
}

/* 小字體美化 */
.small, small {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #666666;
}

/* 文字顏色優化 - 提高對比度 */
.text-secondary {
    color: #666666 !important;
}

.text-muted {
    color: #777777 !important;
}

/* 確保重要文字清晰可見 */
.navbar-brand, .nav-link, .btn, .card-title, .list-group-item {
    color: #333333 !important;
}

/* 確保表格中的文字顏色正確 */
.table tbody tr td {
    color: #333333 !important;
}

.table tbody tr td a {
    color: #333333 !important;
}

.table tbody tr td a:hover {
    color: #007bff !important;
}

/* 頁尾文字優化 */
.footer, .footer * {
    color: #ffffff !important;
}

/* 頂部資訊欄文字優化 */
.bg-primary .text-white, .bg-primary .text-white * {
    color: #ffffff !important;
    font-weight: 500;
}

.bg-primary span, .bg-primary small {
    color: #ffffff !important;
}

/* 橫幅文字優化 */
.jumbotron h1, .jumbotron p {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    font-weight: 700;
}

.jumbotron .text-light, .jumbotron .text-light * {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

/* 修正可能被覆蓋的白色文字 */
.text-white, .text-white * {
    color: #ffffff !important;
}

.text-light, .text-light * {
    color: #f8f9fa !important;
}

/* 確保橫幅背景上的所有文字都可見 */
.jumbotron-fluid h1, 
.jumbotron-fluid p, 
.jumbotron-fluid .container * {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    font-weight: 700;
}

/* 修正響應式字體大小相關的class */
.fs-18 {
    font-size: 18px !important;
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    font-weight: 700 !important;
}

.fs-14 {
    font-size: 14px !important;
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    font-weight: 500 !important;
}

/* 響應式字體大小 */
@media (min-width: 576px) {
    .fs-sm-26 {
        font-size: 26px !important;
        color: #ffffff !important;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
        font-weight: 700 !important;
    }
    
    .fs-sm-18 {
        font-size: 18px !important;
        color: #ffffff !important;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
        font-weight: 500 !important;
    }
}

/* 強制修正頂部資訊欄所有元素 */
.bg-primary, 
.bg-primary * {
    color: #ffffff !important;
}

.fixed-top.bg-primary .fa-solid,
.fixed-top.bg-primary .fas,
.fixed-top.bg-primary span,
.fixed-top.bg-primary small {
    color: #ffffff !important;
    opacity: 1;
    display: inline !important;
}

/* 確保卡片標題清晰 */
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6 {
    color: #1a1a1a !important;
    font-weight: 700 !important;
}

.slideshow {
    height: 400px;
    object-fit: cover;
}

/* 服務團隊卡片樣式 */
.service-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.service-card .icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.service-card:hover .icon-circle {
    transform: scale(1.1);
}

/* 服務團隊圖示尺寸優化 */
.service-card .icon-circle i {
    font-size: 2.5rem !important;
    line-height: 80px !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-weight: 900 !important;
}

.service-card .card-body {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-card h3 {
    color: #1a1a1a;
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-card .service-content p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-card .service-content .fas {
    margin-top: 0px;
    flex-shrink: 0;
    margin-right: 8px;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .service-card .card-body {
        min-height: 180px;
    }
    
    .service-card .icon-circle {
        width: 70px;
        height: 70px;
    }
    
    .service-card .icon-circle i {
        font-size: 2rem !important;
        line-height: 70px !important;
    }
    
    .service-card h3 {
        font-size: 1.1rem;
    }
    
    .service-card .service-content p {
        font-size: 0.9rem;
    }
}

/* 入住流程頁面樣式 */
.process-step {
    position: relative;
    margin-bottom: 2rem;
}

.process-step .step-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.process-step:hover .step-circle {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.process-step .step-content {
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
}

.process-step:hover .step-content {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}

.process-step .step-content h4 {
    font-weight: 700;
}

.process-step .step-content p {
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 服務對象列表樣式 */
.service-list li {
    padding: 0.5rem 0;
    transition: all 0.2s ease;
}

.service-list li:hover {
    transform: translateX(5px);
}

.service-list li i {
    width: 20px;
    text-align: center;
}

.service-list li span {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 收費標準頁面樣式 */
.pricing-section {
    margin-bottom: 3rem;
}

.pricing-section .section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    border-bottom: 3px solid #007bff;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.pricing-section .subsection-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.pricing-table {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.pricing-table thead th {
    font-weight: 700;
    border: none;
    text-align: center;
    vertical-align: middle;
}

.pricing-table tbody td {
    vertical-align: middle;
    border-color: rgba(0,0,0,0.1);
}

/* 修復首頁表格中的分類文字顯示 */
.table .badge {
    color: #007bff !important;
    background-color: rgba(13, 110, 253, 0.1) !important;
    font-weight: 500 !important;
}

.table .badge .fas {
    color: #007bff !important;
}

.price-highlight {
    font-weight: 700;
    font-size: 1.1rem;
    color: #dc3545;
    text-align: center;
}

.price-highlight.text-start {
    text-align: left !important;
}

.daily-rate {
    color: #28a745;
}

.price-total {
    font-size: 1.1rem;
    color: #007bff;
    padding: 0.5rem;
    background-color: rgba(0,123,255,0.1);
    border-radius: 4px;
}

.service-description {
    font-size: 0.95rem;
    line-height: 1.5;
}

.service-description.text-start {
    text-align: left !important;
}

.wound-care-prices, 
.nutrition-prices, 
.oxygen-prices {
    font-size: 0.95rem;
}

.notes-section {
    margin-top: 3rem;
}

.notes-section .section-title {
    font-size: 1.3rem;
    color: #6c757d;
    border-bottom-color: #6c757d;
}

.notes-section .alert {
    border-radius: 8px;
    border-left: 5px solid #17a2b8;
}

.notes-section ol li {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 表格顏色主題 */
.table-warning {
    background-color: #fff3cd !important;
}

.table-success {
    background-color: #d1e7dd !important;
}

.table-info {
    background-color: #cff4fc !important;
}

.table-secondary {
    background-color: #e2e3e5 !important;
}

/* 訊息中心列表樣式 */
.news-list {
    margin-top: 1rem;
}

.news-item {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.08) !important;
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    border-color: #007bff !important;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.8rem;
}

.news-title a {
    color: #1a1a1a !important;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: #007bff !important;
}

.news-badges {
    margin-bottom: 0.8rem;
}

.news-badges .badge {
    font-size: 0.75rem;
    padding: 0.4em 0.8em;
    margin-right: 0.5rem;
}

.news-summary {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0;
}

.news-date {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.8rem;
}

.news-item .btn-outline-primary {
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.news-item .btn-outline-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

/* 空狀態樣式 */
.news-list:empty::after {
    content: "暫無訊息";
    display: block;
    text-align: center;
    padding: 3rem;
    color: #6c757d;
    font-size: 1.1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

/* 現代化分頁樣式 */
.pagination-modern {
    gap: 0.25rem;
}

.pagination-modern .page-link {
    border-radius: 8px;
    border: 1px solid #e9ecef;
    color: #495057;
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    background-color: #fff;
    font-weight: 500;
}

.pagination-modern .page-link:hover {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.pagination-modern .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
    font-weight: 600;
}

.pagination-modern .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-modern .page-item.disabled .page-link:hover {
    transform: none;
    box-shadow: none;
}

/* 分頁資訊區域 */
.page-info {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.page-size-info {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

/* 特殊按鈕樣式 */
.page-first, .page-last {
    font-weight: 600;
}

.page-prev, .page-next {
    font-weight: 600;
}

/* 頁碼容器 */
.page-numbers {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 手機版分頁 */
.mobile-pagination .btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.mobile-pagination .btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

/* 空狀態樣式 */
.empty-state {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    border: 2px dashed #dee2e6;
}

.empty-icon {
    opacity: 0.6;
}

.empty-state h5 {
    font-weight: 600;
}

/* 數字分頁條美化 */
.pagination-modern .page-numbers .page-link {
    min-width: 45px;
    text-align: center;
    font-weight: 500;
}

.pagination-modern .page-numbers .page-item.active .page-link {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-color: #0056b3;
    box-shadow: 0 2px 8px rgba(0,123,255,0.4);
}

/* 輪播圖分頁器樣式 - 完全透明背景 */
.swiper-pagination-between {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    background-clip: unset !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

.swiper-pagination-between .swiper-pagination-bullet {
    width: 10px !important;
    height: 10px !important;
    background: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important;
    margin: 0 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    transition: all 0.3s ease !important;
}

.swiper-pagination-between .swiper-pagination-bullet-active,
.swiper-pagination-between .swiper-pagination-bullet.swiper-pagination-bullet-active {
    background: #007bff !important;
    background-color: #007bff !important;
    border-color: #007bff !important;
    transform: scale(1.2) !important;
}

.swiper-pagination-between .swiper-pagination-bullet:hover {
    background: rgba(0, 123, 255, 0.8) !important;
    border-color: #007bff !important;
    transform: scale(1.1) !important;
}

/* 文章分類導航樣式 */
.category-nav {
    padding: 1rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.category-btn {
    border-radius: 25px;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

.category-btn .badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3em 0.6em;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

/* 當前分類高亮 */
.category-btn.active {
    background-color: #007bff !important;
    border-color: #007bff !important;
    color: #fff !important;
}

.category-btn.active .badge {
    background-color: #fff !important;
    color: #007bff !important;
}

/* 非當前分類 */
.category-btn:not(.active) {
    background-color: #fff;
    border-color: #007bff;
    color: #007bff;
}

.category-btn:not(.active) .badge {
    background-color: #007bff !important;
    color: #fff !important;
}

.category-btn:not(.active):hover {
    background-color: #007bff;
    color: #fff;
}

.category-btn:not(.active):hover .badge {
    background-color: #fff !important;
    color: #007bff !important;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .category-nav {
        padding: 0.8rem;
        margin-bottom: 1.5rem;
    }
    
    .category-nav .col-auto {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 0.25rem;
    }
    
    .category-btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
        width: 100%;
        display: inline-block;
        text-align: center;
    }
    
    .category-btn .badge {
        font-size: 0.7rem;
        min-width: 20px;
    }
    
    .news-item {
        margin-bottom: 1.5rem;
        padding: 1rem;
    }
    
    .news-title {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }
    
    .news-date {
        text-align: left !important;
        margin-bottom: 0.8rem;
    }
    
    .news-item .btn-outline-primary {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .pricing-section .section-title {
        font-size: 1.2rem;
    }
    
    .pricing-section .subsection-title {
        font-size: 1.1rem;
    }
    
    .pricing-table {
        font-size: 0.9rem;
    }
    
    .price-highlight {
        font-size: 1rem;
    }
    
    .process-step .step-circle {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .process-step .d-flex {
        flex-direction: column;
    }
    
    .process-step .step-content {
        margin-left: 0 !important;
        margin-top: 1rem;
    }
    
    .service-list li {
        flex-direction: column;
        align-items: flex-start !important;
        text-align: left;
    }
    
    .service-list li i {
        margin-bottom: 0.5rem;
        margin-right: 0 !important;
    }
}
