﻿@charset "UTF-8";
@charset "UTF-8";

/*
    footer.css
    楊展有限公司 頁尾樣式
    特色：標題左側黃色色塊、icon背景微亮、文字前黃色小標誌、完整保留hover特效、版權置中
    參考圖片：每個資訊項目前加上黃色小標誌（▹ 符號）
    Update: 
    - 修正手機版底部大片空白問題
    - 增強權重以對抗 head_counter.css 影響
    - 確保版權區塊在所有裝置顯示
*/

/* ===== 頁尾整體容器 - 提高權重 ===== */
footer.footer,
.footer {
    background-color: #1e2b37 !important;        /* 深色背景 */
    color: #cbd5e1 !important;                   /* 主要文字顏色 */
    padding: 2rem 0 1rem 0 !important;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
    line-height: 1.6 !important;
    width: 100% !important;
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
    clear: both !important;
}

/* 容器 - 確保不受外部影響 */
.footer .container,
footer.footer .container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 2rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 每個資訊區塊 */
.footer .footer-info,
footer.footer .footer-info {
    flex: 1 1 240px !important;
    min-width: 240px !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
}

/* ===== 標題左側黃色色塊 ===== */
.footer .footer-info h4,
footer.footer .footer-info h4 {
    color: #ffffff !important;
    font-size: 1.2rem !important;
    margin-bottom: 1rem !important;
    border-left: 4px solid #ffaa00 !important;   /* 黃色色塊 */
    padding-left: 0.75rem !important;
    position: relative !important;
    text-align: left !important;
}

/* ===== 文字前黃色小標誌 ===== */
.footer .footer-info p:not(:has(a)):not(:has(i)),
footer.footer .footer-info p:not(:has(a)):not(:has(i)) {
    position: relative !important;
    padding-left: 1.5rem !important;
}

.footer .footer-info p:not(:has(a)):not(:has(i))::before,
footer.footer .footer-info p:not(:has(a)):not(:has(i))::before {
    content: "▹" !important;
    color: #ffaa00 !important;
    font-size: 1.1rem !important;
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-weight: bold !important;
}

/* 連結項目保留原樣 */
.footer .footer-info p:has(a),
footer.footer .footer-info p:has(a) {
    padding-left: 0 !important;
}

.footer .footer-info p:has(a)::before,
footer.footer .footer-info p:has(a)::before {
    content: none !important;
}

/* 聯絡資訊的icon保持原樣 */
.footer .footer-info p:has(i),
footer.footer .footer-info p:has(i) {
    padding-left: 0 !important;
}

.footer .footer-info p:has(i)::before,
footer.footer .footer-info p:has(i)::before {
    content: none !important;
}

/* ===== icon 背景微亮 ===== */
.footer .footer-info i,
footer.footer .footer-info i {
    color: #ffaa00 !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
    text-align: center !important;
    background-color: rgba(255, 170, 0, 0.12) !important;
    padding: 0.25rem !important;
    border-radius: 50% !important;
    font-size: 0.9rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}

/* icon懸浮效果 */
.footer .footer-info p:hover i,
footer.footer .footer-info p:hover i {
    background-color: rgba(255, 170, 0, 0.25) !important;
    transform: scale(1.05) !important;
}

.footer .footer-info p,
footer.footer .footer-info p {
    margin: 0.5rem 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    font-size: 0.95rem !important;
    position: relative !important;
}

/* ===== 連結樣式 ===== */
.footer .footer-info a,
footer.footer .footer-info a {
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    display: inline-block !important;
    color: #cbd5e1 !important;
}

.footer .footer-info a:hover,
footer.footer .footer-info a:hover {
    color: #ffffff !important;
    transform: translateX(5px) !important;
}

/* 底線動畫 */
.footer .footer-info a::after,
footer.footer .footer-info a::after {
    content: '' !important;
    position: absolute !important;
    width: 0 !important;
    height: 1px !important;
    bottom: -2px !important;
    left: 0 !important;
    background-color: #ffaa00 !important;
    transition: width 0.3s ease !important;
}

.footer .footer-info a:hover::after,
footer.footer .footer-info a:hover::after {
    width: 100% !important;
}

/* ===== 區隔線 ===== */
.footer hr.border-secondary,
footer.footer hr.border-secondary {
    border: 0 !important;
    border-top: 1px solid #3a4a5a !important;
    margin: 1.5rem auto 1rem auto !important;
    width: 90% !important;
    opacity: 0.6 !important;
    display: block !important;
    height: 0 !important;
    background: transparent !important;
}

/* ===== 版權訊息置中 - 重點加強 ===== */
.footer .text-center.text-white-50,
footer.footer .text-center.text-white-50,
footer.footer p.text-center.text-white-50 {
    text-align: center !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.9rem !important;
    margin: 0.5rem 0 0 0 !important;
    padding: 0 15px 0.25rem 15px !important;
    display: block !important;
    width: 100% !important;
    clear: both !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 確保版權區塊在父層置中 */
.footer > .text-center,
.footer hr + .text-center,
footer.footer > .text-center,
footer.footer hr + .text-center {
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 統一編號圖示 */
.footer .footer-info p:contains("統一編號")::before,
footer.footer .footer-info p:contains("統一編號")::before {
    content: "🏷️" !important;
    font-size: 0.9rem !important;
    margin-right: 0.25rem !important;
}

/* ===== 響應式調整 ===== */
@media (max-width: 768px) {
    .footer .container,
    footer.footer .container {
        flex-direction: column !important;
        gap: 1.5rem !important;
        align-items: stretch !important;
    }
    
    .footer .footer-info,
    footer.footer .footer-info {
        text-align: center !important;
        flex: none !important;
        width: 100% !important;
    }
    
    .footer .footer-info p,
    footer.footer .footer-info p {
        justify-content: center !important;
        padding-left: 0 !important;
    }
    
    /* 圖示對齊文字下邊緣 */
    .footer .footer-info p:has(i),
    footer.footer .footer-info p:has(i) {
        display: flex !important;
        align-items: flex-end !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }
    
    .footer .footer-info i,
    footer.footer .footer-info i {
        align-self: flex-end !important;
    }
    
    /* 較長的文字段落 */
    .footer .footer-info p:has(.fa-globe),
    footer.footer .footer-info p:has(.fa-globe) {
        flex-wrap: wrap !important;
        max-width: 280px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .footer .footer-info p:has(.fa-globe) i,
    footer.footer .footer-info p:has(.fa-globe) i {
        align-self: center !important;
    }
    
    /* 隱藏小標誌 */
    .footer .footer-info p:not(:has(a)):not(:has(i))::before,
    footer.footer .footer-info p:not(:has(a)):not(:has(i))::before {
        content: none !important;
    }
    
    .footer .footer-info h4,
    footer.footer .footer-info h4 {
        border-left: none !important;
        border-bottom: 4px solid #ffaa00 !important;
        padding-left: 0 !important;
        padding-bottom: 0.5rem !important;
        display: inline-block !important;
        text-align: center !important;
    }
    
    /* 重點加強：手機版版權區塊 */
    .footer hr.border-secondary,
    footer.footer hr.border-secondary {
        display: block !important;
        margin: 1rem auto !important;
        width: 90% !important;
    }
    
    .footer .text-center.text-white-50,
    footer.footer .text-center.text-white-50,
    footer.footer p.text-center.text-white-50 {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin-top: 0.75rem !important;
        padding: 0 15px 0.25rem 15px !important;
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        text-align: center !important;
        color: rgba(255, 255, 255, 0.7) !important;
        position: relative !important;
        z-index: 10 !important;
    }
}

/* ===== 列印樣式 ===== */
@media print {
    footer.footer,
    .footer {
        background-color: #ffffff !important;
        color: #000000 !important;
    }
    
    .footer .footer-info h4 {
        border-left-color: #cccccc !important;
    }
    
    .footer .footer-info i {
        background-color: transparent !important;
        color: #000000 !important;
    }
    
    .footer .footer-info a {
        color: #000000 !important;
        text-decoration: underline !important;
    }
}