/**
 * 統一頁腳樣式
 * 適用於所有頁面（法律文件和首頁）
 */

.legal-footer, .home-footer {
    background: linear-gradient(135deg, #8b1a1a, #a52a2a, #dc3545);
    color: white;
    margin-top: auto;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.legal-footer .container, .home-footer .container {
    max-width: 1200px;
}

/* 版權資訊樣式 */
.legal-footer p, .home-footer p {
    margin: 0;
    font-weight: 500;
}

.legal-footer .fa-copyright, .home-footer .fa-copyright {
    opacity: 0.8;
}

/* 頁腳連結樣式 */
.legal-footer .footer-links, .home-footer .footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.legal-footer .footer-links a, .home-footer .footer-links a {
    color: #e8e8e8;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.legal-footer .footer-links a:hover, .home-footer .footer-links a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.legal-footer .footer-links a i, .home-footer .footer-links a i {
    font-size: 0.9em;
    opacity: 0.8;
}

/* 描述文字樣式 */
.legal-footer .text-muted, .home-footer .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
    font-style: italic;
}

/* 首頁專用樣式 */
.home-footer .social-links {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
    margin-top: 10px;
}

.home-footer .social-links a {
    color: #e8e8e8;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 1.2em;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
}

.home-footer .social-links a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .legal-footer .footer-links, .home-footer .footer-links {
        flex-direction: column;
        align-items: center;
    }
    
    .legal-footer .footer-links a, .home-footer .footer-links a {
        margin: 2px 0;
        padding: 8px 12px;
        width: auto;
        text-align: center;
    }
    
    .legal-footer .py-4, .home-footer .py-4 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .home-footer .social-links {
        margin-top: 15px;
    }
}

@media (max-width: 576px) {
    .legal-footer .footer-links a, .home-footer .footer-links a {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
    
    .legal-footer p, .home-footer p {
        font-size: 0.9rem;
    }
    
    .legal-footer .small, .home-footer .small {
        font-size: 0.8rem !important;
    }
    
    .home-footer .social-links a {
        width: 35px;
        height: 35px;
        font-size: 1.1em;
        margin: 0 3px;
    }
}

/* 高對比度支援 */
@media (prefers-contrast: high) {
    .legal-footer, .home-footer {
        background: #000000;
        border-top: 2px solid #ffffff;
    }
    
    .legal-footer .footer-links a, .home-footer .footer-links a {
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .legal-footer .footer-links a:hover, .home-footer .footer-links a:hover {
        border-color: #ffffff;
        background-color: rgba(255, 255, 255, 0.2);
    }
    
    .home-footer .social-links a {
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .home-footer .social-links a:hover {
        border-color: #ffffff;
    }
}

/* 深色模式支援 */
@media (prefers-color-scheme: dark) {
    .legal-footer .text-muted, .home-footer .text-muted {
        color: rgba(255, 255, 255, 0.8) !important;
    }
}

/* 列印樣式 */
@media print {
    .legal-footer, .home-footer {
        background: none !important;
        color: #000000 !important;
        box-shadow: none !important;
        border-top: 1px solid #000000;
    }
    
    .legal-footer .footer-links a, .home-footer .footer-links a {
        color: #000000 !important;
    }
    
    .legal-footer .text-muted, .home-footer .text-muted {
        color: #666666 !important;
    }
    
    .home-footer .social-links {
        display: none;
    }
}