/**
 * 台中和潤優質當舖 - 頁尾樣式
 */

.footer {
    color: #333;
    padding: 40px 0;
    margin-top: 60px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/footer_bg1920.png');
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: -1;
}

/* 为非首页的footer添加点点背景 */
body.inner-page .footer::after {
    content: '';
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(#efefef 1px, transparent 1px);
    background-size: 30px 30px;
    background-attachment: fixed;
    z-index: -2;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    position: relative;
}

.footer-info {
    flex: 0 0 50%;
    padding-right: 30px;
}

.footer-links {
    flex: 0 0 20%;
    padding: 20px 15px;
}

.footer-social {
    flex: 0 0 30%;
    padding-left: 15px;
}

/* 頁尾資訊區塊 */
.footer-top {
    display: flex;
    align-items: flex-end;
    margin-bottom: 2px;
    padding-bottom: 0;
}

.footer-logo {
    max-width: 200px;
    margin-right: 20px;
}

.footer-logo img {
    width: 100%;
    height: auto;
}

.footer-slogan {
    font-size: 1rem;
    font-weight: bold;
    color: #d19238;
    padding-bottom: 5px;
}

.footer-middle {
    display: flex;
    margin-bottom: 2px;
    padding-bottom: 0;
}

.footer-qrcode {
    width: 85px;
    margin-right: 10px;
    flex-shrink: 0;
}

.footer-qrcode img {
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
}

.footer-contact {
    flex: 1;
}

.footer-contact-row {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 5px;
}

.footer-contact-row .footer-contact-item {
    margin-right: 30px;
    flex: 0 0 auto;
    margin-bottom: 0;
}

.footer-contact-row .footer-contact-item:last-child {
    margin-right: 0;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 5px;
}

.footer-contact-item:last-child {
    margin-bottom: 0;
}

.footer-contact-item i {
    margin-right: 10px;
    color: #F5A623;
    font-size: 1rem;
    margin-top: 4px;
    width: 16px;
    text-align: center;
}

.footer-contact-text {
    line-height: 1.6;
    font-size: 1.0rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding-left: 0;
}

.visitor-number {
    width: 16px;
    height: 24px;
    margin: 0 1px;
}

.footer-contact-item a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.footer-contact-item a:hover {
    color: #F5A623;
}

.footer-bottom {
    font-size: 0.85rem;
    color: #000;
    line-height: 1.5;
    font-weight: 500;
    margin-bottom: 2px;
}

.footer-security {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.security-icon {
    color: #28a745;
    font-size: 1.2rem;
    margin-right: 8px;
}

.footer-copyright-info {
    margin-bottom: 0;
}

.footer-copyright-info a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-copyright-info a:hover {
    text-decoration: underline;
}

.footer-notes {
    font-size: 0.8rem;
    color: #000;
    white-space: pre-line;
    margin-bottom: 0;
}

.footer-remarks {
    font-size: 0.8rem;
    color: #000;
    white-space: pre-line;
    line-height: 1.4;
    margin-top: 2px;
}

.footer-remarks-title {
    color: #d19238;
    font-weight: 500;
    display: block;
    margin-bottom: 0;
}

/* 頁尾連結區塊 */
.footer-links h3 {
    color: #F5A623;
    margin-bottom: 5px;
    font-size: 1rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 0;
    background-color: transparent;
}

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

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    position: relative;
    padding-left: 0;
}

.footer-links ul li a::before {
    display: none;
}

.footer-links ul li a:hover {
    color: #F5A623;
}

/* 頁尾社群區塊 */
.footer-social h3 {
    display: none;
}

.fb-page-container {
    width: 100%;
    overflow: visible;
    background-color: #fff;
    border-radius: 5px;
    border: 1px solid #ddd;
    min-height: 350px;
    position: relative;
}

.fb-page-container iframe {
    width: 100% !important;
    max-height: 350px;
}

/* 響應式設計 */
@media (max-width: 992px) {
    .footer-container {
        flex-direction: column;
    }
    
    .footer-info, .footer-links, .footer-social {
        width: 100%;
        flex: 0 0 100%;
        padding: 0;
        margin-bottom: 30px;
    }
    
    .footer-middle {
        flex-direction: column;
    }
    
    .footer-qrcode {
        margin: 0 auto 20px;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 30px 0;
    }
    
    .footer::before {
        background-image: url('../images/footer_bg768.png');
    }
    
    /* 确保移动设备上点点背景也能正常显示 */
    body.inner-page .footer::after {
        top: -30px;
    }
    
    .footer-top {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-logo {
        margin: 0 auto 15px;
    }
    
    .footer-contact-row {
        flex-direction: column;
    }
    
    .footer-contact-row .footer-contact-item {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .footer-contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-contact-item i {
        margin: 0 0 5px 0;
    }
    
    .footer-bottom {
        text-align: center;
        width: 90%;
        margin: 0 auto;
        font-size: 0.8rem;
    }
    
    .footer-remarks {
        text-align: left;
        width: 90%;
        margin: 2px auto 0;
        font-size: 0.75rem;
    }
    
    .footer-remarks-title {
        text-align: left;
    }
    
    .footer-links {
        text-align: center;
        padding: 0 10px;
        margin-bottom: 20px;
        width: 100%;
    }
    
    .footer-links h3 {
        margin-bottom: 10px;
        padding-bottom: 5px;
    }
    
    .footer-links ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 5px;
        padding: 0 5px;
    }
    
    .footer-links ul li {
        margin: 0;
    }
    
    .footer-links ul li a {
        padding: 10px 5px;
        background-color: #fff9e6;
        border: 1px solid #ffe177;
        border-radius: 15px;
        font-size: 0.9rem;
        transition: all 0.3s ease;
        display: block;
        width: 100%;
        text-align: center;
    }
    
    .footer-links ul li a:hover {
        background-color: #ffe177;
        color: #333;
    }
    
    .footer-links ul li a::before {
        display: none;
    }
    
    .footer-social {
        padding: 0 10px;
        display: flex;
        justify-content: center;
    }
    
    .fb-page-container {
        width: 83%;
        overflow: hidden;
        min-height: 300px;
        margin: 0 auto;
    }
    
    .fb-page-container iframe {
        width: 100% !important;
    }
    
    .footer-slogan {
        text-align: center;
        width: 100%;
        margin: 0 auto;
    }
}

/* TOP按鈕 */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 10px;
    width: 40px;
    height: 40px;
    z-index: 9999;
    cursor: pointer;
    transition: opacity 0.3s, visibility 0.3s;
    opacity: 0.8;
    display: none; /* 初始隱藏 */
}

.back-to-top:hover {
    opacity: 1;
}

.back-to-top img {
    width: 100%;
    height: auto;
    display: block;
}

/* 手機版底部固定按鈕 */
.mobile-fixed-buttons {
    display: none;
}

@media (max-width: 768px) {
    .mobile-fixed-buttons {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }
    
    .mobile-fixed-button {
        flex: 1;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: 10px 5px;
        text-decoration: none;
        color: #fff;
        font-size: 0.8rem;
        text-align: center;
    }
    
    .mobile-fixed-button.line {
        background-color: #5bb512;
    }
    
    .mobile-fixed-button.tel {
        background-color: #f4a100;
    }
    
    .mobile-fixed-button.map {
        background-color: #089fd8;
    }
    
    .mobile-fixed-button img {
        width: 24px;
        height: 24px;
        margin-right: 5px;
        margin-bottom: 0;
    }
    
    .footer {
        padding-bottom: 70px; /* 為底部固定按鈕預留空間 */
    }
    
    .back-to-top {
        bottom: 80px; /* 調整TOP按鈕位置，避免被底部按鈕遮擋 */
    }
} 