/**
 * 非常GO平台 - 主要樣式表
 * 包含網站全局樣式、響應式設計和UI元素
 */

/* 全站共用樣式 */

:root {
  /* 主色系 */
  --primary-color: #2C3E50;
  --secondary-color: #ECF0F1;
  --accent-color: #F1C40F;
  --dark-accent: #E67E22;
  
  /* 文字顏色 */
  --text-dark: #2C3E50;
  --text-light: #ECF0F1;
  --text-muted: #95A5A6;
  
  /* 背景顏色 */
  --bg-light: #FFFFFF;
  --bg-gray: #F8F9FA;
  --bg-dark: #2C3E50;
  
  /* 邊框和陰影 */
  --border-color: #E9ECEF;
  --shadow-sm: 0 .125rem .25rem rgba(0, 0, 0, .075);
  --shadow-md: 0 .5rem 1rem rgba(0, 0, 0, .15);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, .175);
  
  /* 間距 */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 3rem;
  
  /* 圓角 */
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 1rem;
  --border-radius-pill: 50rem;
  
  /* 過渡效果 */
  --transition-fast: 0.2s;
  --transition-normal: 0.3s;
  --transition-slow: 0.5s;
  
  /* 原有變數保留 */
  --primary: #0d6efd;
  --secondary: #6c757d;
  --success: #198754;
  --info: #0dcaf0;
  --warning: #ffc107;
  --danger: #dc3545;
  --light: #f8f9fa;
  --dark: #212529;
}

body {
    font-family: "Microsoft JhengHei", "PingFang TC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding-top: 76px;
    padding-bottom: 60px;
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

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

.navbar-brand img {
    transition: transform 0.3s ease;
}

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

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* 搜尋框樣式 */
.search-form .form-control {
    border-radius: 50rem 0 0 50rem;
    padding-left: 1rem;
}

.search-form .btn {
    border-radius: 0 50rem 50rem 0;
    padding: 0.375rem 1rem;
}

/* 頁面標題樣式 */
.page-title {
    margin: 2rem 0;
    padding: 2rem 0;
    background: linear-gradient(45deg, var(--primary), #0056b3);
    color: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.page-title h1 {
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.page-title p {
    margin-bottom: 0;
    opacity: 0.9;
}

/* 按鈕樣式 */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), #0056b3);
    border: none;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

/* 表單樣式 */
.form-control {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 卡片樣式 */
.card {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

/* 頁尾樣式 */
.footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    margin-top: 4rem;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary);
}

.footer-links a {
    color: var(--dark);
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.footer-contact i {
    margin-top: 0.25rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
}

.bottom-footer {
    background-color: #fff;
    border-top: 1px solid #dee2e6;
}

.bottom-footer a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.bottom-footer a:hover {
    color: var(--primary);
}

/* 響應式設計 */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: white;
        padding: 1rem;
        border-radius: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        margin-top: 1rem;
    }

    .search-form {
        margin: 1rem 0;
    }
}

/* 手機版底部導航 */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.mobile-nav .nav-item {
    color: var(--dark);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.mobile-nav .nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.mobile-nav .nav-item span {
    font-size: 0.75rem;
}

.mobile-nav .nav-item.active {
    color: var(--primary);
}

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

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* 載入指示器 */
.loading {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

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

/* 返回頂部按鈕 */
#back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    display: none;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    z-index: 1000;
    cursor: pointer;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    transition: all 0.3s ease;
}

#back-to-top:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
}

@media (min-width: 992px) {
    #back-to-top {
        bottom: 20px;
    }
}

/* 工具類 */
.text-truncate-2 {
    display: -webkit-box;
    display: -moz-box;
    display: box;
    -webkit-line-clamp: 2;
    -moz-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3em; /* 作為備用，當 line-clamp 不支援時 */
}

/* 頁尾增強樣式 */
.footer-enhanced::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    height: 1px; 
    background: linear-gradient(90deg, transparent, #F1C40F, transparent); 
} 

.footer-title { 
    color: #F1C40F; 
    font-weight: 600; 
    font-size: 1.2rem; 
    margin-bottom: 1.5rem; 
    position: relative; 
    padding-bottom: 10px; 
} 

.footer-title::after { 
    content: ''; 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 30px; 
    height: 2px; 
    background: linear-gradient(90deg, #F1C40F, #E67E22); 
    border-radius: 1px; 
} 

.footer-description { 
    color: #BDC3C7; 
    line-height: 1.6; 
    margin-bottom: 1.5rem; 
} 

.footer-links { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
} 

.footer-contact { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
} 

.footer-link { 
    color: #BDC3C7; 
    text-decoration: none; 
    transition: all 0.3s ease; 
    display: inline-flex; 
    align-items: center; 
    padding: 5px 0; 
    position: relative; 
} 

.footer-link:hover { 
    color: #F1C40F; 
    transform: translateX(5px); 
    text-decoration: none; 
} 

.footer-link i { 
    transition: all 0.3s ease; 
} 

.footer-link:hover i { 
    color: #E67E22; 
} 

.footer-text { 
    color: #BDC3C7; 
} 

.contact-icon { 
    color: #F1C40F; 
    width: 20px; 
    margin-right: 10px; 
    text-align: center; 
} 

.social-links { 
    display: flex; 
    gap: 15px; 
    margin-top: 20px; 
} 

.social-link { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    width: 45px; 
    height: 45px; 
    border-radius: 50%; 
    text-decoration: none; 
    transition: all 0.3s ease; 
    position: relative; 
    overflow: hidden; 
} 

.social-link::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    border-radius: 50%; 
    transition: all 0.3s ease; 
    z-index: 1; 
} 

.social-link i { 
    position: relative; 
    z-index: 2; 
    font-size: 18px; 
    transition: all 0.3s ease; 
} 

.social-link.facebook { 
    background: rgba(59, 89, 152, 0.1); 
    border: 2px solid rgba(59, 89, 152, 0.3); 
    color: #3B5998; 
} 

.social-link.facebook:hover { 
    background: #3B5998; 
    color: white; 
    transform: translateY(-3px); 
    box-shadow: 0 5px 15px rgba(59, 89, 152, 0.4); 
} 

.social-link.twitter { 
    background: rgba(29, 161, 242, 0.1); 
    border: 2px solid rgba(29, 161, 242, 0.3); 
    color: #1DA1F2; 
} 

.social-link.twitter:hover { 
    background: #1DA1F2; 
    color: white; 
    transform: translateY(-3px); 
    box-shadow: 0 5px 15px rgba(29, 161, 242, 0.4); 
} 

.social-link.instagram { 
    background: rgba(225, 48, 108, 0.1); 
    border: 2px solid rgba(225, 48, 108, 0.3); 
    color: #E1306C; 
} 

.social-link.instagram:hover { 
    background: linear-gradient(45deg, #E1306C, #FD1D1D, #F77737); 
    color: white; 
    transform: translateY(-3px); 
    box-shadow: 0 5px 15px rgba(225, 48, 108, 0.4); 
} 

.social-link.youtube { 
    background: rgba(255, 0, 0, 0.1); 
    border: 2px solid rgba(255, 0, 0, 0.3); 
    color: #FF0000; 
} 

.social-link.youtube:hover { 
    background: #FF0000; 
    color: white; 
    transform: translateY(-3px); 
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.4); 
} 

.btn-contact { 
    display: inline-block; 
    padding: 12px 25px; 
    background: linear-gradient(45deg, #F1C40F, #E67E22); 
    color: #2C3E50; 
    text-decoration: none; 
    border-radius: 25px; 
    font-weight: 600; 
    transition: all 0.3s ease; 
    border: none; 
    font-size: 0.9rem; 
} 

.btn-contact:hover { 
    background: linear-gradient(45deg, #E67E22, #F1C40F); 
    color: #2C3E50; 
    transform: translateY(-2px); 
    box-shadow: 0 5px 15px rgba(241, 196, 15, 0.3); 
    text-decoration: none; 
} 

/* 移動設備底部導航樣式 */ 
.mobile-nav { 
    display: none; 
} 

@media (max-width: 768px) { 
    .footer-enhanced { 
        padding: 30px 0 20px; 
    } 
    
    /* 手機端摺疊式設計 */ 
    .footer-section { 
        margin-bottom: 25px; 
        border-bottom: 1px solid rgba(241, 196, 15, 0.2); 
        padding-bottom: 20px; 
    } 
    
    .footer-section:last-child { 
        border-bottom: none; 
        margin-bottom: 0; 
    } 
    
    .footer-title { 
        font-size: 1.1rem; 
        margin-bottom: 15px; 
        cursor: pointer; 
        position: relative; 
        padding-right: 30px; 
    } 
    
    .footer-title::before { 
        content: '\f107'; 
        font-family: 'Font Awesome 5 Free'; 
        font-weight: 900; 
        position: absolute; 
        right: 0; 
        top: 50%; 
        transform: translateY(-50%); 
        transition: transform 0.3s ease; 
        color: #F1C40F; 
    } 
    
    .footer-title.collapsed::before { 
        transform: translateY(-50%) rotate(-90deg); 
    } 
    
    .footer-content { 
        max-height: 0; 
        overflow: hidden; 
        transition: max-height 0.3s ease; 
    } 
    
    .footer-content.show { 
        max-height: 300px; 
    } 
    
    /* 關於我們區塊 - 預設展開 */ 
    .about-section .footer-content { 
        max-height: none; 
    } 
    
    .footer-description { 
        font-size: 0.9rem; 
        line-height: 1.5; 
        margin-bottom: 15px; 
    } 
    
    .social-links { 
        justify-content: flex-start; 
        gap: 12px; 
    } 
    
    .social-link { 
        width: 40px; 
        height: 40px; 
    } 
    
    .social-link i { 
        font-size: 16px; 
    } 
    
    /* 連結列表優化 */ 
    .footer-links li { 
        margin-bottom: 8px; 
    } 
    
    .footer-link { 
        font-size: 0.9rem; 
        padding: 8px 0; 
    } 
    
    .footer-link i { 
        width: 18px; 
        font-size: 14px; 
    } 
    
    /* 聯絡資訊優化 */ 
    .footer-contact li { 
        margin-bottom: 12px; 
        display: flex; 
        align-items: flex-start; 
    } 
    
    .contact-icon { 
        width: 18px; 
        font-size: 14px; 
        margin-right: 12px; 
        margin-top: 2px; 
        flex-shrink: 0; 
    } 
    
    .btn-contact { 
        padding: 10px 20px; 
        font-size: 0.85rem; 
        width: 100%; 
        text-align: center; 
        margin-top: 10px; 
    } 
    
    /* 版權區域 */ 
    .copyright-section { 
        text-align: center; 
        padding-top: 20px; 
        border-top: 1px solid rgba(241, 196, 15, 0.2); 
    } 
    
    .copyright-section .row > div { 
        text-align: center !important; 
        margin-bottom: 10px; 
    } 
    
    .copyright-section .list-inline { 
        justify-content: center; 
    } 
    
    .copyright-section .list-inline-item { 
        margin: 0 8px; 
    } 
    
    .copyright-section a { 
        font-size: 0.85rem; 
    } 
    
    /* 首頁內容區塊手機端優化 */ 
    .main-content .row { 
        margin: 0; 
    } 
    
    .main-content .col-lg-8, .main-content .col-lg-4 { 
        padding: 0 10px; 
    } 
    
    .card { 
        margin-bottom: 15px !important; 
    } 
    
    .card-body { 
        padding: 10px !important; 
    } 
    
    .card-header { 
        padding: 8px 15px !important; 
    } 
    
    .list-group-item { 
        padding: 8px 15px !important; 
    } 
    
    .news-item h3, .business-item h3 { 
        font-size: 14px !important; 
        line-height: 1.3 !important; 
    } 
    
    .news-summary { 
        font-size: 12px !important; 
        line-height: 1.4 !important; 
    } 
    
    .mobile-nav { 
        display: flex; 
        position: fixed; 
        bottom: 0; 
        left: 0; 
        right: 0; 
        background: linear-gradient(135deg, #2C3E50, #34495E); 
        z-index: 1000; 
        box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.2); 
        border-top: 1px solid rgba(241, 196, 15, 0.3); 
    } 
    
    .mobile-nav a { 
        flex: 1; 
        text-align: center; 
        padding: 10px 5px; 
        color: #ECF0F1; 
        text-decoration: none;
        font-size: 0.7rem;
    }
    
    .mobile-nav a i {
        display: block;
        font-size: 1.2rem;
        margin-bottom: 3px;
        color: #F1C40F;
    }
    
    .mobile-nav a:hover, .mobile-nav a.active {
        background: rgba(241, 196, 15, 0.1);
    }
}

.text-truncate-3 {
    display: -webkit-box;
    display: -moz-box;
    display: box;
    -webkit-line-clamp: 3;
    -moz-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 4.5em; /* 作為備用，當 line-clamp 不支援時 */
}

.hover-scale {
    transition: transform 0.3s ease;
}

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

/* 警告訊息 */
.alert {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.alert-primary {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary);
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--success);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

/* 評分星星 */
.rating-stars {
    color: #ffc107;
    font-size: 1.25rem;
}

.rating-stars .star {
    cursor: pointer;
    transition: all 0.3s ease;
}

.rating-stars .star:hover,
.rating-stars .star.active {
    transform: scale(1.2);
}

/* 分頁導航 */
.pagination {
    margin: 2rem 0;
}

.pagination .page-link {
    border-radius: 0.5rem;
    margin: 0 0.25rem;
    border: none;
    color: var(--dark);
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
}

/* 標籤樣式 */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 50rem;
    font-weight: 500;
}

.badge-primary {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary);
}

.badge-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--success);
}

.badge-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning);
}

.badge-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}