footer {
    position: relative;
    width: 100%;
    background-image: url(../img/footer-bg.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 60px 60px 30px 60px;
    box-sizing: border-box;
    color: #e2b969;
    font-family: "MingLiU", "PMingLiU", "新細明體", "細明體", serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 30px;
}

/* 左側：聯絡資訊 */
.footer-contact {
    flex: 0 0 auto;
    min-width: 280px;
}

.footer-logo {
    font-size: 2rem;
    font-weight: bold;
    color: #e2b969;
    margin-bottom: 30px;
    line-height: 1.5;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 0.8;
}

.footer-logo .logo-small {
    width: auto;
    height: 1.2em;
    vertical-align: middle;
    object-fit: contain;
}

.footer-logo span {
    display: inline-block;
}

.footer-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 10px;
}

.footer-info-item img,
.footer-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    display: inline-block;
    font-size: 18px;
    line-height: 20px;
    text-align: center;
}

.footer-info-item-text {
    flex: 1;
    font-size: 1rem;
    line-height: 1.6;
    color: #e2b969;
}

.footer-phone {
    font-size: 1.3rem;
    font-weight: bold;
}

/* 中間：導航連結 */
.footer-nav {
    flex: 1;
    display: flex;
    justify-content: space-around;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-nav-column {
    flex: 1;
    min-width: 140px;
}

.footer-nav-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #e2b969;
    margin-bottom: 15px;
    letter-spacing: 0.1em;
}

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

.footer-nav-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-nav-list li::before {
    content: '•';
    color: #e2b969;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.footer-nav-list a {
    color: #e2b969;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.5;
    transition: opacity 0.3s ease;
}

.footer-nav-list a:hover {
    opacity: 0.8;
}

/* 右側：TOP 按鈕和版權 */
.footer-right {
    position: fixed;
    bottom: 20px;
    right: 20px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.footer-right.show {
    opacity: 1;
    visibility: visible;
}

.footer-top-button {
    cursor: pointer;
    transition: transform 0.3s ease;
    display: inline-block;
}

.footer-top-button:hover {
    transform: translateY(-5px);
}

.footer-top-button img {
    width: auto;
    height: auto;
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
    display: block;
}

/* 分隔線 */
.footer-separator {
    width: 100%;
    height: 1px;
    background-color: #e2b969;
    margin: 30px 0 20px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 版權資訊 */
.footer-copyright {
    text-align: right;
    font-size: 1rem;
    color: #e2b969;
    padding-right: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 響應式設計 */
@media (max-width: 1024px) {
    footer {
        padding: 50px 40px 25px 40px;
    }

    .footer-container {
        flex-wrap: wrap;
        gap: 30px;
    }

    .footer-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
    }

    .footer-right {
        order: 2;
    }
}

@media (max-width: 768px) {
    footer {
        padding: 40px 30px 20px 30px;
    }

    .footer-container {
        flex-direction: column;
        gap: 30px;
    }

    .footer-contact {
        width: 100%;
    }

    .footer-nav {
        width: 100%;
        justify-content: space-between;
    }

    .footer-nav-column {
        min-width: 120px;
    }

    .footer-right {
        width: 100%;
        align-items: flex-end;
    }

    .footer-copyright {
        text-align: center;
        padding-right: 0;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 30px 20px 15px 20px;
    }

    .footer-logo {
        font-size: 1.6rem;
    }

    .footer-nav {
        flex-direction: column;
        gap: 25px;
    }

    .footer-nav-column {
        width: 100%;
    }

    .footer-top-button img {
        max-width: 80px;
        max-height: 80px;
    }
}