/* 雲樞智科網站樣式 */

/* 全域樣式 */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --border-radius: 0.75rem;
    --border-radius-lg: 1rem;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    scroll-behavior: smooth;
}

section[id] {
    scroll-margin-top: 90px;
}

/* 增強 Checkbox 可見度 */
.form-check-input {
    width: 1.25em;
    height: 1.25em;
    border: 2px solid #0d6efd !important;
    border-radius: 0.25em;
    cursor: pointer;
    background-color: #fff;
}

.form-check-input:hover {
    border-color: #0a58ca !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-check-input:focus {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-check-input:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

.form-check-label {
    cursor: pointer;
    padding-left: 0.5rem;
    user-select: none;
}

/* Checkbox 容器背景 */
.contact-card .form-check {
    background-color: #f8f9fa;
    padding: 1rem 1rem 1rem 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    margin-left: 0;
}

.contact-card .form-check:hover {
    background-color: #e9ecef;
    border-color: #0d6efd;
}

.contact-card .form-check-input {
    margin-left: 0;
    margin-top: 0.25rem;
}

.contact-card .form-check-label {
    margin-left: 0.25rem;
}

/* 最新消息和文章卡片 */
.news-card,
.article-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

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

.news-image-container {
    position: relative;
    overflow: hidden;
}

.news-card img,
.article-card img {
    transition: transform 0.3s ease;
}

.news-card:hover img,
.article-card:hover img {
    transform: scale(1.05);
}

/* 內容區域樣式 */
.content-area {
    line-height: 1.8;
}

.content-area img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.content-area h2,
.content-area h3,
.content-area h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.content-area p {
    margin-bottom: 1rem;
}

.content-area ul,
.content-area ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

/* 導航欄樣式 */
.navbar {
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    max-height: 40px;
    width: auto;
    transition: var(--transition);
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.navbar-nav .nav-link:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

/* Hero 區樣式 */
.hero-section {
    background: var(--gradient-primary);
    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 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.min-vh-75 {
    min-height: 75vh;
}

.hero-buttons .btn {
    border-radius: var(--border-radius-lg);
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: var(--transition);
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 服務卡片樣式 */
.service-card {
    transition: var(--transition);
    border: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    transition: var(--transition);
}

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

.service-price {
    font-size: 1.25rem;
}

/* 案例卡片樣式 */
.case-card {
    transition: var(--transition);
    border: none;
    border-radius: var(--border-radius-lg);
}

.case-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.case-icon {
    transition: var(--transition);
}

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

.result-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* 關於我們樣式 */
.value-item {
    transition: var(--transition);
    padding: 1rem;
    border-radius: var(--border-radius);
}

.value-item:hover {
    background-color: rgba(102, 126, 234, 0.05);
    transform: translateX(5px);
}

.value-icon {
    transition: var(--transition);
}

.value-item:hover .value-icon {
    transform: scale(1.1);
}

/* 頁面標題樣式 */
.page-header {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.page-header::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 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

/* 服務詳細頁面樣式 */
.service-detail-card {
    transition: var(--transition);
    border: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.service-detail-card:hover {
    box-shadow: var(--shadow-lg);
}

.service-badge {
    font-size: 0.9rem;
    font-weight: 600;
}

.service-features ul li {
    padding: 0.25rem 0;
}

.result-highlight {
    border-radius: var(--border-radius);
    font-weight: 600;
}

/* 聯絡表單樣式 */
.contact-card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* 聯絡方式卡片樣式 */
.contact-method-card {
    transition: var(--transition);
    border: none;
    border-radius: var(--border-radius-lg);
}

.contact-method-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    transition: var(--transition);
}

.contact-method-card:hover .contact-icon {
    transform: scale(1.1);
}

/* 社群連結樣式 */
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

/* 常見問題樣式 */
.accordion-button {
    border-radius: var(--border-radius);
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

/* 文章樣式 */
.article-card {
    transition: var(--transition);
    border: none;
    border-radius: var(--border-radius-lg);
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.article-title a {
    color: inherit;
    transition: var(--transition);
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-meta {
    font-size: 0.9rem;
}

.article-excerpt {
    line-height: 1.6;
}

/* 分享按鈕樣式 */
.share-buttons .btn {
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.share-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* 相關文章樣式 */
.related-article-card {
    transition: var(--transition);
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: block;
    height: 100%;
}

.related-article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background-color: #f8f9fa !important;
    border-color: var(--primary-color);
}

/* 相關文章的圖片樣式 */
.related-article-card img {
    transition: var(--transition);
}

.related-article-card:hover img {
    transform: scale(1.05);
}

/* 相關文章的標題樣式 */
.related-article-card h6 {
    color: #333;
    transition: var(--transition);
}

.related-article-card:hover h6 {
    color: var(--primary-color);
}

/* 相關文章的外層連結樣式 */
.related-articles a {
    text-decoration: none;
    display: block;
}

.related-articles a:hover {
    text-decoration: none;
}

/* 分頁樣式 */
.pagination .page-link {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    color: var(--primary-color);
    transition: var(--transition);
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* CTA 區樣式 */
.cta-section {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.cta-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 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.cta-section .container {
    position: relative;
    z-index: 2;
}

.cta-buttons .btn {
    border-radius: var(--border-radius-lg);
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: var(--transition);
}

.cta-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 統計卡片樣式 */
.metric-card {
    transition: var(--transition);
    border: none;
    border-radius: var(--border-radius-lg);
    background: white;
    box-shadow: var(--shadow-sm);
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.metric-icon {
    transition: var(--transition);
}

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

/* 流程步驟樣式 */
.process-step {
    transition: var(--transition);
}

.process-step:hover {
    transform: translateY(-3px);
}

.step-number {
    transition: var(--transition);
    font-size: 1.5rem;
    font-weight: 700;
}

.process-step:hover .step-number {
    transform: scale(1.1);
}

/* 團隊成員樣式 */
.team-member-card {
    transition: var(--transition);
    border: none;
    border-radius: var(--border-radius-lg);
}

.team-member-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.member-photo img {
    transition: var(--transition);
}

.team-member-card:hover .member-photo img {
    transform: scale(1.05);
}

/* 公司資訊卡片樣式 */
.info-card {
    transition: var(--transition);
    border: none;
    border-radius: var(--border-radius-lg);
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.info-icon {
    transition: var(--transition);
}

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

/* 使命卡片樣式 */
.mission-card {
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.mission-stats .stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* 痛點卡片樣式 */
.pain-point-card {
    transition: var(--transition);
    border: none;
    border-radius: var(--border-radius-lg);
    background: white;
    box-shadow: var(--shadow-sm);
}

.pain-point-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pain-icon {
    transition: var(--transition);
}

.pain-point-card:hover .pain-icon {
    transform: scale(1.1);
}

.solution-badge {
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
}

.pain-point-card:hover .solution-badge {
    transform: scale(1.05);
}

/* 高級服務卡片樣式 */
.premium-card {
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.premium-badge {
    border-radius: var(--border-radius);
    font-weight: 600;
}

.premium-features ul li {
    padding: 0.25rem 0;
}

.premium-price {
    font-size: 1.5rem;
    font-weight: 700;
}

/* 地圖卡片樣式 */
.map-card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.map-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.map-container iframe {
    display: block;
    border-radius: var(--border-radius);
}

.map-placeholder {
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.map-placeholder:hover {
    transform: scale(1.02);
}

/* 空狀態樣式 */
.empty-state {
    padding: 3rem 0;
}

.empty-state i {
    opacity: 0.5;
}

/* 麵包屑樣式 */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

/* 預設麵包屑樣式（深色背景用） */
.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: white;
}

.breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.6);
}

/* 淺色背景的麵包屑樣式（文章頁面用） */
.bg-light .breadcrumb-item a {
    color: #667eea;
    font-weight: 500;
}

.bg-light .breadcrumb-item a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.bg-light .breadcrumb-item.active {
    color: #6c757d;
}

.bg-light .breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
}

/* Footer 樣式 */
footer img {
    max-height: 50px;
    width: auto;
    transition: var(--transition);
}

footer img:hover {
    transform: scale(1.05);
}

/* Footer：內容文字白色，標題（h5、h6）保持 text-primary 不變 */
footer .text-muted {
    color: #fff !important;
}
footer .list-unstyled a.text-muted:hover,
footer a.text-muted:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* 隱私政策與服務條款樣式 */
.privacy-content,
.terms-content {
    font-size: 1.05rem;
    line-height: 1.7;
}

.privacy-content section,
.terms-content section {
    scroll-margin-top: 100px;
}

.privacy-content h2,
.terms-content h2 {
    margin-top: 2rem;
    scroll-margin-top: 100px;
}

.privacy-content .card,
.terms-content .card {
    transition: var(--transition);
}

.privacy-content .card:hover,
.terms-content .card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.privacy-content ul li,
.terms-content ul li {
    line-height: 1.8;
}

.privacy-content .alert,
.terms-content .alert {
    border-radius: var(--border-radius);
}

/* 文章內容樣式 */
.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.article-body ul,
.article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #666;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: 1.5rem 0;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .service-card,
    .case-card,
    .article-card {
        margin-bottom: 2rem;
    }
    
    .cta-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .mission-stats .stat-item h3 {
        font-size: 2rem;
    }
    
    .article-body {
        font-size: 1rem;
    }
    
    .navbar-brand img {
        max-height: 35px;
    }
    
    footer img {
        max-height: 40px;
    }
    
    .map-container iframe {
        height: 350px;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }
    
    .navbar-brand img {
        max-height: 30px;
    }
    
    footer img {
        max-height: 35px;
    }
    
    .map-container iframe {
        height: 300px;
    }
}

/* 動畫效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

/* 載入動畫 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 工具提示樣式 */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background-color: var(--dark-color);
    border-radius: var(--border-radius);
}

/* 滾動條樣式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* 選擇文字樣式 */
::selection {
    background-color: var(--primary-color);
    color: white;
}

::-moz-selection {
    background-color: var(--primary-color);
    color: white;
}

/* 焦點樣式 */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* 無障礙設計 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   輕量級聊天引導系統
   ======================================== */

/* 浮動聊天按鈕 */
.chat-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #06D6A0 0%, #1B9AAA 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(6, 214, 160, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 999;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(6, 214, 160, 0.6);
}

.chat-button .chat-icon {
    transition: transform 0.3s ease;
}

.chat-button.active .chat-icon {
    transform: rotate(90deg);
}

/* 脈衝動畫 */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(6, 214, 160, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(6, 214, 160, 0.7);
    }
}

/* 未讀訊息徽章 */
.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #EF476F;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: bounce 1s infinite;
}

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

/* 聊天視窗 */
.chat-widget {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 360px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 998;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.chat-widget.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* 聊天視窗標題列 */
.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

.chat-header-text h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-status {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #06D6A0;
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.chat-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 聊天內容區 */
.chat-body {
    padding: 24px;
    max-height: 400px;
    overflow-y: auto;
}

/* 歡迎訊息 */
.chat-message {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message p {
    margin: 0;
    color: #495057;
    line-height: 1.6;
}

.chat-message .wave {
    font-size: 24px;
    display: inline-block;
    animation: wave 1s ease infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-20deg); }
}

/* 快速選項 */
.chat-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.chat-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateX(5px);
}

.chat-option-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.chat-option-icon.line {
    background: #06C755;
    color: white;
}

.chat-option-icon.whatsapp {
    background: #25D366;
    color: white;
}

.chat-option-icon.form {
    background: #667eea;
    color: white;
}

.chat-option-content {
    flex: 1;
}

.chat-option-title {
    font-weight: 600;
    color: #212529;
    margin: 0 0 4px 0;
    font-size: 15px;
}

.chat-option-desc {
    color: #6c757d;
    font-size: 13px;
    margin: 0;
}

.chat-option-badge {
    background: #06D6A0;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

/* 底部提示 */
.chat-footer {
    padding: 16px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.chat-footer-text {
    color: #6c757d;
    font-size: 12px;
    margin: 0;
}

.chat-footer-text i {
    color: #06D6A0;
}

/* 回到頂部按鈕樣式 */
.back-to-top {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    z-index: 998;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .chat-button {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        font-size: 22px;
    }
    
    .chat-widget {
        bottom: 90px;
        right: 20px;
        width: calc(100vw - 40px);
    }
    
    .chat-body {
        max-height: 300px;
    }
    
    /* 手機版回到頂部按鈕調整位置 */
    .back-to-top {
        bottom: 90px;
        right: 20px;
        width: 46px;
        height: 46px;
    }
}

/* 列印樣式 */
@media print {
    .navbar,
    .sidebar,
    .cta-section,
    .share-buttons,
    .pagination,
    .chat-button,
    .chat-widget {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0 !important;
    }
    
    .article-body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .article-body h1,
    .article-body h2,
    .article-body h3 {
        page-break-after: avoid;
    }
    
    .article-body p {
        orphans: 3;
        widows: 3;
    }
}
